Flow Lab

Syllabus / Module 13: Applications: Control Systems

Lesson 13.5

Frequency Response & Bode Plots

Sinusoidal steady state, Bode magnitude and phase plots, gain and phase margins, Nyquist criterion (intro).

Written byClaude Sonnet

🌊
Why this matters for simulation: Pilot-induced oscillation is a phase-margin problem.

By the end of this lesson you can…

  • Derive that a stable system driven by $\sin\omega t$ settles to $|G(i\omega)|\sin(\omega t + \arg G(i\omega))$ and compute gain and lag for the cruise plant.
  • Draw a Bode plot from asymptotes and break frequencies for first-order and second-order factors and their products, and read the resonant peak off $\zeta$.
  • Read gain and phase margin of a loop, and show that the gain margin of the cruise PI loop is the Routh edge of 13.4 divided by the gain.
  • Turn a phase margin into a delay margin $\tau_{\max} = \text{PM}/\omega_c$ and recover the critical gain $16.351$ of 13.1.
  • Relate bandwidth to rise time, and use the peak $M_s$ of $S = 1/(1+L)$ to bound the margins.
  • Explain why both margins can look comfortable while the loop is badly damped.
On this page
·
  1. A sinusoid in, a sinusoid out
  2. Bode plots: decibels and a log axis
  3. The Nyquist picture, briefly
  4. Gain margin and phase margin
  5. Phase margin is a delay margin
  6. Bandwidth and rise time
  7. Sensitivity from the frequency response
  8. Honest limits of margins
  9. Concept checks
  10. Playground and exercise
  11. Problems
  12. What comes next
  13. Key Takeaways

13.4 Stability: Routh–Hurwitz & Root Locus ended with a gap. Padé approximations of a delay moved the critical gain from 2121 to 16.486616.4866 against the exact 16.35116.351, and the exact answer came from a phase condition on L(iω)L(i\omega) that needed no polynomial at all. This lesson takes that route seriously. Instead of asking where the poles are, we ask what the loop does to a sinusoid, one frequency at a time, and read stability, speed and robustness off two curves. It works on a model or on measured data: a wind-tunnel fan can be shaken at one frequency and its response measured, with no model at all.

