Frequency Response and Bode Plots
Gain and phase against frequency, bandwidth, gain and phase margins and loop shaping.
What frequency response tells you
Feed a sine of frequency ω into a stable linear system and, after the transient, the output is a sine of the same frequency with a different amplitude and a phase shift. The ratio of the amplitudes is the gain |G(jω)| and the shift is the phase ∠G(jω). Plotting them against frequency gives the frequency response, which shows at a glance how fast a system can follow, what it does to noise and, most importantly for control, how close a feedback loop is to oscillating. You can measure it on a real machine with a swept sine, without knowing the equations.
Reading a Bode plot
A Bode plot has two panels with a logarithmic frequency axis: the gain in decibels (dB = 20 log₁₀ of the ratio) and the phase in degrees. Because the axes are logarithmic, transfer functions multiply by adding their curves, so a plot can be sketched from its parts: each pole adds a −20 dB per decade slope (and a phase of up to −90°) beyond its corner frequency, each zero adds +20 dB per decade (and up to +90°), an integrator is a −20 dB/decade line with a constant −90°, and a delay has no gain effect but an ever-increasing phase lag −ω θ.
First-order and second-order examples
Worked example: the oven and the servo on their own
- Oven G = 2 ÷ (120 s + 1): the DC gain is 20 log₁₀ 2 = 6.0 dB. The corner is at ω = 1 ÷ τ = 0.0083 rad/s, where the gain has dropped 3 dB to 3.0 dB and the phase is -45°. Beyond it the gain falls 20 dB per decade; the phase tends to −90° (plus the −ω θ of the delay).
- Servo (ωn = 10, ζ = 0.5): a resonant peak of Mr = 1 ÷ (2 ζ √(1 − ζ²)) = 1.155 (1.25 dB) at ωr = ωn √(1 − 2 ζ²) = 7.07 rad/s; the closed-loop bandwidth (−3 dB) is 12.7 rad/s. Lower damping makes a sharper peak: ζ = 0.2 gives Mr = 2.55.
- The peak in the frequency response matches the overshoot in the step response: both measure the lack of damping.
The loop transfer function and margins
Break the loop at the sensor and multiply everything round it: the loop transfer function L(s) = C(s) G(s). The closed loop oscillates if L reaches the value −1 (gain 1, phase −180°) at some frequency, because the feedback then reinforces itself instead of opposing. The margins measure how far the loop is from this point:
- Phase margin (PM) = 180° + ∠L at the frequency ωgc where |L| = 1 (the gain crossover): how much more phase lag the loop could stand. Aim for 45° to 60°.
- Gain margin (GM) = 1 ÷ |L| at the frequency ωpc where ∠L = −180° (the phase crossover): by how much the gain could rise. Aim for 2 (6 dB) or more.
- Delay margin = PM (in radians) ÷ ωgc: the extra dead time the loop tolerates.
- Peak sensitivity Ms = max |1 ÷ (1 + L)|: below 1.5 to 2 for a robust loop.
A useful correspondence: the phase margin in degrees is roughly 100 times the damping ratio of the closed loop (so a PM of 60° gives ζ ≈ 0.6). For the lambda tuning, PM = 61° would suggest ζ ≈ 0.61 and an overshoot of about 9 percent (the simulation gives 5 percent).
Worked example: the oven loop
Worked example: margins of the three oven tunings
| Tuning | Gain crossover ωgc | Phase margin | Gain margin | Delay margin |
|---|---|---|---|---|
| Lambda PI (λ = dead time) | 0.0333 rad/s | 61° | 3.14 (9.9 dB) | 32 s |
| Ziegler–Nichols PI | 0.0625 rad/s | 26° | 1.59 (4.0 dB) | 7 s |
| Ziegler–Nichols PID | 0.0811 rad/s | 37° | 1.42 (3.1 dB) | 8 s |
- Lambda PI (Ti = τ cancels the oven’s lag): L(s) = Kp K e−θ s ÷ (τ s), an integrator with a delay, so |L| = 1 at ωgc = Kp K ÷ τ = 0.0333 rad/s (the numerical value 0.0333) and the phase is −90° − ωgc θ, so PM = 90° − 28.6° = 61.4°.
- Ziegler–Nichols PI crosses at 0.063 rad/s, nearly twice as high, where the delay and lag have used up more phase: PM 26°, a gain margin of only 1.59: a 59 percent increase in gain (the process gain changing with temperature, for instance) would take it to the edge.
- Extra delay: if the lambda loop gains 10 s of additional delay (a slower sensor, a longer sample time), the phase margin falls by ωgc × 10 s = 19° to 42°: still stable. The delay margin is 32 s.
Bandwidth and the speed of the loop
The loop cannot be faster than its phase allows. As a rule the gain crossover must lie below about 1 ÷ (2 θ) = 0.033 rad/s for a process with dead time θ (the oven’s limit of about 0.033 rad/s is exactly where the lambda tuning, with λ = θ, put it). Setting the crossover lower makes the loop slower but more robust; higher makes it faster up to the limit and then unstable. For the closed loop, the −3 dB bandwidth is about the gain crossover frequency, and the response time is about 1 ÷ ωgc = 30 s here (matching the 46 s rise time of the simulation).
Loop shaping
Loop shaping designs the controller by shaping L(jω): high gain at low frequency (for accuracy and disturbance rejection, which the integrator provides), a gentle −20 dB per decade slope through the crossover (for a good phase margin), and low gain at high frequency (to ignore sensor noise and unmodeled dynamics). A lead compensator adds phase near the crossover (the job of the derivative term); a lag compensator raises the low-frequency gain without moving the crossover; a notch filter removes a mechanical resonance. The trade-offs are summarized by the sensitivity S = 1 ÷ (1 + L) (disturbance rejection) and the complementary sensitivity T = L ÷ (1 + L) (noise and robustness), which add to 1: you cannot make both small at the same frequency.
Related
- Previous: PID Control and Tuning. Next: Stability: Routh, Root Locus and Margins.
- Servo Motors and Tuning for resonance and notch filters.
- Control Systems: the whole guide.
FAQ
How do I measure a frequency response?
Apply a small sinusoid of increasing frequency to the input (or a swept sine, or a chirp), record the output, and compare amplitudes and phases. Many drives and servo amplifiers have the function built in.
What is a decibel?
A logarithmic ratio: 20 log₁₀(ratio) for amplitudes. 6 dB is a factor of 2, 20 dB a factor of 10, −3 dB a factor of 0.707.
Why is the phase margin the one to watch?
Because the loop goes unstable when the gain is 1 and the phase is −180°. The phase margin is the distance in phase from that condition at the frequency where the gain is 1.
Can I trust a Bode plot for a nonlinear system?
Only near the operating point where the system is linear. Backlash, saturation and friction change the effective gain with amplitude.
References
- Ogata, K., Modern Control Engineering, Pearson (frequency-response analysis); Franklin, G. F., et al., Feedback Control of Dynamic Systems, Pearson.
- Skogestad, S., Postlethwaite, I., Multivariable Feedback Control, Wiley (sensitivity and margins).
- Åström, K. J., Murray, R. M., Feedback Systems, Princeton University Press (free online).
Last reviewed: October 2026. Margin targets are rules of thumb; the numbers come from the oven model.
