Observability & Controllability B. Wayne Bequette State Space - - PowerPoint PPT Presentation

observability controllability
SMART_READER_LITE
LIVE PREVIEW

Observability & Controllability B. Wayne Bequette State Space - - PowerPoint PPT Presentation

Observability & Controllability B. Wayne Bequette State Space Model Infer State i.c. from Output Measurements Important for State Estimation Controllability Chemical and Biological Engineering Observability x x u = +


slide-1
SLIDE 1

Chemical and Biological Engineering

Observability & Controllability

  • B. Wayne Bequette
  • State Space Model
  • Infer State i.c. from Output Measurements
  • Important for State Estimation
  • Controllability
slide-2
SLIDE 2
  • B. Wayne Bequette

Observability

k k k k k

Cx y u x x = Γ + Φ =

+1

y0 = Cx0 y1 = Cx1 = C Φx0 + Γu0

[ ] = CΦx0 +CΓu0

y2 = Cx2 = C Φx1 + Γu1

[ ] = C Φ Φx0 + Γu0

{ }+ Γu1

# $ % & = CΦ2x0 +CΦΓu0 +CΓu1

1 2 1 1 − − − −

Γ + + Γ Φ + Φ =

n n n n

u C u C x C y 

Discrete, state space model Step from initial condition to n-1 for n output measurements Can rearrange to solve for the initial condition

slide-3
SLIDE 3
  • B. Wayne Bequette

Observability

( ) ( ) ( )

1 1 2 1 2 2 1 1 2 1 × × Ο − × − − −

⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ Φ Φ Φ = ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ Γ − − Γ Φ − Γ − ΦΓ − Γ −

n n n n n n n n

x C C C C u C u C y u C u C y u C y y                       

Y = O x0 x0 = O-1 Y

Solve for the initial condition Solution exists if O is nonsingular (full rank)

slide-4
SLIDE 4
  • B. Wayne Bequette

Observability, Continuous-time

Cx y Bu Ax x = + = 

( )

matrix ity

  • bservabil

1 2

= ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ =

× Ο −

     

n n n

CA CA CA C O

slide-5
SLIDE 5
  • B. Wayne Bequette

Example 3-tank problem

slide-6
SLIDE 6
  • B. Wayne Bequette

Example

dh

1

dt dh2 dt dh3 dt ! " # # # # # # # $ % & & & & & & &

 x

    = −1 1 −1 1 −1 " # $ $ $ % & ' ' '

A

     h

1

h2 h3 ! " # # # # $ % & & & &

x

   + 1 ! " # # # $ % & & &

B

F

u

y = 1 ! " # $

C

       h

1

h2 h3 ! " % % % % # $ & & & &

x

   y = 1 ! " # $

C

       h

1

h2 h3 ! " % % % % # $ & & & &

x

   y = 1 ! " # $

C

       h

1

h2 h3 ! " % % % % # $ & & & &

x

  

State 1 measured State 2 measured State 3 measured

slide-7
SLIDE 7
  • B. Wayne Bequette

Example, continued

C CA CA2 ! " # # # $ % & & &

Ο 3×3

( )

     = 1 −1 1 ! " # # # $ % & & & = 1 1 −1 −2 1 ! " # # # $ % & & & = 1 1 −1 1 −2 1 ! " # # # $ % & & &

Rank = 1 Rank = 2 Rank = 3 State 1 measured State 2 measured State 3 measured If state 3 (height of 3rd tank) is measured, states 1 and 2 are observable A = −1 1 −1 1 −1 " # $ $ $ % & ' ' '

[ ]

1 = C

[ ]

1 = C

[ ]

1 = C

slide-8
SLIDE 8
  • B. Wayne Bequette

Does this make sense?

If h1 is measured, can you detect perturbations in h2 and/or h3?

slide-9
SLIDE 9
  • B. Wayne Bequette

Example, Discrete-Time

C CΦ CΦ2 " # $ $ $ % & ' ' '

Ο 3×3

( )

     = 1 0.6065 0.3679 " # $ $ $ % & ' ' ' = 1 0.3033 0.6065 0.3679 0.3679 " # $ $ $ % & ' ' ' = 1 0.0758 0.3033 0.6065 0.1839 0.3679 0.3679 " # $ $ $ % & ' ' '

Rank = 1 Rank = 2 Rank = 3 State 1 measured State 2 measured State 3 measured If state 3 (height of 3rd tank) is measured, states 1 and 2 are observable Φ = 0.6065 0.3033 0.6065 0.0758 0.3033 0.6065 " # $ $ $ % & ' ' '