▶ Video A sinusoid through the cruise plant, the Bode plot built from corner frequencies, the gain and phase margins read off the loop, phase margin as a delay budget, and the peak of the sensitivitycaptions only
Transcript
  1. Feed the cruise plant e to the i omega t and look for an output of the same form. That gives H equal to G of i omega, the transfer function at s equal i omega. The transient dies like e to the minus 0.1 t, and the settled output is the gain times a sine, shifted by the phase. At omega 0.1 and K equal 1 the lab integrates the ODE and measures gain 0.7036 and phase minus 50.7106 degrees: a lag of 8.851 seconds. At K equal 4 the gain is 2.8144.
  2. A Bode plot draws decibels against frequency on a log axis, so a product becomes a sum. The cruise plant is two first-order factors with breaks at 0.1 and 1 radians per second: the asymptote is flat, then falls 20, then 40 decibels per decade. A gain of K equal 4 lifts the whole curve to 12.04 decibels without touching the phase. At omega equal 1 the asymptote reads minus 7.96, and the true gain is minus 11.01. At a break one factor is down 3.010 decibels and 45 degrees.
  3. A second-order factor falls 40 decibels per decade above omega n. At omega n the gain is exactly 1 over 2 zeta, with phase minus 90 degrees. The peak rises to 1 over 2 zeta root 1 minus zeta squared. At zeta 0.1 that is 14.023 decibels, at 0.3 it is 4.847, and at 0.5 only 1.249. The gain at omega n is 13.979, 4.437 and 0.
  4. Now the loop. The gain crossover is where the loop gain is 1, and the phase margin is 180 degrees plus the phase there. The cruise loop at K p equal 4 crosses at 0.3625 radians per second with phase margin 85.495 degrees. At K p equal 10 the crossover is 0.7815 and the margin 59.282. At 19 it is 1.2077 and 44.360. This phase never reaches minus 180, so the gain margin is infinite: the proportional loop is stable at every gain, as in 13.4.
  5. Add an integrator: the PI loop at K p equal 4, gain K i. The phase crosses minus 180 at 0.7071 radians per second whatever K i is, where the loop gain is K i over 5.5. So the gain margin is 5.5 over K i: 11 at K i equal 0.5, 2.75 at 2, 1.1 at 5, exactly 1 at 5.5. The phase margin shrinks with it, to zero at 5.5 and minus 3.147 at 6, where the gain margin is 0.9167. That edge is the Routh edge of 13.4: one boundary, two methods.
  6. A delay drops the phase at the gain crossover by omega c times theta, so the delay the loop can take is the phase margin in radians over omega c. The cruise loop with K p equal 4 can take 4.116 seconds, K p equal 10 only 1.324, and K p equal 19 just 0.6411: more gain, less budget. For 1 over 10 s plus 1 at K equal 16.3506 the margin is exactly 1 second: 13.1's critical gain. With the engine lag and a 1 second delay, the critical gain is 12.759.
  7. The bandwidth is where the closed loop has fallen to 1 over root 2. For the cruise plant it grows with the gain, 0.2161 at K p equal 1 up to 1.9579 at 19, while the rise time falls from 10.112 seconds to 1.023. The product stays near 2, so the rise time is about 2.2 over the bandwidth, good to about ten percent. One pole gives ln 9, 2.197 exactly. The lightly damped loop, 1.601, is further off.
  8. The sensitivity S is 1 over 1 plus L, and its size is 1 over the distance from L of i omega to the point minus 1. Its peak M s bounds both margins: the gain margin is at least M s over M s minus 1, and the phase margin is at least 2 arcsine of 1 over 2 M s. Cruise at K p equal 4 has M s 1.1767; the 13.1 loop with a delay has 1.3958, and 2.8631 at K equal 10. For the PI loop at K i equal 2 the bounds are 1.925 and 27.8 degrees, below the actual 2.75 and 42.1.
  9. Margins look at one point of the curve. Take the loop K over s times s plus 1 times a lightly damped mode at 3 radians per second, K equal 7.2. Phase margin 53.833 degrees at 0.6942, gain margin 2.2855 at 2.6312: rules of thumb accept both. But the curve passes close to minus 1 between them: M s is 2.2109 at 2.8081 and the closed-loop poles are minus 0.1118 plus or minus 2.8577 i, damping 0.039. M s catches it, and guarantees only gain margin 1.826 and phase margin 26.1 degrees.
  10. A sine through a linear system returns a sine scaled by G of i omega. Bode plots add the factors, and the margins read the distance to minus 1: the PI gain margin is the Routh edge, 5.5 over K i, and the phase margin is a delay budget, 4.116 seconds at K p equal 4. Margins can mislead; M s does not. This lesson chose the controller structure in advance. Lesson 13.6 is not yet written; it is meant to take the state-space route: feed back every state, and place the closed-loop eigenvalues.

A sinusoid in, a sinusoid out

Take the cruise plant of the last four lessons, the engine lag a˙=u−a\dot a = u - a and the car 10y˙=a−y10\dot y = a - y, so G(s)=1/((10s+1)(s+1))G(s) = 1/((10s+1)(s+1)). Feed it the complex input u=eiωtu = e^{i\omega t} and look for an output of the same form, y=Heiωty = H e^{i\omega t} with HH a constant. Then a˙=iωa\dot a = i\omega a gives a=u/(1+iω)a = u/(1 + i\omega), and 10iω y=a−y10 i\omega\,y = a - y gives

H=1(1+10iω)(1+iω)=G(iω).H = \frac{1}{(1 + 10 i\omega)(1 + i\omega)} = G(i\omega) .

So the answer is the transfer function with s=iωs = i\omega. The homogeneous part of the solution decays like e−0.1te^{-0.1t} (the pole at −0.1-0.1), so after a few time constants only this particular solution is left. Taking the imaginary part, for a real input sin⁡ωt\sin\omega t:

y(t)→∣G(iω)∣ sin⁡(ωt+arg⁡G(iω)).y(t) \to |G(i\omega)|\,\sin\bigl(\omega t + \arg G(i\omega)\bigr) .

The gain ∣G(iω)∣|G(i\omega)| says how much the amplitude is scaled and arg⁡G(iω)\arg G(i\omega), normally negative, says how far the output lags. This is the forced-oscillation result of 5.6 Forced Oscillations & Resonance for any plant: a sine is an eigenfunction of every linear time-invariant system (6.5 Convolution & Transfer Functions), and G(iω)G(i\omega) is the eigenvalue.

