observability - university of california, san...

18
Observability We have seen observability twice already It was the property which permitted us to retrieve the initial state from the initial data It was the property in Lyapunov stability which allowed us to resolve that if when then It is a dual property to controllability Many of the results are completely parallel Duality refers to the property that (formally only in LTI) Observability - two equivalent definitions The future inputs and outputs on [t 0 ,t 1 ] uniquely determine the initial state x 0 With the same input signal on [t 0 ,t 1 ], two distinct initial conditions yield distinct output signals of [t 0 ,t 1 ] The first definition is behind our first use of observability The second is behind the Lyapunov result 1 {u(0),y (0),u(1),y (1),...,u(n - 1),y (n - 1)} ˙ V (x)= -x(t) T C T Cx(t) ! 0 ˙ x(t)= Ax(t) x(t) ! 0 [A, C ] is observable , [A T ,C T ] is controllable [A, C ] is constructible , [A T ,C T ] is reachable

Upload: dinhkhanh

Post on 09-Feb-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

ObservabilityWe have seen observability twice already It was the property which permitted us to retrieve the initial state from the

initial data It was the property in Lyapunov stability which allowed us to resolve that

if when then It is a dual property to controllability Many of the results are completely parallel Duality refers to the property that (formally only in LTI) !!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

{u(0), y(0), u(1), y(1), . . . , u(n� 1), y(n� 1)}

V (x) = �x(t)TCTCx(t) ! 0 x(t) = Ax(t) x(t) ! 0

[A,C] is observable , [AT , CT] is controllable

[A,C] is constructible , [AT , CT] is reachable

Page 2: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

(Re)ConstructibilityObservability 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] !!!!!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]

!2

x(t) = A(t)x(t) +B(t)u(t)

y(t) = C(t)x(t) +D(t)u(t)

=) y(t) = C(t)�(t, t0)x(t0) +

Z t1

t0

C(t)�(t, ⌧)B(⌧)u(⌧) d⌧ +D(t)u(t)

Page 3: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

Unobservable and unconstructible SubspacesDefinition 15.1 (Unobservable subspace) Given two times t1>t0, the unobservable subspace on [t0,t1] consists of all

states for which 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 [Sneaky! When the has issues, the unconstructible subspace shrinks] !Definition 15.3 (Constructible system) Given two times t1>t0, the LTV system is constructible if its

unconstructible subspace contains only the zero vector

!3

x0 2 RnC(t)�(t, t0)x0 = 0, 8t 2 [t0, t1]

C(t)�(t, t1)x1 = 0, 8t 2 [t0, t1]x1 2 Rn

�(t, t1)

Page 4: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

Example of an unobservable systemA parallel interconnection of systems !!!Output !!!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

In order to separately estimate two states from a single measurement we need to have their dynamics differ

!4

Problems for MAE280A Linear Systems Theory, Fall 2013: due Wednesday

November 13 in class.

Problem 1 (Bob’s own)Consider the interconnection of two state variable systems.

P1 : x1(t) = A1(t)x1(t) +B1(t)u1(t) x1(t) 2 Rn1, u1(t) 2 Rk1

y1(t) = C1(t)x1(t) +D1(t)u1(t), y1(t) 2 Rm1.

and

P2 : x2(t) = A2(t)x2(t) +B2(t)u2(t) x2(t) 2 Rn2, u2(t) 2 Rk2

y2(t) = C2(t)x2(t) +D2(t)u2(t), y2(t) 2 Rm2.

For each of the four configurations in Figure 1, provide responses to the following questions.

(i) What constraints are implied between the dimensions ni, ki and mi by this interconnection?

(ii) What is a state-variable realization of the composite system from input u to output y?

(iii) What is the state of this composite system?

P1

P2+u

P1

P2[]yu

P1P2u yy

P1

P2

+u y-

(a) summation (b) cascade

(d) feedback(c) concatenation

Figure 1: System interconnections for Question 1.

[Note: the order of the systems is important in problems (b) and (d). The concatenation in problem (c) has the tworespective outputs stacked into a single vector y in the order shown.]

Problem 2 (Hespanha 6.2, p. 54)Compute the powers At and the matrix exponential eAt for each of the following matrices.

A1 =

2

41 1 00 1 00 0 1

3

5, A2 =

2

41 1 00 0 10 0 1

3

5, A3 =

2

664

2 0 0 02 2 0 00 0 3 30 0 0 3

3

775 .

Do this by hand and then verify with matlab syms and expm commands.

x1(t)x2(t)

�=

A1(t) 00 A2(t)

� x1(t)x2(t)

�+

B1

B2

�u(t)

y(t) =⇥C1 C2

⇤x(t) + [D1(t) +D2(t)]u(t)

y(t) = C1(t)�1(t, t0)x1(t0) + C2(t)�2(t, t0)x2(t0)

+

Z t

t0

