# Sample Solution Example Set 6: Controllability & Observability

## Comments

## Transcription

Sample Solution Example Set 6: Controllability & Observability

Signal and System Theory II, FS 2014 Prof. J. Lygeros Automatic Control Laboratory ETH Zurich, ETL I28 8092 Zurich Sample Solution Example Set 6: Controllability & Observability Handed out: Exercise 1 Thursday, 17 April 2014 Minimum Energy Control (a) The system is controllable if the controllability matrix P has full rank. P = [B AB], so " 1 # 1 2 2 − (R1 +R − (R1 +R 2 2 1 C C 2 )C 2 )C P = . 2R1 R22 2R1 R22 R2 R1 + R2 − RL2 − (R1 +R 2 L (R1 +R2 )L2 2 )L Note that det 1 C R2 L 1 C − RL2 =− 2R2 6= 0. LC Therefore rank(P ) = 2, which implies that P is full rank and hence the system is controllable. (b) We observe only one of the two states, and since there is no coupling between the states in the dynamics the system is not observable. Alternatively one could check the observability matrix C Q= . CA 1 0 Q= . 2 − (R1 +R2 )C 0 We obtain that rank(Q) = 1, and hence the system is unobservable. (c) The system is controllable, and hence the minimum energy input for t ∈ [0, 1] is given by u(t) = B T eA where Wc = R1 0 T eAτ BB T eA 1 τ T (1−t) Wc (1)−1 x(1), dτ is the controllability gramian. Evaluating we get −τ 1 1 1 e−τ 0 1 1 e Wc (1) = −τ 0 e 1 −1 1 −1 0 4 0 Z 1 −2τ 1 1 e 0 1 0 = (1 − e−2 ) . = −2τ 0 e 0 1 2 0 4 Z 1 0 e−τ dτ Then, 2 t−1 e 1 − e−2 4 t−1 e = 1 − e−2 u(t) = Exercise 2 1 1 1 −1 1 . 0 1 0 0 1 1 1 Controllability and controller design (a) The state equations for Figure 2 are x(t) ˙ = y(t) (b) The controllability matrix is P = 1 1 −3 1 = −1 α = B AB x(t) + 1 0 u(t) (1) x(t). 1 0 (2) −1 α . Hence, det(P ) = α and the system is controllable unless α = 0. (c) The control law u(t) = K(α)x(t) drives the state to zero for any initial condition if and only if the closed loop system is asymptotically stable. The closed loop system is x(t) ˙ = Ax(t) + BK(α)x(t) = [A + BK(α)] x(t). For α 6= 0 The system is controllable therefore it is always possible to find a matrix K such that A + BK is asymptotically stable. −1 1 1 k1 − 1 k2 + 1 k1 k2 = A + BK = + . α 1 0 α 1 Its characteristic polynomial is det(sI − (A + BK)) = s2 − k1 s + k1 − 1 − α(k2 + 1). We have an asymptotically stable matrix if, for example, we choose to allocate both the eigenvalues in −1. The characteristic polynomial is in this case (s + 1)2 = s2 + 2s + 1. By comparison we obtain −k1 = 2 ⇒ k1 = −2 k1 − 1 − α(k2 + 1) = 1 . Therefore K(α) = −2 − 1 + α4 ⇒ 4 k2 = − 1 + α For α = 0 A + BK = −1 0 1 1 + 1 0 k1 k2 = k1 − 1 0 k2 + 1 1 . Irrespective of the choice of K, one eigenvalue is 1. Therefore for α = 0 the system is not stabilizable and it is not possible to find K such that the closed loop system is asymptotically stable. 2 Exercise 3 (1) Reachable states, Unobservable states & Duality The output of a continuous-time linear time-invariant system is given by y(t) = CeAt x0 + C Z t eA(t−τ ) Bu(τ )dτ + Du(t). 0 We want to find the set of states x0 whose influence on the output is zero, i.e. for which the term CeAt x0 is zero for all t ≥ 0. If we define f (t) = CeAt x0 , t ≥ 0, then by the Taylor series expansion of f (t), we have that f (t) = f (0) + f 0 (0)t + f 00 (0) t2 + · · · = 0 ∀t ≥ 0 2! in other words f (0) f 0 (0) = Cx0 = CAx0 .. . =0 =0 f n−1 (0) f n (0) = CAn−1 x0 = CAn x0 .. . =0 =0 (3) From the Cayley-Hamilton theorem, we know that An+k is a linear function of I, A, . . . An−1 , for all k = 0, 1, . . .. Therefore, if Cx0 = CAx0 = . . . = CAn−1 x0 = 0, because of linearity, we also have CAn+k x0 = 0 for all k = 0, 1, . . . . That means, that the above infinite system of equations is equivalent to the following reduced system f (0) f 0 (0) f n−1 (0) = Cx0 = CAx0 .. . =0 =0 = CAn−1 x0 = 0, (4) which, in turn, is equivalent to Qx0 = 0. Hence, the set of states x0 satisfying (4) is the nullspace of the observability matrix C CA Q= . .. . CAn−1 (2) We denote by R0 the set of states that can be reached from the origin. In order to prove that R0 = range(P ) (where P is the controllability matrix), we show R0 ⊆ range(P ) and R0 ⊇ range(P ). Proof of R0 ⊆ range(P ): 3 Let x ∈ R0 . Then, by definition, for some time t > 0 there exists an input u(·) : [0, t] → Rm such that t Z eA(t−s) Bu(s)ds x= 0 2 2 n n We already know that eAt = I + At + A 2t + · · · An!t + · · · and we can also write (by the CayleyHamilton Theorem) Ak for k ≥ n as a linear combination of I, A, A2 , · · · , An−1 . Hence higher order terms can be grouped together leading to: eAt = k0 (t)I + k1 (t)A + . . . + kn−1 (t)An−1 for some appropriately defined functions ki (t). This fact enables us to rewrite the above expression for x as x= n−1 X Ai B Z t ki (t − s)u(s)ds, 0 i=0 from which we can deduce that x ∈ range(P ), where P = [B AB A2 B · · · An−1 B] is the controllability matrix of the system. One can see this by rewriting the above equation in matrix form: x = P z, where P is the controllability matrix and Z t Z t Z t z := [ k0 (t − s)u(s)ds k1 (t − s)u(s)ds · · · kn−1 (t − s)u(s)ds]T . 0 0 0 Proof of R0 ⊇ range(P ): In order to prove the reverse inclusion, we show first that range(P ) = range(Wc (t)), ∀t > 0 (5) where Wc (t) is the controllability gramian at time t: Z t T Wc (t) = eAs BB T eA s ds. 0 Note that, by its definition, Wc (t) is a symmetric matrix. Also, as seen in the lecture notes slide 4.19, null(Wc (t)) = null(P T ). But, as we know from linear algebra, (range(X))⊥ = null(X T ), for any real matrix X. (In words, this says that the set of vectors that are orthogonal to all vectors in the range of X is equal to the nullspace of X T ). This fact enables us to write null(Wc (t)) = null(P T ) = (range(P ))⊥ ⇐⇒ range(P ) = (null(Wc (t)))⊥ = range(Wc (t)). The last equality holds because Wc (t) is symmetric, which implies that its range space is the orthogonal complement of its nullspace. Now let us assume that x ∈ range(P ) and fix t > 0. Since range(P ) = range(Wc (t)), ∀t > 0, it holds that x = Wc (t)z, for some z, i.e. Z t T x = Wc (t)z = eA(t−s) BB T eA (t−s) zds. 0 4 Setting u(s) = B T eA(t−s) z, for 0 ≤ s ≤ t, we see that Z x= t eA(t−s) Bu(s)ds, 0 which implies that x ∈ R0 . Having proven both inclusions, we conclude that R0 = range(P ). (3) System (1) is controllable if and only if rank( B AB Consider now the observability condition BT −B T AT rank .. . for system (2). System (2) is observable if and only if BT B T AT (7) =n⇔ = n ⇔ rank .. . ... An−1 B ) = n. B T (AT )n−1 (−1)n−1 B T (AT )n−1 ⇔ rank( B AB ... An−1 B T (6) ) = n ⇔ rank( B AB ... An−1 B ) = n. (8) Hence (2) is observable if and only if (1) is controllable. Exercise 4 Satellite observability and observer design (a) State space model of the satellite and sensor system: 0 0 1 0 x(t) ˙ = 0 0 0 x(t) + J1 u(t) 0 0 0 0 1 0 0 y(t) = x(t) + 0u(t). 0 1 1 (9) (10) Observability test: n = 3 so 1 0 C 0 Q = CA = 0 CA2 0 0 0 1 1 0 0 0 0 1 0 , 0 0 0 Q has 3 linearly independent rows (or columns) so rank(Q) = 3 and the system is observable. 5 (11) ¨ ˙ (b) We have J θ(t) = u(t), y1 (t) = θ(t) + bθ and y2 (t) = θ(t). Let the state vector be x(t) = T ˙ [θ(t), θ(t), bθ ] , then, since bθ is constant, the state-space form of the model is 0 0 1 0 x(t) ˙ = 0 0 0 x(t) + J1 u(t) 0 0 0 0 1 0 1 y(t) = x(t) + 0u(t). 0 1 0 (12) (13) Observability test: n = 3 so 1 0 C 0 Q = CA = 0 CA2 0 0 0 1 1 0 0 0 1 0 0 . 0 0 0 (14) This has only 2 linearly independent rows (or columns) so rank(Q) = 2 < 3 = n, and hence the system is not observable. ˙ (c) In this case take the state vector to be x(t) = [θ(t), θ(t), d]T . We use only the star tracker output: y(t) = θ(t). So the state space equations are: 0 1 0 0 x(t) ˙ = 0 0 J1 x(t) + J1 u(t) 0 0 0 0 y(t) = 1 0 0 x(t) + 0u(t). (15) (16) Observability test: n = 3 so 1 C Q = CA = 0 CA2 0 0 1 0 0 0 . (17) 1 J Clearly rank(Q) = 3 = n in this case, so this system is observable. It is therefore possible to construct a stable observer, such that x ˆ3 → d as t → ∞. (d) Design observer: x ˜˙ (t) = A˜ x(t) + Bu(t) + L(y(t) − C x ˜(t)) e(t) ˙ (A − LC)e(t). = 6 (18) (19) There are 3 states and 1 output measurement, so the observer gain matrix must have 3 rows and 1 column. So let L = [l1 , l2 , l3 ]T . Then 0 1 0 −l1 1 0 l1 (20) A − LC = 0 0 J1 − l2 1 0 0 = −l2 0 J1 l3 0 0 0 −l3 0 0 and hence the observer’s eigenvalues are given by the roots of the characteristical polynomial det[sI − (A − LC)] or s + l1 det l2 l3 −1 s 0 0 − J1 = s = s[(s + l1 )s + l2 ] + s3 + l1 s2 + l2 s + 1 (0 + l3 ) J l3 J (21) (22) The state estimation errors are to decay with time constant 1 sec, to this end is sufficient to place all 3 eigenvalues at -1 sec−1 . (Another possibility would be to make the real parts -1, but choose a conjugate pair of imaginary parts for two of the eigenvalues). That means we want the characteristic polynomial to be (s + 1)3 = s3 + 3s2 + 3s + 1. Comparing coefficients, we see that we need l1 = 3, l2 = 3, l3 = J. 7