Lecture10(Controllability and Observability)

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 64

Adama Science and Technology

University

PCE6101 Linear and


Nonlinear Systems
Theory
(Controllability and Observ-
ability)
ASTU
School of EEC
10.1 Plant and Feedback
Control
Consider Output feedback control
d
r+ e Controller u + + Plant y
- Gc(s) Gp(s)
+ n
+
Only output signal is used for feedback
10.1 Plant and Feedback
Control
State feedback control
d
r Feedforward + u + + y
Plant
gain matrix -
Feedback x
gain matrix

Plant
x  Ax  Bu, x (t0 )  x0
y Cx  Du
State variables are used for feedback.
10.2 Controllable/Uncon-
trollable
10.3 Controllability
Controllability concept
Situations:
 We want to design a feedback system with the de-
sired performance.
 We want to control unstable systems.

Questions:
 Is it possible to move the initial state x(t0) to the
desired state x(t1) after a finite time by applying
the appropriate input u(t)? YES.
10.3 Controllability
Observability concept
Situations:
 Some variables are difficult to measure for feed-
back.
 Some sensors are too expensive. So they can not
be used.
Questions:
 Is it possible to know the initial state x(t0) or the
state x(t) from both the input u(t) and the output
y(t) observed for a finite time? YES.
10.3 Controllability
Why do we check it?
Necessary to know the existence
of uncontrollable state variables
because the feedback of the state
variables is used.
If a system is uncontrolable, no
state controller can be designed.
Firstly introduced by R.E. R.E. Kalman
(1930-2016)
Kalman.
Adama Science and Technology
University

R.E. Kalman Decomposition of System

 Controllable and
observable system
 Controllable but
unobservable system
 Observable but un-
controllable system
 Uncontrollable and
unobservable system
10.3 Controllability
(Definition) Controllability
A system is said to be controllable at t= t0 if there is a
control input u(t), t0<tt1 that can move the initial
state x(t0) to the desired state x(t1) at t= t1.
10.3 Controllability
Single input LTI system:
The controllability is closely related to matrices A and
B. For example

 0 1  
x   x    u, x (t0 ) 0
 0 1 

Transition matrix (t)


1 -1+et 
Φ (t ) e At  
t
 0 e 
10.3 Controllability
The solution is 0
t

A ( t  t0 ) A( t   )
x (t ) e x (t0 )  e Bu ( )d
0

t 1 -1+e(t   )    
  
0 0
 e (t   )
  
   
u ( )d

 t 

(t   )
 [     e ]u ( )d 
0
 
t
 

(t   )
e u ( )d
 0 
10.3 Controllability
Letting t= t1
t1 t1
x1 (t1 ) (   )  0
u ( )d   
0
e(t1   ) u ( )d
t1
e
(t1   )
x2 (t1 )  u ( )d
0

When  0, = 0
t1
x1 (t1 )   u( )d
0
x2 (t1 ) 0
 x1(t1) can be moved to any state via u(t), but x2(t1) is
always fixed to 0.
10.3 Controllability
(Definition) Controllability of a LTI system
A LTI system is said to be controllable at t= t0 if u(t),
t0< t  t1 exists to move x(t0) to the desired state x(t1)
at t= t1. Especially if one of the following conditions
is true, then it is controllable:

1. The rank of the nnm controllability matrix is n.


U= [B AB  An-1B]
2. All rows of the transfer matrix are linearly
independent.
(sI-A)-1B
10.3 Controllability
3. The controllable Gramian matrix WC is
nonsingular.
t
T AT 

A
Wc  e BB e d , t  0
0
For example, given a system
0 1  1 0
x   x  u, x (t0 )  x0
  1  2  0 1
Controllability matrix is given by
1 0 0 1  Since U= 2 = n,
U [ B AB ]  
 0 1  1  2  controllable.
10.3 Controllability
Consider a system
  1 1 0  1
x  0  1 0  x   2  u, x (t0 )  x0
   
 0 0 0   1 

Controllability matrix is given by


 1 1  3
U [ B AB A2 B ]  2  2 2 
 1 0 0 
10.3 Controllability
 1 1  3 -2E1+E2  E2
