0% found this document useful (0 votes)
9 views

Chapter 8 State Estimator based controller design

The document discusses the design of state observers for feedback control in linear systems, focusing on full state observers and asymptotic state observers. It highlights the limitations of open-loop state observers and presents methods for designing asymptotic observers to improve state estimation accuracy. Key concepts include the use of gain matrices and the importance of observability in system design.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Chapter 8 State Estimator based controller design

The document discusses the design of state observers for feedback control in linear systems, focusing on full state observers and asymptotic state observers. It highlights the limitations of open-loop state observers and presents methods for designing asymptotic observers to improve state estimation accuracy. Key concepts include the use of gain matrices and the importance of observability in system design.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

Adama Science and Technology

University

PCE6101 Linear Systems


Theory
Chapter 8: State Estimator based
feedback Controller design
ASTU
School of EEC
8.1 Full State Observer Design
When state feedback control is used
• Designed on the assumption that all state variables
can be fed back, but some variables (signals) may
not be measured due to the limitation of the
measuring device.
• Even if the measurement is possible, we have to
consider the cost of the measuring equipment
• In these cases, a state observer can be used to
estimate state variables.
8.1 Full State Observer Design
SISO LTI system
x  Ax  Bu, x (t0 )
y  Cx
• xn, u, y and A, B, C are nn, n1, 1n
real matrices, respectively.
• D is regarded as 0 for convenience. In case of D 0,
if y= y-Du, the system is of the form y= Cx .
• The pair (A, C) is observable (V= n).
8.2 Open-loop State Observer
Open-loop state observer
xˆ  Axˆ  Bu, xˆ (t0 ) x

• Estimating the state x by


connecting the model in
parallel with the system
• Observer outputs x with
u as input
• x(𝑡0) is the initial value of the state observer.
8.2 Open-loop State Observer
Characteristics of open-loop state observer
If the model is accurate and x(𝑡0) of the state observer
is synchronized with x(𝑡0) of the system, then x(𝑡) is
equal to x(t) at tt0. But this method has two drawbacks:

• Firstly, it is not easy to synchronize x(𝑡0)with x(𝑡0)


exactly when the state observer is turned on.
• Secondly, if the system parameters change during
operation, x(𝑡) no longer coincides with x(t).
8.2 Open-loop State Observer
(1) When x(𝑡0)  x(𝑡0)
System:
 0 1 0  0.2 
x  x    u, x (t0 )   
 0.8 1 1   0 
Observer:
0 1 0 0
xˆ    xˆ    u , xˆ (t0 )   
a b 1  0
a  0.8, b  1
8.2 Open-loop State Observer
1.5

1
x1(𝑡) System
Observer
0.5
x1(𝑡)
0
0 2 4 6 8 10
t
1

0.5 x2(𝑡) System


Observer

-0.5 x2(𝑡)
-1
0 2 4 6 8 10
t
8.2 Open-loop State Observer
(2) When system parameters change

System:
 0 1 0  0
x  x    u, x (t0 )   
 0.8 1 1  0
Observer:

0 1 0 0
xˆ    xˆ    u , xˆ (t0 )   
a b 1  0
a  0.7, b  0.9
8.2 Open-loop State Observer
1.5

x1 & xˆ1 1
System
0.5 Observer

0
0 2 4 6 8 10
t
1
System
0.5 Observer
x2 & xˆ2 0

-0.5

-1
0 2 4 6 8 t 10
8.2 Open-loop State Observer
State feedback control without an observer
d
r + + u y
 k2 Plant
- -

x
K1

u   K1 x  k2  (r  y )dt
If all state variables are available for feedback
control, they are directly used without any observer.
8.2 Open-loop State Observer
State control with an open-loop observer
d
r + + u y
 k2 Plant
- -
Observer

K1
x

u   K1 xˆ  k2  (r  y )dt
8.3 Asymptotic State Observer
Asymptotic state observer
xˆ  Axˆ  Bu  L( y  Cxˆ ), xˆ (t0 )
• Improve the disadvantage
of the open-loop state 제어대상 시스템
observer
• Output x using u and y as
input
• L is the gain matrix
multiplied by the error
between the system and
the observer output.
8.3 Asymptotic State Observer
PI type state control with an observer
d
r + + u y
 k2 Plant
- -

Observer

K1
x

u   K1 xˆ  k2  (r  y )dt
xˆ  Axˆ  Bu  L( y  Cxˆ ), xˆ (t0 )
8.3 Asymptotic State Observer
Defining the error between the system state and the
observer state as
e  x  xˆ
Differentiating both sides and substituting the previous
expressions yields
e  x  xˆ  Ax  Bu  Axˆ  Bu  L( y  Cxˆ )
 A( x  xˆ )  L(Cx  Cxˆ )
 A( x  xˆ )  LC ( x  xˆ )
 ( A  LC )e
