16.333 Lecture #10 State Space Control Basic state space control approaches
16.333 Lecture # 10 State Space Control • Basic state space control approaches
Fa2004 16.3339-1 State Space Basics State space models are of the forr i(t)= Ax(t)+ Bu(t) y(t)=Cx (t)+Du with associated transfer function G(s)=C(sI-A)B+D Note: must form symbolic inverse of matrix(sI-A), which is hard Time response: Homogeneous part =A., c(O) known Take Laplace transform (s)=(sI-A)-1x(0 (t)=C-1[(s-A)-]x0 But can show(sI- A)-1=l+4+43 C-1[(s/-A)=1+At+2(4t)2 Gives c(t)=eAtx(0) where eAt is Matrix Exponential ◇ Calculate in matlab using expm. m and not exp.m o Time response: Forced Solution -Matrix case i= Ar+ Bu Where r is an n-vector and u is a m-vector. Cam show )+/e4c-)Bu(T) 0 y(t)=Ceata(0)+/CeA(-T Bu(r)dr+Du(t) Ceat a(0) is the initial response Cea(t)B is the impulse response of the system Matlab is a trademark of the mathworks Inc
� � � � � � Fall 2004 16.333 9–1 State Space Basics • State space models are of the form x˙(t) = Ax(t) + Bu(t) y(t) = Cx(t) + Du(t) with associated transfer function G(s) = C(sI − A) −1 B + D Note: must form symbolic inverse of matrix (sI − A), which is hard. • Time response: Homogeneous part x˙ = Ax, x(0) known – Take Laplace transform X(s) = (sI − A) −1 x(0) ⇒ x(t) = L−1 (sI − A) −1 x(0) I A A2 – But can show (sI − A) −1 = + s2 + s3 + . . . s 1 so L−1 (sI − A) −1 = I + At + 2!(At) 2 + . . . = eAt – Gives x(t) = eAtx(0) where eAt is Matrix Exponential 3 1 Calculate in MATLAB�R using expm.m and not exp.m • Time response: Forced Solution – Matrix case x˙ = Ax + Bu where x is an nvector and u is a mvector. Cam show t x(t) = eAtx(0) + eA(t−τ ) Bu(τ )dτ 0 t y(t) = CeAtx(0) + CeA(t−τ ) Bu(τ )dτ + Du(t) 0 – CeAtx(0) is the initial response – CeA(t) B is the impulse response of the system. 1MATLAB�R is a trademark of the Mathworks Inc
Fa2004 16.3339-2 Dynamic Interpretation Since a= Tat-. then where we have written which is a column of rows Multiply this expression out and we get that At Assume A diagonalizable, then A a(0) given, has solution (t)=er 0)=Tet( ∑e:{nxrO)h ∑ State solution is a linear combination of the system modes vier eAit -Determines the nature of the time response Ui- Determines extent to which each state contributes to that mode Bi-Determines extent to which the initial condition excites the mode
� � � Fall 2004 16.333 9–2 Dynamic Interpretation • Since A = TΛT −1, then ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ T e At | | λ1t ... − w . . 1 − e = TeΛt T −1 = ⎣ v ⎦ 1 · · · vn ⎦ ⎣ ⎦ ⎣ . | | λnt T e − wn − where we have written ⎡ ⎤ − T w . 1 − T −1 = ⎣ . . ⎦ − T wn − which is a column of rows. • Multiply this expression out and we get that n At λit T e = e viwi i=1 • Assume A diagonalizable, then x˙ = Ax, x(0) given, has solution x(t) = eAtx(0) = TeΛt T −1 x(0) n = eλit vi{wi T x(0)} i=1 n λit = e viβi i=1 • State solution is a linear combination of the system modes vieλi eλit – Determines the nature of the time response vi – Determines extent to which each state contributes to that mode βi – Determines extent to which the initial condition excites the mode
Fa2004 16.3339-3 Note that the vi give the relative sizing of the response of each part of the state vector to the response mode 1 0 de 2 Clearly eid gives the time modulation A i real- growing/decaying exponential response Ai complex -growing/decaying exponential damped sinusoidal Bottom line: The locations of the eigenvalues determine the pole locations for the system, thus They determine the stability and or performance transient be- havior of the system It is their locations that we will want to modify with the controllers
� � � � Fall 2004 16.333 9–3 • Note that the vi give the relative sizing of the response of each part of the state vector to the response. 1 v1(t) = e−t mode 1 0 0.5 v2(t) = e−3t mode 2 0.5 • Clearly eλit gives the time modulation – λi real – growing/decaying exponential response – λi complex – growing/decaying exponential damped sinusoidal • Bottom line: The locations of the eigenvalues determine the pole locations for the system, thus: – They determine the stability and/or performance & transient behavior of the system. – It is their locations that we will want to modify with the controllers
Fa2004 16.3339-4 Full-state Feedback Controller Assume that the single-input system dynamics are given by Ar+ Bu y= Ca so that D=0 The multi-actuator case is quite a bit more complicated as we would have many extra degrees of freedom Recall that the system poles are given by the eigenvalues of A Want to use the input u(t) to modify the eigenvalues of A to change the system dynamics y A.B. C Assume a full-state feedback of the form u=r-Kx where r is some reference input and the gain K is rxn If r=0, we call this controller a regulator
Fall 2004 16.333 9–4 Fullstate Feedback Controller • Assume that the singleinput system dynamics are given by x˙ = Ax + Bu y = Cx so that D = 0. – The multiactuator case is quite a bit more complicated as we would have many extra degrees of freedom. • Recall that the system poles are given by the eigenvalues of A. – Want to use the input u(t) to modify the eigenvalues of A to change the system dynamics. r u y − OO / A, B, C / x K • Assume a fullstate feedback of the form: u = r − Kx where r is some reference input and the gain K is R1×n – If r = 0, we call this controller a regulator
Fa2004 16.3339-5 Find the closed-loop dynamics Ax+B(r-Ka =(A- BK)a+Br ld.C+B 4 C Objective: Pick K so that Ac has the desired properties, e. g A unstable, want A stable Put2 poles at-2±2 o Note that there are n parameters in k and n eigenvalues in a, so it looks promising, but what can we achieve Example #1: Consider 0 Then det(s-A)=(s-1)(s-2) 3s+1=0 so the system is unstable -Define u=-[ki k2]=-Ka,then 1-k11-k2 Ad=a-BK= [k1k2] So then we have that det(I-Aa)=s2+(k1-3)s+(1-2k1+k2)=0
� � � � � � � � Fall 2004 16.333 9–5 • Find the closedloop dynamics: x˙ = Ax + B(r − Kx) = (A − BK)x + Br = Aclx + Br y = Cx • Objective: Pick K so that Acl has the desired properties, e.g., – A unstable, want Acl stable – Put 2 poles at −2 ± 2j • Note that there are n parameters in K and n eigenvalues in A, so it looks promising, but what can we achieve? • Example #1: Consider: 1 1 x˙ = 1 2 1 x + u 0 – Then det(sI − A) = (s − 1)(s − 2) − 1 = s2 − 3s + 1 = 0 so the system is unstable. – Define u = − k1 k2 x = −Kx, then � � � � 1 1 1 � � 1 − k1 1 − k2 Acl = A−BK = k1 k2 = 1 2 − 0 1 2 – So then we have that det(sI − Acl) = s2 + (k1 − 3)s + (1 − 2k1 + k2) = 0
Fa2004 16.3339-6 Thus, by choosing ki and k2, we can put Ai(Ac) anywhere in the complex plane(assuming complex conjugate pairs of poles) To put the poles ats=-5,-6, compare the desired characteristic equation (s+5)(s+6)=s2+118+30=0 with the closed-loop one s2+(k1-3)x+(1-2k+k2)=0 to conclude that k1-3=11 k1=14 1-2k1+k2=30 so that K=[14 57, which is called Pole Placement Of course, it is not always this easy, as the issue of controllability must be addressed Example #2: Consider this system 11 0 with the same control approach 1-k11-k2 A=A-Bk so that det(si- ad)=(s-1+k1(s-2)=0 The feedback control can modify the pole at s but it cannot move the pole at s= 2 This system cannot be stabilized with full-state feedback control o What is the reason for this problem?
� � � � � � � � � � � � � Fall 2004 16.333 9–6 – Thus, by choosing k1 and k2, we can put λi(Acl) anywhere in the complex plane (assuming complex conjugate pairs of poles). • To put the poles at s = −5, −6, compare the desired characteristic equation (s + 5)(s + 6) = s2 + 11s + 30 = 0 with the closedloop one 2 s + (k1 − 3)x + (1 − 2k1 + k2) = 0 to conclude that k1 − 3 = 11 k1 = 14 1 − 2k1 + k2 = 30 k2 = 57 so that K = 14 57 , which is called Pole Placement. • Of course, it is not always this easy, as the issue of controllability must be addressed. • Example #2: Consider this system: 1 1 x˙ = 0 2 1 x + u 0 with the same control approach 1 1 1 � � 1 − k1 1 − k2 Acl = A − BK = k1 k2 = 0 2 − 0 0 2 so that det(sI − Acl) = (s − 1 + k1)(s − 2) = 0 The feedback control can modify the pole at s = 1, but it cannot move the pole at s = 2. • This system cannot be stabilized with fullstate feedback control. • What is the reason for this problem?
Fa2004 16.3339-7 It is associated with loss of controllability of the e mode Basic test for controllability: rank Mc=n BlAB So that rank M=1<2 Must assume that the pair(A, B) are controllable
� � � � � Fall 2004 16.333 9–7 – It is associated with loss of controllability of the e2t mode. • Basic test for controllability: rank Mc = n � � � � � B AB 1 1 = 1 0 1 0 Mc = 0 2 So that rank Mc = 1 < 2. • Must assume that the pair (A, B) are controllable
Fa2004 16.3339-8 Ackermann's Formula The previous outlined a design procedure and showed how to do it by hand for second-order systems - Extends to higher order(controllable) systems, but tedious Ackermann's Formula gives us a method of doing this entire design process is one easy step K=[0…01]Ma重 [BAB…A-B] dpa(s is the characteristic equation for the closed-loop poles. which we then evaluate for s= a It is explicit that the system must be controllable because we are inverting the controllability matrix · Revisit Example#1:重(Ss)=s2+115+30 11 BlAB 0 So 11 11 01 +301 01 4314 =1457 Automated in Matlab: place. m acker m(see polyvalmm too
� � � � � � � � �� �� Fall 2004 16.333 9–8 Ackermann’s Formula • The previous outlined a design procedure and showed how to do it by hand for secondorder systems. – Extends to higher order (controllable) systems, but tedious. • Ackermann’s Formula gives us a method of doing this entire design process is one easy step. K = 0 . . . 0 1 M−1 Φd(A) c – Mc = B AB . . . An−1B – Φd(s) is the characteristic equation for the closedloop poles, which we then evaluate for s = A. – It is explicit that the system must be controllable because we are inverting the controllability matrix. • Revisit Example #1: Φd(s) = s2 + 11s + 30 � � � � � � � 1 1 1 � 1 1 1 Mc = B AB = = 0 1 2 0 0 1 So ⎞ � � 1 1 �−1 ⎛� �2 � � � 1 1 1 1 K = 0 1 ⎝ + 11 + 30I⎠ 0 1 1 2 1 2 � � 43 14 � � = 0 1 = 14 57 14 57 • Automated in Matlab: place.m & acker.m (see polyvalm.m too)
Fa2004 16.3339-9 Origins? For simplicity, consider a third-order system(case #2),but this extends to any order ai-a 100B=0C=[bb2b3] This form is useful because the characteristic equation for the system is obvious => det(sI-A)=s+a1S+a2S+a3=0 Can show that a A=A-BK 100 0[k1 k2 ka 1-k1-a2-k2 so that the characteristic equation for the system is still obvious 重a(s)=de-Aa)=s3+(a1+k)s2+(a2+k2)s+(a3+k3)=0 We then compare this with the desired characteristic equation devel oped from the desired closed -loop pole locations 重(s)=s32+(a1)s2+(a2)s+(a3)=0 to get that +hl +k kn Pole placement is a very powerful tool and we will be using it for most of our state space work
� � � � Fall 2004 16.333 9–9 • Origins? For simplicity, consider a thirdorder system (case #2), but this extends to any order. ⎡ ⎤ ⎡ ⎤ −a1 −a2 −a3 1 A = ⎣ 1 0 0 ⎦ B = ⎣ 0 ⎦ C = b1 b2 b3 0 1 0 0 – This form is useful because the characteristic equation for the 2 system is obvious ⇒ det(sI − A) = s3 + a1s + a2s + a3 = 0 • Can show that ⎡ ⎤ ⎡ ⎤ −a1 −a2 −a3 1 Acl = A − BK = ⎣ 1 0 0 ⎦ − ⎣ 0 ⎦ k1 k2 k3 0 1 0 0 ⎡ ⎤ −a1 − k1 −a2 − k2 −a3 − k3 = ⎣ 1 0 0 ⎦ 0 1 0 so that the characteristic equation for the system is still obvious: 2 Φcl(s) = det(sI −Acl) = s3+(a1+k1)s +(a2+k2)s+(a3+k3) = 0 • We then compare this with the desired characteristic equation developed from the desired closedloop pole locations: 2 Φd(s) = s3 + (α1)s + (α2)s + (α3) = 0 to get that ⎫ a1 + k1 = α1 ⎬ k1 = α . 1 − a1 . . . . . ⎭ an + kn = αn kn = αn − an • Pole placement is a very powerful tool and we will be using it for most of our state space work