2  
U [ B AB A B ]  2  2 2  -E1+E3  E3
 1 0 0 

 1 1  3
0  4 8  -E2+E3  E3  1 1  3
  0  4 8 
 0  1 3   
 0 0 1 
Since U= 3= n, controllable.
10.3 Controllability
Consider a LTI system
1 1  1
x   x    u, x (t0 )  x0
 0  2  1
1
1 s 1 1  1
( sI  A) B    1
 0 s  2   
 s 3 
1  s  2 1  1  ( s  1)( s  2) 
   
( s  1)( s  2)  0 s  1 1  1 
 ( s  2) 
 
To check the linear independence of two rows
s 3 1
1 2 0
( s  1)( s  2) ( s  2)
10.3 Controllability
Multiplying both sides by (s-1)(s+2) gives

1(s+3)+2(s-1)= (1+2)s+(31-2)= 0s+0s0

Comparing the left and right sides gives


1+2= 0 
31-2= 0 

Thus, 1= 2= 0. Since two rows of (sI-A)-1B are linearly


independent, controllable.
10.3 Controllability
For example, given a system
 1 0   1
x   x    u, x (t0 )  x0
 0  2  1

Transition matrix (t)


 e t 0 
Φ (t ) e At  
 2t
 0 e 
t
T AT 

A
Wc  e BB e d , t  0
0
10.3 Controllability
        2  3 
T e 0  1  e 0 e e
e A BBT e A  
 2
   1 1 

 
 

 0 e   1  0  2
e   e  3 
e 4

t T t  e  2 e  3 

0
Wc  e A BBT e A  d   
0 e

 3 
e  4
 d

1  2t 1  3t 
2 (1  e ) (1  e )
3
 
 1 (1  e  3t ) 1 (1  e  4t ) 
 3 4 
Since Wc is
1 1
Wc  (1  e  2t )(1  e  4t )  (1  e  3t ) 2 0 nonsingular,
8 9
controllable.
10.3 Controllability
For example, check the controllability using the Mat-
lab functions.
  1 1 0  1
x  0  1 0  x   2  u, x (t0 )  x0
 0 0 0   1 
Program:
>>A= [-1 1 0;0 -1 0;0 0 0];
>> B= [1;2;1];
>> U= ctrb(A,B); % Controllability matrix
>> r= rank(U) % Rank
r= 3
10.4 Observability
Why do we need to check it?
Designing and implementing state feedback control
require the feedback of all state variables.
When some state variables are unmeasurable, we
need to check whether they can be estimated from the
model.
If the system is unobservable, state observer design is
impossible
Firstly introduced by R.E. Kalman
10.4 Observability
LTI system:
The observability is closely related to matrices A
and C.
x  Ax  Bu, x (t0 )  x0
y Cx  Du

x  Ax  Bu, x (t0 )  x0
y Cx
10.4 Observability
(Definition) Observability
A LTI system is said to be observable if there is
enough t= t1>0 that u and y determine x0 uniquely. Es-
pecially it is observable if one of the following condi-
tions is true:
1. The rank of the npm observability matrix V is n.

 C 
 CA 
V  
  
 n-1 
 CA 
10.4 Observability
2. All columns of the transfer matrix are linearly
independent.

C(sI-A)-1

3. The observable Gramian matrix WO is nonsingular.


t
AT 
Wo  e 0
C T Ce A d , t  0
10.4 Observability
For example, consider a SISO LTI system
0 1  0
x   x    u, x (t0 )  x0
  1  2  1
y 1 0 x
Observability matrix yields
 C   1 0
V    
 CA  0 1 
 Since V= 2 = n, the system is observable.
10.4 Observability
For example, consider a LTI system
 0 1  1
x   x    u , x (t0 )  x0
 0 0  0
y 1 0 x
1
 s  1
C ( sI  A) 1 0 
1

 0 s 
1  s 1  1 1
 2 1 0    2
s  0 s  s s 
10.4 Observability
To check the linear independence of two columns
1 1
1   2 2 0
s s
Multiplying both sides by s2 gives

1s+2= 0s+0s0

