Professional Documents
Culture Documents
State Space Equations - Pole Assignment by State Feedback - Observer Design
State Space Equations - Pole Assignment by State Feedback - Observer Design
9 SS
• State space equations
• Pole assignment by state feedback
• Observer design
9 SS 1
State-Space Equation (SS Eq.): two carts example (1)
From differential Eq. to SS Eq.
q p
x1 p
x2 q
x3 x 1 p
u
x 4 x 2 q
x1 p p u k1 ( p q) b1 ( p q )
x2 q
x3 x 1 p
k1 ( p q ) b1 ( p q ) k 2 q b2 q
q
x 4 x 2 q
x 1 x3
x 2 x4
x 3 k1 x1 k1 x2 b1 x3 b1 x4 u
x 4 k1 x1 (k1 k2 ) x2 b1 x3 (b1 b2 ) x4
9 SS 2
State-Space Equation: two carts example (2)
From differential Eq. to SS Eq.
x1 x3
x 2 x4
x 3 k1 x1 k1 x2 b1 x3 b1 x4 u
x 4 k1 x1 (k1 k 2 ) x2 b1 x3 (b1 b2 ) x4 y =p = x1
x1 0 0 1 0 x1 0 x1
x 0 x 0 x
0 0 1
2 2 u y 1 0 0 0 2
x 3 k1 k1 b1 b1 x3 1 x3
x
4 1 k ( k1 k 2 ) b1 (b1 b2 x4 0
) x4
x A x B u y C x
x A x B u
y C x Du (D0 )
9 SS 3
Transfer Function (tf) and State Space (ss) models
Plant to be controlled
p u k1 ( p q ) b1 ( p q )
k1 ( p q ) b1 ( p q ) k 2 q b2 q
q
9 SS 4
State Space Open-loop System
x A x Bu y c x
Plant, Open-loop
system
State-space feedback u (k1 x1 k2 x2 k3 x3 k4 x4 ) → closed-loop system
y ( s ) num( s )
Gp (s)
u ( s ) den( s)
u y
tf2ss
ss2tf
Open-loop system
u r K x
x ( A BK ) x B r y c x
x1
x
k1 k 2 k 3 k 4 2
Closed-loop
x3
system poles
x4
u (k1 x1 k2 x2 k3 x3 k4 x4 ) >> eig(Ac)
x A x B u A x B (r K x ) ( A BK ) x B r
x1
x Closed-loop
k1 k2 k3 k4 2
x3 system poles
x4
>> eig(Ac)
x A x B u A x B (r K x) ( A BK ) x B r
A c ( A BK ) : closed - loop state space matrix
9 SS 8
Simulink model
• Do not use the “ready-made” model, quoted: “We are
looking for an enthusiastic person …… who wants to learn
and understand the complex equipment we make, from
nuts and bolts to complete systems”.
x A x B u y c x
1
s
A* u
Initiation condition = 0
9 SS 9
State-space model, a, b and c: data inputs
1
c1 B C
s
C2 C1 I ntegrator C S cope
A* u
A a1 Matrix (K*u)
B b1 Element-wise (K.*u)
C c1 Matrix (K*u) (u vector)
9 SS 10
Summary of what you do in your lab sessions
1
kss b2 c2
s
Step kss B Integrator C S cop e
Kss = 1 a2* u
x0 = 0 y_o ut
Y ou tp ut
Plant
t
k2
Cl ock Ti me
-k2 * u
Model
• Get a2, b2, c2 and d2 from your plant num and den tf2ss(num, den)
• Find open-loop system poles eig(a2)
• >> i = sqrt(-1), assign closed-loop system poles: c_p (poles must be at
the left-hand side of the s-plane, any complex poles must be conjugate
pair) place, check closed-loop system poles: eig(a2-b2*k2)
• run simulation, find the steady-state value “y_out_ss”
• set Kss = 1/y_out_ss (whenever you change c_p (k2) , need to change it
again)
9 SS 11
Where to put the closed-loop system in the s-plane ?
Simply move to left Change the pattern
o: O.L.S. poles o: O.L.S. poles
x: C.L.S. poles x: C.L.S. poles
Im Im
X o
X
X o X o o o
Re Re
X o X
9 SS 12
Output feedback control v.s. State feedback control
r u
u
Plant
u rK x
x
Classical
Root locus Arbitrarily pole
assignment
9 SS 13
Spend an hour do
work specified in slide 11.
This is a necessary
practice before you can
understand next topic
“State Observer”
9 SS 14
Your extra work: investigate
C.L.S poles and time responses
9 SS 15
Changing pole positions in the s-plane (a)
1 Ae at sin( t )
9 SS 16
Changing pole positions in the s-plane (b)
1 Ae at sin( t )
9 SS 17
Changing pole positions in the s-plane (c)
9 SS 18
What is a state observer, why do we need it
sensors to
x1 p measure
x2 q X
x3 x 1 p
But States are difficult
x 4 x 2 q or costly to measure
u Kx
u r K x
Observer is a
observer
“software” sensor X^
9 SS 19
State variable x not available for u = -kx, using observer
and u = -kx^, where x^ is an estimation of x
y
-kx^
observer
observer output x^
9 SS 20
Observer is a feedback system
it has a feedback gain “L”
Estimated ^y
measured y
observer
error
9 SS 21
Simulink model (compare it with the block diagram)
1
kss b2 K*uvec
s
Step kss B Integrator C Scope
A
a2* u
y_out
t -K-
Y output
Obs_B 1
Cl ock T ime K*uvec
s
Obs_Inte Obs_C
Obs_A
a2* u
Obs_gai n_L
L'* u
-k2* u
9 SS 22
Slide 14
Obs_A = a2
Obs_B = b2
Obs_C = c2
9 SS 23
Simulink model: new observer feedback gain L
1
kss b2 K*uvec
s
Step kss B Integrator C Scope
A
a2* u
y_out
t -K-
Y output
Obs_B 1
Cl ock T ime K*uvec
s
Obs_Inte Obs_C
Obs_A
a2* u
Obs_gai n_L
L'* u
-k2* u
L
Element-wise (K.*u)
How to design L ?
1
x_out
kss b2 K*uvec
s
Step kss B Integrator C Scope
A
a2* u
y_out
t -K-
Y output
0.2
Obs_B 1
Cl ock T ime K*uvec
s
Obs_Inte Obs_C
Obs_A
a2* u
Obs_y_out
Obs_gai n_L
Compare L'* u
t 0,
t ,
num( s ) x A x B u
G ( s )
History of main From 2nd worlddenwar( sto) 1960s ctox now
From y1960s du
development