Worked example 1. For the cruise plant at ω=0.1\omega = 0.1 rad/s (unit gain): ∣1/(1+0.1i)∣=0.99504|1/(1+0.1i)| = 0.99504 and ∣1/(1+i)∣=0.70711|1/(1+i)| = 0.70711, so ∣G∣=0.7036|G| = 0.7036 (−3.054-3.054 dB). The phases are −arctan⁡(1)=−45∘-\arctan(1) = -45^\circ and −arctan⁡(0.1)=−5.7106∘-\arctan(0.1) = -5.7106^\circ, so arg⁡G=−50.7106∘\arg G = -50.7106^\circ, a lag of 0.885070.88507 rad /0.1=8.851/ 0.1 = 8.851 s. In the lab (cruise plant, K=1K = 1, w=0.1w = 0.1) the inset simulates the ODE with RK4 and measures the settled output by projecting the last whole periods on sin⁡\sin and cos⁡\cos: gain 0.70360.7036, phase −50.7106∘-50.7106^\circ, the formula to the digits printed. At K=4K = 4 the gain is 2.81442.8144 and the phase is unchanged.

◆ Interactive Bode plot of the cruise plant with K = 4: drag the test frequency along the magnitude plot and compare the measured gain and lag in the inset with |L| and the phase of L

Loading simulation…

Bode plots: decibels and a log axis

A Bode plot draws 20log⁡10∣G(iω)∣20\log_{10}|G(i\omega)| (decibels) and arg⁡G(iω)\arg G(i\omega) in degrees against ω\omega on a log axis. A product becomes a sum: for G=G1G2G = G_1G_2 the dB values add, and so do the phases.

A first-order factor 1/(τs+1)1/(\tau s + 1) has ∣⋅∣=1/1+ω2τ2|\cdot| = 1/\sqrt{1+\omega^2\tau^2}. Below the break frequency 1/τ1/\tau it is about 00 dB, above it falls −20-20 dB per decade. The asymptotes meet at 1/τ1/\tau, where the true gain is 20log⁡10(1/2)=−3.01020\log_{10}(1/\sqrt2) = -3.010 dB. The phase −arctan⁡ωτ-\arctan\omega\tau is −5.71∘-5.71^\circ a decade below the break, −45∘-45^\circ at it and −84.29∘-84.29^\circ a decade above.

A second-order factor ωn2/(s2+2ζωns+ωn2)\omega_n^2/(s^2 + 2\zeta\omega_n s + \omega_n^2) has break frequency ωn\omega_n and slope −40-40 dB per decade above it. At ω=ωn\omega = \omega_n the gain is exactly 1/(2ζ)1/(2\zeta) with phase −90∘-90^\circ. From the resonance lesson (recomputed by the lab on 1/(s2+2ζs+1)1/(s^2 + 2\zeta s + 1)) the peak is at ωn1−2ζ2\omega_n\sqrt{1-2\zeta^2} with height 1/(2ζ1−ζ2)1/(2\zeta\sqrt{1-\zeta^2}):

ζ\zetapeak atpeak heightgain at ωn\omega_n
0.10.10.98990.989914.02314.023 dB13.97913.979 dB
0.30.30.90550.90554.8474.847 dB4.4374.437 dB
0.50.50.70710.70711.2491.249 dB00 dB

For ζ≥1/2\zeta \ge 1/\sqrt2 there is no peak. The short period of 12.5 Trim, Linearization & Longitudinal Modes (ωn=4.5567\omega_n = 4.5567, ζ=0.5848\zeta = 0.5848) as a unit-gain block (a stand-in, not the elevator-to-pitch transfer function; the lab’s short-period preset) peaks at 2.56182.5618 rad/s by only 0.4570.457 dB.

Building a product. The cruise plant is two first-order factors with breaks at 0.10.1 and 11 rad/s, so the asymptote is flat, then −20-20, then −40-40 dB per decade. A gain KK lifts the curve by 20log⁡10K20\log_{10}K and leaves the phase alone. For K=4K = 4 the flat part sits at 12.0412.04 dB; at ω=1\omega = 1 the asymptote is 4(0.1)=0.44(0.1) = 0.4, −7.96-7.96 dB, and the true gain is 4×0.07036=0.28144 \times 0.07036 = 0.2814, −11.01-11.01 dB. The lab’s asymptote toggle draws the straight lines under the curve.

A delay e−sθe^{-s\theta} has ∣e−iωθ∣=1|e^{-i\omega\theta}| = 1 and phase −ωθ-\omega\theta. It leaves the magnitude plot alone and eats phase without limit as ω\omega grows: 13.1’s warning as a curve that falls through −180∘-180^\circ.

The Nyquist picture, briefly