Comparing the left and right sides gives

 Since 1= 2= 0, the system is observable.


10.4 Observability
Program:
>> A= [0 1;0 0]; B= [1;0]; C= [1 0];
>> U= ctrb(A,B); % Controllability matrix
>> ru= rank(U) % Rank
>> V= obsv(A,C); % Observability matrix
>> rv= rank(V) % Rank
ru= 1  0 1  1
rv= 2 x   x    u , x (t0 )  x0
 0 0  0
y 1 0 x
The system is observable but not controllable.
10.5 Similarity Transforma-
tion
A LTI system can be represented as a combination of sub-
systems with appropriate similarity transformation
Controllable subsystem
x  Ax  Bu, x (t0 )  x0
y Cx  Du
If U= n1< n, via the following similarity transfor-
mation
x Qx
The original system can be represented by a combi-
nation of controllable subsystems and uncontrollable
subsystems.
10.5 Similarity Transforma-
tion

(n-n1) vectors randomly chosen


such that Q is nonsingular

where Q= [q1 q2 … qn1 qn1+1 … qn]

n1 independent linear vectors


selected from U
10.5 Similarity Transforma-
tion
Original system
x  Ax  Bu, x (t0 )  x0
y Cx  Du
Similarity transformation x Qx

x  Ax  Bu
y Cx  Du
where A Q  1 AQ , B Q  1 B, C = CQ, D  D
10.5 Similarity Transforma-
tion
Transformed system
 x c   Ac A12   xc   Bc 
        u

 c   0
x Ac   xc   0 
 xc 
y  C c C c     Du
 xc 
Controllable subsystem

x c  Ac xc  Bc u
y C c xc  Du
10.5 Similarity Transforma-
tion
Consider a LTI system.

0 1 0  0
x   1   
 2 0  x   1  u, x (t0 )  x0

 0 0  3  0 
y 1 1 0 x
The controllability matrix U gives
 0 1  2
U [ B AB A2 B ]  1  2 3 
 0 0 0 
10.5 Similarity Transforma-
tion
Since U= 2 < n= 3, it is uncontrollable. n1= 3-2= 1.
Choosing one vector randomly such that Q is non-
singular yields

 0 1  2  0 1 0
 
U  1  2 3  Q  1  2 0 
 0 0 0   0 0 1 
 2 1 0
Q 1 
 1 0 0  
Randomly choose
 0 0 1  such that Q-1 exists
10.5 Similarity Transforma-
tion
Thus
 0 - 1 0
A Q  1 AQ  1 -2 0  ,
 0 0 -3 
 1
1 
B Q B  0  , 
 0 
C CQ 1  1 0 ,
D  D 0
10.5 Similarity Transforma-
tion
The transformed system is given by

  0 - 1 0  1
 xc     xc   
    1 -2 0      0  u
 xc    xc 
 0 0 -3   0 
 xc 
y 1  1 0  
 xc 
Thus, controllable sub- x  0  1 x   1  u
c  1  2 c  0
system is given by    
y 1  1 xc
10.5 Similarity Transforma-
tion
Observable subsystem
x  Ax  Bu, x (t0 )  x0
y Cx  Du
If V= n2 < n, via the similarity transformation
x Q  1 x
the original system can be represented by a combina-
tion of observable subsystems and unobservable sub-
systems.
10.5 Similarity Transforma-
tion
 q1 
 q  n2 independent vectors
 2 
   selected from V
 
where Q  qn2 
q 
 n2 1  (n-n2) vectors randomly cho-
   sen such that Q is nonsingu-
  lar
 qn 
10.5 Similarity Transforma-
tion
Original system
x  Ax  Bu, x (t0 )  x0
y Cx  Du
1
Similarity transformation x Q x
x  Ax  Bu
y Cx  Du
where A QAQ  1 , B QB, C  CQ  1 , D  D
10.5 Similarity Transforma-
tion
Transformed system
 x o   Ao A12   xo   Bo 
        u
 x o   0 Ao   xo   0 
 xo 
y  C o C o     Du
 xo 
