Loop shaping modifies L = KG on the Bode plot. In series, controller elements add their dB and degrees to the plant. Pick an element and watch where it acts.
G(s) = s + 10s (s + 1) K(s) = k · 1(1 + 0.01s)² · 1 + s/ωz1 + s/ωp
Specs: ramp error ≤ 0.02, slope −60 dB/dec above 100 rad/s, PM ≥ 70°, GM ≥ 20 dB. Build the controller step by step and watch the margins.
Rule of thumb: put the lead zero a little below the crossover (it lifts the phase there) and the pole above it (it limits the high-frequency gain, which protects the gain margin and keeps noise down).
G(s) = 1s (1 + s/10)(1 + s/200) k = 100 for eramp = 1/k ≤ 0.01
The lead adds phase at ωc but also gain, so k₁ < 1 restores the crossover and the ramp error grows. The lag puts the low-frequency gain back without touching the phase at ωc, if its corner is far below ωc.
G(s) = abs + 1 T(s) = 1Tfs + 1 Q = G−1T K = Q1 − ĜQ
With a perfect model, T = GQ and S = 1 − GQ are affine in Q: pick the closed loop you want, then read off K. For this plant K is exactly a PI controller with k = b/(aTf) and TI = b.
T = 1 is not achievable: a causal controller cannot make the closed loop faster than order 0 for a first-order plant. For a second-order plant the same recipe with T = 1/(Tfs+1)² gives a PID with a first-order filter 1/(Tfs/2 + 1).