8.3 Asymptotic State Observer
(Theorem) Consider an error system
e (t )  ( A  LC )e (t ), e (t0 )  x (t0 )  xˆ (t0 )

Its characteristic equation is

|IA+LC |= 0.
If L is selected so that all eigenvalues of (A-LC) have
negative real parts, then for any e(t0), e(t)0 as t,
that is, x(t)x(t).
(Proof) The solution of the error system is
( A  LC )t
e (t )  e e (t0 )
8.3 Asymptotic State Observer
(Theorem) Consider an asymptotic state observer

xˆ  Axˆ  Bu  L( y  Cxˆ ), xˆ (t0 )


If the matrix pairs (A, C) of the system are
observable, then L can be chosen appropriately for
the observer to have arbitrary poles.
(Proof) Refer to the text book.
8.3 Asymptotic State Observer
How to design an asymptotic observer

Given n poles 1 , 2 , , n , find the gain matrix L


of the following asymptotic observer.

xˆ  Axˆ  Bu  L( y  Cxˆ ), xˆ (t0 )

where (A,C) is observable and the initial vector of the


state observer is generally set to x(𝑡0)= 0.
8.3 Asymptotic State Observer
Method 1: Brute force
Step 1: Find the characteristic polynomial of the state
observer.
( )   I  A  LC    a1   aˆn
n
ˆ n -1

Step 2: Find the characteristic polynomial from the
given poles of n, 1 , 2 , , n .

( )  (  1 )(  2 ) (  n )   n  a1 n-1 


 an

Step 3: Compare the coefficients of two polynomials to
find L.
aˆi  ai (i  1, 2, , n)
8.3 Asymptotic State Observer
For example, consider a system.

 2 1  1 0.5
x  x    u, x (t0 )   
 0 3 1 0
y  1 0 x

Design an asymptotic state observer with two poles


of -53j.
8.3 Asymptotic State Observer
Find the characteristic polynomial from the given
poles
( )  (  5  j3)(  5  j3)
   10  34
2

L
A-LC becomes
 2 1   1  2  1
A  LC     1 0   
1
 
3
 0 3  2  2
8.3 Asymptotic State Observer
The characteristic polynomial of A-LC becomes
 2 1
( )   I  A  LC  1

2  3
  2  (5  1 )  (2  1 )3  2 

Comparing  with  gives


5 1  10  1 5
(2  1 )3  2  34  2  34  21  13
 1 5
 L   13
 2  
8.3 Asymptotic State Observer
Method 2: Similarity transformation
Step 1: Set A  AT , B  C T , K  LT
Step 2: Find the characteristic polynomial of the open-
loop system.
( )   I  A    a1
n n -1
  an 
Step 3: Find the characteristic polynomial from the
given poles.
( )  (  1 )(  2 ) (  n )
   a1
n n -1
  an 
8.3 Asymptotic State Observer
Step 4: Find K from  and .
K   an  an an -1  an -1 a1  a1 
Step 5: Find Q= [q1 q2 ... qn].
qn  B
qn -1  Aqn  a 1 B

q1  Aq2  an-1 B
Step 6: Find K and L.
1
K  KQ LK T
8.3 Asymptotic State Observer
Consider the previous system.
 2 1  1 0.5
x  x    u, x (t0 )   
 0 3 1 0
y  1 0 x

Design an asymptotic state observer with two poles


of -53j.
Set the matrices.
 2 0  1 
A A 
T
 , B  C T
   , K  LT
 
 1 3
1 2
0
8.3 Asymptotic State Observer
The characteristic polynomial of the open-loop system
yields
2 0
 ( )   I  A    2  5  6 
1   3
 a1  5, a2  6
The characteristic polynomial from the given poles
becomes
( )  (  5  j3)(  5  j3)

   10  34
2

 a1  10, a2  34
8.3 Asymptotic State Observer
From  and 
K   a2  a2 a1  a1    28 5
Q= [q1 q2]
1 
q2  B   
0 
 2 0  1   1   3
q1  Aq2  a1 B       5    
 1 3 0  0  1
1
1 3 1  0 1 
Q    
1 0  1 3
8.3 Asymptotic State Observer
L is obtained as follows:

0 1 
K  KQ   28 5 
1
  5 13
1 3
5
LK  
T

13
8.3 Asymptotic State Observer
Method 3: Ackermann Formula
Step 1: Find () from the given poles.
( )  (  1 )(  2 ) (  n )   n  a1 n-1   an

Step 2: Find  ( A)  A n
 a A n -1
  an I
1
 C 
 CA 
Step 3: Find the observability matrix V  
 