[ ]

1 = C

[ ]

1 = C

[ ]

1 = C

slide-10
SLIDE 10
  • B. Wayne Bequette

Numerical Example

l Some perturbation in states initially, with no input

  • changes. The following output measurements are available

Ø y0 = 0 (t=0 min), y1 = 0.3791 (t=0.5 min), y2 = 0.5518 (t=1.0 min)

slide-11
SLIDE 11
  • B. Wayne Bequette

C CΦ CΦ2 " # $ $ $ % & ' ' '

Ο 3×3

( )

     = 1 0.0758 0.3033 0.6065 0.1839 0.3679 0.3679 " # $ $ $ % & ' ' '

The observability matrix

x0 = O-1 Y

Solve for the initial condition To find x0 = 1 1 ! " # # # $ % & & &

slide-12
SLIDE 12
  • B. Wayne Bequette

Which is consistent with the simulation

slide-13
SLIDE 13
  • B. Wayne Bequette

Controllability

k k k k k

Cx y u x x = Γ + Φ =

+1

x0 x1 = Φx0 + Γu0

[ ]

x2 = Φx1 + Γu1

[ ] = Φ Φx0 + Γu0

{ }+ Γu1

# $ % & x2 = Φ2x0 +ΦΓu0 + Γu1 etc.

Discrete, state space model For an n-state system with known initial condition, find the sequence of n manipulated input moves to reach a desired xn

Exercise: Solve for the manipulated inputs u0 à à un-1 to achieve xn Use the 3-tank example, then generalize

slide-14
SLIDE 14
  • B. Wayne Bequette

Controllability Solution

x1 = Φx0 + Γu0 x2 = Φ2x0 +ΦΓu0 + Γu1 x2 = Φx1 + Γu1 = Φ Φx0 + Γu0

[ ]+ Γu1

x3 = Φ3x0 +Φ2Γu0 +ΦΓu1 + Γu2 x3 = Φ3x0 + Φ2Γ ΦΓ Γ # $ % & u0 u1 u2 # $ ' ' ' ' % & ( ( ( (

slide-15
SLIDE 15
  • B. Wayne Bequette

x3 −Φ3x0 = Φ2Γ ΦΓ Γ $ % & ' u0 u1 u2 $ % ( ( ( ( & ' ) ) ) ) u0 u1 u2 ! " # # # # $ % & & & & = Φ2Γ ΦΓ Γ ! " $ %

−1 x3 −Φ3x0

! " $ %

Must be invertible (non-singular)

slide-16
SLIDE 16
  • B. Wayne Bequette

In General

xn −Φnx0 = ΦnΓ... ΦΓ Γ $ % & ' u0 un−2 un−1 $ % ( ( ( ( & ' ) ) ) ) u0 un−2 un−1 " # $ $ $ $ % & ' ' ' ' = ΦnΓ ...ΦΓ Γ " # % &

−1 xn −Φnx0

" # % &

Must be invertible (non-singular)

slide-17
SLIDE 17
  • B. Wayne Bequette

Three Tank Example x0 = [1;1;1] x3 = [0;0;0]

slide-18
SLIDE 18
  • B. Wayne Bequette

% use the three tank example % first, continuous state space model a = [-1 0 0;1 -1 0;0 1 -1] b = [1;0;0] c = [0 0 1] d = 0 % lintank = ss(a,b,c,d) % defines continuous state space model % -------------------------------------------------------------------- % % discrete time model delt = 0.5; % sample time of 0.5 minutes tankssz = c2d(lintank,delt,'zoh') % create discrete state space model from continuous % % extract the matrix information % [phi,gamma,cmat,dmat] = ssdata(tankssz) % cmat will equal c % % CONTmat = [phi*phi*gamma phi*gamma gamma] % rank(CONTmat)

slide-19
SLIDE 19
  • B. Wayne Bequette

x0 = 1;1;1] ; xdis(:,1) = x0; x3 = [0;0;0] u = inv(CONTmat)*(x3 - (phi^3)*x0) time = [0 0.5 1 1.5]; tplot = []; yplot = []; xplot = []; % for k = 1:3; [tdummy,xdummy] = ode45('linodepar',[time(k) time(k+1)],xdis(:,k),[],a,b,u(k)); ndum = length(tdummy); xdis(:,k+1) = xdummy(ndum,:); % plant state tplot = [tplot;tdummy]; xplot = [xplot;xdummy]; end % u(k+1) = u(k)