Control Systems Nyquist stability criterion L. Lanari Sunday, November 9, 2014 Outline • • • • • • • polar plots when F(j!) has no poles on the imaginary axis Nyquist stability criterion what happens when F(j!) has poles on the imaginary axis general feedback system stability margins (gain and phase margin) Bode stability criterion effect of a delay in a feedback loop Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 2 Unit negative feedback closed-loop system + F (s) - W(s) we have seen that • in a unit feedback system, the closed-loop system has hidden modes if and only if the open-loop has them • the open-loop hidden modes are inherited unchanged by the closed-loop therefore we make the hypothesis that there exists no open-loop hidden mode with non negative real part (since this would be inherited by the closed-loop system) stability of the closed-loop is only determined by the closed-loop poles Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 3 We are going to determine the stability of the closed-loop system from the open-loop system features (i.e. the graphical representation of the open-loop frequency response F(j!)) Nyquist diagram: (closed) polar plot of F(j!) with ω ∈ (−∞, ∞) we plot the magnitude and phase on the same plot using the frequency as a parameter, that is we use the polar form for the complex number F(j!) mirror image being F(s) a rational fraction + positive phase ω ∈ (−∞, 0] F(-j!) = F *(j!) and therefore the plot for negative angular frequencies ! is the symmetric wrt the real axis of the one obtained for F(j!1) ω ∈ [0, ∞) F(j!2) in !1 in !2 positive ! Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 4 Hyp. no open-loop poles on the imaginary axis (i.e. with Re[.] = 0) some polar plots polar plot of F(j!) can be obtained from the Bode diagrams (magnitude and phase information) 5 0 1 0.8 −10 −15 Magnitude Magnitude (dB) −5 dB −20 not in dB 0.6 0.4 −25 −30 0.2 −35 −40 0 −2 10 0 2 10 frequency (rad/s) −2 10 10 0 2 10 frequency (rad/s) 10 0.6 20 0.4 0 0.2 1 F (s) = s+1 −40 −60 Im Phase (deg) −20 ω1 ω2 ω7 ω6 ω5 0 −0.2 ω3 −80 −0.4 −100 −2 10 0 10 frequency (rad/s) ω4 2 10 0 0.2 0.4 0.6 0.8 1 Re Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 5 fact I The closed-loop system W(s) has poles with Re[.] = 0 if anf only if the Nyquist plot of F (j!) passes through the critical point (-1,0) Proof. Nyquist plot intersects the real axis in -1 therefore ∃ ω̄ such that F (j ω̄) = −1 that is F (j ω̄) + 1 = 0 F (s) W (s) = 1 + F (s) Being the closed-loop transfer function given by this shows that s = j ω̄ is a pole of W(s) (and vice versa). Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 6 Hyp. no open-loop poles on the imaginary axis (i.e. with Re[.] = 0) fact II let us define • • • nF+ the number of open-loop poles with positive real part nW+ the number of closed-loop poles with positive real part Ncc the number of encirclements the Nyquist plot of F (j!) makes around the point (-1, 0) counted positive if counter-clockwise a direct application of Cauchy’s principle of argument gives Ncc = nF+ - nW+ Obviously if the encirclements are defined positive clockwise, let them be Nc, the relationship changes sign and becomes Nc = nW+ - nF+ Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 7 Hyp. no open-loop poles on the imaginary axis (i.e. with Re[.] = 0) (this hypothesis guarantees that, if F (s) is strictly proper, the polar plot of F (j!) is a closed contour and therefore we can determine the number of encirclements) In order to guarantee closed-loop stability, we need nW+ = 0 (no closed-loop poles with positive real part) and no poles with null real part (which we saw being equivalent to asking that the Nyquist plot of F (j!) does not go through the point (-1, 0)) If the open-loop system has no poles on the imaginary axis, the unit negative feedback system is asymptotically stable if and only if i) the Nyquist plot does not pass through the point (-1, 0) ii) the number of encirclements around the point (-1, 0) counted positive if counterclockwise is equal to the number of open-loop poles with positive real part, i.e. Ncc = nF+ Nyquist stability criterion Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 8 Remarks • if the open-loop system has no positive real part poles then we obtain the simple • N&S condition Ncc = 0 which requires the Nyquist plot not to encircle (-1, 0) if the stability condition is not satisfied then we have an unstable closed-loop system • with nW+ = nF+ - Ncc positive real part poles condition i), which ensures that the closed-loop system does not have poles with null part, could be omitted by noting that if the Nyquist plot goes through the critical point (-1, 0) then the number of encirclements is not well defined examples on the number of encirclements depending on where is the critical point 0 -1 +1 0 Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 0 -2 0 -2 -1 0 0 2 0 2 1 0 9 not in dB in dB 0 1 −10 0.8 Magnitude Magnitude (dB) −20 −30 −40 −50 0.6 0.4 −60 0.2 −70 −80 −2 10 0 10 frequency (rad/s) 2 10 phase 100 F (s) = (s + 10)2 0 −2 10 0 2 10 frequency (rad/s) 10 0.6 50 0.4 Ncc = nF+ = 0 0.2 ω6 −50 Im Phase (deg) 0 ω1 0 ω5 −100 −0.2 −150 −0.4 ω2 ω4 −0.6 −200 −2 10 0 10 frequency (rad/s) 10 Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 ω3 2 −0.2 0 0.2 0.4 0.6 Re 0.8 1 1.2 10 phase 50 0 0 1 −10 −50 −30 −40 −50 Phase (deg) 0.8 magnitude magnitude (dB) −20 0.6 0.4 −100 −150 −200 −60 0.2 −250 −70 −80 −2 10 0 0 2 10 frequency (rad/s) −2 10 10 10 F (s) = (s + 1)2 (s + 10) 0 2 10 frequency (rad/s) −300 10 0 2 10 frequency (rad/s) 10 Zoom Im 0.05 0 #$ exact 0.6 −2 10 −0.05 −0.1 0.4 −0.08 −0.06 −0.04 −0.02 “by hand” 0 Re Im 0.2 () ← Zoom 0 ! % *! ! % (! ! %&' !" −0.2 −0.4 −0.6 −0.2 0 0.2 0.4 0.6 Re 0.8 1 Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 1.2 important to determine that this intersection is on the right of -1 11 phase 0 0 1 −50 −30 −100 Phase (deg) 0.8 −20 Magnitude Magnitude (dB) −10 0.6 0.4 −40 −200 −250 −300 0.2 −50 −150 −350 −60 −2 10 0 0 2 10 frequency (rad/s) 10 −2 10 0 2 10 frequency (rad/s) −10(s − 1) F (s) = (s + 1)2 (s + 10) −2 10 10 0 10 frequency (rad/s) 2 10 Zoom 0.2 0.15 0.1 0.05 Im 1 exact #$ 0 −0.05 −0.1 “by hand” −0.15 −0.2 0.5 −0.25 −0.1 −0.05 0 Re 0.05 0.1 ← Zoom Im () 0 ! % *! ! % (! ! %&' !" −0.5 −1 −0.5 0 0.5 Re Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 1 important to determine that this intersection is on the right of -1 12 phase 10 0 2 −50 −10 −20 Phase (deg) 1.5 Magnitude Magnitude (dB) 0 1 −100 −150 −200 0.5 −30 −250 −40 0 −2 10 0 10 frequency (rad/s) 2 F (s) = s−1 2 −2 10 10 0 −2 2 10 frequency (rad/s) 10 10 0 2 10 frequency (rad/s) 10 exact unstable open-loop system 1 Ncc = nF+ = 1 Im 0.5 0 ω1 ω2 −0.5 Nyquist criterion is verified: closed-loop system is asymptotically stable −1 Sunday, November 9, 2014 increasing ! ω3 ω4 −2 Lanari: CS - Stability - Nyquist ω7 ω6 ω5 −1.5 −1 Re −0.5 0 13 Let’s remove the hypothesis of no open-loop poles on the imaginary axis (i.e. with Re[.] = 0) open-loop poles on the imaginary axis (i.e. with Re[.] = 0) come from: • • one or more integrators (pole in s = 0) resonance (imaginary poles in s = +/- j!n) and give a discontinuity in the phase • passing from ¼/2 to -¼/2 when ! switches from 0- to 0+ • or from 0 to ¼ when ! switches from !n- to !n+ while the magnitude is at infinity In order to obtain a closed polar plot, we introduce closures at infinity which consists in rotating of ¼ clockwise with an infinite radius (for every pole with Re[.] = 0) for growing frequencies, at those values of the frequency corresponding to singularities of the transfer function F (s) lying on the imaginary axis (poles of the open-loop system with Re[.] = 0) ! = 0- ! = 01 F (s) = s(s + 1) Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 R = +∞ ! = -∞ ! = +∞ ! = 0+ closure at infinity ! = 0+ 14 closures at infinity K F (s) = s(1 + τ1 s) ¼ clockwise at infinity from ! = 0- to ! = 0+ K F (s) = 2 s (1 + τ1 s) 2¼ clockwise at infinity from ! = 0- to ! = 0+ K(1 + τ2 s) F (s) = 3 s (1 + τ1 s) 3¼ clockwise at infinity from ! = 0- to ! = 0+ K F (s) = 2 (s + ω12 )(1 + τ1 s) ¼ clockwise at infinity from ! = -!1- to ! = -!1+ K F (s) = 2 (s + ω12 )2 (1 + τ1 s) 2¼ clockwise at infinity from ! = -!1- to ! = -!1+ ¼ clockwise at infinity from ! = !1- to ! = !1+ 2¼ clockwise at infinity from ! = !1- to ! = !1+ ¼ clockwise at infinity from ! = -!1- to ! = -!1+ K(1 + τ2 s) F (s) = 2 2 s (s + ω12 )(1 + τ1 s) Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 2¼ clockwise at infinity from ! = 0- to ! = 0+ ¼ clockwise at infinity from ! = !1- to ! = !1+ 15 40 0 20 Phase (deg) Magnitude (dB) −50 0 −20 100 F (s) = s(s + 10)2 −100 −150 −200 −40 −250 exact approx −60 −2 10 exact approx 0 10 frequency (rad/s) −300 −2 10 2 10 0 10 frequency (rad/s) 2 10 Zoom 0.3 ) ! %&' 0.2 #$ 0.1 Im the zoom is just to show that the phase goes to -3¼/2 0 −0.1 −0.2 2 −0.25 −0.2 −0.15 −0.1 −0.05 Re 0 0.05 1.5 1 + Ncc = nF = 0 )* ! % (! ! % )! 0.5 Im ← Zoom !" 0 ¼ clockwise with infinite radius from 0- to 0+ −0.5 −1 −1.5 −2 −0.5 0 0.5 1 Re Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 ( ! %&' 16 40 1 one pole in +j F (s) = (s + 1)(s2 + 1) one pole in -j magnitude (dB) 20 0 * ! %&' −20 #$ * ! %&(' −40 −60 −2 10 −1 10 0 10 frequency (rad/s) 1 10 2 10 (' ! % *! ! %&) !" ! % (! 0 Phase (deg) −50 −100 ! %&'( −150 ! %&('( −200 −250 exact approx −300 −2 10 −1 10 0 10 frequency (rad/s) Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 1 10 2 10 ¼ clockwise with infinite radius from -1- to -1+ ¼ clockwise with infinite radius from 1- to 1+ 17 40 0 20 Phase (deg) Magnitude (dB) −50 0 −20 −100 −150 −200 −40 −250 exact approx −60 −2 10 0 −300 −2 10 2 10 frequency (rad/s) 10 0 10 frequency (rad/s) 2 10 ¼ clockwise with infinite radius from 0- to 0+ Zoom 0.1 s2 + 100 F (s) = s(s + 1)(s + 10) 0.05 Im ) ! %&' 0 #$ −0.05 8 −0.1 −0.1 6 −0.05 0 Re 0.05 0.1 ! % )! 4 Im 2 )* ← Zoom 0 !" −2 ! % (! −4 −6 −8 −8 −6 −4 −2 Re 0 2 4 ( Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 ! %&' 18 40 exact approx 0 20 for K = 1 plot crosses (-1, 0) 0 Phase (deg) magnitude (dB) −50 −20 −100 −150 −π −200 −40 −250 exact approx −60 −2 10 0 10 frequency (rad/s) −300 −2 10 2 10 0 2 10 frequency (rad/s) 10 Zoom 0.1 ( ! %&' Im 0.05 #$ 0 −0.05 8 6 −0.1 −0.1 −0.05 0 Re 0.05 0.1 4 Im 2 K(s + 1) F (s) = s(s/10 − 1) ← Zoom 0 −2 )*+, ! % )! ! % (! !" −4 −6 −8 −8 −6 −4 −2 Re 0 2 Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 4 ¼ clockwise with infinite radius from 0- to 0+ ) ! %&' 19 40 1 F1 (s) = s(s + 1) 30 2 Magnitude (dB) 20 2 −100 10 0 −10 1 F2 (s) = 5 s (s + 1) −20 −30 −40 −2 10 −1 10 0 10 frequency (rad/s) 1 10 −600 −2 10 ! %&' Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 −1 10 5 times ¼ clockwise with infinite radius ) from 0- to 0+ ! %&' #$ ( −300 −500 2 ! %&' ! % )! ! % (! −200 −400 10 ) )* F1 F 0 Phase (deg) F1 F !" )* 0 10 frequency (rad/s) 1 10 2 10 #$ ! % )! ! % (! !" ( ! %&' 20 general negative feedback + + F1(s) - F1(s)F2(s) for stability these two schemes are equivalent - F2(s) F1(s) = N1(s)/D1(s) F2(s) = N2(s)/D2(s) W1 (s) = F1 (s) 1 + F1 (s)F2 (s) = N1 (s)D2 (s) D2 (s)D1 (s) + N1 (s)N2 (s) W2 (s) = F1 (s)F2 (s) 1 + F1 (s)F2 (s) = N1 (s)N2 (s) D2 (s)D1 (s) + N1 (s)N2 (s) same denominator same poles same stability properties Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 21 Typical pattern for a control system: open-loop system with no positive real part poles nF+ = 0, therefore the closed-loop system will be asymptotically stable if and only if the Nyquist plot makes no encirclements around the point (-1, 0). We want to explore how the closed-loop stability varies as a gain K in the open-loop system increases. ! = 0- + Im K F (s) As K increases over a critical value -1 ! = +∞ the closed-loop system goes from asymptotically stable to unstable Re ! = -∞ as K increases ! = 0+ Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 22 In this context, the proximity to the critical point (-1, 0) is an indicator of the proximity of the closed-loop system to instability. We can define two quantities: ! = 0- gain margin kGM If we multiply F (j!) by the quantity 1/kGM kGM the Nyquist diagram will pass through the critical point the gain margin kGM is the smallest ! = +∞ -1 amount that the closed-loop system can tolerate (strictly) before it becomes unstable Im Re !¼ F (j!) kGM F (j!) ωπ : ∠F (jωπ ) = −π kGM 1 = |F (jωπ )| kGM |dB = −|F (jωπ )|dB ! = 0+ only positive angular frequencies are shown Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 23 phase margin PM Im the phase margin PM is the amount of lag the closed-loop system can tolerate (strictly) before it becomes unstable !c angular frequency at which the gain is unity is defined as crossover frequency (or gain crossover frequency) ωc : |F (jωc )| = 1 ωc : |F (jωc )|dB = 0 dB P M = π + ∠F (jωc ) Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 ! = +∞ -1 Re PM F (j!c) F (j!) 24 (B) same gain margin as (A) but different phase margin Im (C) same phase margin as (A) but different gain margin 1/kGM ! = +∞ -1 Im Re PM real “distance” (B) Re (C) (A) F (j!) Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 25 stability margins on Bode - kGM|dB kGM |dB = −|F (jωπ )|dB Magnitude (dB) 20 P M = π + ∠F (jωc ) 0 −20 −40 −60 −1 10 ωc 0 10 ωπ 1 10 frequency (rad/s) 2 10 1000 F (s) = s(s + 10)2 3 10 PM ωc 0 ωπ 0.4 −90 0.2 −180 Im Phase (deg) 0.6 −270 0 −0.2 −1 10 0 10 1 10 frequency (rad/s) 2 10 3 10 −0.4 −0.6 −1.2 Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 −1 −0.8 −0.6 −0.4 −0.2 Re 0 0.2 26 Magnitude (dB) 20 500 F1 (s) = s(s + 10)2 0 −20 −40 −1 10 6000 F1 (s) = s(s + 10)2 F1(s) F2(s) 0 1 these are scaled (by 0.5 and 6) wrt the previous system 2 10 10 frequency (rad/s) 10 Phase (deg) 0 both have same phase but different crossover frequencies and therefore different phase margins −90 −180 −270 −1 10 0 1 positive phase margin (and thus for this example Ncc = 0) asymptotically stable closed-loop system Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 2 10 10 frequency (rad/s) 10 negative phase margin (and thus for this example a non-zero Ncc) both systems with nF+ = 0 unstable closed-loop system (suggested exercise: check with Routh) 27 Bode stability theorem Let the open-loop system F (s) be with no positive real part poles (i.e. nF+ = 0) and such that there exists a unique crossover frequency !c (i.e. such that | F (j!c) | = 1) then the closed-loop system is asymptotically stable if and only if the system’s generalized gain is positive & the phase margin (PM) is positive 1.5(1 − s) (s + 1)(2s + 1)(0.5s + 1) F (s) = 0 −20 0.5 −40 Im Magnitude (dB) 1 Phase (deg) −60 0 0 Ncc = nF+ = 0 −0.5 −90 −180 −270 −2 10 −1 −1 10 0 10 frequency (rad/s) Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 1 10 2 10 −1 −0.5 0 0.5 1 1.5 Re 28 Bode stability theorem • stability margins are useful to evaluate stability robustness wrt parameters variations (for example the gain margin directly states how much gain variation we can tolerate) • phase margin is also useful to evaluate stability robustness wrt delays in the feedback loop. Recall that, from the time shifting property of the Laplace transform, a delay is modeled by e-sT and that + e-sT - F (s) ∠e−jωT = − ωT |e−jωT | = 1 delay of T sec ∠e−jωT = − ωT a delay introduces a phase lag and therefore it can easily “destabilize” a system (note that the abscissa in the Bode diagrams is in log10 scale so the phase decreases very fast) |e−jωT | = 1 a delay in the loop does not alter the magnitude (0 dB contribution) Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 29 Special cases • Im infinite gain margin -1 • infinite phase margin Im -1 Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 Re Re 30 Particular example good gain and phase margins but close to critical point 0.38(s2 + 0.1s + 0.55) F (s) = s(s + 1)(s/30 + 1)(s2 + 0.06s + 0.5) Magnitude (dB) 10 0 −10 1 −20 Im 0.5 0 Phase (deg) 0 −0.5 −90 −1 −180 0.01 0 10 frequency (rad/s) 1 10 −2 −1.5 −1 −0.5 Re 0 0.5 1 0.005 zoom to see the gain margin Im −1 10 0 −0.005 −0.01 −0.03 Lanari: CS - Stability - Nyquist Sunday, November 9, 2014 −0.02 −0.01 Re 0 31