Read the margin
A gain K = 4 drives a plant 1/(s(s+2)), and the output is fed back and compared with the input. We will apply a step of 1. How far past 1 will the output swing? We answer from the open-loop Bode plot, before running anything.
On the magnitude plot, follow |L| down to 0 dB, where the loop gain is exactly 1. That frequency is the gain crossover ωc. For K = 4 it is 1.57 rad/s.
Go straight down to the phase plot at ωc. The phase there is −128.2°. The phase margin is how far that sits above −180°: 180 − 128.2 = 51.8°. The lesson on gain margin and phase margin defined it.
Margin to overshoot
Closing this loop gives K/(s² + 2s + K), a standard second-order system. For it, the phase margin depends on the damping ratio ζ alone. Solving the formula backwards, 51.8° gives ζ = 0.50.
The damping ratio fixes the overshoot of a second-order step: %OS = 100·e^(−ζπ/√(1−ζ²)). With ζ = 0.50 that is 16.3%. So the prediction: the output peaks at about 1.163.
Now apply the step. The output rises, swings past 1 and peaks at 1.163 after 1.81 s, exactly the 16.3% we predicted, then settles at 1. The open-loop plot told us this in advance.
Turn the gain
Raise K to 25. The magnitude curve lifts by 16 dB, so it crosses 0 dB later, at 4.80 rad/s. The phase curve does not move, but there it is −157.4°, so the margin falls to 22.6°.
22.6° means ζ = 0.20 and 52.7% overshoot: the output rings up to 1.527. The gain margin is still infinite, because the phase never reaches −180°. Only the phase margin warned us.
Lower K to 2. The crossover drops to 0.91 rad/s, where the phase is only −114.5°, so the margin grows to 65.5°. That means ζ = 0.71 and just 4.3% overshoot, but a slower rise.
Design with it
For quick work, engineers use ζ ≈ PM/100. Our three gains: 22.6° gives 0.20 (rule 0.23), 51.8° gives 0.50 (0.52), 65.5° gives 0.71 (0.66). It holds up to about 60° to 70°.
Now run the chain the other way. We want at most 10% overshoot, so ζ ≥ 0.591, so the phase margin must be at least 58.6°. Slide K until the Bode plot shows that margin: K = 2.86. The step peaks at 1.100.
The formula is exact only when the closed loop is a pure two-pole system, as here. For other loops treat it as an estimate: it works when two poles dominate, and extra poles, zeros or time delay shift the real overshoot.
What is happening
# step 1/12 · loop # about: Step input, Compare, Gain dial, Plant, Output open loop L(s) = K / (s (s + 2)), K = 4 closed loop T(s) = L / (1 + L) input r = unit step (0 → 1 at t = 0) question: the peak of y(t), read from the plot of L(jω) alone
The plant 1/(s(s+2)) is an illustrative motor-like model (an integrator and one pole at 2 rad/s). Every curve and number in the figure is computed from it: the Bode curves from L(jω), the step curves from the exact second-order step response. The Python on each step is plain Python 3 (math and cmath). python-control's margin(L) returns the same phase margin and crossover frequency.