C1(t)�1(t, ⌧)B1(⌧)u(⌧) d⌧ +

Z t

t0

C2(t)�2(t, ⌧)B2(⌧)u(⌧) d⌧

+ [D1(t) +D2(t)]u(t)

Page 5: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

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 (i) when the system is observable !! (ii) when the system is constructible

!5

WO(t0, t1) =

Z t1

t0

�(⌧, t0)TC(⌧)TC(⌧)�(⌧, t0) d⌧

WCn(t0, t1) =

Z t1

t0

�(⌧, t1)TC(⌧)TC(⌧)�(⌧, t1) d⌧

rank WCn(t0, t1) = n

rank WO(t0, t1) = n

y(t) = y(t)�Z t

t0

C(t)�(t, ⌧)B(⌧)u(⌧) d⌧ �D(t)u(t)

x(t0) = WO(t0, t1)�1

Z t1

t0

�(t, t0)TC(t)T y(t) dt

x(t1) = WCn(t0, t1)�1

Z t1

t0

�(t, t1)TC(t)T y(t) dt

Page 6: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

Discrete-time Observability and Constructibility

Definitions 15.6 Given two times t1>t0, the unobservable subspace on [t0,t1] consists of all

states for which The unconstructible subspace on [t0,t1] consists of all states for

which !Gramians

!6

x(t+ 1) = A(t)x(t) +B(t)u(t)

y(t) = C(t)x(t) +D(t)u(t)

=) y(t) = C(t)�(t, t0)x0 +t�1X

⌧=t0

C(t)�(t, ⌧)B(⌧)u(⌧) +D(t)u(t)

x0 2 RnC(t)�(t, t0)x0 = 0, 8t 2 [t0, t1]

C(t)�(t, t1)x1 = 0, 8t 2 [t0, t1]

x1 2 Rn

WO(t0, t1) =t1X

⌧=t0

�(⌧, t0)TC(⌧)TC(⌧)�(⌧, t0)

WCn(t0, t1) =t1X

⌧=t0

�(⌧, t1)TC(⌧)TC(⌧)�(⌧, t1)

Page 7: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

Discrete-time ContinuedReconstructions Define

If the system is observable then !! If the system is constructible then !!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

y(t) = y(t)�tX

⌧=t0

C(t)�(t, ⌧)B(⌧)u(⌧)�D(t)u(t)

x(t0) = WO(t0, t1)�1

t1X

⌧=t0

�(t, t0)TC(t)T y(t)

x(t1) = WCn(t0, t1)�1

t1X

⌧=t0

�(t, t1)TC(t)T y(t)

Page 8: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

Constructibility in Discrete TimeWe 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 !! 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 A2=0 Even though we cannot construct the initial

state it has no effect on the current state

!8

x(t+ 1) =

0 10 0

�x(t) +

b1

b2

�u(t)

y(t) =⇥0 1

⇤x(t) + du(t)

x(0) =

x1(0)x2(0)

y(0) = x2(0) + du(0)

x(1) =

x2(0) + b1u(0)

b2u(0)

y(1) = b2u(0) + du(1)

x(2) =

b2u(0) + b1u(1)

b2u(1)

y(2) = b2u(1) + du(2)

Page 9: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

Duality in LTI SystemsContinuous-time Discrete-time !!!!!!!!Consider LTI systems and ! 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

!9

WC(t0, t1) =

Z t1

t0

eA(⌧�t0)BBT eAT (⌧�t0) d⌧

WO(t0, t1) =

Z t1

t0

eAT (⌧�t0)CTCeA(⌧�t0) d⌧

WR(t0, t1) =

Z t1

t0

eA(⌧�t1)BBT eAT (⌧�t1) d⌧

WCn(t0, t1) =

Z t1

t0

eAT (⌧�t1)CTCeA(⌧�t1) d⌧

x(t) = Ax(t) +Bu(t)

y(t) = Cx(t) +Du(t)

˙x(t) = A

Tx(t) + C

Tu(t)

y(t) = B

Tx(t) +D

Tu(t)

WC(t0, t1) =t1�1X

⌧=t0

At0�1�⌧BBTAT t0�1�⌧

WO(t0, t1) =t1�1X

⌧=t0

AT t0�1�⌧

CTCAt0�1�⌧

WR(t0, t1) =t1�1X

⌧=t0

At1�1�⌧BBTAT t1�1�⌧

WCn(t0, t1) =t1�1X

⌧=t0

AT t1�1�⌧

CTCAt1�1�⌧

Page 10: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

Tests for Observability, Constructibility, DetectabilityThe 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 How does this fit with duality?

!10

O =

2

666664

CCACA2

...CAn�1

3

777775

rank O = n

rank

A� �I

C

�= n, 8� 2 C

rank

A� �I

C

�= n, 8� 2 C,Re(�) � 0

rank

A� �I

C

�= n, 8� 2 C, |�| � 1