Plot L(iω)L(i\omega) in the complex plane as ω\omega runs up from 00. A closed-loop pole has 1+L=01 + L = 0, so −1-1 is critical. The Nyquist criterion (from memory, not proved here) says a loop that is itself stable gives a stable closed loop when the curve does not circle −1-1. For L=Kp/((10s+1)(s+1))L = K_p/((10s+1)(s+1)) the curve leaves KpK_p and spirals into the origin through the lower half plane, never reaching the negative real axis: 13.4’s result that the proportional cruise loop is stable at every gain.

For the PI loop with Kp=4K_p = 4 the denominator at s=iωs = i\omega is s(10s2+11s+5)=−11ω2+iω(5−10ω2)s(10s^2 + 11s + 5) = -11\omega^2 + i\omega(5 - 10\omega^2). It is real when ω2=1/2\omega^2 = 1/2, and there it equals −5.5-5.5. So L(0.7071i)=−Ki/5.5L(0.7071i) = -K_i/5.5: the curve crosses the negative real axis at −Ki/5.5-K_i/5.5 at the same frequency whatever the gain. At Ki=5.5K_i = 5.5 it passes through −1-1; at Ki=6K_i = 6 it crosses at −1.0909-1.0909, circles the critical point, and 13.4 counted two unstable roots. (A pole at the origin needs a small detour, from memory.)

Gain margin and phase margin

The phase crossover ω180\omega_{180} is where the phase is −180∘-180^\circ; the gain margin GM=1/∣L(iω180)∣\text{GM} = 1/|L(i\omega_{180})| is the factor by which the gain can grow before the curve reaches −1-1. The gain crossover ωc\omega_c is where ∣L∣=1|L| = 1; the phase margin PM=180∘+arg⁡L(iωc)\text{PM} = 180^\circ + \arg L(i\omega_c) is the extra lag that takes the curve to −1-1.

The PI loop, all from the lab. Cruise plant with a PI controller at Kp=4K_p = 4, so L=Ki/(s(10s2+11s+5))L = K_i/(s(10s^2 + 11s + 5)) with KiK_i as the gain:

KiK_iωc\omega_cPMω180\omega_{180}GMGM in dB
0.50.50.09960.099677.403∘77.403^\circ0.70710.707111.00011.00020.82820.828
220.36730.367342.104∘42.104^\circ0.70710.70712.75002.75008.7878.787
550.67350.67353.579∘3.579^\circ0.70710.70711.10001.10000.8280.828
5.55.50.70710.70710∘0^\circ0.70710.70711.00001.000000
660.73800.7380−3.147∘-3.147^\circ0.70710.70710.91670.9167−0.756-0.756

The gain margin is 5.5/Ki5.5/K_i in every row, since ∣L(iω180)∣=Ki/5.5|L(i\omega_{180})| = K_i/5.5. The Routh edge of 13.4, Ki=1.1(1+Kp)=5.5K_i = 1.1(1+K_p) = 5.5, is the gain at which the margin is 11, and ω180=0.7071\omega_{180} = 0.7071 is the frequency of the zero row’s auxiliary polynomial: one boundary, two methods. A margin below 11 is a loop past its edge. The phase margin shrinks with the damping: 13.4’s pair had ζ=0.7935\zeta = 0.7935, 0.31000.3100 and 0.02220.0222 at Ki=0.5K_i = 0.5, 22, 55.

Worked example 2: the cruise loop at Kp=4K_p = 4. Here ∣L∣2=16/((1+100ω2)(1+ω2))=1|L|^2 = 16/((1 + 100\omega^2)(1+\omega^2)) = 1 gives, with x=ω2x = \omega^2, 100x2+101x−15=0100x^2 + 101x - 15 = 0, so x=0.131416x = 0.131416 and ωc=0.36251\omega_c = 0.36251. The phase there is −arctan⁡(3.6251)−arctan⁡(0.36251)=−74.578∘−19.926∘=−94.50∘-\arctan(3.6251) - \arctan(0.36251) = -74.578^\circ - 19.926^\circ = -94.50^\circ, so PM=85.50∘\text{PM} = 85.50^\circ, and the lab reports 0.36250.3625 rad/s and 85.495∘85.495^\circ. This plant’s phase never reaches −180∘-180^\circ: no phase crossover, infinite gain margin.

