Post on 15-Jan-2016
Control Theory (2)
Jeremy Wyatt
School of Computer Science
University of Birmingham
Aims
• Understand first order models
• Be able to analyse them
• See their generality
• Analyse PE control for our DC motor
• Meet PI and PID control
Modelling a Simple Process= temperatureQ=rate of heat
input
• What is the relationship between the heat supply and the temperature of the room?
• What is f?
( , )f Q t
Modelling a Simple Process• There are two ways in which heat is “used up”
heats the room leaks out through the walls
• We combine these to give a first order differential equation
model
• C is the heat capacity of the room• L is the loss coefficient (how leaky the room is)
dQ L C
dt
dCdt
L
[1]
First order processes• The behaviour is characteristic of what we call a
first order lag process
• We can analyse the equation to tell us:– The final temperature
– The transient behaviour d
Q L Cdt
t
Steady State Behaviour• If we hold Q constant the temperature will eventually
level out
• At that point so
• If then must rise
• If then must fall
dQ L C
dt
0d
dt
Q
L
t
Q
L
t
Q
L t
t
is the steady state temperature
is the temperature at time t
t
Transient Behaviour
• If we solve we obtain
• tells us the final temperature
• tells us how fast we reach it
dQ L C
dt
is the initial temperature
is the temperature at time t
0
t
0
Lt
Ct
Q Qe
L L
tQ
L
L
C
[2]
The time constant
• tells us how fast we reach the steady state
• We can express this another way
• Where is pronounced “tau” and is called the time constant of the process
• Any first order lag process reaches ~0.63 of its steady state value when t=
t
L
C
C
L
Standard Form
• Any first order lag process reaches – ~0.63 of its steady state value when t=– ~0.95 of its steady state value when t=3– ~0.99 of its steady state value when t=5
• Recall
• A simple rearrangement gives us a standard form:
t
[1]d
Q L Cdt
Q C d
L L dt
d
GUdt
[3]in general
Solution by Inspection
• Once in standard form we can solve by inspection:
• GU is the steady state– where U is the process input (or control action)
– G is called the steady state gain
• HereQ C d
L L dt
dGU
dt
[3]
QGU
L
C
L
Our DC Motor example revisited
• Our DC motor can also be modelled as a first order process
• A motor generates a back voltage proportional to its speed
• The net voltage is related to current by Ohm’s law
1MV K s RI [4]is a motor constant
is the motor speed
is the resistance of the motor
is the current drawn
1Ks
R
I
Our DC Motor example revisited
• The torque produced is proportional to the current drawn
• We can combine these to make a
first order model
2
dsM K Idt
[5]
is a motor constant
is the mass being driven
2K
M
1MV K s RI [4]
Questions
1. Combine the equations to form the first order model
2. What is the steady state speed?
3. What is the time constant ?
Adding Gears
• We can alter the properties of the process by adding gears
• is the gear ratio (>1 means a step down gear)
• input speed = output speed
• input torque = output torque
2
dsM K Idt
[5]
1MV K s RI [4]
Questions
1. Combine the equations to form the new first order model
2. What is the new steady state speed?
3. What is the new time constant ?
Analysing our PE Controller
• Recall our proportional error control law
where
( )T TV s s
-+ Ts e TV
Gs
Te s s
Properties of PE Control
• The PE controller will not reach the target speed
• The difference is called the steady state error
• How big will it be?
s
t
sT
s
Te s s
Analysing our PE Controller
• The open loop behaviour was described by
• We can remodel the new system by substituting [7] back into [6]
• For now assume that
( )T TV s s
21 1 2
MV MR dss
K K K dt [6]
[7]
M TV V
Analysing our PE Controller
• The new system is described by
• So as the steady state error disappearsand it reaches the steady state more quickly
• But big causes instability
21 1 2 2
Ts MR dss
K K K K dt
( )T TV s s [7]
Steady state Time constant
Proportional Integral Control (PI)• IDEA: Add a proportion of the accumulated error to
the control signal
• GOOD: there is no steady state error• BAD:
– Hard to tune– More lag– More unstable
1 2( ) ( )T T TV s s s s dt s
t
sT
PID control• IDEA: Add a third term which looks at how
fast the error is changing
1 2 3
( )( ) ( ) T
T T T
d s sV s s s s dt
dt
s
t
sT
t
de
dt
PID control• GOOD:
– fast initial response to increases in error (D component)– No steady state error (I component)– As error decreases
P 0 and D < 0, therefore stable
• BAD: very hard to tune
s
t
sT
t
de
dt
Summary
• Seen generality of first order model
• Used it to analyse PE control
• Seen principles of PI and PID control