Ker An � Ker ORange An ⇢ Range C

Page 11: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

Observers and State EstimationConsider the LTI system 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 This leads to the following error system with !!! if the original system is stable, A is a stability matrix, ! But what if A is not a stability matrix? Use the output to correct the

estimate

!11

x = Ax+Bu, y = Cx+Du, x 2 Rn, u 2 Rk

, y 2 Rm

˙x = Ax+Bu

x(t) = x(t)� x(t)

x(t) = Ax(t) +Bu(t), x(0)

˙x(t) = Ax(t) +Bu(t), x(0)

˙x(t) = Ax(t), x(0) = x(0)� x(0)

x(t) ! 0 or x(t) ! x(t)

˙x(t) = Ax(t) +Bu(t) + L[y(t)� Cx(t)�Du(t)]

˙x(t) = [A� LC]x(t)

Page 12: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

Observers

If A-LC is a stability matrix then A-LC has the same eigenvalues as (A-LC)T=AT-CTLT If [AT,CT] is controllable then we can find an LT 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

!12

˙x(t) = Ax(t) +Bu(t) + L[y(t)� Cx(t)�Du(t)]

˙x(t) = [A� LC]x(t)

x(t) ! 0 or x(t) ! x(t)

L=place(A’,C’,p)’

Page 13: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

Output Feedback ControlWhen we combine linear state variable feedback control with an observer as

state estimator we arrive at the following closed-loop system !!!!Let us now substitute for u

!13

x(t) = Ax(t) +Bu(t), x(0)

y(t) = Cx(t) +Du(t),

˙x(t) = [A� LC]x(t) +Bu(t) + L[y(t)�Du(t)], x(0)

u(t) = �Kx(t) + w(t)

x(t) = Ax(t)�BKx(t) +Bw(t)

y(t) = Cx(t)�DKx(t) +Dw(t)

˙x(t) = [A� LC]x(t)�BKx(t) + LCx(t) +Bw(t)

u(t) = �Kx(t) + w(t)

x(t)˙x(t)

�=

A �BK

LC A�BK � LC

� x(t)x(t)

�+

B

B

�w(t)

y(t)u(t)

�=

C �DK

0 �K

� x(t)x(t)

�+

D

I

�w(t)

Page 14: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

Output Feedback Control continued

Rewrite in terms of estimation error

!14

x(t) = x(t)� x(t)x(t)x(t)

�=

I 0I �I

� x(t)x(t)

x(t)˙x(t)

�=

A �BK

LC A�BK � LC

� x(t)x(t)

�+

B

B

�w(t)

y(t)u(t)

�=

C �DK

0 �K

� x(t)x(t)

�+

D

I

�w(t)

x(t)˙x(t)

�=

I 0I �I

� A �BK

LC A�BK � LC

� I 0I �I

� x(t)x(t)

�+

I 0I �I

� B

B

�w(t)

y(t)u(t)

�=

C �DK

0 �K

� I 0I �I

� x(t)x(t)

�+

D

I

�w(t)

x(t)˙x(t)

�=

A�BK BK

0 A� LC

� x(t)x(t)

�+

B

0

�w(t)

y(t)u(t)

�=

C �DK DK

�K K

� x(t)x(t)

�+

D

I

�w(t)

x(t)x(t)

�=

I 0I �I

� x(t)x(t)

Page 15: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

Output Feedback Control continued

The closed-loop system matrix is block triangular It is stable if A-BK and A-LC are stable Since 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

!15

x(t)˙x(t)

�=

A�BK BK

0 A� LC

� x(t)x(t)

�+

B

0

�w(t)

y(t)u(t)

�=

C �DK DK

�K K

� x(t)x(t)

�+

D

I

�w(t)

x(t) ! 0 x(t) ! x(t)

Page 16: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

Output Feedback ControllerThe 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 !!!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

˙x(t) = [A� LC]x(t) +B[�Kx(t) + w(t)] + L[y(t) +DKx(t)�Dw(t)]

= [A� LC � (B � LD)K]x(t) + (B � LD)w(t) + Ly(t)

u(t) = �Kx(t) + w(t)

˙x(t) = [A� LC � (B � LD)K]x(t) +

⇥L (B � LD)

⇤ y(t)w(t)

u(t) = �Kx(t) +⇥0 I

⇤ y(t)w(t)

Page 17: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

Discrete-time Output Feedback ControlAll 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, D=0

!17

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)

Page 18: Observability - University of California, San Diegooodgeroo.ucsd.edu/.../ewExternalFiles/Lecture5_observability.pdf · (Re)Constructibility Observability deals with recovering the

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 !!!Note that u(t) depends on y(t) without delay

!18

ˆ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)

= (I � LC)(A�BK)ˆx(t) + (I � LC)Bw(t) + Ly(t+ 1)

u(t) = �K

ˆx(t) + w(t)