For L=ωn2/(s(s+2ζωn))L = \omega_n^2/(s(s + 2\zeta\omega_n)) the relation (from memory; the lab agrees at four values) is PM=arctan⁡(2ζ/1+4ζ4−2ζ2)\text{PM} = \arctan\bigl(2\zeta/\sqrt{\sqrt{1+4\zeta^4} - 2\zeta^2}\bigr): 11.421∘11.421^\circ, 33.272∘33.272^\circ, 51.827∘51.827^\circ, 65.530∘65.530^\circ at ζ=0.1\zeta = 0.1, 0.30.3, 0.50.5, 0.70710.7071, hence the rule ζ≈PM/100\zeta \approx \text{PM}/100 (from memory). The cruise loop has closed-loop damping 0.77780.7778, 0.52440.5244, 0.38890.3889 at Kp=4K_p = 4, 1010, 1919 (13.2), against PM/100=0.855\text{PM}/100 = 0.855, 0.5930.593, 0.4440.444: a rough indicator, ten to fourteen percent high here.

Phase margin is a delay margin

A delay θ\theta leaves the gain crossover where it is and drops the phase there by ωcθ\omega_c\theta. The loop reaches the edge when ωcθ=PM\omega_c\theta = \text{PM} (radians), so

τmax⁡=PMωc\tau_{\max} = \frac{\text{PM}}{\omega_c}

is the extra delay the loop can take. For the cruise plant with no delay (lab values): Kp=4K_p = 4 has PM=85.495∘=1.4922\text{PM} = 85.495^\circ = 1.4922 rad at 0.36250.3625 rad/s, τmax⁡=4.116\tau_{\max} = 4.116 s; Kp=10K_p = 10 gives 1.3241.324 s and Kp=19K_p = 19 gives only 0.64110.6411 s. More gain raises ωc\omega_c and the budget falls.

Worked example 3: the 13.1 plant. For 1/(10s+1)1/(10s+1), K=4K = 4, the gain crossover is 15/10=0.3873\sqrt{15}/10 = 0.3873 and PM=104.478∘\text{PM} = 104.478^\circ with no delay: τmax⁡=4.708\tau_{\max} = 4.708 s. With the 11 s delay already in the loop the lab shows PM=82.287∘\text{PM} = 82.287^\circ and a delay margin of 3.70823.7082 s, and 1+3.7082=4.70821 + 3.7082 = 4.7082 agrees. Setting θ=4.708\theta = 4.708 leaves a phase margin of 0.004∘0.004^\circ.

Without delay, K=10K = 10 gives τmax⁡=1.679\tau_{\max} = 1.679 s, and at K=16.3506K = 16.3506 the margin is 1.0001.000 s: a 11 s delay is exactly what 13.1 found critical at Kc=16.351K_c = 16.351. Gain and delay margin are two views of one boundary: at θ=1\theta = 1 s the gain margin is 16.3506/K16.3506/K (4.08764.0876 at K=4K = 4, 1.63511.6351 at K=10K = 10); at K=8.502K = 8.502, 13.1’s critical gain for θ=2\theta = 2 s, the delay margin is 2.0002.000 s.

Now the cruise plant with the engine lag and a 11 s delay. At K=10K = 10 the lab gives PM=14.503∘\text{PM} = 14.503^\circ (an extra margin of 0.32390.3239 s, so 1.32391.3239 s in total, matching the no-delay τmax⁡\tau_{\max} of 1.3241.324 s above) and a gain margin of 1.27591.2759, so the critical gain with the delay is 12.75912.759. At K=19K = 19 the budget of 0.64110.6411 s is less than the 11 s present: PM=−24.833∘\text{PM} = -24.833^\circ, GM=0.6715\text{GM} = 0.6715, unstable.

Bandwidth and rise time

The bandwidth ωBW\omega_{BW} is where the closed loop T=L/(1+L)T = L/(1+L) has fallen to 1/21/\sqrt2 of its low-frequency value, the highest frequency the loop follows. For 1/(10s+1)1/(10s+1) at K=4K = 4 (13.1), T=0.8/(2s+1)T = 0.8/(2s+1), so ωBW=0.5\omega_{BW} = 0.5 rad/s and the 1010 to 90%90\% rise time is 2ln⁡9=4.3942\ln 9 = 4.394 s, product ln⁡9=2.197\ln 9 = 2.197. For the cruise plant (rise time measured by the lab on the step response of TT):

KpK_pωBW\omega_{BW}rise timeproductPM
110.21610.216110.11210.112 s2.1852.185none
220.35050.35056.1686.168 s2.1622.162110.83∘110.83^\circ
440.63710.63713.3733.373 s2.1492.14985.495∘85.495^\circ
10101.30431.30431.6081.608 s2.0972.09759.282∘59.282^\circ
19191.95791.95791.0231.023 s2.0022.00244.360∘44.360^\circ