Step 4: Obtain the gain matrix L.  n1 
0  CA 
0 
L   ( A)V 1  
 
 
1 
8.3 Asymptotic State Observer
Consider the same system.
 2 1  1 0.5
x  x    u, x (t0 )   
 0 3 1 0
y  1 0 x
Design an asymptotic state observer with two poles
of -53j.
The characteristic polynomial from the given poles
becomes
( )  (  5  j3)(  5  j3)
  2  10  34  a1  10, a2  34
8.3 Asymptotic State Observer
(A) becomes
2
 2 1   2 1  1 0  18 5 
 ( A)     10    34    
 0 3   0 3   0 1   0 13 
The observability matrix V becomes
 C   1 0 1 1 0
V    , V  
CA  2 1  2 1
The gain matrix L becomes

1 0  18 5  1 0  0   5 
L   ( A)V 1    0 13  2 1  1   13
       
8.3 Asymptotic State Observer
Example 1: Consider the same system.

 2 1  1 0.5
x  x    u, x (t0 )   
 0 3 1 0 
y  1 0 x

Simulate an asymptotic state observer with two poles -


53j, where L= [5 13]T.

Program:
8.3 Asymptotic State Observer
State observer
xˆ  Axˆ  Bu  L( y  Cxˆ ), xˆ (t0 )  0
Inserting A, B, C and L gives
 2 1  1  1
xˆ    xˆ    u    ( y  1 0 xˆ )
 0 3 1  2
Rewriting this yields
xˆ1  2 xˆ1  xˆ2  u  1 ( y  xˆ1 )
xˆ2  3xˆ2  u  2 ( y  xˆ1 )
8.3 Asymptotic State Observer
Main program
A= [-2 1;0 -3]; C= [1 0]; P= [-5+3*j, -5-3*j];
AT= A'; CT= C'; L= acker(AT, CT, P); L= L';
t=0; xp= [0.5;0]; xo= [0;0]; h= 0.01; u=1; loop= 300;
buf= [t xp' xo'];
for i= 1:loop
xp= RK4(@plant,t,xp,u,h); % call the plant
y= xp(1);
xo= RK4(@observer,t,xo,u,h,y); % call the observer
t= t+h;
buf= [buf; t xp' xo'];
end
8.3 Asymptotic State Observer
subplot 211
plot(buf(:,1),buf(:,2),'b',buf(:,1),buf(:,4),'r','linewidth',2)
axis([0 3 0 0.8])

subplot 212
plot(buf(:,1),buf(:,3),'b',buf(:,1),buf(:,5),'r','linewidth',2)
axis([0 3 0 0.6])
8.3 Asymptotic State Observer
Plant
function xdot= plant(t,x,u)
xdot= zeros(2,1);
xdot(1)= -2*x(1)+x(2)+u;
xdot(2)= -3*x(2)+u;

 2 1  1
x  x    u or
 0 3 1
x1  2 x1  x2  u
x2  3x2  u
8.3 Asymptotic State Observer
State observer
function xdot= observer(t,x,u,y)
L1= 5; L2= 13;
xdot= zeros(2,1);
xdot(1)= -2*x(1)+x(2)+u+L1*(y-x(1));
xdot(2)= -3*x(2)+u+L2*(y-x(1));

xˆ 1  2xˆ 1  xˆ 2  u  1 (y  xˆ 1 )
xˆ 2  3xˆ 2  u  2 (y  xˆ 1 )
8.3 Asymptotic State Observer
0.8

0.6
x1
0.4

0.2
xˆ1
0
0 0.5 1 1.5 2 2.5 3

0.8

0.6
x2
0.4 xˆ2
0.2

0
0 0.5 1 1.5 2 2.5 3
8.3 Asymptotic State Observer
Example 2: Consider a block diagram that controls the
roll angle ϕ of a light airplane by adjusting the aileron
angle θ.
8.3 Asymptotic State Observer
The model of the airplane is as follows:
0 1 0  0   0.1
x  0 1 1  x  0  u, x (t0 )   0 
0 0 0  1   0 
y  1 0 0 x

(1) Design a PI-type tracking controller so that the


closed-loop augmented system has poles –2 ± 2j, –1
and –2.
8.3 Asymptotic State Observer
Solution: Augmented system matrices are
0 1 0 0  0 
   
 A 0  0 1 1 0   B  0 
A   , B 
C 0   0 0 0 0   D  1 
   
1 0 0 0  0 
>>A= [0 1 0;0 -1 1;0 0 0]; AA= [A;C];
>> AA= [AA zeros(4,1)]; B= [0;0;1]; BB= [B;0];
>> P= [-2+2j, -2-2j, -1, -2];
>> K= acker(AA,BB,P)
K=
32 16 6 16
8.3 Asymptotic State Observer
The PI-type tracking controller is