Observable subsystem
x o  Ao xo  Bo u
y C o xo  Du
10.5 Similarity Transforma-
tion
Consider a LTI system.
0 1 0  0
x   1   
 2 0  x   1  u , x (t 0 )  x 0

 0 0  3  0 
y 1 1 0 x
The observability matrix V gives
 C   1 1 0
   
V  CA    1  1 0 
 2   1 1 0
 CA   
10.5 Similarity Transforma-
tion
Since V= 1 < n= 3, it is unobservable. Selecting Q as
 1 1 0  1  1 0
Q  0 1 0  Q 1  0 1 0 
 0 0 1   0 0 1 
Randomly choose
Thus such that Q-1 exists
 -1 0 0   1
A QAQ  1  -1 -1 0  , B QB  1 
 0 0 -3   0 
C CQ  1 1 0 0 , D  D 0
10.5 Similarity Transforma-
tion
The transformed system is given by

  -1 0 0   1
 xo     xo   
    -1 -1 0    xc   1  u
 xo    xo 
 0 0 -3   0 
 xo 
y 1 0 0  
 xo 
Thus, observable sub- x   1 0  x   1 u
system is given by
o   1  1 o 1
   
y 1 0 xo
10.6 Controllable Canonical
Form
State feedback control
d
r Feedforward + u + + y
Plant
gain matrix -
Feedback x
gain matrix
10.6 Controllable Canonical
Form
Controller Plant
r u y
u  Kx  Fr D/A

A/D A/D
x1 x2
10.6 Controllable Canonical
Form
Plant
x  Ax  Bu , x (t0 )  x0
y Cx  Du
where A  nn , B  n1 , C  1n ,D  
Assumption
The plant is a SISO LTI system(u and y are scalars)
It is controllable & observable(U= n, V= n)
10.6 Controllable Canonical
Form
Similarity transformation
Before
x  Ax  Bu , x (t0 )  x0
y Cx  Du
x Qx
After
Q is nonsingu-
x  Ax  Bu , x (t0 )  x0 lar
y Cx  Du
1 1
where A Q AQ, B Q B, C CQ , D =D
10.6 Controllable Canonical
Form
Controllability
Before U [ B AB  An  1 B ], U n
After U [ B AB  Ai  1 B  An  1 B ]
The ith term in the above equation
Ai  1 B (Q  1 AQ )(Q  1 AQ ) (Q  1 AQ )Q  1 B Q  1 Ai  1 B

Thus (i-1) times


U Q  1[ B AB  Ai  1 B  An  1 B ] Q  1U , U n
If Q is nonsingular, controllability is kept after transformation.
10.6 Controllable Canonical
Form
Observability
 C   C 
 CA   
 CA 
Before V   , V n After V 
    
 n 1   
 CA  n 1
 CA 
As the previous case
CAi  1 CQ (Q  1 AQ )(Q  1 AQ )  (Q  1 AQ ) CAi  1Q

(i-1) times
10.6 Controllable Canonical
Form
After transformation
 C   C 
   
     
V  CAi  1   CAi  1  Q VQ
   
     
 n 1   n 1 
 CA   CA 
Thus V n
 Observability is kept after transformation.
10.6 Controllable Canonical
Form
Conversion to controllable canonical form
System
x  Ax  Bu, x (t0 )  x0
y Cx  Du
Controllable canonical form
x  Ax  Bu, x (t0 )  x0
y Cx  Du
where A Q  1 AQ, B Q  1 B, C CQ , D =D
10.6 Controllable Canonical
Form
Controllable canonical
form(SISO)
 0 1 0  0   0
 0 0 1  0   0
   
x        x    u, x (t0 )  x0
   
 0 0 0  1   0
 a  a   1 
 n n  1  an  2   a1 

y  (bn  b0 an ) (bn  1  b0 an  1 )  (b1  b0 a1 )  x  b0 u

Transfer function

(b1  b0 a1 ) s n  1  (b2  b0 a2 ) s n  1    (bn  b0 an )


G (s)  n n 1
 b0
s  a1s    an  1 s  an
10.6 Controllable Canonical
Form
Conversion procedure
Step 1: Check the controllability of the system ( U= n).
U [ B AB  An 1 B ]
Step 2: Find the characteristic polynomial from A.
( ) |  I  A | n  a1 n  1    an  1  an
Step 3: Obtain Q= [q1 q2 … qn]
qn  B
qn  1  AB  a1 B
qn  2  A2 B  a1 AB  a2 B