The product stays near 22, so tr≈2.2/ωBWt_r \approx 2.2/\omega_{BW} (from memory, exact for one pole) is good to about ten percent here. A resonant loop is further off: the lightly damped loop below gives 1.6011.601.

Sensitivity from the frequency response

∣1+L(iω)∣|1 + L(i\omega)| is the distance from L(iω)L(i\omega) to −1-1, so ∣S∣=1/distance|S| = 1/\text{distance}: where the curve passes close to −1-1, disturbances and plant errors near that frequency are amplified. The peak Ms=max⁡ω∣S∣M_s = \max_\omega|S| is the reciprocal of the closest approach.

The peak also bounds the margins. If ∣1+L∣≥1/Ms|1+L| \ge 1/M_s everywhere, then at the phase crossover L=−1/GML = -1/\text{GM} gives 1−1/GM≥1/Ms1 - 1/\text{GM} \ge 1/M_s, so GM≥Ms/(Ms−1)\text{GM} \ge M_s/(M_s - 1), and at gain crossover L=ei(PM−180∘)L = e^{i(\text{PM} - 180^\circ)} has ∣1+L∣=2sin⁡(PM/2)|1 + L| = 2\sin(\text{PM}/2), so PM≥2arcsin⁡(1/(2Ms))\text{PM} \ge 2\arcsin(1/(2M_s)). The lab prints both bounds.

Lab values:

loopMsM_sat ω\omega
cruise, Kp=4K_p = 41.17671.17670.96690.9669
cruise, Kp=19K_p = 191.63791.63791.58881.5888
cruise PI, Kp=4K_p = 4, Ki=2K_i = 22.08072.08070.51490.5149
cruise PI, Kp=4K_p = 4, Ki=5K_i = 519.500419.50040.68400.6840
1/(10s+1)1/(10s+1), 11 s delay, K=4K = 41.39581.39581.19991.1999
same, K=10K = 102.86312.86311.44691.4469

The K=4K = 4 delay row is 13.1’s peak ∣S∣=1.396|S| = 1.396 near 1.21.2 rad/s, in a loop with GM=4.09\text{GM} = 4.09 and PM=82∘\text{PM} = 82^\circ. For Ki=2K_i = 2 the bounds from Ms=2.0807M_s = 2.0807 are 1.9251.925 and 27.8∘27.8^\circ, below the actual 2.752.75 and 42.1∘42.1^\circ.

Honest limits of margins

Each margin looks at one point of the curve and asks what happens if one thing changes, the gain or the phase. Real plants change in many ways at once.

A good-looking pair with a bad loop. Take L=K/(s(s+1)(s2+0.3s+9))L = K/(s(s+1)(s^2 + 0.3s + 9)), K=7.2K = 7.2: an integrator, a lag and a lightly damped mode at 33 rad/s with ζ=0.05\zeta = 0.05 (the lab’s lightly damped preset). It has PM=53.833∘\text{PM} = 53.833^\circ at 0.69420.6942 rad/s and GM=2.2855\text{GM} = 2.2855 (7.187.18 dB) at 2.63122.6312 rad/s, which rules of thumb accept, but Ms=2.2109M_s = 2.2109 at 2.80812.8081 rad/s and the closed-loop poles are −0.1118±2.8577i-0.1118 \pm 2.8577i, ζ=0.039\zeta = 0.039: a ring at 2.862.86 rad/s. The curve passes close to −1-1 between the two crossover points, where neither number looks. MsM_s catches it (and guarantees only GM≥1.826\text{GM} \ge 1.826, PM≥26.1∘\text{PM} \ge 26.1^\circ).

Delay and models. A pure delay gives infinitely many phase crossovers (the lab prints three), and a loop with several crossings needs the whole curve. Margins are computed from a model: they say how far the model is from the edge, not the plant.

◆ Interactive Gain margin 2.29 and phase margin 54 degrees on paper, yet Ms = 2.21 and a lightly damped closed-loop pair: switch the inset to S and drag the frequency to about 2.8 rad/s

Loading simulation…

Concept checks

✅ Concept check

The cruise plant $G(s) = 1/((10s+1)(s+1))$ (unit DC gain) is driven by $\sin(0.1t)$. What is the amplitude of the settled output?

✅ Concept check

A plant has real poles at $-0.1$ and $-1$ and no zeros. What is the slope of its Bode magnitude plot between $\omega = 1$ and $\omega = 10$ rad/s, by the asymptotes?

