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

Lecture 12

Uploaded by

Veljko
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Lecture 12

Uploaded by

Veljko
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Lecture 12 - State Feedback Introduction

K. J. Åström • The simple design method becomes very cumbersome for


systems of high order
1. Introduction • The PID controller predicts based on linear extrapolation
2. An Example • Can we do something better
3. The general Case • Where to look for inspiration?
4. Integral Action • State a number of variables that summarizes the past that
5. Summary is useful for prediction

Theme: Using the state for control. • The future behavior can be predicted from the state
• Can we find a general controller?
• The state is an ideal basis for control
• We will focus on the predictive part, reference values and
integral action will be dealt with later

State Feedback The Mathematical Tool - Matrices


Assume that the process is described by Please refresh your knowledge of matrices.
dx • What is a matrix
= Ax + Bu
dt • Matrix algebra: addition, multiplication, notice AB = B A (a
y = Cx
very useful property), transpose
The general linear controller is: u = − Lx + l r r • Matlab
The closed loop system then becomes • Linear equations and inverses Ax = B , x = A −1 B
• Eigenvalues and eigenvectors
dx
= Ax + Bu = Ax + B (− Lx + lr r) = ( A − B L) x + B lr r
dt Ae = λ e
The closed loop system has the characeristic equation ( A − λ I)e = 0
det A − λ I = 0
det( sI − A + B L) = 0

Can we choose L so that this equation has specified poles?



c K. J. Åström August, 2000 1
Simple Examples Example - The Car
Consider the following matrices and their transpose Process model
   
Choosing
      dx
=
0 1
x+
0
u
a11 a12 b11 b12 c11 c12 c13 dt l1 = 2ζ ω 0 , l2 = ω 20
A= , B= , C= 0 0 1
a21 a22 b21 b22 c21 c22 c23 y = Cx = ( 1 0)x
gives the characteristic polyno-
• Which matrices can be added? Control law mial s2 + 2ζ ω 0 s + ω 02 .
The closed loop system is
• Which matrices can be multiplied? u = − l1 x1 − l2 x2 + lr r
lr
Y (s) = R(s)
Closed loop system s2 + 2ζ ω 0 s + ω 20
det A = a11 a22 − a12 a21
     
1 a22 −a12 dx
=
0 1
x+
0 Choosing lr = ω 02 gives the
A−1 = dt − l1 − l2 lr
r
correct steady state value.
det A −a21 a11
Characteristic equation ω 20
Characteristic equation Y (s) =
s2 + 2ζ ω 0 s + ω 20
R(s)
s2 + l1 s + l2 = 0
 
s − a11 −a12
det sI − A = det = s2 − ( a11 + a22 ) s + a11 a22 − a12 a21
−a21 s − a22

Example Controllability
Try to do same thing for
    dx
dx 0 1 1 = Ax + Bu
= x+ u dt
dt 0 0 0
y = Cx = ( 1 0) x Find control signal that moves the system from x(0) = a to
x(t) = b. Hence
Control law u = −l1 x1 − l2 x2 + lr r. Closed loop system
     t
− l1 1 − l2
dx
= x+
lr
r b = x ( t) = e a + At
e A( t− s) Bu( s) ds
dt 0 0 0 0

Characteristic equation This implies


s(s + l1 ) = s2 + l1 s = 0  t
e− As Bu( s) ds = −a + be− At
We cannot obtain a desired characteristic polynomial. Why? The 0

control signal does not influence the second state! Some conditions
are required!


c K. J. Åström August, 2000 2
Controllability ... Examples
 t
   
− As − At dx 0 1 0
e Bu( s) ds = −a + be = x+ u
0 dt 0 0 1

It follows from Cayley-Hamiltons theorem (a matrix satisfies it we have


own characteristic equation) that  
0 1
 Wc = ( B , AB ) = , Controllable!

n t 1 0
k−1 − At
A B α k ( s)u( s) ds = −a + be
k=1 0
   
dx 0 1 1
Left side a combination of vectors B , AB , . . . , A n−1 B . Equa- = x+ u
dt 0 0 0
tion can be solved if the matrix
we have
Wc = ( B AB ... An−1 B )  
1 0
Wc = ( B , AB ) = Not Controllable!
can be inverted. Controllability! 0 0

A Special Case The Characteristic Equation


The system The system
       
 −a1 −a2 ... a n− 1 −an   1  −a1 −a2 ... a n− 1 −an   1

 
 
 
 
 
 
 


 
 
 0 
 
 
 0
 1 0 0 0     1 0 0 0   
dz 
 0

 

0 z+0
 

 dz 
 0

 

0  z + 0
 


=


1 0 





 u =


1 0 





 u
dt 
 .. 
 
 . 
 dt 
 .. 
 
 . 


 
 
 .
. 
 
 
 .
.

 . 
 
   .   
     
 
  
 
0 0 1 0 0 0 0 1 0 0

is controllable has the characteristic polynomial


   
 1 − a1 a21 − a2 ...   1 a1 a2 ... a n − 1 sn + a1 sn−1 + a2 sn−2 + . . . + an

 
 
 


 0 1 −a1 ... 
 
 0 1 a1 ... a n− 1 


 
 
 


 
 
 

Wc =  0 0 1 ... 
 , Wc−1 =
 0 0 1 ... a n− 2 



 
 
 


 .
.. 
 
 .. 


 
 
 . 


 
 
 

0 0 0 ... 1 0 0 0 ... 1

