Professional Documents
Culture Documents
Lecture 18 - Summary of The Course Preparations For Final Examination
Lecture 18 - Summary of The Course Preparations For Final Examination
K. J. strm
1. Dynamics
2. PID Control
3. The Simple Feedback Loop
2. PID Control
4. Feedforward
6. Summary
4. Feedforward
Problem 10, Problem 1, Problem 2
5. State Feedback and Observers
Problem 7, Problem 8, Problem 9
1. State models
Linearization
Linear time invariant systems
2. Input-output models
1. Dynamics
State Models
Linearization
dx
= f ( x, u), y = g( x, u)
dt
The stationary solution x0 , u0 is obtained by solving the
equation f ( x0 , u0 ) = 0. For small deviations x = x0 + x,
u = u0 + u, y = y0 + x around the equilibrium we have
d x
= A x + B u
dt
The states describe storage of mass energy and momentum. Constitutive equations are also needed to obtain the
model.
y = C x + D u
dx
= Ax + Bu
dt
y = Cx + Du
Input-Output Models
Input
x( t) = e At x(0) +
e A( t s) Bu( s) ds
y( t) = Ce x(0) + C
At
A ( t s )
Vf
( x0 , u0 )
Vu
Vg
D=
( x0 , u0 )
Vu
B=
Change notation: x x, u u, y y
dx
= Ax + Bu
dt
y = Cx + Du
Vf
( x0 , u0 )
Vx
Vg
C=
( x0 , u0 )
Vx
A=
System
Output
Bu( s) ds + Du( t)
Laplace Transforms
Example 1:
f (t) = 1,
F ( s) =
Example 2:
at
f (t) = e
Z
,
F ( s) =
st
1 st 1
dt = e =
s
0
s
e(s+a)t dt =
1 st
1
e =
s+a
0
s+a
est f (t)dt
<0
2.5
0.8
0.6
1.5
0.4
0.2
0.5
= 0.25
Poles are the zeros of the polynomial A(s), they are also the
eigenvalues of the matrix A. A pole means that the response
of the system has the component e t .
y
c K. J. strm August, 2001
&
0.4
0.6
0.8
= 0.25
20
0.2
10
0.2
10
0.4
0.2
30
0.4
40
0.6
B ( s)
b1 sn1 + b2 sn2 + . . . + bn
= n
A(s)
s + a1 s n 1 + a2 s n 2 + . . . + a n
>0
L f = F ( s) =
Linearity: L (a f + bg) = aL f + bL g
e
10
15
20
10
15
Frequency Response
0.1
0
0
10
15
arg G (i ), phase
Graphical representations of G (i )
1
0
10
Nyquist plot
15
Bode plots
Bode Plot
Interpretation
Interpretation
Ultimate point
Critical point
Positive feedback
Negative feedback
Re G(i )
a
Asymptotes
Gain
10
10
Minimum phase
Relation between curves
Stability
10
10
10
10
10
w
10
10
Phase
0
50
d log h G (i )h
arg G (i )
2
d log
c K. J. strm August, 2001
&
100
150
1
10
10
10
w
10
10
Non-minimum Phase
Right half plane zero
as
Transfer function G (s) =
,
a+s
dx
= Ax + Bu
dt
y = C x + Du
h G (i )h = 1 and
arg G (i ) = 2 arctan
Time delay
Transfer function G (s) = esT ,
The system can be steered from one point to another if the controllability matrix Wc has full rank
Wc = B AB . . . An1 B
h G (i )h = 1 and
arg G (i ) = T
Right half plane pole
s+b
,
sb
CA
Wo = ..
h G (i )h = 1 and
arg G (i ) = 2 arctan
= + 2 arctan
C An1
System Structure
Relations
Soc
dx
= Ax + Bu
dt
y = Cx + Du
Input-output relation
Z
y( t) = Ce At x(0) + Du( t) + C
Soc
Soc-
= Ce x(0) +
At
e A( t ) Bu( ) d
0
t
g( t )u( ) d
-Soc
Impulse response
g(t) = D (t) + CeAt B
Relations ...
Coordinate Changes
dx
= Ax + Bu
dt
y = Cx + Du
dx
= Ax + Bu
dt
y = Cx + Du
Transfer function
b0 sn + b1 sn1 + b2 sn2 + . . . + bn
G ( s) = D + C[sI A]1 B = n
s + a1 sn1 + a2 sn2 + . . . + an
Z
=
e stg( t) dt
dz
+ Bu
= T AT 1 z + T Bu = Az
dt
+ Du
y = CT 1 z + Du = Cz
or equivalently
At
B
g( t) = D ( t) + Ce At B = D ( t) + Ce
1
G ( s) = D + C( sI A) B = D + C ( sI A )1 B
dn y
d n1
dnu
d n1 u
+
a
+
.
.
.
+
a
y
=
b
+
b
+ . . . + bnu
1
n
0
1
dtn
dtn1
dtn
dtn1
c = T Wc ,
W
o = Wo T 1 X S
W
a a . . . a
1
1
2
n1 an
1
0
0
0
0
dz
0
1
0
0
0
=
z
+
u
dt
.
.
.
.
.
.
0
0
1
0
0
y = b1 b2 . . . bn1 bn z + Du
1
1
0
2
2
dz
=
z
+
u
.
.
.
.
dt
.
.
0
n
n
y = 1 2 . . . n z + Du
Transfer function
1 1
2 2
n n
G ( s) = D +
+
+ ... +
s 1
s 2
s n
The mode zi is observable if i = 0 and controllable if i = 0
G ( s) = D +
b 1 s n1 + b 2 s n2 + . . . + b n
sn + a1 sn1 + a2 sn2 + . . . + an
sn + a1 sn1 + a2 sn2 + . . . + an
6
a1
1
a2
dz
.
..
=
dt
an1 0
an
0
y = 1 0 0...
...
0
1
0
0
0
b1
0
b2
.
z
+
u
0
bn
Y ( s)
1
1
=
= 4
4
3
U ( s)
(s + 1)
s + 4s + 6s2 + 4s + 1
Hence
0 z + Du
d4 y
d3 y
d2 y
dy
+4 3 +6 2 +4
+y=u
4
dt
dt
dt
dt
Transfer function
G ( s) = D +
b1 sn1 + b2 sn2 + . . . + bn
s n + a1 s n 1 + a2 s n 2 + . . . + a n
Characteristic polynomial
s n + a1 s n 1 + a2 s n 2 + . . . + a n
d4 y
d3 y
d2 y
dy
+
4
+
6
+4
+y=u
4
3
2
dt
dt
dt
dt
Y ( s)
b1 s2 + b2 s + b3
= 3
U ( s)
s + a1 s2 + a2 s + a3
Introduce
x1 =
d y
,
dt3
dx1
dt
dx2
dt
dx3
dt
dx4
dt
x2 =
d y
,
dt2
x3 =
dy
,
dt
x4 = y
s2
U
s3 + a1 s2 + a2 s + a3
s
1
X2 = 3
U = X1
s + a1 s2 + a2 s + a3
s
1
1
1
X3 = 3
U = X2 = 2 X1
2
s + a1 s + a2 s + a3
s
s
1
1
s X 1 = a1 X 1 a2 X 1 a3 2 X 1 + U
s
s
= a1 X 1 a2 X 2 a3 X 3 + U
X1 =
s X2 = X1
s X3 = X2
= x3
Y = b1 X 1 + b2 X 2 + b3 X 3
c K. J. strm August, 2001
&
1
1
sX 1 = a1 X 1 a2 X 1 a3 2 X 1 + U
s
s
= a1 X 1 a2 X 2 a3 X 3 + U
s3 X 1 + a1 s2 X 1 + a2 s X 1 + a3 X 1 = b1 s2 U + b2 sU + b3 U
1
1
1
s X 1 = a1 X 1 + b1 U +
a2 X 1 a3 X 1 + b2 U + b3 U
s
s
s
1
1
1
X 2 = 2 a2 X 1 a3 X 1 + b2 U + b3 U
s
s
s
s X 1 = a1 X 1 + b1 U + X 2 = a1 X 1 + X 2 + b1 U
1
s X 2 = a2 X 1 + b2 U +
a3 X 1 + b3 U
s
1
a2 X 1 a3 X 1 + b3 U
X3 =
s
s X 2 = a2 X 1 + b2 U + X 3 = a2 X 1 + X 3 + b2 U
sX 2 = X 1
sX 3 = X 2
Y = b1 X 1 + b2 X 2 + b3 X 3
s X 3 = a3 X 1 + b3 U
Stability
For the nonlinear system
dx
= f ( x)
dt
Stable
1
Unstable
1
0.5
0.5
0
0
10
20
30
40
50
Stable
1
10
20
30
40
50
30
40
50
Unstable
1
1
0
0
0
1
10
20
30
40
50
10
20
Stability Margins
The margins express the distance from the Nyquist curve to
the critical point in different ways. Two classical measures: gain
margin gm and phase margin m. An alternative is the shortest
distance to the critical point 1 which is 1/ Ms , where Ms is the
maximum sensitivity.
5
5
Modeling
Modeling from physics
Use knowledge of physics and engineering to derive
differential equations
PC
1 + PC
dh T h
1
dh P h
dh P h
=
=S
hT h
h1 + PCh h Ph
h Ph
1
h Ph
<
h Ph
hT h
2. PID Control
b
s+a
ki
ki
, Cf f (s) = k +
s
s
Closed loop transfer function from reference r to output y
Controller: Cf b (s) = k +
Y ( s)
PC
b( ks + ki)
=
= 2
R( s )
1 + PC
s + (a + bk)s + bki
1
sTd
Y ( s)
U (s) = k R(s) Y (s)) +
R( s ) Y ( s ) +
sTi
1 + sTd/ N
Notice
k = (2 0 a)/b,
Filtering of derivative
s2
b
+ a1 s + a2
Controller: C(s) = k + kd s,
Cf f (s) = k + kds
s2
b
+ a1 s + a2
ki
s
Closed loop transfer function from reference r to output y with
error feedback
Controller: C(s) = k +
Y ( s)
PC
b( ks + ki )
=
=
R( s )
1 + PC
s( s2 + a1 s + a2 ) + b( ks + ki )
b( ks + ki )
= 3
s + a1 s2 + ( a2 + bk) s + bki
ki = 02 /b
kd = (2 0 a1 )/b
c K. J. strm August, 2001
&
10
A compromise
Process: P(s) =
Y ( s)
b( ks + ki)
= 3
2
R( s )
s + a1 s + (a2 + bk)s + bki
ki
+ kds
s
Closed loop transfer function from reference r to output y
s3 + 2 0 s2 + 2 02 s + 03
Y ( s)
PC
b( kd s2 + ks + ki )
=
=
2
R( s )
1 + PC
s( s + a1 s + a2 ) + b( kd s2 + ks + ki )
0 =
a1
,
2
k=
2 a2
=
b
a21 /2
a2
,
b
ki =
b
+ a1 s + a2
Controller: C(s) = k +
2
0
s2
3
0
a31
8b
s3
b( kd s2 + ks + ki )
+ ( a1 + bkd ) s2 + ( a2 + bk) s + bki
ki =
03
b
2 0 a1
kd =
b
ki
+ kds)( R(s) Y (s))
s
11
U ( s) = k( R( s) C( s)) +
KT d s
e = r y
K
Ti
1
s
es
1
Tt
Actuator
Actuator
model
Controller Tuning
Log process output. Normalize the curve so that it corresponds to a unit step.
Good idea but systems are not well damped and too
little process information is used
Open loop experiments (bump test)
Closed loop experiments
A0
a
L
Controller
Ti
P
PI
1/a
0.9/a
3L
PID
1.2/a
2L
Td
Tp
4L
5.7L
L/2
3.4L
12
Properties
Re G(i )
Reg.
0.5ku
PI
0.4ku
0.8Tu
PID
0.6ku
0.5Tu
Ti
+ Very common
- The closed loop system obtained too oscillatory 0.2.
Part of the criterion (quarter amplitude damping)
- Too large overshoot
Tp
Tu
1.4Tu
0.85Tu
Td
0.125Tu
Computer Implementation
= h G ( 180 )/ G (0)h
K/Ku vs kappa
Ti/Tu vs kappa
10
10
10
10
u( tk )= sat(v)
2
10
i( tk+1) = i( tk ) +
0.2
0.4
0.6
0.8
10
0.2
0.4
0.6
0.8
kh
kh
e( t k ) +
uv
Ti
Tr
13
Some Observations
n
d
r
A Possible Choice
P
1 + PC
1
1 + PC
1
L
, T=
, L = PC,
1+ L
1+ L
Disturbance reduction
Ycl(s)
=S
Yol (s)
Sensitivity to small process variations
S=
S+T =1
dh T h
dh P h
= hSh
hT h
h Ph
1
h Ph
<
h Ph
hT h
14
Maximum Sensitivities
1
1
=
,
1+ L
1 + PC
Maximum sensitivities
S=
Ms = max h S (i )h,
T=
L
PC
=
1+ L
1 + PC
Mt = max hT (i )h
h Ph
1
L
Ycl (s)
1
= S,
<
, T=
,
1+ L
1+ L
Yol (s)
h Ph
hT h
A compromise: Good disturbance rejection |S| small! Good
robustness hT h small, but S + T = 1 and
S=
The condition
1
h P(i )h
<
h P(i )h
h Mt h
guarantees that the perturbation P does not give instability.
Feedforward
Closed loop
Open loop
Market Driven
Planning
log h
Feedforward is used to
log h S( i )h d =
4. Feedforward
Feedback
X
1
h d =
pi
1 + L( i )
Z 0
Z0
X1
L(1/ i )
h d =
log h T (1/ i )hd =
log h
1 + L(1/ i )
zi
0
0
15
d
r
C u
P x
My
Mu
My
Mu
um
ym
uf b
C
um
ym
uf b
y
P
Horowitz: "Some structures have been presented as fundamentally different from the others ... all 2DOF configurations
have basically the same properties and potentials."
FC = Mu + Mu C
G f f
ep = e + Td
u
P1
P2
de
dt
Y ( s)
P2 (1 P1 G f f )
=
= P2 (1 P1 G f f ) S
D ( s)
1 + PC
16
Ae = se
a22
( sI A) e = 0
det ( sI A) = 0
The determinant is
det A = a11 a22 a12 a21
s a22
State Feedback
dx
= Ax + Bu = ( A B L) x + B lr r
dt
y = Cx
dx
= Ax + Bu
dt
u = Lx + lr r
u = Lx + lr r
dx
= Ax + Bu = Ax + B ( Lx + lr r) = ( A B L) x + Blr r
dt
Y ( s)
= C(sI A + B L)1 Blr
R( s )
17
Observers
Simple problems, determine closed loop characteristic polynomial, pick L to match desired polynomial
Easy if system is in controllable canonical form
a1 a2 . . . an
1
1
0
0
0
dz
0
1
0
0
=
z
+
u
dt
.
.
.
.
.
.
0
Observer
CA
Wo =
..
n1
System
dx
= Ax + Bu
dt
y = Cx
CA
The state can be computed from the output if system observable; i.e. if the observability matrix Wo is regular. Many different
ways, differentiation, simulation of model, A compromise:
d x
d x
= ( A K C) x
= A x + Bu + K ( y C x )
dt
dt
Find a matrix K so that A K C has desired eigenvalues.
c = T Wc .
Transform to controllable canonical form W
Design of Observers
uc
T T
Model and
Feedforward
xm
Generator
Simple problems, determine closed loop characteristic polynomial, pick L to match desired polynomial
u ff
u fb
Process
Observer
o = Wo T 1
Easy if system is in observable canonical form W
a1
1
a
0
dz
.
=
..
dt
an1 0
an
0
y = 1 0 0...
...
0
0
0 z
0
b1
0
b2
.
z
+
u
0
bn
dx
= Ax + Bu
dt
y = Cx
u = u m + L( xm x )
d x
= A x + Bu + K ( y y )
dt
y = C x
c K. J. strm August, 2001
&
18
dx
= Ax + Bu
dt
y = Cx
u = L x + lr r
dx
= ( A B L) x + B L x + B lr r
dt
d x
= ( A K C) x
dt
d x
= A x + Bu + K ( y C x )
dt
Characteristic equation
det (sI A + B L) det (sI A + K C) = 0
Integral Action
Meaning of the model
An alternative
dx
= Ax + B (u + v)
dt
dv
=0
dt
dx
= Ax + Bu
dt
dv
=0
dt
x
A
=
v
0
x
B
K
+
u+
v
0
0
Kv
= ( y C x )
u = L x v
B
19