2. multivariable linear systems -...

28
Kalman Filter { }{ } { } 2 1 () () () () () () () ˆ ˆ () () () () ˆ () () u w m T n i i k xt Ax t But Bwt mt Cxt vt J E xt xt xt xt E xt xt = = + + = + = = ( ) ˆ ˆ ˆ () () () () () () u m xt Ax t But Gt mt Cxt = + +

Upload: buitu

Post on 01-Apr-2018

219 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

Kalman Filter

{ } { }

{ }2

1

( ) ( ) ( ) ( )( ) ( ) ( )

ˆ ˆ( ) ( ) ( ) ( )

ˆ( ) ( )

u w

m

T

n

i ik

x t Ax t B u t B w tm t C x t v t

J E x t x t x t x t

E x t x t=

= + +

= +

⎡ ⎤= − −⎣ ⎦

⎡ ⎤= −⎣ ⎦∑

( )ˆ ˆ ˆ( ) ( ) ( ) ( ) ( ) ( )u mx t Ax t B u t G t m t C x t= + + −

Page 2: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

H-infinity Estimation

• Kalman Filter: minimizes the mean square estimation gain between the disturbances and the estimation error.

• H-infinity Filter: minimizes the infinity-norm of the gain between the disturbances and the estimation error. Worst case gain minimized.

Page 3: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

H-infinity Estimation Problem

( ) ( ) ( ) ( )( ) ( ) ( )

0

u w

m mw

Tmw w

Tmw mw

x t Ax t B u t B w tm t C x t D w t

D B

D D I

= + += +

=

=

[ ]

[ ]

[ ][ ]

The disturbance entering the plant via the state equation and the disturbance entering the plantvia the measurement must be distinct

( ) ( ) ( ) 0

( ) ( ) 0

0 0

xu

m

xm

m

TTmw w

wx t Ax t B u t I

w

wm t C x t I

w

D B I I

⎡ ⎤= + + ⎢ ⎥

⎣ ⎦⎡ ⎤

= + ⎢ ⎥⎣ ⎦

= = 0

Page 4: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance
Page 5: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance
Page 6: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

Adjoint System

Page 7: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance
Page 8: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

Adjoint System forTime-Invariant System

T T

T T

x Ax Buy Cx Dux A B xy C D u

xA CxyB Du

= += +

⎡ ⎤ ⎡ ⎤ ⎡ ⎤=⎢ ⎥ ⎢ ⎥ ⎢ ⎥

⎣ ⎦ ⎣ ⎦ ⎣ ⎦

⎡ ⎤ ⎡ ⎤ ⎡ ⎤=⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥⎢ ⎥ ⎣ ⎦⎣ ⎦⎣ ⎦

Page 9: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

Adjoint System forTime-Invariant System

Page 10: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

Finite-Time Estimation

[ ]2

0 2

( ) ( ) ( )

( ) ( ) ( )ˆ( ) ( ) ( )

ˆ( ) ( )

sup

( ) 0 ( )( ) 0 ( )

ˆ( ) 0 ( )

w

m mw

y

w

w

m mw

y

x t Ax t B w t

m t C x t D w te t y t C x t

y t m t

ew

x t A B x tm t C D w te t C I y t

γ≠

= +

= +

= −

=

<

⎡ ⎤⎡ ⎤ ⎡ ⎤⎢ ⎥⎢ ⎥ ⎢ ⎥= ⎢ ⎥⎢ ⎥ ⎢ ⎥⎢ ⎥⎢ ⎥ ⎢ ⎥−⎣ ⎦ ⎣ ⎦⎣ ⎦

G

Page 11: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

( ) ( )( ) 0 ( )

0 0 ( )ˆ( )

( ) ( ) ( ) ( )

( ) ( ) ( )

ˆ( ) ( )

ˆ( ) ( )

T T Tm y

T Tw mw

T T Tm y

T Tw mw

x A C C xw B D m

I ey

x A x C m C e

w B x D m

y e

m y

τ ττ τ

ττ

τ τ τ τ

τ τ τ

τ τ

τ τ

⎡ ⎤ ⎡ ⎤− ⎡ ⎤⎢ ⎥ ⎢ ⎥ ⎢ ⎥=⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎣ ⎦⎣ ⎦⎣ ⎦

= + −

= +

=

⎡ ⎤= ⎣ ⎦G

Page 12: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance
Page 13: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

Control Problem for AdjointSystem

Page 14: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

Full Information Control: Review

Page 15: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

The Riccati Equation( ) ( ) ( ) ( )

( ) ( ) ( )

( ) ( ) ( ) ( )

( ) ( ) ( )

( ) ( )

T T Tm y

T T Tm y

m

x A C G x C e

m G x

x A C G x C e

m G x

G C Q

τ τ τ τ

τ τ τ

τ τ τ τ

τ τ τ

τ τ

