observability controllability
play

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 = +


  1. Observability & Controllability B. Wayne Bequette • State Space Model • Infer State i.c. from Output Measurements • Important for State Estimation • Controllability Chemical and Biological Engineering

  2. Observability x x u = Φ + Γ k + 1 k k Discrete, state space model y Cx = k k Step from initial condition to n-1 for n output measurements y 0 = Cx 0 [ ] = C Φ x 0 + C Γ u 0 y 1 = Cx 1 = C Φ x 0 + Γ u 0 # % [ ] = C Φ Φ x 0 + Γ u 0 y 2 = Cx 2 = C Φ x 1 + Γ u 1 { } + Γ u 1 $ & = C Φ 2 x 0 + C ΦΓ u 0 + C Γ u 1 n 1 n 2 y C x C u  C u − − = Φ + Φ Γ + + Γ n 1 0 0 n 1 − − Can rearrange to solve for the initial condition B. Wayne Bequette

  3. Observability y C ⎡ ⎤ ⎡ ⎤ 0 ⎢ ⎥ ⎢ ⎥ y C u C − Γ Φ 1 0 ⎢ ⎥ ⎢ ⎥ 2 y C u C u x C ⎢ ⎥ ⎢ ⎥ − ΦΓ − Γ = Φ  2 0 1 0 ⎢ ⎥ ⎢ ⎥   ( n 1 ) × ⎢ ⎥ ⎢ ⎥ n 2 n 1 ⎢ y C u  C u ⎥ ⎢ C ⎥ − − − Φ Γ − − Γ Φ ⎣ ⎦ ⎣ ⎦   n 1       0      n   2      − − ( ) ( n 1 ) n n Ο × × Y = O x 0 Solve for the initial condition x 0 = O -1 Y Solution exists if O is nonsingular (full rank) B. Wayne Bequette

  4. Observability, Continuous-time  x Ax Bu = + y Cx = C ⎡ ⎤ ⎢ ⎥ CA ⎢ ⎥ 2 O CA observabil ity matrix ⎢ ⎥ = = ⎢ ⎥  ⎢ ⎥ n 1 CA ⎢ − ⎥ ⎣ ⎦      ( n n ) Ο × B. Wayne Bequette

  5. Example 3-tank problem B. Wayne Bequette

  6. Example ! $ dh 1 # & dt ! $ # & " % ! $ h − 1 0 0 1 1 # & # & $ ' # & dh 2 1 − 1 0 h 2 0 F = # & +  # & $ ' # & dt # & # & u $ ' # & 0 1 − 1 0 h 3 # & " % # & " %  dh 3      # &    # & B A dt x " %      x ! # ! # ! # h h h 1 1 % & % & 1 % & ! # ! # ! # y = 1 0 0 h 2 y = 0 1 0 h 2 % & % & y = 0 0 1 h 2 % & " $ " $ " $               % & % &        % & h 3 h 3 h 3 % & % & C C " $ " $ % & C " $          x x x State 1 measured State 2 measured State 3 measured B. Wayne Bequette

  7. Example, continued " % − 1 0 0 $ ' A = 1 − 1 0 $ ' $ 0 1 − 1 ' # & [ ] [ ] [ ] C 0 1 0 C 0 0 1 C 1 0 0 = = = State 1 measured State 2 measured State 3 measured ! $ ! $ ! $ ! $ C 1 0 0 0 1 0 0 0 1 # & # & # & # & CA − 1 0 0 1 − 1 0 0 1 − 1 = = = # & # & # & # & # & # 1 0 0 & # − 2 1 0 & # 1 − 2 1 & CA 2 " % " % " % " %      ( ) Ο 3 × 3 Rank = 1 Rank = 2 Rank = 3 If state 3 (height of 3 rd tank) is measured, states 1 and 2 are observable B. Wayne Bequette

  8. Does this make sense? If h 1 is measured, can you detect perturbations in h 2 and/or h 3 ? B. Wayne Bequette

  9. Example, Discrete-Time " % 0.6065 0 0 $ ' 0.3033 0.6065 0 Φ = $ ' $ 0.0758 0.3033 0.6065 ' # & [ ] [ ] [ ] C 0 1 0 C 0 0 1 C 1 0 0 = = = State 1 measured State 2 measured State 3 measured " % " % " % " % C 1 0 0 0 1 0 0 0 1 $ ' $ ' $ ' $ ' C Φ 0.6065 0 0 0.3033 0.6065 0 0.0758 0.3033 0.6065 = = = $ ' $ ' $ ' $ ' $ C Φ 2 ' $ 0.3679 0 0 ' $ 0.3679 0.3679 0 ' $ 0.1839 0.3679 0.3679 ' # & # & # & # &      ( ) Ο 3 × 3 Rank = 1 Rank = 2 Rank = 3 If state 3 (height of 3 rd tank) is measured, states 1 and 2 are observable B. Wayne Bequette

  10. 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) B. Wayne Bequette

  11. The observability matrix " % " % C 0 0 1 $ ' $ ' C Φ 0.0758 0.3033 0.6065 = $ ' $ ' $ C Φ 2 ' $ 0.1839 0.3679 0.3679 ' # & # &      ( ) Ο 3 × 3 Solve for the initial condition x 0 = O -1 Y To find ! $ 1 # & x 0 = 1 # & # & 0 " % B. Wayne Bequette

  12. Which is consistent with the simulation B. Wayne Bequette

  13. Controllability x x u = Φ + Γ k + 1 k k Discrete, state space model y Cx = k k For an n-state system with known initial condition, find the sequence of n manipulated input moves to reach a desired x n x 0 [ ] x 1 = Φ x 0 + Γ u 0 # % [ ] = Φ Φ x 0 + Γ u 0 x 2 = Φ x 1 + Γ u 1 { } + Γ u 1 $ & x 2 = Φ 2 x 0 + ΦΓ u 0 + Γ u 1 etc . Exercise: Solve for the manipulated inputs u 0 à à u n-1 to achieve x n Use the 3-tank example, then generalize B. Wayne Bequette

  14. Controllability Solution x 1 = Φ x 0 + Γ u 0 [ ] + Γ u 1 x 2 = Φ x 1 + Γ u 1 = Φ Φ x 0 + Γ u 0 x 2 = Φ 2 x 0 + ΦΓ u 0 + Γ u 1 x 3 = Φ 3 x 0 + Φ 2 Γ u 0 + ΦΓ u 1 + Γ u 2 # % u 0 ' ( # % x 3 = Φ 3 x 0 + Φ 2 Γ ΦΓ Γ u 1 ' ( $ & ' ( u 2 ' ( $ & B. Wayne Bequette

  15. $ & u 0 ( ) $ & x 3 −Φ 3 x 0 = Φ 2 Γ ΦΓ Γ u 1 ( ) % ' ( ) u 2 ( ) % ' ! $ u 0 # & − 1 x 3 −Φ 3 x 0 ! $ ! $ = Φ 2 Γ ΦΓ Γ u 1 # & " % " % # & u 2 # & " % Must be invertible (non-singular) B. Wayne Bequette

  16. In General $ & u 0 ( ) $ & x n −Φ n x 0 = Φ n Γ ... ΦΓ Γ u n − 2 ( ) % ' ( ) u n − 1 ( ) % ' " % u 0 $ ' − 1 x n −Φ n x 0 = Φ n Γ ... ΦΓ Γ " % " % u n − 2 $ ' # & # & $ ' u n − 1 $ ' # & Must be invertible (non-singular) B. Wayne Bequette

  17. Three Tank Example x 0 = [1;1;1] x 3 = [0;0;0] B. Wayne Bequette

  18. % 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) B. Wayne Bequette

  19. 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) B. Wayne Bequette

Recommend


More recommend