✅ Concept check

The PI cruise loop with $K_p = 4$ has gain margin $5.5/K_i$. What is the gain margin at $K_i = 4.4$?

✅ Concept check

A loop has phase margin $20^\circ$ at gain crossover $\omega_c = 0.5$ rad/s. How much additional pure delay (in seconds) does it tolerate?

✅ Concept checkselect all that apply

Select every statement that is true.

Playground and exercise

The first cell scans a grid for the margins and MsM_s of the cruise loop (agreeing with the lab to about three digits), the second integrates the cruise ODE under a sine and measures the settled gain and phase, and the exercise asks you to write the crossover and margin functions.

🐍 PythonPlayground: crossover, phase margin, delay margin and the peak of S for the cruise loop at four gains
⌘/Ctrl + Enter
🐍 PythonPlayground: integrate the cruise ODE with a sinusoid and measure the settled gain and phase
⌘/Ctrl + Enter
🧪 Coding exerciseExercise: loop gain, crossover, phase margin and delay margin
⌘/Ctrl + Enter

Problems

✏️ Pen & paperGain and lag from the ODE●○○

A first-order system 5y˙=−y+u5\dot y = -y + u is driven by u=sin⁡(0.4t)u = \sin(0.4t). Find the settled output y(t)y(t) and the time lag between input and output peaks.

Show worked solution

G(s)=1/(5s+1)G(s) = 1/(5s + 1) and ωτ=0.4×5=2\omega\tau = 0.4 \times 5 = 2. The gain is 1/1+4=0.44721/\sqrt{1 + 4} = 0.4472 and the phase is −arctan⁡2=−63.435∘=−1.1071-\arctan 2 = -63.435^\circ = -1.1071 rad, so y(t)→0.4472 sin⁡(0.4t−1.1071)y(t) \to 0.4472\,\sin(0.4t - 1.1071). The output lags by 1.1071/0.4=2.7681.1071/0.4 = 2.768 s.

✏️ Pen & paperA Bode plot by asymptotes●●○

Let G(s)=100/((s+1)(s+10))G(s) = 100/((s+1)(s+10)). (a) Give the DC gain in dB, the breaks and the asymptote slopes. (b) Find the exact gain crossover and the phase margin of L=GL = G.

Show worked solution

(a) G=10/((s+1)(0.1s+1))G = 10/((s+1)(0.1s+1)): DC gain 2020 dB; breaks at 11 and 1010 rad/s; slopes 00, then −20-20 from 11 to 1010, then −40-40 dB per decade.

(b) ∣G∣2=104/((1+ω2)(100+ω2))=1|G|^2 = 10^4/((1+\omega^2)(100+\omega^2)) = 1 with x=ω2x = \omega^2 gives x2+101x−9900=0x^2 + 101x - 9900 = 0, so x=(−101+49801)/2=61.081x = (-101 + \sqrt{49801})/2 = 61.081 and ωc=7.8154\omega_c = 7.8154 rad/s. (This is the cruise plant sped up tenfold at K=10K = 10: same PM, frequencies times ten.) The phase is −arctan⁡(7.8154)−arctan⁡(0.78154)=−82.70∘−38.02∘=−120.72∘-\arctan(7.8154) - \arctan(0.78154) = -82.70^\circ - 38.02^\circ = -120.72^\circ, so PM=59.28∘\text{PM} = 59.28^\circ (the lab agrees, 59.282∘59.282^\circ).

✏️ Pen & paperGain margin of the PI loop at another Kp●●○

For the cruise plant under PI control with Kp=9K_p = 9, L=Ki/(s(10s2+11s+10))L = K_i/(s(10s^2 + 11s + 10)). Find the phase crossover frequency and the gain margin at Ki=4K_i = 4, and say how it relates to 13.4’s edge Ki=1.1(1+Kp)K_i = 1.1(1+K_p).

Show worked solution

At s=iωs = i\omega the denominator is −11ω2+iω(10−10ω2)-11\omega^2 + i\omega(10 - 10\omega^2). It is real and negative when ω=1\omega = 1, where it equals −11-11. So ω180=1\omega_{180} = 1 rad/s and ∣L(i)∣=Ki/11|L(i)| = K_i/11, giving GM=11/Ki=2.75\text{GM} = 11/K_i = 2.75 at Ki=4K_i = 4 (8.7878.787 dB). The edge 1.1(1+9)=111.1(1 + 9) = 11 is where the margin is 11. (Lab, custom plant num 11, den 10 11 10 010\ 11\ 10\ 0: GM=2.7500\text{GM} = 2.7500 at 1.00001.0000 rad/s, PM=60.383∘\text{PM} = 60.383^\circ at 0.42390.4239.)