q1  An  1 B  a1 An  2 B   an  1 B
10.6 Controllable Canonical
Form
Step 4: Obtain matrices
1 1
A Q AQ, B Q B, C CQ , D =D

For example, consider a dynamic system.


1 0  1
x   x  u
  1  2  1
y  2 1 x
Check the controllability.
Convertible to the
1 1  controllable
U [ B AB ]   ,  U 2
 1  3 canonical form.
10.6 Controllable Canonical
Form
Getting the characteristic polynomial of A
1 0 2
 ( )   I  A      2
1  2
a1= 1, a2= -2 1 0  1
x   x  u
  1  2  1
 1 y  2 1 x
q2  B  
 1
1 1  2 
q1  AB  a1 B    1    Q= [q1 q2]
  3  1   2 
10.6 Controllable Canonical
Form
 2 1 1 1  1  1
Q    Q   
  2 1 4 2 2 
Obtain matrices

1 1  1  1  1 0   2 1  0 1 
A Q AQ =        
4  2 2    1  2    2 1  2  1
1 1  1  1 1  0 
B Q B =      
4  2 2   1  1 
 2 1
C CQ =  2 1    2 3 , D  D =0
  2 1
10.6 Controllable Canonical
Form
Before
1 0  1 G ( s ) C ( sI  A)  1 B  D
x   x  u
  1  2  1 3s  2
 2
y  2 1 x s s 2
 TFs before and after the transfor-
After
mation are the same.
x  0 1  x   0  u 1
G ( s ) C ( sI  A) B  D
 2  1  1
    3s  2
 2
y  2 3 x s s 2
10.6 Controllable Canonical
Form
Example 1: Code to obtain the controllable canonical
form of the system.
  2 1 0  4
x  0 0 1  x   0  u
  1 0 0   1 
y 1 0 0 x

Program:
10.6 Controllable Canonical
Form
MATLAB program

A= [-2 1 0;0 0 1;-1 0 0]; B= [4;0;1]; C= [1 0 0];


D= 0;
3 2
p= poly(A); %  ( )   a1  a 2   a 3
Q(:,3)= B;
Q(:,2)= A*Q(:,3)+p(2)*B;
Q(:,1)= A*Q(:,2)+p(3)*B;
IQ= inv(Q);
A1= IQ*A*Q, B1= IQ*B, C1= C*Q, D1= D
[ns,ds]= ss2tf(A,B,C,D) % TF of original
[ns1,ds1]= ss2tf(A1,B1,C1,D1) % TF after
10.6 Controllable Canonical
Form
Example 2: Obtain the TF of the system.
 0 1 0  0
x  0 0 1  x   0  u
  2 0  1  1 
y  2 3 0 x
Solution:
G ( s ) C ( sI  A)  1 B  D
b1s 2  b2 s  b3 3s  2
 
s 3  a1s 2  a2 s  a3 s3  s 2  2
10.6 Controllable Canonical
Form
Example 3: Write the TF in the controllable canoni-
cal form.
3 2
2 s  3s  6s  2
G (s) 
s 3  6 s 2  5s  1
Solution:
a1= 6, a2= 5, a3= 1, b0=2, b1= 3, b2= 6, b3= 2
 0 1 0   0 0 1 0  0
x  0 0 1  x   0  u  0 0 1  x   0  u
  a3  a2  a1   1    1  5  6   1 
y  (b3  b0 a3 ) (b2  b0 a2 ) (b1  b0 a1 )  x  0  4  9  x
10.7 Observable Canonical
Form
Observable canonical form

0 0  0  an   (bn  b0 an ) 
1   (b  b a ) 
 0  0  an  1   n 1 0 n 1 
x  0 1  0  an  2  x   (bn  2  b0 an  2 )  u , x (t0 )  x0
   
        
0 0  1  a1   (b  b a ) 
  1 0 1 
y  0 0  0 1 x  b0u
Q&A

You might also like