c K. J. Åström August, 2000 3
A Special Case which is Easy A Special Case
       
 −a1 −a2 ... a n− 1 −an   1  −a1 −a2 ... a n− 1 −an   1

 
 
 
 
 
 
 


 0  
 0 
 0  
 0
 1 0 0     1 0 0   
dz 
 0 0 

 




 dz 
 0 0 

 





=


1 0 

 z + 


0 

 u =


1 0 

 z + 


0 

 u
dt 
 . 
 
 . 
 dt 
 . 
 
 . 


 .. 
  .
. 
 
 .. 
  .
. 


 
 
   
     
 
  
 
0 0 1 0 0 0 0 1 0 0

The feedback u = −l 1 z1 − l2 z2 − . . . − ln zn + lr r gives The feedback


   
 −a1 − l1 −a2 − l2 ... − a n − ln   1 u = −l1 z1 − l2 z2 − . . . − ln z n + lr r

 
 
 


 1 0 0 
 
 0  l1 = p1 − a1 , l2 = p2 − a2 , . . . , ln = pn − an
   
dz 










=


0 1 0 

 z + 


0 

 u
dt 
 
 
 


.. 
 
 .. 
. 

gives the characteristic polynomial

 . 
 
 
    
0 0 0 0 sn + p1 sn−1 + p2 sn−2 + . . . + pn

The General Case The General Case


Problem solved for special case. Can we transfor a given A system
system to this case? Start with dx
= Ax + Bu
dt
dx
= Ax + Bu which is controllable can be transformed to
dt

with controllability matrix


 −a − a2 ... − an  1


1 
 
 

Wc = ( B ... An−1 B ) 
 
 
 
AB 
 1 0 ... 0   
 0


 
 
 

dz 
 0 1 ... 0   
 0 

=






z+



 u
Change coordinates z = T x dt 

 .
 ..






 .
.
.




 
 
 
    
0 0 ... 1 0
dz dx
=T = T Ax + T Bu = T AT −1 z + T Bu = Ãz + B̃u
dt dt It is easy to find a state feedback u = − L̃z for this system which
This system has the controllability matrix gives a specified characteristic equation.
L̃ = ( p1 − a1 p2 − a2 ... pn − an )
W̃c = ( B̃ Ã B̃ ... Ãn−1 B̃ ) = T ( B AB ... An−1 B ) = T Wc
c K. J. Åström August, 2000 4
An Algorithm How to Compute the Feedback Gain
dx • For simple problems we just write the characteristic
Transform the system = Ax + Bu to controllable canonical
dt equation, compute the characteristic polynomial and match
dz coefficients. (Typical exam problem)
form = Ãz+ B̃u using the transformation z = T x = W̃c Wc−1 x.
dt
• Ackermann’s formula summarizes the derivation given
Feeedback for transformed system u = − z̃ where above
L̃ = ( p1 − a1 p2 − a2 ... pn − an ) L = (0 . . . 0 1 ) ( B AB ... An−1 B )−1 P( A)
en = ( 0 . . . 0 1 )
We have u = − Lx = − LT −1 z = − L̃z, hence Wc = ( B AB . . . An−1 B )
L = en Wc−1 P( A)
L = L̃T = L̃ W̃c Wc−1

where P(s) is the desired characteristic polynomial This


formula does not have good numerical properties
• There are efficient numerical routines acker and place in
Matlab

The Inverted Pendulum Using Matlab


    There are several command is Matlab for design of state
dx 0 1 0
= Ax + Bu = x+ u feedback. The command help toolbox/control tells you what
dt 1 0 1
command are available
The system is controllable. The control law ACKER Pole placement using Ackermann’s formula.
u = −l1 x1 − l2 x2 K = ACKER(A,B,P) calculates the feedback gain
matrix K such that the single input system
gives the closed loop system .
  x = Ax + Bu
dx 0 1
= ( A − B L) x = x
dt 1 − l1 −l2 with a feedback law of u = -Kx has closed loop
poles at the values specified in vector P,
The characteristic polynomial is
i.e., P = eig(A-B*K). See also PLACE.
 
s −1
det ( sI − A + B L) = det = s2 + l2 s + l1 − 1
l1 − 1 s + l2


c K. J. Åström August, 2000 5
Integral Action - A Fix Integral Action - A Fix ...
Process model         
d x A 0 x B 0
dx = + u+ r
= Ax + Bu dt I −C 0 I 0 1
dt
y = Cx Control law
 
Introduce the integral of the error as an extra state x
u = −( L lI ) + lr r
 I
dI
I= ( r − y) dt, = r − y = r − Cx
dt Closed loop system
      
Form the augmented system d x A − B L − B Li x B lr
= + r
         dt I −C 0 I 1
d x A 0 x B 0
= + u+ r
dt I −C 0 I 0 1 If closed loop system stable there is no steady state error

Looks as original system with one extra state! Cx0 = r

Is the Augmented System Controllable? Summary


         • A nice way to use process dynamics to predict
d x A 0 x B 0
dt I
=
−C 0 I
+
0
u+
1
r • A nice alternative to pole placement
• Actually works for systems with many inputs and outputs
Controllability matrix
• Nice computational methods matrix calculations
 
B AB ... An B • Works for high order systems
Wc =
− CB − CAB ... − CAn B
• The idea of augmentation
• Integal action still ad hoc will be dealt with later
• Reference values will be done later
• The control problem is thus easy if all state variables are
measured
• What to do if all states are not measured? (Stay tuned for
next lecture!)

c K. J. Åström August, 2000 6

You might also like