Lecture 2
Lecture 2
Review
K. J. Åström • Feedback
• Open and closed loop systems
1. Introduction
• Properties of feedback
2. Cruise Control
+ Reduce effects of process disturbances
3. Agenda for the Future
+ Makes system insensitive to process variations
4. Differential Equations + Stabilize an unstable system
5. Summary + Create well defined relations between output and
reference
Theme: Make a simple control design. Systems described by
- Risk for instability
ordinary differential equations.
• PID control
Block diagram
c K. J. Åström September, 2000 1
The Closed Loop System Stop and Think!!
dv How is the behavior of the equation
Process model: + 0.02v = u − 10θ
dt
t d2 e de dθ
PI controller: u = k(v r − v) + ki 0 (vr − v(τ ))dτ + (0.02 + k) + ki e = 10
dt2 dt dt
The closed loop system is described by (differentiate both influenced by the parameters k and k i
equations and add them) e = v r − v
d2 e de dθ
+ (0.02 + k) + ki e = 10
dt2 dt dt The Audience is Thinking ...
In steady state with constant θ and e we have e = 0.
No surprise the controller has integral action!
d2 e de dθ d2 e de dθ
+ (0.02 + k) + ki e = 10 2
+ (0.02 + k) + ki e = 10
dt2 dt dt dt dt dt
Compare with spring-mass-damper system Comparison with the normalized mass-spring-damper system
d2 x dx d2 x dx
m +d + kx = 0 + 2ζ ω 0 + ω 20 x = 0
dt2 dt dt2 dt
e [m/s]
1.5
0
18
−0.5
0 10 20 30 40 50 60 70 80 90 100
16 t [s]
Velocity error [m/s]
14 0.5
12 0.4
u [0-1]
0.3
10
0.2
8
0.1
6
0
0 10 20 30 40 50 60 70 80 90 100
4 t [s]
2
0
0 10 20 30 40 50 60 70 80 90 100
Time [s]
ζ = 1, ω 0 = 0.05 (dotted), ω 0 = 0.1 (solid) and ω 0 = 0.2 ζ = 1, ω 0 = 0.05 (dotted), ω 0 = 0.1 (solid) and ω 0 = 0.2
(dashed) (dashed) with extra dynamics T = 5s
3 4
2.5
3
e [m/s]
e [m/s]
2
2
1.5
1
1
0
0.5
0 −1
0 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 50 60 70 80 90 100
t [s] t [s]
0.5 1
0.4 0.8
u [0-1]
u [0-1]
0.3 0.6
0.2 0.4
0.1 0.2
0 0
0 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 50 60 70 80 90 100
t [s] t [s]
c K. J. Åström September, 2000 3
What have we done? Agenda
• Derive process model in the form of ODE We must develop methods for
• ODE = Ordinary Differential Equation • Deriving equations for the system
• Select controller ODE • Methods for manipulating the equations
• Process and controller described in similar ways ODE • Techniques to understand the equations
• Eliminate variables to give relation disturbance output – Qualitative understanding concepts
• Understand how closed loop system behaves – Insight
• Select controller parameters to give desired behavior – Standard forms
• Fine tune parameters by simulation or experiment – Computations
• Methods for finding controller parameters
• Techniques to validate the results
y
dy
+ a y = bu
4
0.4
dt 2
0.2
0.2
y
10
n 0 0
y( t) = Ck eα k t −0.2 −10
k=1
−0.4 −20
0 5 10 15 0 5 10 15
dn y d n− 1 y d n− 2 y dn y d n− 1 y
+ a1 + a2 + . . . + an y = 0 + a1 + . . . + an y = u
dtn dtn−1 dtn−2 dtn dtn−1
c K. J. Åström September, 2000 5
General Linear Time Invariant System (LTI) Standard Forms
• Standard forms are foundations of the “language”
dn y d n− 1 y d n− 1 u
+ a1 + . . . + a n y = b1 + . . . + bn u • Learn to deal with the standard forms
dtn dtn−1 dtn−1
• Transform problems to standard form
has the solution
• Software is often based on standard form
n t
α kt
y( t) = Ck−1 ( t) e + g( t − τ )u(τ ) dτ
k=1 0 One of the standard forms of LTI systems is
The roots of A(s) are called poles of the system. The roots of If s = β is a zero and u(t) = Ce β t it follows that
B (s) are called zeros of the system.
d n− 1 u d n− 2 u
The poles give the components of the time functions that b1 + b2 . . . + bn u = B ( β ) Ceβ t = 0
dtn−1 dtn−2
compose the solution.
A zero of B (s) at s = β blocks the transmission of the signal
u(t) = Ceβ t .
c K. J. Åström September, 2000 6
The Transfer Function Inverse System
Consider the linear time invariant system Consider the linear time invariant system
dn y d n− 1 y d n− 1 u dn y d n− 1 y d n− 1 u d n− 2 u
n
+ a1 n−1 + . . . + an y = b1 n−1 + . . . + bn u n
+ a1 n−1 + . . . + an y = b1 n−1 + b2 n−2 + . . . + bn u
dt dt dt dt dt dt dt
The rational function Notice (almost) symmetry between y and u. The inverse
system is obtained by reversing the roles of input and output.
B ( s)
B ( s)
A( s ) The transfer function of the system is and the inverse
A ( s)
is called the transfer function of the system A ( s)
system has the transfer function .
B ( s)
d2 e de dθ z=1.0;
+ (0.02 + k) + ki e = 10
dt2 dt dt w0=0.1;
t=0:0.01:100;
where k and k i are the controller parameters. This differential th0=0.04; %Slope of the road
equation is characterized by the polynomials k=2*z*w0-0.02;
A( s) = s2 + (0.02 + k) s + k i ki=w0^2;
B ( s) = 10s syseol=tf(10*th0,[1 0.02]);
sysecl=tf(10*th0*[1 0],[1 0.02+k ki]);
The poles can be given arbitrary values by choosing the eol=step(syseol,t);
controller parameters (pole placement). The choice k = ecl=step(syscl,t);
2ω 0 − 0.02 and k i = ω 02 gives a double pole at s = −ω 0. The plot(t,eol,’b--’,t,ecl,’b-’)
zero at s = 0 blocks transmission of constant θ .
c K. J. Åström September, 2000 7
Summary
• Solution to a simple control problem:
– Write differential equations for process and controller
– Eliminate variables to obtain a differential equation for
closed loop
– Select controller coefficients so that the characteristic
equation has desired roots (or in another language the
closed loop system has given poles, pole placement).
• Review ordinary differential equations and the standard
model
dn y d n− 1 y d n− 1 u
+ a1 + . . . + a n y = b1 + . . . + bn u
dtn dtn−1 dtn−1
c K. J. Åström September, 2000 8