u= -[ 32 16 6]x+16(r-y)dt
(2) Design an asymptotic state observer with poles -32j,
-2 and combine with the tracking controller. Make sure
that the performance at the setpoint ϕd= 20° satisfies
Mp≤10(%) and 2% ts≤9(sec) with x(𝑡0)= 0.
8.3 Asymptotic State Observer
0 0 0  1 
AT  1 1 0  , C T  0 
0 1 0  0 

>>A= [0 1 0;0 -1 1;0 0 0]; AT= A';


>> C= [1 0 0]; CT= C';
>> P= [-3+2j, -3-2j, -4];
>> L= acker(AT, CT, P);
>> L= L'

L= 9
28
52
8.3 Asymptotic State Observer
The state observer becomes

0 1 0  0 9
xˆ  0 1 1  xˆ  0  u   28 ( y  1 0 0  xˆ )
0 0 0  1  52 
xˆ1  xˆ2  9( y  xˆ1 )
xˆ2   xˆ2  xˆ3  28( y  xˆ1 )
xˆ3  u  52( y  xˆ1 )
8.3 Asymptotic State Observer
Overall system
r+  16 + u y
- -

State observer

32 x1
+ +
x2
16
+ +
x3
6
PI-type tracking controller
8.3 Asymptotic State Observer
Main progarm
A= [0 1 0;0 -1 1;0 0 0]; B= [0;0;1]; C=[1 0 0];
AA= [A;C];
AA= [AA zeros(4,1)];
BB= [B;0];
PC= [-2+2j, -2-2j, -1, -2];
K= acker(AA,BB,PC)
PO= [-3+2j, -3-2j, -4];
AT= A'; CT= C'; L= acker(AT, CT, PO);
L= L'
8.3 Asymptotic State Observer
t= 0; xp= [-0.1;0;0]; xo= [0;0;0]; h= 0.01;
r= 20*pi/180; z= 0; loop= 1000; buf=[]; par=[xp(1);L];
u= 0;
for i= 1:loop
buf= [buf; t xp(1) xo(1) u];
z= z+h*(r-xp(1));
u= -K(1:3)*xo+K(4)*z;
xp= RK4(@airplane,t,xp,u,h);
par(1)= xp(1);
xo= RK4(@observer,t,xo,u,h,par);
t= t+h;
end
8.3 Asymptotic State Observer
subplot 211
plot(buf(:,1),buf(:,2),'b',buf(:,1),buf(:,3),'r','linewidth',2)
axis([0 10 -0.1 0.4])
grid on

subplot 212
plot(buf(:,1),buf(:,4),'linewidth',2)
axis([0 10 -5 6])
grid on
8.3 Asymptotic State Observer
Plant

function xdot= airplane(t,x,u)


xdot= zeros(3,1);
xdot(1)= x(2);
xdot(2)= -x(2)+x(3);
xdot(3)= u;

x1  x2
x2   x2  x3
x3  u
8.3 Asymptotic State Observer
State observer
function xdot= observer(t,x,u,par)
y= par(1); L1= par(2); L2= par(3); L3= par(4);
xdot= zeros(3,1);
xdot(1)= x(2)+L1*(y-x(1));
xdot(2)= -x(2)+x(3)+L2*(y-x(1));
xdot(3)= u+L3*(y-x(1));
xˆ1  xˆ2  9( y  xˆ1 )
xˆ2   xˆ2  xˆ3  28( y  xˆ1 )
xˆ3  u  52( y  xˆ1 )
8.3 Asymptotic State Observer
Step response
0.3
x1
0.2
y(t)
0.1 xˆ1
0
-0.1
0 2 4 6 8
t
5

u(t)
0

-5
0 2 4 6 8
t
Adama Science and Technology
University

Assignment IV
1. A dynamic system is modelled by

a. Compute the state transition matrix Φ(t) .


b. Is the system BIBO stable? Asymptotically stable?
c. Can you design a feedback control law u(t) = -Kx(t) such that Eigen of (A+BK) = { -1, -1, -2}? If so, what
should K be?
d. Does the original system have any unobservable modes(s)? If so, should you worry about it (them)
2. Consider the system shown below, design an asymptotic state observer with two poles of -21.5j.
 2 0  1 0.5
x  x    u, x (t0 )   
 1 3 1 0
3. Consider the system shown below. y   0 1 x

0 1 0 0   0.1
x  0 1 1  x  0  u, x (t0 )   0 
  
0 0 0  1   0 
y  1 0 1 x
a. Design a PI-type tracking controller so that the closed-loop augmented system has poles –1 ± 1j, –1 and –2.
b. Design an asymptotic state observer with poles -10.5j, -1 and combine with the tracking controller.
Note: simulate and see the result using MATLAB.

You might also like