Cascade Compensation R(s) + Frequency Domain Design C(s) Gc(s) G(s) M. Sami Fadali Professor of Electrical Engineering University of Nevada • Gc(s) = compensator transfer function • Choose compensator to meet design specs. • Phase Margin, Gain Margin, BW, e()% 1 2 Frequency Response Criteria Determine Phase Margin • Find the gain crossover frequency . • Express closed-loop criteria in terms of • Consider the unity feedback system • Find Magnitude (dB) 40 where Bode Diagram Gm = 7.96 dB (at 10 rad/s) , Pm = 22.5 deg (at 6.08 rad/s) 30 20 10 0 Phase (deg) -10 -90 • Substitute for -135 PM=22.5 deg -180 -1 10 3 0 1 10 Frequency (rad/s) 10 4 Phase Margin Gain Crossover 2 4 4 1 2 2 5 Phase Margin vs. Damping Ratio PM 100 6 Bandwidth • Obtain from the magnitude plot of the closedloop transfer function 80 60 • Solve for the 3 dB frequency : 40 20 0 0 0.5 1 1.5 2 2.5 3 MATLAB: 7 >> bandwidth(T) 8 Bandwidth and Gain Crossover Solve for 3 dB Frequency BW n (3 dB point) c n / c BW 9 Resonance Frequency and Peak 10 Resonance Frequency and Peak • Differentiate and equate to zero to find the minimum p n 11 Mp 12 Proportional Control Specified GM • Only one characteristic can be chosen. • Phase plot cannot be changed. • Specify one of the following (stable system): – Gain Margin. – Phase Margin. – Steady-state error. 1. Determine the phase crossover frequency 1. Find the magnitude at the crossover frequency. • Determine the remaining characteristics of the system after the design is completed. 13 14 Example Specified GM (Cont.) 3. Add an amplifier gain Bode Diagram Magnitude (dB) 100 (or slide curve up or down with sisotool) / -100 System: g Gain Margin (dB): 7.96 At frequency (rad/s): 10 Closed loop stable? Yes System: g Phase Margin (deg): 22.5 Delay Margin (sec): 0.0647 At frequency (rad/s): 6.08 Closed loop stable? Yes -200 -90 Phase (deg) 0 15 -180 -270 -1 10 10 0 1 10 Frequency (rad/s) 10 2 10 3 16 GM Example GM Absolute Units . Magnitude (abs) 10 10 10 Bode Diagram 5 / / 0 -5 System: g Gain Margin (abs): 2.5 At frequency (rad/s): 10 Closed loop stable? Yes , System: g Phase Margin (deg): 22.5 Delay Margin (sec): 0.0647 At frequency (rad/s): 6.08 Closed loop stable? Yes -10 10 -90 Phase (deg) • Desired / -180 -270 -1 10 10 0 1 10 Frequency (rad/s) 10 2 10 3 17 GM Example: MATLAB 18 GM Example: MATLAB (cont.) >> g=zpk([],[0,-5,-20],1000); >> [m, f]=bode(g,10) % mag, phase at crossover m= 0.4000 f= -180 >> k=1/m/sqrt(10) % 1/mag./GM k= 0.7906 >>[ GM,PM,wpc,wgc]=margin(g*k) GM = 3.1623 PM = 28.8031 wpc = 10.0000 wgc = 5.2613 19 20 PM Example Specified PM Desired PM 50° Magnitude (dB) 1. Determine the new gain crossover frequency (has the desired angle). at 2. Add an amplifier gain / . / 21 Magnitude (abs) 10 10 0 -5 0.355 System: g Frequency (rad/s): 3 Magnitude (abs): 2.81 -10 System: g Frequency (rad/s): 2.99 Phase (deg): -130 10 -90 Phase (deg) 1 2.81 Bode Diagram 5 -180 -270 -1 10 10 0 1 10 Frequency (rad/s) 10 2 -50 System: g Frequency (rad/s): 3 Magnitude (dB): 8.99 -100 System: g Frequency (rad/s): 2.99 Phase (deg): -130 -180 -270 -1 10 / 10 =20 log magnitude dB 0 1 10 Frequency (rad/s) 22 MATLAB: Bode New Gain 10 0 -150 -90 Phase (deg) 1. Find the magnitude at the new gain crossover . frequency Bode Diagram 50 10 3 23 >> [mag,ph]=bode(g,3) mag = 2.8267 ph = -129.4945 >> K=1/mag K= 0.3538 24 PM after Gain Change Specified Steady-State Error >> margin(0.35*g) 1. Determine the necessary improvement in the steady-state error. Magnitude (abs) Bode Diagram Gm = 7.14 (at 10 rad/s) , Pm = 50.8 deg (at 2.98 rad/s) 10 0 System: untitled1 Frequency (rad/s): 9.99 Magnitude (abs): 0.14 10 2. Determine the necessary increase in the error constant. -5 e.g. for a type I system Phase (deg) -90 -135 , -180 -225 , -270 -1 10 0 10 1 10 Frequency (rad/s) 2 10 3 10 25 Steady-state Error Example • Desired (Type I) , , 27 26