✏️ Pen & paperHow much gain buys how much delay●●●

For 1/(10s+1)1/(10s+1) with gain K>1K \gt 1, show that the gain crossover is ωc=K2−1/10\omega_c = \sqrt{K^2 - 1}/10 and that the delay margin is τmax⁡=(π−arctan⁡(10ωc))/ωc\tau_{\max} = \bigl(\pi - \arctan(10\omega_c)\bigr)/\omega_c. Evaluate it at K=10K = 10, and find the gain for which τmax⁡=2\tau_{\max} = 2 s.

Show worked solution

∣L∣2=K2/(1+100ω2)=1|L|^2 = K^2/(1 + 100\omega^2) = 1 gives ωc=K2−1/10\omega_c = \sqrt{K^2-1}/10. The phase is −arctan⁡(10ωc)-\arctan(10\omega_c), so PM=π−arctan⁡(10ωc)\text{PM} = \pi - \arctan(10\omega_c) and τmax⁡=PM/ωc\tau_{\max} = \text{PM}/\omega_c. At K=10K = 10: ωc=99/10=0.99499\omega_c = \sqrt{99}/10 = 0.99499, 10ωc=9.949910\omega_c = 9.9499, arctan⁡=84.26∘\arctan = 84.26^\circ, PM=95.739∘=1.6709\text{PM} = 95.739^\circ = 1.6709 rad, and τmax⁡=1.6794\tau_{\max} = 1.6794 s. Setting τmax⁡(K)=2\tau_{\max}(K) = 2 has no closed form; a few steps of bisection give K=8.5024K = 8.5024, which is 13.1’s critical gain at a 22 s delay (8.5028.502). A larger gain always tolerates less delay.

What comes next

Frequency response described a loop by how it treats a sinusoid, for one input and one output and for a controller structure chosen in advance. It did not say how to choose the dynamics. An aircraft has many states, and the yaw damper of 12.6 fed back one of them. Lesson 13.6 (13.6 State-Space Control & Pole Placement) takes the state-space route: feed back every state, u=−Kxu = -Kx, and place the closed-loop eigenvalues, with the margins of this lesson as the check.

Key Takeaways

  • A stable system driven by sin⁡ωt\sin\omega t settles to ∣G(iω)∣sin⁡(ωt+arg⁡G(iω))|G(i\omega)|\sin(\omega t + \arg G(i\omega)): for the cruise plant at ω=0.1\omega = 0.1 (unit gain), gain 0.70360.7036 and phase −50.7106∘-50.7106^\circ.
  • Bode plots use dB and log⁡ω\log\omega so that factors add. A first-order corner is −3.01-3.01 dB and −45∘-45^\circ; a second-order factor has gain 1/(2ζ)1/(2\zeta) at ωn\omega_n and a peak 1/(2ζ1−ζ2)1/(2\zeta\sqrt{1-\zeta^2}) (14.02314.023 dB at ζ=0.1\zeta = 0.1).
  • A delay costs phase ωθ\omega\theta and no gain. The cruise loop at Kp=4K_p = 4 has PM=85.495∘\text{PM} = 85.495^\circ.
  • The gain margin of the PI cruise loop at Kp=4K_p = 4 is 5.5/Ki5.5/K_i, the Routh edge over the gain, at ω180=0.7071\omega_{180} = 0.7071.
  • τmax⁡=PM/ωc\tau_{\max} = \text{PM}/\omega_c: 4.1164.116 s at Kp=4K_p = 4, 0.64110.6411 s at 1919; for 1/(10s+1)1/(10s+1) it is 11 s at K=16.3506K = 16.3506, 13.1’s critical gain.
  • Bandwidth times rise time is near 2.22.2 (2.1492.149 at Kp=4K_p = 4, ln⁡9\ln 9 for one pole). MsM_s gives GM≥Ms/(Ms−1)\text{GM} \ge M_s/(M_s-1) and PM≥2arcsin⁡(1/(2Ms))\text{PM} \ge 2\arcsin(1/(2M_s)), not the converse: GM 2.292.29, PM 54∘54^\circ coexisted with Ms=2.21M_s = 2.21 and ζ=0.039\zeta = 0.039.
Finished this lesson?

Mark it complete to track your progress (saved in this browser). Reading every section does this for you.