Observability We have seen observability twice already It was the property which permitted us to retrieve the initial state from the initial data {u(0),y(0),u(1),y(1),...,u(n 1),y(n 1)} It was the property in Lyapunov stability which allowed us to resolve that if V (x) x(t) T C T Cx(t) 0 when ẋ(t) Ax(t) then x(t) 0 It is a dual property to controllability Many of the results are completely parallel Duality refers to the property that (formally only in LTI) [A, C] is observable, [A T,C T ] is controllable [A, C] is constructible, [A T,C T ] is reachable Observability - two equivalent definitions The future inputs and outputs on [t0,t1] uniquely determine the initial state x0 With the same input signal on [t0,t1], two distinct initial conditions yield distinct output signals of [t0,t1] The first definition is behind our first use of observability The second is behind the Lyapunov result 1
(Re)Constructibility Observability deals with recovering the initial state x0 from the i/o data Constructibility deals with recovering the current state from the i/o data Constructibility - two equivalent definitions The past input and output signals on [t0,t1] determine uniquely the current state x(t1) For the same input signal on [t0,t1], two distinct terminal states must have distinct output signals on [t0,t1] ẋ(t) A(t)x(t)+B(t)u(t) y(t) C(t)x(t)+D(t)u(t) ) y(t) C(t) (t, )x( )+ With known u(t), recovering x(t0) from y(t) involves just [A(t),C(t)] on [t0,t1] Likewise, for x(t1), although we still need care in discrete time as we shall see Observability and constructibility rely on [A(t),C(t)] on [t0,t1] Similarly to how controllability and reachability rely on [A(t),B(t)] on [t0,t1] Z t1 C(t) (t, )B( )u( ) d + D(t)u(t) 2
Unobservable and unconstructible Subspaces Definition 15.1 (Unobservable subspace) Given two times t1>t0, the unobservable subspace on [t0,t1] consists of all states x 0 2 R n for which C(t) (t, )x 0 0, 8t 2 [,t 1 ] Definition 15.2 (Observable system) Given two times t1>t0, the LTV system is observable if its unobservable subspace contains only the zero vector Definition 15.3 (Unconstructible subspace) Given two times t1>t0, the unconstructible subspace on [t0,t1] consists of all states for which C(t) (t, t 1 )x 1 0, 8t 2 [,t 1 ] [Sneaky When the x 1 2 R n (t, t 1 ) Definition 15.3 (Constructible system) has issues, the unconstructible subspace shrinks] Given two times t1>t0, the LTV system is constructible if its unconstructible subspace contains only the zero vector 3
Example of an unobservable system A parallel interconnection of systems Output appleẋ1 (t) ẋ 2 (t) y(t) C 1 apple A1 (t) 0 0 A 2 (t) apple x1 (t) x 2 (t) + apple B1 B 2 If C1(t)C2(t) and A1(t)A2(t) then Φ1(t,t0)Φ2(t1,t0) and we cannot separate the contributions from the two initial conditions x1(t0) and x2(t0) We shall see that this a practical problem u(t) C 2 x(t)+[d1 (t)+d 2 (t)]u(t) y(t) C 1 (t) 1 (t, )x 1 ( )+C 2 (t) 2 (t, )x 2 ( ) + Z t C 1 (t) 1 (t, )B 1 ( )u( ) d + +[D 1 (t)+d 2 (t)]u(t) In order to separately estimate two states from a single measurement we need to have their dynamics differ u Z t P1 P2 + C 2 (t) 2 (t, )B 2 ( )u( ) d y 4
Observability and Constructibility Gramians Corollary 15.1 Given two times t1>t0 a LTV system is observable if Given two times t1>t0 a LTV system is constructible if Theorem 15.2 Given two times t1>t0 define W O (,t 1 ) W Cn (,t 1 ) Z t1 Z t1 (i) when the system is observable (ii) when the system is constructible (, ) T C( ) T C( ) (, ) d (,t 1 ) T C( ) T C( ) (,t 1 ) d ỹ(t) y(t) Z t rank W O (,t 1 )n rank W Cn (,t 1 )n C(t) (t, )B( )u( ) d D(t)u(t) Z t1 x( )W O (,t 1 ) 1 (t, ) T C(t) T ỹ(t) dt Z t1 x(t 1 )W Cn (,t 1 ) 1 (t, t 1 ) T C(t) T ỹ(t) dt 5
Definitions 15.6 Discrete-time Observability and Constructibility x(t + 1) A(t)x(t) + B(t)u(t) y(t) C(t)x(t)+D(t)u(t) Given two times t1>t0, the unobservable subspace on [t0,t1] consists of all states x 0 2 R n for which C(t) (t, )x 0 0, 8t 2 [,t 1 ] The unconstructible subspace on [t0,t1] consists of all states which Gramians ) y(t) C(t) (t, )x 0 + C(t) (t, t 1 )x 1 0, 8t 2 [,t 1 ] W O (,t 1 ) W Cn (,t 1 ) t 1 X Xt 1 (, ) T C( ) T C( ) (, ) t 1 X (,t 1 ) T C( ) T C( ) (,t 1 ) C(t) (t, )B( )u( )+D(t)u(t) x 1 2 R n for 6
Reconstructions Define ỹ(t) y(t) If the system is observable then If the system is constructible then Discrete-time Continued tx x( )W O (,t 1 ) 1 x(t 1 )W Cn (,t 1 ) 1 C(t) (t, )B( )u( ) t 1 X t 1 X D(t)u(t) (t, ) T C(t) T ỹ(t) (t, t 1 ) T C(t) T ỹ(t) We have the same admonitions about conditions such as observability and constructibility as we did for controllability and reachability If the Gramian is almost singular, then the state reconstruction can amplify any noise in the signal measurements This is the basis behind Kalman filtering and is the dual of the reachability issue with possibly large control signals 7
Constructibility in Discrete Time We need to be careful about constructibility when the transition function can be singular - a peculiarity of discrete time Look at a variant of the earlier example x(0) apple x1 (0) x 2 (0) y(0) x 2 (0) + du(0) apple x2 (0) + b x(1) 1 u(0) b 2 u(0) y(1) b 2 u(0) + du(1) apple b2 u(0) + b x(2) 1 u(1) b 2 u(1) y(2) b 2 u(1) + du(2) x(t + 1) y(t) 0 apple 0 1 0 0 x(t)+ apple b1 b 2 1 x(t)+du(t) u(t) We cannot calculate x1(0) from the data But we can compute exactly x(t) for t>0 given the input/output data up to time t-1 The zero-input response has already gone to zero since A 2 0 Even though we cannot construct the initial state it has no effect on the current state 8
Continuous-time W C (,t 1 ) W O (,t 1 ) Consider LTI systems W R (,t 1 ) W Cn (,t 1 ) Z t1 e A( ) BB T e A Z t1 Z t1 Duality in LTI Systems T ( ) d e A T ( ) C T Ce A( t0) d e A( t 1) BB T e A Z t1 T ( t 1 ) d e A T ( t 1 ) C T Ce A( t1) d ẋ(t) Ax(t)+Bu(t) y(t) Cx(t)+Du(t) W C (,t 1 ) W O (,t 1 ) and Discrete-time W R (,t 1 ) W Cn (,t 1 ) x(t) A T x(t)+c T ū(t) ȳ(t) B T x(t)+d T ū(t) System 1 will be controllable if and only if System 2 is observable System 1 will be reachable if and only if System 2 is constructible Note that some Matlab functions are only written for one test But duality allows us to test the transposes using the same function X t 1 1 A t0 1 BB T A T tx 1 1 A T tx 1 1 1 1 C T CA 1 A t1 1 BB T A T tx 1 1 A T t 1 1 t 1 1 C T CA t 1 1 9
Tests for Observability, Constructibility, Detectability The observability matrix for the LTI system [A,B,C,D] is The LTI system is observable iff [PBH] The LTI system is observable iff The continuous-time LTI system is detectable iff The discrete-time LTI system is detectable iff The LTI system is constructible iff Test for controllability is rank rank rank apple A apple A How does this fit with duality? rank O n apple A C C C I I I Ker A n n, 8 2 C Range A n Range C O n, 8 2 C, Re( ) 0 n, 8 2 C, 1 Ker O 2 6 4 C CA CA 2. CA n 1 3 7 5 10
Consider the LTI system Observers and State Estimation Let u-kx be a stabilizing linear state variable feedback When we cannot measure the state x directly then we must reconstruct it from available measurements {u,y} The most direct approach would be to copy the system ẋ Ax + Bu, y Cx + Du, x 2 R n,u2 R k, y 2 R m This leads to the following error system with ẋ(t) Ax(t)+Bu(t), x(0) ˆx(t) Aˆx(t)+Bu(t), ˆx(0) x(t) A x(t), x(0) x(0) ˆx(0) if the original system is stable, A is a stability matrix, x(t) 0 or ˆx(t) x(t) ˆx Aˆx + Bu x(t) x(t) ˆx(t) But what if A is not a stability matrix? Use the output to correct the estimate ˆx(t) Aˆx(t)+Bu(t)+L[y(t) C ˆx(t) Du(t)] x(t) [A LC] x(t) 11
Observers ˆx(t) Aˆx(t)+Bu(t)+L[y(t) C ˆx(t) Du(t)] x(t) [A If A-LC is a stability matrix then LC] x(t) x(t) 0 or ˆx(t) x(t) A-LC has the same eigenvalues as (A-LC) T A T -C T L T If [A T,C T ] is controllable then we can find an L T to place these eigenvalues arbitrarily Theorem 16.8/9 If [A,C] is an observable pair then it is possible to find an output injection gain L to place the eigenvalues of A-LC arbitrarily in the complex plane If [A,C] is a detectable pair then it is possible to find an output injection gain L to make A-LC a stability matrix We can use the matlab functions place or acker to do this Lplace(A,C,p) 12
Output Feedback Control When we combine linear state variable feedback control with an observer as state estimator we arrive at the following closed-loop system ẋ(t) Ax(t)+Bu(t), y(t) Cx(t)+Du(t), Let us now substitute for u x(0) ˆx(t) [A LC]ˆx(t)+Bu(t)+L[y(t) Du(t)], ˆx(0) u(t) K ˆx(t)+w(t) ẋ(t) Ax(t) y(t) Cx(t) BKˆx(t)+Bw(t) DKˆx(t)+Dw(t) ˆx(t) [A LC]ˆx(t) BKˆx(t)+LCx(t)+Bw(t) u(t) K ˆx(t)+w(t) appleẋ(t) ˆx(t) apple y(t) u(t) apple apple apple A BK x(t) B LC A BK LC ˆx(t) + B w(t) apple apple apple C DK x(t) D 0 K ˆx(t) + w(t) I 13
Output Feedback Control continued Rewrite in terms of estimation error appleẋ(t) x(t) apple y(t) u(t) apple x(t) x(t) appleẋ(t) ˆx(t) apple y(t) u(t) apple I 0 I I apple apple apple A BK x(t) B LC A BK LC ˆx(t) + B w(t) apple apple apple C DK x(t) D 0 K ˆx(t) + w(t) I apple x(t) ˆx(t) x(t) x(t) ˆx(t) apple x(t) ˆx(t) apple apple apple I 0 A BK I 0 I I LC A BK LC I I apple apple apple apple C DK I 0 x(t) D 0 K I I x(t) + w(t) I appleẋ(t) x(t) apple y(t) u(t) apple I 0 I I apple apple x(t) I 0 x(t) + I I apple apple apple A BK BK x(t) B 0 A LC x(t) + 0 w(t) apple apple apple C DK DK x(t) D K K x(t) + w(t) I apple x(t) x(t) apple B B w(t) 14
Output Feedback Control continued The closed-loop system matrix is block triangular It is stable if A-BK and A-LC are stable Since appleẋ(t) x(t) 0 x(t) apple y(t) u(t) we have The estimate error is uncontrollable but it is stabilizable The closed-loop eigenvalues fall into two groups Those due to LSVF and those due to the observer First the state estimate converges and then we stabilize This is referred to as the Separation Theorem of LTI output feedback control The output feedback controller is apple apple apple A BK BK x(t) B 0 A LC x(t) + 0 w(t) apple apple apple C DK DK x(t) D K K x(t) + w(t) I ˆx(t) x(t) 15
Output Feedback Controller The separation theorem deals with the behavior of the closed-loop system of the plant and the controller together The output feedback controller itself is Rearranging the terms ˆx(t) [A LC]ˆx(t)+B[ K ˆx(t)+w(t)] + L[y(t)+DKˆx(t) Dw(t)] u(t) [A LC (B LD)K]ˆx(t)+(B LD)w(t)+Ly(t) K ˆx(t)+w(t) ˆx(t) [A LC (B LD)K]ˆx(t)+ L (B LD) apple y(t) w(t) u(t) K ˆx(t)+ 0 I apple y(t) w(t) This system has two inputs y(t) and w(t) There is no particular reason to think that this system would be stable The direct feedthrough D of the plant does not interact with the direct feedthrough of the controller because the gain on y is zero So there is no algebraic loop here and the controller transfer function from y to u is strictly proper 16
Discrete-time Output Feedback Control All of the preceding algebra holds for discrete time as it does for continuous time We could easily replace the derivatives by time steps and the results would be identical, including the separation theorem and the controller state-space realization The positioning of the eigenvalues of A-BK and A-LC would need to be strictly inside the unit circle rather than the olhp Discrete-time observers have one critical distinction however It is possible to design them without time delay We then need to ensure that there is no direct feedthrough, D0 x(t + 1) Ax(t)+Bu(t) y(t) Cx(t) ˆ x(t + 1) Aˆ x(t)+bu(t)+l y(t + 1) C{Aˆ x(t)+bu(t)} [A LCA]ˆ x(t)+[b LCB]u(t)+ Ly(t + 1) ˆ x(t + 1) (I LC)Aˆ x(t)+(i LC)Bu(t)+Ly(t + 1) x(t + 1) [(I LC)A] x(t) 17
Discrete-Time Output Feedback Control continued Delay-free observer Convergence/stability depends on (I-LC)A eigenvalues This form has advantages when there is an uncontrollable random disturbance affecting the plant state In control systems parlance, it is called a state filter while the version with delay is called a state predictor Delay-free controller is ˆ x(t + 1) (I LC)Aˆ x(t)+(i LC)Bu(t)+Ly(t + 1) x(t + 1) [(I LC)A] x(t) ˆ x(t + 1) (I LC)Aˆ x(t) +(I LC)B[ K ˆ x(t) + w(t)] + Ly(t + 1) u(t) (I LC)(A BK)ˆ x(t)+(i LC)Bw(t)+ Ly(t + 1) K ˆ x(t)+w(t) Note that u(t) depends on y(t) without delay 18