Margins on Bode plot Margins on Nyquist plot Suppose: • Draw Nyquist plot G(jω) & unit circle • They intersect at point A • Nyquist plot cross neg. real axis at –k T hen: PM angle indicated GM 1 in value k Relative stability from margins • One of the most widely used methods in determine “how stable the system is” • Margins on based on open-loop transfer function’s frequency response • Basic rule: – PM>0 and GM>0: closed-loop system stable – PM + Mp 70 – As PM or GM 0: oscillates more – PM=0 and GM=0: sustained oscillation – PM<0: unstable • If no wgc, gain never crosses 0dB or 1: – Gain > 1: Closed loop system is unstable. – Gain < 1: Closed loop system is stable Bode Diagram 30 G(s) Magnitude (dB) 25 20 unstable 15 10 0 Phase (deg) -10 -20 -30 -40 -1 10 0 10 1 10 Frequency (rad/s) 2 10 3 10 • If no wgc, gain never crosses 0dB or 1: – Gain > 1: Closed loop system is unstable. – Gain < 1: Closed loop system is stable Bode Diagram -10 stable Magnitude (dB) -15 G(s) -20 -25 -30 40 Phase (deg) 30 20 10 0 -1 10 0 10 1 10 Frequency (rad/s) 2 10 3 10 Relative stability from margins • If there is one wgc and multiple wpc’s all > wgc – PM>0, all GM>0, and closed-loop system is stable • If there is one wgc but > one wpc’s – Closed-loop system is stable if margins >0 – PM and GM reduce simultaneously – PM and GM becomes 0 simultaneously, at which case the closed loop system will have sustained oscillation at wgc=wpc Relative stability from margins • If there is one wgc, and multiple wpc’s • And if system is minimum phase (all zeros in left half plane) • And if gain plot is generally decreasing – PM>0, all GM>0: closed-loop system is stable – PM>0, and at wpc right to wgc GM>0: closedloop system is stable – PM<0, and at wpc right to wgc GM<0: closedloop system is unstable Bode Diagram Gm = 9.92 dB (at 1.36 rad/s) , Pm = 25.1 deg (at 0.765 rad/s) 50 Magnitude (dB) 0 -50 -100 -150 -200 -90 Phase (deg) -135 -180 -225 -270 -2 10 -1 10 0 10 1 10 Frequency (rad/s) 2 10 3 10 4 10 • ans = 1.0e+002 * -1.7071 -0.2928 -0.0168 -0.0017 + 0.0083i -0.0017 - 0.0083i All poles negative (in left half plane) Closed loop system is stable Relative stability from margins • If there is one wgc, and multiple wpc’s • And if system is minimum phase (all zeros in left half plane) • And if gain plot is generally decreasing – PM>0, all GM>0: closed-loop system is stable – PM>0, and at wpc right to wgc GM>0: closedloop system is stable – PM<0, and at wpc right to wgc GM<0: closedloop system is unstable Bode Diagram Gm = -12.1 dB (at 8.67 rad/s) , Pm = 11.4 deg (at 19.4 rad/s) 150 Magnitude (dB) 100 50 0 -50 -100 -150 -90 Phase (deg) -135 -180 -225 -270 -2 10 -1 10 0 10 1 10 Frequency (rad/s) 2 10 3 10 4 10 • ans = 1.0e+002 * -1.7435 -0.0247 + 0.1925i -0.0247 - 0.1925i -0.1748 -0.0522 Closed loop system poles are all negative System is stable Relative stability from margins • If there is one wgc, and multiple wpc’s • And if system is minimum phase (all zeros in left half plane) • And if gain plot is generally decreasing – PM>0, all GM>0: closed-loop system is stable – PM>0, and at wpc right to wgc GM>0: closedloop system is stable – PM<0, and at wpc right to wgc GM<0: closedloop system is unstable Bode Diagram Gm = 18.3 dB (at 8.67 rad/s) , Pm = -16.6 deg (at 3.42 rad/s) 100 Magnitude (dB) 50 0 -50 -100 -150 -200 -90 Phase (deg) -135 -180 -225 -270 -2 10 -1 10 0 10 1 10 Frequency (rad/s) 2 10 3 10 4 10 • ans = 1.0e+002 * -1.7082 -0.2888 -0.0310 0.0040 + 0.0341i 0.0040 - 0.0341i Two right half plane poles, unstable Conditionally stable systems • Closed-loop stability depends on the overall gain of the system • For some gains, the system becomes unstable • Be very careful in designing such systems • Type 2, or sometimes even type 1, systems with lag control can lead to such • Need to make sure for highest gains and lowest gains, the system is stable Relative stability from margins • If there are multiple wgc’s – Gain plot cannot be generally decreasing – There may be 0, or 1 or multiple wpc’s – If all PM>0: closed-loop system is stable – If one PM<0: closed-loop system is unstable Bode Diagram Gm = Inf , Pm = 118 deg (at 21.9 rad/s) 10 Magnitude (dB) 0 -10 poles = -20 -30 -25.3788 -4.4559 -0.2653 -40 90 stable Phase (deg) 45 0 -45 -90 -3 10 -2 10 -1 10 0 10 Frequency (rad/s) 1 10 2 10 3 10 Relative stability from margins • If there are multiple wgc’s – Gain plot cannot be generally decreasing – There may be 0, or 1 or multiple wpc’s – If all PM>0: closed-loop system is stable – If one PM<0: closed-loop system is unstable Bode Diagram Gm = -5.67 dB (at 11.5 rad/s) , Pm = -51.9 deg (at 21.9 rad/s) 10 Magnitude (dB) 0 -10 -20 -30 Phase (deg) -40 360 270 poles = 4.7095 +11.5300i 4.7095 -11.5300i -1.1956 -0.3235 Unstable 180 90 -3 10 -2 10 -1 10 0 10 Frequency (rad/s) 1 10 2 10 3 10 Bode Diagram Gm = -5.91 dB (at 9.42 rad/s) , Pm = 45.3 deg (at 4.66 rad/s) 10 Magnitude (dB) 0 -10 -20 -30 -40 270 Phase (deg) 225 poles = 4.8503 + 7.1833i 4.8503 - 7.1833i 0.3993 -0.1000 Unstable 180 135 90 45 0 -3 10 -2 10 -1 10 0 10 Frequency (rad/s) 1 10 2 10 3 10 Bode Diagram Gm = Inf , Pm = -82.2 deg (at 4.66 rad/s) 10 Magnitude (dB) 0 -10 -20 -30 -40 135 Phase (deg) 90 Poles = 28.9627 -4.4026 + 4.5640i -4.4026 - 4.5640i -0.2576 Unstable 45 0 -45 -90 -3 10 -2 10 -1 10 0 10 Frequency (rad/s) 1 10 2 10 3 10 Limitations of margins • Margins can be come very complicated • For complicated situations, sign of margins is no longer a reliable indicator of stability • In these cases, compute closed loop poles to determine stability • If transfer function is not available, use Nyquist plot to determine stability Stability from Nyquist plot The complete Nyquist plot: – Plot G(jω) for ω = 0+ to +∞ – Get complex conjugate of plot, that’s G(jω) for ω = 0– to –∞ – If G(s) has pole on jω-axis, treat separately – Mark direction of ω increasing – Locate point: –1 e.g. Gs k s 2 n s 2 2 n Encirclement of the -1 point • As you follow along the G(jω) curve for one complete cycle, you may “encircle” the –1 point • Going around in clock wise direction once is +1 encirclement • Counter clock wise direction once is –1 encirclement Nyquist Criterion Theorem # (unstable poles of closed-loop) Z = # (unstable poles of open-loop) + # encirclement or: Z = P + N To have closed-loop stable: need Z = 0, i.e. N = –P P N That is: G(jω) needs to encircle the “–1” point counter clock wise P times. If open loop is stable to begin with, G(jω) cannot encircle the “–1” point for closed-loop stability In previous example: 1. No encirclement, N = 0. 2. Open-loop stable, P = 0 3. Z = P + N = 0, no unstable poles in closed-loop, stable Example: 4 4 Gs , G j s 1 j 1 at 0 : at : Note: G j 4 G j 0 4 2 j 1 2 j 1 G j 2 2 j 1 j 1 j 1 G j is a circlecenteredat 2with radius 2 As you move around from ω = –∞ to 0–, to 0+, to +∞, you go around “–1” c.c.w. once. # encirclement N = – 1. 4 G s s 1 # unstable pole P = 1 Z N P 1 1 0 i.e. # unstable poles of closed-loop = 0 closed-loop system is stable. G s Check: Gc.. s 1 G s 4 s 1 4 s 1 1 4 4 s 1 4 s 3 c.l. pole at s = –3, stable. Example: 1. Get G(jω) for ω = 0+ to +∞ 2. Use conjugate to get G(jω) for ω = –∞ to 0– 3. How to go from ω = 0– to ω = 0+? At ω ≈ 0 : 1 G s s let : s e j 90, s j 0 90, s j 0 as 0 to 0 , 1 1 j G s e s G j 90 90 as 0 to 0 90 90 # encirclement N = _____ # open-loop unstable poles P = _____ Z = P + N = ________ = # closed-loop unstable poles. closed-loop stability: _______ Example: Given: 1. G(s) is stable 2. With K = 1, performed open-loop sinusoidal tests, and G(jω) is on next page Q: 1. Find stability margins 2. Find Nyquist criterion to determine closed-loop stability Solution: 1. Where does G(jω) cross the unit circle? ________ Phase margin ≈ ________ Where does G(jω) cross the negative real axis? ________ Gain margin ≈ ________ Is closed-loop system stable with K = 1? ________ Note that the total loop T.F. is KG(s). If K is not = 1, Nyquist plot of KG(s) is a scaling of G(jω). e.g. If K = 2, scale G(jω) by a factor of 2 in all directions. Q: How much can K increase before GM becomes lost? ________ How much can K decrease? ______ Some people say the gain margin is 0 to 5 in this example Q: As K is increased from 1 to 5, GM is lost, what happens to PM? What’s the max PM as K is reduced to 0 and GM becomes ∞? 2. To use Nyquist criterion, need complete Nyquist plot. a) Get complex conjugate b) Connect ω = 0– to ω = 0+ through an infinite circle c) Count # encirclement N d) Apply: Z = P + N P = _______ o.l. stable, Z = _______ c.l. stability: _______ Incorrect Correct Example: G(s) stable, P = 0 G(jω) for ω > 0 as given. 1. Get G(jω) for ω < 0 by conjugate 2. Connect ω = 0– to ω = 0+. But how? Choice a) : Incorrect Where’s “–1” ? # encirclement N = _______ Z = P + N = _______ Make sense? _______ Choice b) : Where is “–1” ? # encir. N = _____ Z=P+N = _______ closed-loop stability _______ Correct Note: If G(jω) is along –Re axis to ∞ as ω→0+, 1 s2 it means G(s) has in it. when s makes a half circle near ω = 0, G(s) makes a full circle near ∞. choice a) is impossible, but choice b) is possible. Incorrect Example: G(s) stable, 1. Get conjugate for ω < 0 2. Connect ω = 0– to ω = 0+. Needs to go one full circle with radius ∞. Two choices. P=0 Choice a) : N=0 Z=P+N=0 Incorrect! closed-loop stable Choice b) : N=2 Z=P+N =2 Closed loop has two unstable poles Correct! Which way is correct? near s 0 , G s K0 2 s K0 in this case s N in general For stable & non-minimum phase systems, K0 0 when s circles in c.c.w. 1 s circlesin c.w. Gs circlesin c.w. Example: G(s) has one unstable pole P = 1, no unstable zeros 1. Get conjugate 2. Connect ω = 0– to ω = 0+. How? One unstable pole/zero If connect in c.c.w. # encirclement N = ? If “–1” is to the left of A i.e. A > –1 then N = 0 Z=P+N=1+0=1 but if a gain is increased, “–1” could be inside, N = –2 Z = P + N = –1 c.c.w. is impossible If connect c.w.: For A > –1 N = ______ Z=P+N = ______ For A < –1 N = ______ Z = ______ No contradiction. This is the correct way. Example: G(s) stable, minimum phase P=0 G(jω) as given: get conjugate. Connect ω = 0– to ω = 0+, K0 0 c.w. direction If A < –1 < 0 : N = ______ Z = P + N = ______ stability of c.l. : ______ If B < –1 < A : A=-0.2, B=-4, C=-20 N = ______ Z = P + N = ______ closed-loop stability: ______ Gain margin: gain can be varied between (-1)/(-0.2) and (-1)/(-4), or can be less than (-1)/(-20) If C < –1 < B : N = ______ Z = P + N = ______ closed-loop stability: ______ If –1 < C : N = ______ Z = P + N = ______ closed-loop stability: ______