Lecture 18 - Summary of the Course
Preparations for Final Examination
1. Dynamics
K. J. strm
1. Dynamics
2. PID Control
3. The Simple Feedback Loop
Most problems require knowledge about dynamical systems
Problem 6 - Physical modeling and observability
Problem 5 - Linearization
Problem 3 - Stability
2. PID Control
4. Feedforward
Problem 1, Problem 2, Problem 3
5. State Feedback and Observers
3. The Simple Feedback Loop
6. Summary
Problem 4, Problem 1, Problem 2
Theme: Reviewing what we learned and filling some gaps.
4. Feedforward
Problem 10, Problem 1, Problem 2
5. State Feedback and Observers
Problem 7, Problem 8, Problem 9
Homework Problems and Midterm
1. Dynamics
1. State models
Homework 1, Homework 2, Homework 3, Midterm
2. PID Control
Homework 2, Midterm
Homework 2, Homework 4, Homework 5, Midterm
Homework 6, Midterm
5. State Feedback and Observers
Homework 6, Homework 7
Linearization
Linear time invariant systems
2. Input-output models
3. The Simple Feedback Loop
4. Feedforward
1. Dynamics
Transient response, step response, impulse response
Transfer function, poles, zeros
Frequency response, Bode and Nyquist plots
3. Controllability, observability, system structure
4. Relations between representations
Coordinate changes, standard forms
5. Stability
6. Modeling (from physics and from data)
c K. J. strm August, 2001
&
State Models
Linearization
State a collection of variables that summarize the past for
the purpose of predicting the future, e.g.
dx
= f ( x , u)
dt
y = g( x, u)
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
x state, u control signal, y measured signal
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
Synonyms: internal descriptions, white boxes
Linear Time Invariant Systems
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
Key problem: How accurately do we need to describe the
storage?
dx
= Ax + Bu
dt
y = Cx + Du
Vf
( x0 , u0 )
Vx
Vg
C=
( x0 , u0 )
Vx
A=
System
Output
Table over all input-output pairs
Bu( s) ds + Du( t)
Superposition: if (u1, y1) and (u2 , y2) are i-o pairs so is
(au1 + bu2, a y1 + b y2)
Think in scalars interpret as vectors and matrices!
If the matrix A can be diagonalized A = T T 1 we have
eAt = Tet T 1 . The elements of eAt is a sum of terms e i t . In
general when the
multiple eigenvalues the elements
P matrix has
t
i
ki Pi (t) e where i is an eigenvalue and P(t)
have the form
is a polynomial
Table can be simplified drastically if initial conditions
neglected
Rt
Impulse response y(t) = 0 g(t s)u(s)ds
Transfer function Y (s) = G (s) U (s)
Frequency response
c K. J. strm August, 2001
&
Laplace Transforms
Some Properties of the Laplace Transform
Consider a function f defined on 0 t < and a real number
> 0. Assume that f grows slower than e t for large t. The
Laplace transform F = L f of f is defined as
Z
L f = F ( s) =
est f (t)dt
0
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
Transform of the derivative
Z
df
L =
est f P (t)dt = f (0) + sL f
dt
0
= sL f f (0)
Differentiation: L df
dt
Rt
Integration: L 0 f ( )d = 1s L f
Rt
Convolution: L 0 f (t )g( )d = F (s) G (s)
Final value Theorem: lim s0 sF (s) = lim t f (t)
Initial value Theorem: lims sF (s) = lim t0 f (t)
Shape of e t for Real and Complex
Poles and Zeros
<0
The transfer function of an LTI system is a rational function
2.5
0.8
The denominator polynomial A(s) = det(sI A) is the
characteristic polynomial of the matrix A. (Notice a slight
notational conflict!)
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
Zeros are the zeros of the polynomial B (s), they depend on
all matrices in the state description and reflect how the states
are coupled to the inputs and outputs. A zero means that
transmission of the signal e t is blocked.
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
G (s) = C(sI A)1 B =
L f = F ( s) =
Linearity: L (a f + bg) = aL f + bL g
e
10
15
20
10
15
Frequency Response
Frequency Response ...
The steady state transmission of sinusoids is given by G (i )
0.1
h G (i )h gain, amplitude ratio
0
0
10
15
arg G (i ), phase
Graphical representations of G (i )
1
0
10
Nyquist plot
15
An LTI system is completely characterized by its steady state
response to sinusoidal signals.
u( t) = u0 sin t
y( t) = u0 h G ( i )h sin t + arg G ( i )
Bode plots
Bode Plot
The Nyquist Curve
Represent the complex number G (i ) as a point in the complex plane. The Nyquist curve is the locus of the point as frequency changes.
Im G(i )
Interpretation
Interpretation
Ultimate point
Critical point
Positive feedback
Negative feedback
Represent the function G (i ) as two curves, one for the
magnitude h G (i )h (the gain curve or amplitude ratio) and one
for the phase arg G (i ) (the phase curve). Use logarithmic
scales for frequency and gain and linear scales for the phase.
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 ,
Controllability and Observability
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
Transfer function G (s) =
s+b
,
sb
The state can be computed from the output if the observability
matrix Wo has full rank
C
CA
Wo = ..
h G (i )h = 1 and
arg G (i ) = 2 arctan
= + 2 arctan
C An1
System Structure
Relations
An LTI system can be split into four subsystems. The transfer
function is uniquely given by the subsystem Sco
Soc observable and
controllable
Soc
not observable but
controllable
Soc observable but not
controllable
Soc neither observable
nor controllable
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
c K. J. strm August, 2001
&
Relations ...
Coordinate Changes
dx
= Ax + Bu
dt
y = Cx + Du
dx
= Ax + Bu
dt
y = Cx + Du
Change coordinates by the transformation z = T x, x = T 1 z
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
Same form but different matrices. Some relations
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
The Diagonal Form
o = Wo T 1 X S
W
Controllable Canonical Form
If the controllability matrix Wc has full rank we have
If the matrix A can be diagonalized we have
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
The transfer function is
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
The characteristic polynomial is
c K. J. strm August, 2001
&
sn + a1 sn1 + a2 sn2 + . . . + an
6
Observable Canonical Form
a1
1
a2
dz
.
..
=
dt
an1 0
an
0
y = 1 0 0...
...
0
1
0
0
From Transfer Functions to State Equations
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
(s4 + 4s3 + 6s2 + 4s + 1) Y (s) = U (s)
Switch to time domain
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
From Transfer Functions to State Equations ...
From Transfer Functions to State Equations
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
= 4x1 6x2 4x3 x4 + u
= x1
= x2
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
&
From Transfer Functions to State Equations ...
From Transfer Functions to State Equations
Y ( s)
b1 s2 + b2 s + b3
= 3
U ( s)
s + a1 s2 + a2 s + a3
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
Back to time domain
dx1
= a1 x1 a2 x a3 x3 + u
dt
dx2
= x1
dt
dx3
= x2
dt
y = b1 x1 + b2 x2 + b3 x3
s X 3 = a3 X 1 + b3 U
From Transfer Functions to State Equations ...
sX 1 = a1 X 1 + b1 U + X 2 = a1 X 1 + X 2 + b1 U
sX 2 = a2 X 1 + b2 U + X 3 = a2 X 1 + X 3 + b2 U
sX 3 = a3 X 1 + b3 U
In the time domain
dx1
= a1 x1 + x2 + b1 u
dt
dx2
= a2 x1 + x3 + b2 u
dt
dx3
= a3 x1 + b3 u
dt
y = x1
Stability
For the nonlinear system
dx
= f ( x)
dt
only stability of a solution.
For LTI systems stability
of one solution guarantees
stability of all
dx
= Ax
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
An LTI system is stable if all eigenvalues of A are in the left half
plande or, equivalently, if the characteristic equation
det (sI A) = sn + a1 sn1 + a2 sn2 + . . . + an = 0
has all roots in the left half plane.
c K. J. strm August, 2001
&
The Nyquist Criterion
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
Investigate propagation of sinusoids through the closed loop.
An oscillation can be maintained if L(i 0 ) = 1. Notice that
the feedback is positive for the frequency 0 .
The point 1 is the critical point!
Stability based on encirclements of critical point.
Sensitivity to Process Variations
Closed loop transfer function with error feedback
T=
Modeling
Modeling from physics
Use knowledge of physics and engineering to derive
differential equations
PC
1 + PC
Try to understand what factors are relevant for the problem
Small variations in the process
Useful to think of frequencies and magnitudes
dh T h
1
dh P h
dh P h
=
=S
hT h
h1 + PCh h Ph
h Ph
States describe storage of mass momentum and energy
Modeling from data
Large variations stable if
Introduce perturbations (steps, pulses, sinusoids) to the
process and observe its response
1
h Ph
<
h Ph
hT h
Maximum sensitivities Ms = max h S (i )h, Mt = max hT (i )h
Fit LTI models (system identification)
Often useful to combine the approaches
c K. J. strm August, 2001
&
2. PID Control
PI Control of First Order System
Process: P(s) =
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
All poles can be assigned. A good characteristic polynomial is
s2 + 2 0 s + 02
Identification of coefficients of equal powers of s gives
Set point weighting (Cheap 2 DOF)
k = (2 0 a)/b,
Filtering of derivative
PD Control of Second Order System
Process: P(s) =
s2
b
+ a1 s + a2
Controller: C(s) = k + kd s,
PI Control of Second Order System
Process: P(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 +
Closed loop transfer function from reference r to output y
Y ( s)
PC
b( kds + k)
=
= 2
R( s )
1 + PC
s + (a1 + bkd)s + a2 + bk
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
All poles can be assigned. A good characteristic polynomial is
s2 + 2 0 s + 02
Identification of coefficients of equal powers of s gives
k = ( 02 a2 )/b,
ki = 02 /b
Not enough parameters to assign all poles.
kd = (2 0 a1 )/b
c K. J. strm August, 2001
&
10
PI Control of Second Order System
PID Control of Second Order System
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 )
and also choose 0 (response speed). Hence
0 =
a1
,
2
k=
2 a2
=
b
a21 /2
a2
,
b
ki =
b
+ a1 s + a2
Controller: C(s) = k +
Make characteristic polynomial equal to
2
0
s2
3
0
a31
8b
s3
b( kd s2 + ks + ki )
+ ( a1 + bkd ) s2 + ( a2 + bk) s + bki
All poles can be assigned.
Pole pattern can be chosen but the response speed is given by
process parameter a1 .
PID Control of Second Order System ...
Y ( s)
PC
b( kds2 + ks + ki)
=
= 3
R( s )
1 + PC
s + (a1 + bkd)s2 + (a2 + bk)s + bki
A good characteristic polynomial is
s3 + 2s2 0 + 2 02 s + 03
Identification of coefficients of equal powers of s gives
2 02 a2
k=
,
b
ki =
03
b
2 0 a1
kd =
b
Controllers with Error Feedback
Error feedback
U (s) = C(s)( R(s) Y (s)) = ( k +
ki
+ kds)( R(s) Y (s))
s
gives the closed loop transfer function from reference r to
output y
Y ( s)
PC
b( kds2 + ks + ki)
=
= 3
R( s )
1 + PC
s + (a1 + bkd)s2 + (a2 + bk)s + bki
All poles can be placed arbitrarily. Can something be done
about the zeros?
c K. J. strm August, 2001
&
11
Controllers with Set Point Weighting
Controller with set point weighting (a kind of feedforward)
ki
( R( s) Y ( s)) + kd s( R( s) Y ( s))
s
ki
ki
= ( k +
+ kd s) R( s) ( k +
+ kd s) Y ( s)
s
s
= Cr ( s) R( s) C( s) Y ( s)
U ( s) = k( R( s) C( s)) +
Saturation Windup and Windup Protection
The feedback loop is broken if signals saturates. Problem
with unstable modes in the process and the controller. The
integrator in a PI is a typical example.
y
KT d s
e = r y
K
Ti
1
s
es
1
Tt
The numerator can be modified by choosing the parameters
and .
Actuator
gives the closed loop transfer function
Y ( s)
Cr (s) P(s)
b( kds2 + ks + ki)
=
= 3
R( s )
1 + P ( s) C ( s)
s + (a1 + bkd)s2 + (a2 + bk)s + bki
Actuator
model
Look for the error. Assume system works.
Controller Tuning
Ziegler-Nichols Step Response Method
Model based: Make a model and apply some control
design method e.g. the methods just discussed
Switch controller to manual.
Make simple experiments on the process and adjust
Log process output. Normalize the curve so that it corresponds to a unit step.
Make a step in the control variable.
Ziegler and Nichols methods
Determine parameters a and L. The controller parameters
are obtained from a table.
Good idea but systems are not well damped and too
little process information is used
Open loop experiments (bump test)
Closed loop experiments
Improved tuning rules
A0
a
L
c K. J. strm August, 2001
&
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
Ziegler-Nichols Frequency Response Method
Switch the controller to pure proportional.
Properties
Adjust the gain so that the closed loop system is at the
stability boundary.
Determine the gain ku (the ultimate gain) and the period
Tu (the ultimate period) of the oscillation.
Suitable controller parameters are obtained from a table.
Im G(i )
Ultimate point
Re G(i )
Reg.
0.5ku
PI
0.4ku
0.8Tu
PID
0.6ku
0.5Tu
Ti
Properties of Ziegler and Nichols Rules
+ Very common
- The closed loop system obtained too oscillatory 0.2.
Part of the criterion (quarter amplitude damping)
- Too large overshoot
Tp
- Sensitive to process variations
Tu
- Can only be used on a restricted class of processes
1.4Tu
A good idea to base tuning on simple process experiments.
0.85Tu
Large scope for improvements.
Td
0.125Tu
+ Easy to explain and use
More process information needed.
A Ziegler Nichols Replacement
Computer Implementation
ZN is basically a sound method, BUT
Sampling, aliasing and anti-aliasing filters
Damping specified is too low < = 0.2
Too little process information (Two parameters ku, Tu )
An additional parameter give a big improvement
Approximate derivatives by differences
Use backward differences
Organization of the code
= h G ( 180 )/ G (0)h
K/Ku vs kappa
p( tk) = k b( ysp( tk ) y( tk))
Ti/Tu vs kappa
10
e( tk) = ysp( tk ) y( tk)
Td
d( t k ) =
d( tk1) kN y( tk) y( tk1)
Td + Nh
v= p( tk) + i( tk ) + d( tk )
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
c K. J. strm August, 2001
&
kh
kh
e( t k ) +
uv
Ti
Tr
13
3. The Basic Feedback Loop
Some Observations
n
d
r
A system based on error feedback is characterized by four
transfer functions (The Gang of Four)
The basic feedback system with two degrees of freedom is
characterized by six transfer function (The Gang of Six)
To fully understand a system it is necessary to look at all
systems
Six transfer functions are required to describe the system
P
PC
PCF
D
N+
R
1 + PC
1 + PC
1 + PC
P
1
PCF
D+
N+
R
Y=
1 + PC
1 + PC
1 + PC
PC
C
CF
U=
D
N+
R
1 + PC
1 + PC
1 + PC
X =
It may be strongly misleading to only show properties of
a few systems for example the response of the output to
command signals. This is a common error in the literature.
The properties of the different transfer functions can be
illustrated by transient or frequency responses.
A Possible Choice
The Sensitivity Functions
Six transfer functions are required to show the properties of a
basic feedback loop. Four characterize the response to load
disturbances and measurement noise.
PC
1 + PC
C
1 + PC
P
1 + PC
1
1 + PC
Two more are required to describe the response to set point
changes.
CF
PC F
1 + PC
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
Large variations do not give instability if
c K. J. strm August, 2001
&
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=
The Sensitivity Functions
L
PC
=
1+ L
1 + PC
Mt = max hT (i )h
The value 1/ Ms is the shortest distance from the Nyquist curve
of the loop transfer function L(i ) to the critical point 1.
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=
Bodes integrals: sL(s) goes to zero as s
Z
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
Robust to model errors
h S h < 1 for some
Not robust to model
errors h S h = 1 for all
Risk for instability
No risk for instability
Reduce the effect of measurable disturbances
log h
Acts before deviations
show up
Improve response to reference signals
System with Two Degrees of Freedom
Acts only when there
are deviations
Feedforward is used to
log h S( i )h d =
The water bed effect.
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
The system is said to have two degrees of freedom (2DOF)
because there are separate signal paths from set-point to u
and from measured signal to u.
Set point weighting in PI control is a simple version of 2DOF
Z t
u(t) = k( r(t) y(t)) +
(r( ) y( ))d
c K. J. strm August, 2001
&
15
Many Versions of 2DOF
n
d
r
C u
Response to Reference Signals
P x
My
Mu
My
Mu
um
ym
uf b
C
um
ym
uf b
y
P
Notice that Mu and M y can be viewed as generators of the
desired output ym and the inputs um which corresponds to ym.
Horowitz: "Some structures have been presented as fundamentally different from the others ... all 2DOF configurations
have basically the same properties and potentials."
Assume that process P, controller C and desired response M y
are given are given. Then Mu = M y / P. Does not depend on C!
FC = Mu + Mu C
Attenuation of Measurable Disturbance
d
5. State Feedback and Observers
Basic idea: PID controller predicts by linear extrapolation
G f f
ep = e + Td
u
P1
P2
Can we predict better?
Transfer function from disturbance to process output with
combined feedback and feedforward
Gd =
de
dt
Y ( s)
P2 (1 P1 G f f )
=
= P2 (1 P1 G f f ) S
D ( s)
1 + PC
The state captures all information about the past that is
relevant to predict the future.
Find a way to compute the state from measurements of
input and output
A nice structuring of the control problem
Notice combined effect of feedback and feedforward. Ideal
feedforward compensator G f f = P11 = P yQ/ P yu.
c K. J. strm August, 2001
&
16
Determinants, Inverses, and Eigenvalues
A vector e is an eigenvector if Ae = se and the number s is
called an eigenvalue. We have
Consider the following matrices and their transpose
a11 a12
A=
a21
Determinants, Inverses, and Eigenvalues
Ae = se
a22
( sI A) e = 0
det ( sI A) = 0
The determinant is
det A = a11 a22 a12 a21
If the determinant is different from zero the matrix has an
inverse which is given by
1
a22 a12
1
A =
det A a21 a11
The eigenvalues are thus given by the characteristic equation
s a11
a12
= s2(a11 +a22)s+a11 a22 a12 a21
det (sI A) = det
a21
s a22
The roots of this equation are the eigenvalues of the matrix.
State Feedback
The Closed Loop System
System and linear controller
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
The closed loop system
Transfer function from reference r to output y
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 )
If the system is controllable; i.e. if controllability matrix
Wc = ( B AB . . . An1 B )
is regular, then the matrix L can be chosen to give arbitrary
eigenvalues of A B L.
c K. J. strm August, 2001
&
17
Computing the State Feedback Matrix L
Start by determining controllability!
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
Use Matlab for numerical solutions.
Design of Observers
State Feedback from Observed State
Basic compromise: Trust models or measurements?
uc
Use results for feedback design A K C = ( A C K ) ,
compare with state feedback A B L
T
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
The Closed Loop System
The Closed Loop System ...
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
Introduce the state x = x x instead of x .
dx
= Ax + Bu = Ax B L x + B lr r
dt
= Ax B L( x x ) + B lr r = ( A B L) x + B L x + B lr r
d x
= ( A K C) x
dt
Transfer function from reference r to output y
Y ( s)
= C(sI A + B L)1 Blr
R( s )
Integral Action
Meaning of the model
An alternative
dx
= Ax + B (u + v)
dt
dv
=0
dt
dx
= Ax + Bu
dt
dv
=0
dt
Feedback from estimated states x and v
d
dt
x
A
=
v
0
x
B
K
+
u+
v
0
0
Kv
= ( y C x )
u = L x v
B
c K. J. strm August, 2001
&
19