Course Outline Week 1 2 3 4 5 6 7 8 Amme 3500 : System Dynamics & Control State Space Design 9 10 11 12 13 14 Dr. Stefan Williams Date 1 Mar 8 Mar 15 Mar 22 Mar 29 Mar 5 Apr 12 Apr 19 Apr 26 Apr 3 May 10 May 17 May 24 May 31 May Dr. Stefan B. Williams Higher Order Poles Amme 3500 : State Space Amme 3500 : Introduction Assignment Notes Assign 1 Due Assign 2 Due No Tutorials Assign 3 Due Assign 4 Due Slide 2 Higher Order Poles: Example • Classical controller designs are based on selecting the location of the dominant second order pole locations • Higher order poles are generally not able to be set explicitly Dr. Stefan Williams Content Introduction Frequency Domain Modelling Transient Performance and the s-plane Block Diagrams Feedback System Characteristics Root Locus Root Locus 2 Bode Plots BREAK Bode Plots 2 State Space Modeling State Space Design Techniques Advanced Control Topics Review Spare Slide 3 • For the following plant 1 G(s) = s(s + 2)(s + 10) • Design a PD controller to yield an overshoot of 5% and a settling time of 1s Dr. Stefan Williams Amme 3500 : State Space Slide 4 Higher Order Poles: Example • Consider the design of a PD controller to achieve the required specifications • Desired root locations are at Higher Order Poles: Example x o x x x s = !4 ± 4.08 j ! z " !1 " ! 2 " ! 3 = (2k + 1)180° x ! z = 134.4 + 116.1 + 34.2 " 180 ! z = 104.7° # zc = 2.93 Dr. Stefan Williams With K=44.7 Amme 3500 : State Space Slide 5 Dr. Stefan Williams Amme 3500 : State Space Slide 6 Higher Order Poles State Space Modelling • As can be seen, the position of the higher order poles can have a significant impact on the actual system behaviour • Classical techniques do not easily afford us with a means of choosing the position of higher order poles • Recall that for the state space approach, we represent a system by a set of n firstorder differential equations: x! = Ax + Bu • The output of the system is expressed as: y = Cx + [Du] x - state vector y - output vector u - input vector Dr. Stefan Williams Amme 3500 : State Space Slide 7 Dr. Stefan Williams A - state matrix B - input matrix C - output matrix D - feedthrough or feedforward matrix (often zero) Amme 3500 : State Space Slide 8 State Space Control • We can represent a general state space system as a Block Diagram. • If we feedback the state variables, we end up with n controllable parameters. • State feedback with the control input u=-Kx +r. Dr. Stefan Williams State Space Control * N.S. Nise (2004) Control Systems Engineering Wiley & Sons Amme 3500 : State Space Slide 9 • We can then control the pole locations by finding appropriate values for K • This allows us to select the position of all the closed loop system roots during our design. • There are a number of methods for selecting and designing controllers in state space, including pole placement and optimal control methods via the Linear Quadratic Regulator algorithm. Dr. Stefan Williams • Setting u=-Kx+r yields x˙ (t) = Ax(t) + B(!Kx(t) + r) • Given a system of the form y(t) = Cx(t) • Rearranging the state equation and taking LT yields sX(s) = (A ! BK ) X(s) + BR(s) (sI ! (A ! BK ))X(s) = BR(s) 1 0 " 0 $ 0 0 1 A=$ " " $ " $!a !a !a # 0 1 2 C = [c1 c 2 ! X(s) !1 = ( sI ! (A ! BK )) B R(s) • Essentially we select values of K so that the eigenvalues (root locations) of (A-BK) are at a particular location Amme 3500 : State Space Slide 10 Pole Placement State Space Control Dr. Stefan Williams Amme 3500 : State Space Slide 11 cn ] ! 0 % "0 % ' $0 ' ! 0 'B= $ ' # 0 ' $" ' ' $1 ' ! !an !1 & # & • We can find the characteristic equation by solving for det(sI-(A-BK)) Dr. Stefan Williams Amme 3500 : State Space Slide 12 Pole Placement Pole Placement • Using u=-Kx, we can find the system matrix A-BK 0 1 0 " $ 0 0 1 A ! BK = $ " " " $ $!(a + k ) !(a + k ) !(a + k ) # 0 1 1 2 2 3 • Given a desired pole placement of ! 0 % ' ! 0 ' # 0 ' ! !(an !1 + k n ) '& n !1 det(sI ! (A ! BK)) = s + (an !1 + kn )s + ! + (a1 + k 2 )s + (a0 + k1 ) = 0 Dr. Stefan Williams Amme 3500 : State Space Slide 13 • or Dr. Stefan Williams Amme 3500 : State Space Slide 14 Pole Placement Example • Represent the plant in state space via the phase-variable form • Feed back each phase variable to the input of the plant through a gain, ki • Find the characteristic equation of the closedloop system • Decide upon closed-loop pole locations and determine an equivalent characteristic equation • Equate like coefficients of the characteristic equations and solve for ki Amme 3500 : State Space di = ai + k i+1 i = 0,1, 2,…, n ! 1 • This will allow us to place all of the closed loop poles where we want them Pole Placement Dr. Stefan Williams • and equating terms, we find ki+1 = di ! ai • With characteristic equation of the form n sn + dn !1sn !1 + ! + d1s + d0 = 0 Slide 15 • For the following plant 1 G(s) = s(s + 2)(s + 10) • Design a full state feedback controller to yield an overshoot of 5% and a settling time of 1s Dr. Stefan Williams Amme 3500 : State Space Slide 16 Pole Placement Example Pole Placement Example • The OL transfer function for the system is G(s) = 1 (s + 12s2 + 20s) 3 – 5% OS and – settling time of 1s • Convert the transfer function to SS 0 $! x1 $ !0 $ ! x˙1 $ !0 1 # x˙ & = #0 0 1 &# x 2 & + #0 & u 2 # & # &# & # & #" x˙ 3 &% #"0 '20 '12 &%#" x 3 &% #"1 &% y = [1 0 0]x Dr. Stefan Williams Amme 3500 : State Space • Decide on desired root locations • From specifications, we require Slide 17 • Select dominant second order roots to be at s = !4 ± 4 j • Select third root 5 times to left at s = !20 • Desired characteristic equation: s3 + 28s2 + 192s + 640 Dr. Stefan Williams Pole Placement Example Amme 3500 : State Space Slide 18 Pole Placement Example • Feeding back states we find • So x˙ = Ax + Bu = Ax + B(!Kx + r) = (A ! BK ) x + Br (" 0 1 0 %+ "0 % $ ' * sX = 0 0 1 X + $0 'r '$ ' *$ !K !(20 + K ) !(12 + K ) $ ' $#1 '& )# 1 2 3 &, • Solve for the characteristic equation 0 % "0 0 0 %+ " x1 % "0 % " x˙1 % ( "0 1 $ x˙ ' = * $0 0 1 '! $ 0 0 0 '- $ x 2 ' + $0 ' r $ 2' *$ ' $ '- $ ' $ ' $# x˙ 3 '& ) $#0 !20 !12 '& $#K1 K 2 K 3 '&, $# x 3 '& $#1 '& s !1 0 0 s !1 =0 K1 (20 + K 2 ) s + (12 + K 3 ) s3 + (12 + K 3 )s2 + (20 + K 2 )s + K1 = 0 Dr. Stefan Williams Amme 3500 : State Space Slide 19 Dr. Stefan Williams Amme 3500 : State Space Slide 20 Pole Placement Example Pole Placement Example • Looks like we have met the overshoot and settling time requirements • However, steady state error is not addressed here • Equating like terms we find s3 + 28s2 + 192s + 640 s3 + (12 + K 3 )s2 + (20 + K 2 )s + K1 • So K1 = 640 K 2 = 172 K 3 = 16 Dr. Stefan Williams Amme 3500 : State Space Slide 21 Dr. Stefan Williams Steady State Error * N.S. Nise (2004) Control Systems Engineering Wiley & Sons Amme 3500 : State Space Slide 22 Steady State Error • Full state feedback does not directly address the issue of steady state error • A common strategy is to feedback the output and add additional state variables Dr. Stefan Williams Amme 3500 : State Space Slide 23 • Looking at the previous diagram, we find x˙ N = e = r ! Cx • We can augment the state equations yielding ! x˙ $ ! A 0 $ ! x $ !B $ !0 $ # x˙ & = #'C 0 & # x & + # 0 &u + #1 & r " N% " %" N % " % " % !x$ y = [C 0]# & " xN % Dr. Stefan Williams Amme 3500 : State Space Slide 24 Steady State Error • But • So Steady State Error Example "x% u = !Kx + K E x N = ![K K E ]$ ' #xN & • Let s consider the previous example where we wanted the roots at s3 + 28s2 + 192s + 640 • We now have an additional pole which we will place at s=100 so the new desired characteristic equation is ! x˙ $ !A ' BK BK e $! x $ !0 $ + r # x˙ & = # 'C 0 &%#" x N &% #"1 &% " N% " !x$ y = [C 0]# & " xN % • We can now choose gains to yield desired pole locations and zero steady state error Dr. Stefan Williams Amme 3500 : State Space Slide 25 Steady State Error Example • The system is now characterised by 1 0 0 $+ (! 0 !0 $ # * 0 1 0 &- ! X $ # & !X$ # 0 & -# & + 0 r s# & = * " X N % * #'K1 '(20 + K 2 ) '(12 + K 3 ) K e &- " X N % # & #"1 &% # -C * 0 0 0 &%-, ) " '1 • Finding the eigenvectors of this equation yields s4 + (12 + K 3 )s3 + (20 + K 2 )s2 + K1s + K e Amme 3500 : State Space Dr. Stefan Williams Amme 3500 : State Space Slide 26 Steady State Error Example • Equating like terms we find BKe Dr. Stefan Williams s4 + 128s3 + 2992s2 + 19840s + 64000 Slide 27 s4 + 128s3 + 2992s2 + 19840s + 64000 s4 + (12 + K 3 )s3 + (20 + K 2 )s2 + K1s + K e • So K1 = 19840 K 2 = 2972 K 3 = 116 K e = 64000 Dr. Stefan Williams Amme 3500 : State Space Slide 28 Steady State Error Example • We now have a system that meets all of our requirements • We haven t considered the required control effort Dr. Stefan Williams • The previous development assumes that we have access to all state variables for state feedback • In some instances, the state variables may not be available – They may be difficult to observe – Sensors may be expensive Amme 3500 : State Space Slide 29 Observer Design • We may need to design an Observer to estimate the state variables • We can compare the estimated output against the measured output to close the loop on our estimate • The estimated state is then used as the feedback in the controller Dr. Stefan Williams Observer Design Dr. Stefan Williams Amme 3500 : State Space Slide 30 Linear Quadratic Regulator Control • Optimal control methods attempt to find optimal gains subject to certain conditions • One such algorithm is called the Linear Quadratic Regulator (LQR) algorithm. • An objective/cost function can be defined and the appropriate state feedback gain K that minimizes the cost function can be found. • Weighting factors/matrices are used to penalize the states and control input. This generally requires a good engineering judgment depending on the control performance requirements. * N.S. Nise (2004) Control Systems Engineering Wiley & Sons Amme 3500 : State Space Slide 31 Dr. Stefan Williams Amme 3500 : State Space Slide 32 LQR Control LQR Control • Consider a dynamic system in a state space form: • Then, the state feedback gain that minimizes this cost function is: x˙ = Ax + Bu • We can set a particular objective/cost function which governs the performance of the closedloop system: ! T J = " ( x Qx + uT Ru) dt u = !(R!1 B T P)x = !Kx • P can be obtained by solving the Riccati equation: A T P + PA ! PBR !1 B T P + Q = 0 0 • Here, Q and R are the weighting matrices that respectively penalize the states x and control input u (Q!0, R>0). Dr. Stefan Williams Amme 3500 : State Space Slide 33 An Example System • In Matlab, the feedback gain can be found via [K]=lqr(system,Q,R) Dr. Stefan Williams Amme 3500 : State Space Slide 34 Inverted Pendulum Inverted pendulum – video courtesy of Colorado State University Dr. Stefan B. Williams Amme 3500 : Introduction Slide 35 Dr. Stefan B. Williams Amme 3500 : Introduction Slide 36 Inverted Pendulum State Space Systems • We will look at the modelling and control of the inverted pendulum solutions provided by the University of Michigan • http:// www.engin.umich.edu /class/ctms/examples/ pend/invpen.htm Dr. Stefan Williams Amme 3500 : State Space • There are many other aspects of state space systems that we have not touched on here • These include accounting for non-linear or digital systems • We have also only touched briefly on optimal control methods Slide 37 Dr. Stefan Williams Conclusions Amme 3500 : State Space Slide 38 Further Reading • We have looked at techniques for modelling systems using State Space techniques. • We have provided a brief introduction to designing controllers using the State Space techniques using pole placement and the LQR algorithm. Dr. Stefan Williams Amme 3500 : State Space Slide 39 • Nise – Sections 3.1-3.7 and 12.1-12.8 • Franklin & Powell – Section 2.2 and 7.1-7.6 Dr. Stefan Williams Amme 3500 : State Space Slide 40
© Copyright 2024 Paperzz