The loop
A step goes in. The loop compares it with the output, multiplies the error by a gain K, and drives G(s) = 1/(s(s + 2)). With K = 2 the output rises, overshoots by 4.3%, and settles at 1.
The closed loop's poles are the roots of s² + 2s + K = 0, which is 1 + K·G(s) = 0. They are not G's poles. K sits inside the equation, so turning K moves the poles.
Turn up the gain
Turn the knob to zero. Now s² + 2s = 0, so the poles are 0 and −2: exactly the open-loop poles of G, marked ×. With no gain, nothing pushes the plant and the output stays at 0.
Raise K to 0.75. The poles slide along the real axis toward each other: −0.5 and −1.5. Both are real, so there is no swing. The slow pole at −0.5 makes the output creep: about 8.6 s to settle.
At K = 1 the two poles meet at −1. This is the fastest response with no overshoot at all (critical damping): settled in 5.83 s. Any more gain and they cannot stay on the axis.
Past K = 1 the poles leave the axis: −1 ± j√(K − 1). At K = 5 they are −1 ± 2j. The real part stays −1, so settling stays near 4 s, but the swing grows: 20.8% overshoot.
The locus
Sweep K from 0 upward and trace every place the poles visit. That drawing is the root locus: it starts at G's poles, the branches meet at −1, then run up and down for ever. They never cross into the right half.
Want 16.3% overshoot? That needs ζ = 0.5: a ray 60° from the negative real axis. It cuts the locus at −1 ± j√3. The gain there is K = |s|·|s + 2| = 2 · 2 = 4.
Compute it
A root locus is just roots, solved again for each K. A few lines of Python with complex square roots list the poles at each gain, and read the gain back off a chosen point.
The working
# step 1/9 · loop
# about: Input: unit step, Compare: input − output, Gain K, Plant G(s), Output y(t), Feedback path, step response
G(s) = 1 / (s(s + 2)) gain K in front, output fed back
closed loop T(s) = K·G / (1 + K·G)
= K / (s² + 2s + K)
K = 2: T(s) = 2 / (s² + 2s + 2)
peak 1.043 at t = 3.14 s (overshoot 4.3 %)
final value 2/2 = 1
Every curve is the exact step response of T(s) = K / (s² + 2s + K), computed from its poles every frame. Overshoot and peak time are exact for this two-pole, no-zero loop; settling times are measured on the curve to a 2% band. This loop is stable for every positive K because its two branches stay on σ = −1. Add a third pole and the branches bend into the right half at some gain: the Routh test from the stability module finds that limit, and the root locus shows where it happens. The Python uses only the standard library. With python-control installed, ct.root_locus_map(ct.tf([1], [1, 2, 0]), gains=[0, 0.75, 1, 2, 5]) gives the same closed-loop poles in the .loci array of the result. Python prints a signed zero such as -0j for a real root; it is still just 0.