⎡ ⎤= − −⎣ ⎦= −

⎡ ⎤= − +⎣ ⎦=

=

Page 16: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

{ }

Convert equation 9.37 to the adjoint system

ˆ ˆ( ) ( ) ( ) ( ) ( )

ˆ( ) ( )

( ) ( )

ˆ ˆ ˆ( ) ( ) ( ) ( ) ( ) ( )ˆ ˆ( ) ( )

T Tf m f

y

Tf

u m

y

x t A G t t C x t G t t m t

e t C x t

G t G t t

x t Ax t B u t G t m t C x ty t C x t

⎡ ⎤= − − + −⎣ ⎦=

= −

= + + −

=

Page 17: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance
Page 18: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance
Page 19: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

Example 9.3

Page 20: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance
Page 21: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

% Example 9.3. Time-varying Hinf radar range tracking.clear% Define the bounds on the disturbance input and the measurement error.Wbound=4; Vbound=20;% Compute the inverse of the measurement error bound to simplify% future computations.Vbinv=1/Vbound;% Define the plant model (with normalized inputs).A=[0 1;0 0]; B=[0 0;Wbound 0]; D=[0 1];Cm=[1/Vbound 0]; Cy=eye(2);% Initialize the state and the estimator state.x(:,1)=[10000;-50]; xh(:,1)=[9500;0];% Initialize the Riccati solution.Q=zeros(2);% Define the time vectors. Note: A short sampling time is used in % the beginning, and a long sampling time is used subsequently.dt1=0.001;n1=1000;dt2=0.1;n2=240;% Define the disturbance input and the measurement error.vn=2*Vbound*rand(1,n1+n2)-Vbound;wn=2*Wbound*rand(1,n1+n2)-Wbound;% Define the performance bound.gamma=22.5;gm2=1/gamma/gamma;

Page 22: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

% Simulation loop for plant, Riccati equation, and estimator.for i=1:n1,

% Plant simulation.m=[1 0]*x(:,i)+vn(i);x(:,i+1)=x(:,i)+dt1*(A*x(:,i)+B(:,1)*wn(i));% Riccati solution.Q=Q+dt1*(Q*A'+A*Q+B*B'-Q*(Cm'*Cm-gm2*Cy'*Cy)*Q);% Gain computation.G=Vbinv*Q*Cm';% Save the estimator gains.Gs(:,i)=G;% Estimator simulation.xh(:,i+1)=xh(:,i)+dt1*(A*xh(:,i)+G*(m-[1 0]*xh(:,i)));end

% Use a different sampling time for the remainer of the simulation.for i=n1+1:n1+n2,

% Plant simulation.m=[1 0]*x(:,i)+vn(i);x(:,i+1)=x(:,i)+dt2*(A*x(:,i)+B(:,1)*wn(i));% Riccati solution.Q=Q+dt2*(Q*A'+A*Q+B*B'-Q*(Cm'*Cm-gm2*Cy'*Cy)*Q);% Gain computation.G=Vbinv*Q*Cm';% Save the estimator gains.Gs(:,i)=G;% Estimator simulation.xh(:,i+1)=xh(:,i)+dt2*(A*xh(:,i)+G*(m-[1 0]*xh(:,i)));

end

Page 23: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

% Define the time vector for plotting.t=[0:dt1:n1*dt1 n1*dt1+dt2:dt2:n1*dt1+n2*dt2];% Plot the results.set(0,'DefaultAxesFontName','times')set(0,'DefaultAxesFontSize',16)set(0,'DefaultTextFontName','times')figure(1)clfsubplot(2,2,1)plot(t, x(1,:), 'r-', t, xh(1,:), 'r-.')axis([0 25 8000 12000])legend('Actual', 'Estimate')xlabel('Time (sec)')ylabel('Range')gridsubplot(2,2,2)plot(t, x(2,:), 'r-', t, xh(2,:), 'r-.')axis([0 25 -100 100])legend('Actual', 'Estimate')xlabel('Time (sec)')ylabel('Range rate')gridsubplot(2,2,3)t=[dt1:dt1:n1*dt1 n1*dt1+dt2:dt2:n1*dt1+n2*dt2];plot(t, Gs)plot(t, Gs(1,:), 'r-', t, Gs(2,:), 'r-.')axis([0 25 0 5])legend('{\itG}_1', '{\itG}_2')xlabel('Time (sec)')ylabel('Gains')grid

Page 24: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

Baseline

Page 25: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

Vbound=2,gamma=3.5

Page 26: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance
Page 27: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

Steady-State Equation

Page 28: 2. Multivariable Linear Systems - Hanyangccrs.hanyang.ac.kr/webpage_limdj/robust/Chapter9_2.pdfvn=2*Vbound*rand(1,n1+n2)-Vbound; wn=2*Wbound*rand(1,n1+n2)-Wbound; % Define the performance

Full Information Control: Steady-state