Handin 1 Bo Bernhardsson, K. J. Åström Department of Automatic Control LTH, Lund University Bo Bernhardsson, K. J. Åström Handin 1 Handin 1 - goals Get some practice using the Matlab control system toolbox (or similar) Get started with some control design Bo Bernhardsson, K. J. Åström Handin 1 Example - Double Integrator Consider the double integrator y= 1 u s2 controlled with state-feedback + Kalman filter u = −K x̂ = −K(sI − A + BK + LC)−1 Ly Let’s place eigenvalues of A − BK and A − LC in Butterworth patterns >Pm >K >Po >L = = = = butter(2,wm,’s’) place(A,B,Pm) butter(2,wo,’s’) place(A’,C’,Po)’ Bo Bernhardsson, K. J. Åström Handin 1 Results Bode Diagram, C 40 Magnitude (dB) 60 50 0 -50 20 0 -100 -20 -150 -40 -135 45 -180 0 Phase (deg) Phase (deg) Magnitude (dB) Bode Diagram P*C 100 -225 -45 -90 -270 0 1 10 10 Frequency (rad/sec) 2 0 3 10 10 10 1 10 Frequency (rad/sec) 2 3 10 10 2 Nichols Chart 1.5 40 0.5 dB 1 dB Open-Loop Gain (dB) 20 0.5 0 -0.5 -1 3 dB 6 dB 0 -20 -40 -60 -1.5 -2 -2 0 dB 0.25 dB 1 -80 -270 -1.5 -1 -0.5 0 0.5 1 1.5 Bo Bernhardsson, K. J. Åström -225 -180 -135 Open-Loop Phase (deg) 2 Handin 1 -90 Results 3 10 2 Max |C(iw)| 10 1 10 0 10 0 10 1 10 wgc rad/s 2 10 Trade off between closed loop bandwidth and controller gain (Hmmmm, why is the slope 2?) (Advanced hmmmm, why do LQG design with varying control penalty ρ and Butterworth pole placement give the same results? Answer to this later in the course.) Bo Bernhardsson, K. J. Åström Handin 1 Handin 1A- PI control of 1st order system First order model: the archetype system Normalizing input, output and time variables we have G(s) = 1 s+1 Let’s use PI control u = (kp + ki /s)(r − y) This gives a 2nd order closed system. Bo Bernhardsson, K. J. Åström Handin 1 Handin 1A- PI control of 1st order system Let’s design the closed loop polynomial to become s2 + 2ζ0 ω0 s + ω02 we get kp = 2ζ0 ω0 − 1 ki = ω02 Let’s assume a slow design is ok, say ω0 = 0.1, ζ0 = 0.5. Bo Bernhardsson, K. J. Åström Handin 1 Result - Rise time vs ω0 6 100 90 5 input load disturbance peak 80 risetime 70 60 50 40 30 20 4 3 2 1 10 0 0 2 4 omega0 6 8 10 0 0 Looks as expected. Let’s check the control signal size also. Bo Bernhardsson, K. J. Åström Handin 1 2 4 ω0 6 8 10 Step Response - input signal size 10 9 control signal peak 8 7 6 5 4 3 2 1 0 2 4 omega0 6 8 10 Hmm, the behavior when ω0 is small is rather unexpected. Let’s check the Bode and Nyquist diagrams. Bo Bernhardsson, K. J. Åström Handin 1 Nyquist Diagram ω0 =0.1 step response with G=1.1/(s+1), omega0=[0.1 0.3 1 3 10] 2 10 1.5 8 6 1 4 0.5 2 0 0 -0.5 -2 -1 -4 -1.5 -2 -2 -6 -1.5 -1 -0.5 0 0.5 1 1.5 2 -8 0 20 40 60 80 The design with ω0 = 0.1 has terrible robustness. The system becomes unstable with 10 % model error Practically useless! Why? What to do? Bo Bernhardsson, K. J. Åström Handin 1 100 Handin 1 Exercise 1A Verify the previous figures. Use pole placement design to do PI control of the system 1/(s + 1) for varying ω0 . Use any method you like to find a PI-controller that achieves good robustness and a gain-crossover frequency ωgc = 0.1, or describe why this is not possible. Bo Bernhardsson, K. J. Åström Handin 1 Handin 1 Exercise 1B Consider the system P (s) = s+1 . Design a controller s2 with pole-placement where the observer poles and the controller poles have ω0 = 10 and damping ratio ζ0 = 0.707. Plot the Nyquist curve of the loop transfer function and the Gang of Four for the closed loop systems obtained. Comment on the design. Handin 1 is due Thursday Feb 25, 10.00 Bo Bernhardsson, K. J. Åström Handin 1