2008/09 MECH466 : Automatic Control 1
MECH466: Automatic Control
MECH466: Automatic Control
Dr. Ryozo Nagamune
Dr. Ryozo Nagamune
Department of Mechanical Engineering
Department of Mechanical Engineering
University of British Columbia
University of British Columbia Lecture 12
Lecture 12
PID control (Preparation for Lab 3)
PID control (Preparation for Lab 3)
Root locus: Sketch of proofs
Root locus: Sketch of proofs
2008/09 MECH466 : Automatic Control 2
Course roadmap
Course roadmap
Laplace transform
Laplace transform
Transfer function
Transfer function
Models for systems
Models for systems
•
•electricalelectrical •
•mechanicalmechanical •
•electromechanicalelectromechanical
Linearization
Linearization Modeling
Modeling AnalysisAnalysis DesignDesign
Time response
Time response
•
•TransientTransient •
•Steady stateSteady state
Frequency response
Frequency response
•
•Bode plotBode plot
Stability
Stability
•
•RouthRouth--HurwitzHurwitz
•
•NyquistNyquist
Design specs
Design specs
Root locus
Root locus
Frequency domain
Frequency domain
PID & Lead
PID & Lead--laglag
Design examples
Design examples
Matlab
Matlabsimulations & laboratoriessimulations & laboratories
PID controller
PID controller
G(s) Kp
Ki/s
Kds
-r
r ee uu yy
Proportional
Proportional IntegralIntegral DerivativeDerivative
t
t--domain:domain:
s
s--domain:domain:
Notes on PID controller
Notes on PID controller
Most popular in process and robotics industriesMost popular in process and robotics industries
Good performanceGood performance
Functional simplicity (Operators can easily tune.)Functional simplicity (Operators can easily tune.)
To avoid high frequency noise amplification, To avoid high frequency noise amplification, derivative term is implemented as
derivative term is implemented as
with
with ττddmuch smaller than plant time constant.much smaller than plant time constant.
PI controllerPI controller
2008/09 MECH466 : Automatic Control 5
A simple example
A simple example
We plot We plot y(ty(t) for step reference ) for step reference r(tr(t) with) with
P controllerP controller
PI controllerPI controller
PID controllerPID controller
G(s) Kp
Ki/s
Kds
-r
r ee uu yy
2008/09 MECH466 : Automatic Control 6
P controller
P controller
SimpleSimple
Steady state errorSteady state error
Higher gain gives Higher gain gives smaller error
smaller error
StabilityStability
Higher gain gives Higher gain gives faster and more
faster and more
oscillatory response
oscillatory response
0 5 10 15 20
0 0.2 0.4 0.6 0.8 1 1.2 1.4
0 5 10 15 20
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
PI controller
PI controller
Zero steady state Zero steady state error
error(provided that (provided that CL is stable.) CL is stable.)
StabilityStability
Higher gain gives Higher gain gives
faster and more
faster and more
oscillatory response
oscillatory response
0 5 10 15 20
0 0.5 1 1.5 2
PID controller
PID controller
Zero steady state Zero steady state error (due to integral error (due to integral control)
control)
StabilityStability
Higher gain gives Higher gain gives more
more dampeddamped response
response
Too high gain Too high gain
2008/09 MECH466 : Automatic Control 9
How to tune PID parameters
How to tune PID parameters
Empirical (ModelEmpirical (Model--free)free)
Trial and errorTrial and error
ZieglerZiegler--Nichols tuning rule (1942) (Appendix)Nichols tuning rule (1942) (Appendix)
Useful even if a system is too complex to modelUseful even if a system is too complex to model
Useful only when trialUseful only when trial--andand--error tuning is allowederror tuning is allowed
ModelModel--basedbased
Root locusRoot locus
Frequency response approachFrequency response approach
Useful only when a model is availableUseful only when a model is available
Necessary if a system has to work at the first trialNecessary if a system has to work at the first trial
2008/09 MECH466 : Automatic Control 10
PID controller realization
PID controller realization
One example: Using OP ampOne example: Using OP amp
R
R22 R
R11
C
C22
-+
+
C
C11
-+
+
R
R33 R
R44
v
vii(t(t))
v
voo(t(t))
Exercise: Derive this! Exercise: Derive this!
Course roadmap
Course roadmap
Laplace transform Laplace transform Transfer function Transfer functionModels for systems
Models for systems
•
•electricalelectrical
•
•mechanicalmechanical
•
•electromechanicalelectromechanical
Linearization
Linearization Modeling
Modeling AnalysisAnalysis DesignDesign
Time response
Time response
•
•TransientTransient
•
•Steady stateSteady state
Frequency response
Frequency response
•
•Bode plotBode plot
Stability
Stability
•
•RouthRouth--HurwitzHurwitz •
•NyquistNyquist
Design specs Design specs Root locus Root locus Frequency domain Frequency domain
PID & Lead
PID & Lead--laglag
Design examples
Design examples
Matlab
Matlabsimulations & laboratoriessimulations & laboratories
Complex numbers (review)
Complex numbers (review)
RepresentationRepresentation
Cartesian formCartesian form
Polar formPolar form
Multiplication & division in the polar formMultiplication & division in the polar form Re Re Im
2008/09 MECH466 : Automatic Control 13
What is Root Locus? (Review)
What is Root Locus? (Review)
Consider a feedback system that has one Consider a feedback system that has one parameter (gain) K>0 to be designed. parameter (gain) K>0 to be designed.
Root locusRoot locusgraphically shows how poles of the graphically shows how poles of the closed
closed--loop system varies as K varies from 0 to loop system varies as K varies from 0 to infinity.
infinity.
L(s
L(s)) K
K
L(s
L(s): open): open--loop TFloop TF
2008/09 MECH466 : Automatic Control 14
RL sketching algorithm (review)
RL sketching algorithm (review)
Step 0: Mark open-Step 0: Mark open-loop poles and zerosloop poles and zeros
Step 1: On the real axisStep 1: On the real axis
Step 2: AsymptotesStep 2: Asymptotes
Step 3: Breakaway pointsStep 3: Breakaway points
Step 4: Angles of departures and arrivalsStep 4: Angles of departures and arrivals
Examples of root locus
Examples of root locus
Re
Re ReRe ReRe ReRe
Re
Re ReRe ReRe ReRe
Don
Don’’t forget to put arrows!t forget to put arrows!
Characteristic equation & root locus
Characteristic equation & root locus
Characteristic equationCharacteristic equation
Root locus is obtained byRoot locus is obtained by
for a fixed K>0, finding roots of the characteristic for a fixed K>0, finding roots of the characteristic
equation, and
equation, and
sweeping K over real positive numbers.sweeping K over real positive numbers.
A point “A point “ss””is on the root locus, if and only if L(sis on the root locus, if and only if L(s) ) evaluated for that
2008/09 MECH466 : Automatic Control 17
Angle and magnitude conditions
Angle and magnitude conditions
Characteristic Characteristic eqeq. can be split into two conditions.. can be split into two conditions.
Angle conditionAngle condition
Magnitude conditionMagnitude condition
Odd number Odd number
For any point s,
For any point s,
this condition holds
this condition holds
for some positive K.
for some positive K.
2008/09 MECH466 : Automatic Control 18
A simple example
A simple example
Select a pointSelect a points=s=--2+j2+j Re
Re Im Im
s is on root locus.
s is on root locus.
Select a pointSelect a points=s=--1+j1+j
s is NOT on root locus.
s is NOT on root locus.
Root locus: Step 0
Root locus: Step 0
Root locus is symmetric Root locus is symmetric w.r.tw.r.t. the real axis.. the real axis.
Characteristic equation isCharacteristic equation isananequation with real equation with real coefficients. Hence, if a complex number is a root, its coefficients. Hence, if a complex number is a root, its complex conjugate is also a root.
complex conjugate is also a root.
The number of branches = order of The number of branches = order of L(sL(s))
If If L(sL(s)=)=n(s)/d(sn(s)/d(s), then Ch. ), then Ch. eqeq. is . is d(s)+Kn(sd(s)+Kn(s)=0, which )=0, which has roots as many as the order of
has roots as many as the order of d(sd(s).).
Mark poles of L with Mark poles of L with ““xx””and zeros of L with and zeros of L with ““oo””..
Re Re Im Im
Root locus: Step 1
Root locus: Step 1
-
-
1
1
RL includes all points on real axis to the left of an RL includes all points on real axis to the left of an odd number of real poles/zeros.
odd number of real poles/zeros.
Re Re Im
Im Test point
Test point
0
0 00 00
Re Re Im
Im
180
180 00 00
Not satisfy angle condition!
Not satisfy angle condition!
Satisfy angle condition!
2008/09 MECH466 : Automatic Control 21
Root locus: Step 1
Root locus: Step 1
-
-
1 (cont
1 (cont
’
’
d)
d)
RL includes all points on real axis to the left of an RL includes all points on real axis to the left of an odd number of real poles/zeros.
odd number of real poles/zeros.
Re Re Im
Im
180
180 180180 00
Re Re Im
Im
180
180 180180 180180 Not satisfy angle condition!
Not satisfy angle condition!
Satisfy angle condition!
Satisfy angle condition!
2008/09 MECH466 : Automatic Control 22
Root locus: Step 1
Root locus: Step 1
-
-
2
2
RL originates from the poles of L, and terminates RL originates from the poles of L, and terminates at the zeros of L, including infinity zeros.
at the zeros of L, including infinity zeros.
s: Poles of
s: Poles of L(sL(s)) s: Zeros of s: Zeros of L(sL(s))
Root locus: Step 2
Root locus: Step 2
-
-
1
1
Number of asymptotes = relative degree (r) of L:Number of asymptotes = relative degree (r) of L:
Angles of asymptotes areAngles of asymptotes are
Root locus: Step 2
Root locus: Step 2
-
-
1 (cont
1 (cont
’
’
d)
d)
For a very large s,For a very large s,
2008/09 MECH466 : Automatic Control 25
Root locus: Step 2
Root locus: Step 2
-
-
2
2
Intersections of asymptotesIntersections of asymptotes
Proof for this is omittedProof for this is omittedand not required in this and not required in this course.
course.
Interested students should read the proof in Interested students should read the proof in Appendix L.1 at
Appendix L.1 at www.wiley.com/colege/nisewww.wiley.com/colege/nise..
2008/09 MECH466 : Automatic Control 26
Root locus: Step 3
Root locus: Step 3
Breakaway points are among roots ofBreakaway points are among roots of
Suppose that s=b is a breakaway point.
Suppose that s=b is a breakaway point.
Root locus: Step 4
Root locus: Step 4
RL departs from a pole RL departs from a pole ppjjwith angle of departurewith angle of departure
RLRLarrives at a zero arrives at a zero zzjjwith with angle of arrivalangle of arrival
(No need to memorize these formula.)
(No need to memorize these formula.)
Root locus: Step 4 (cont
Root locus: Step 4 (cont
’
’
d)
d)
Sketch of proof for angle of departureSketch of proof for angle of departure
Im Im
Re Re
For s to be on root locus,
For s to be on root locus,
due to
2008/09 MECH466 : Automatic Control 29
Root locus: Step 4 (cont
Root locus: Step 4 (cont
’
’
d)
d)
Sketch of proof for Sketch of proof for angle of arrivalangle of arrival
Im Im
Re Re
For s to be on root locus,
For s to be on root locus,
due to
due to angle conditionangle condition
2008/09 MECH466 : Automatic Control 30
Summary and exercises
Summary and exercises
PID controlPID control
Most popular controller in industryMost popular controller in industry
Simple controller structure Simple controller structure
Simple controller tuningSimple controller tuning
ModelModel--free methods for design are available.free methods for design are available.
Sketch of proofs for root locus algorithmSketch of proofs for root locus algorithm
Angle condition is important, and will be used in Angle condition is important, and will be used in
controller design.
controller design.
Exercises: Problems 8.1, 8.2, 8.3, 8.6, 8.7.Exercises: Problems 8.1, 8.2, 8.3, 8.6, 8.7.
Lab #3 starts this week.Lab #3 starts this week.
Ziegler
Ziegler
-
-
Nichols PID tuning rules
Nichols PID tuning rules
Step response method (for only stable systems)Step response method (for only stable systems)
t
t
y(t
y(t))
Open
Open--loop step responseloop step response
Steepest tangent
Steepest tangent
PID parameters
PID parameters
Ziegler
Ziegler
-
-
Nichols PID tuning rules
Nichols PID tuning rules
Ultimate sensitivity methodUltimate sensitivity method
t
t
y(t
y(t)) Closed
Closed--loop step responseloop step response with a gain controller
with a gain controller
Increase gain and find
Increase gain and find KcKc
generating oscillation
generating oscillation
(marginally stable case).
(marginally stable case).
PID parameters
2008/09 MECH466 : Automatic Control 33
0 2 4 6 8 10 12 14 16 18 20 0
0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
Example revisited
Example revisited
Step response methodStep response method Ultimate sensitivityUltimate sensitivity
0 2 4 6 8 10 12 14 16 18 20 0
0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
P
P
PI
PI
PID
PID
P
P
PI
PI
PID
PID
2008/09 MECH466 : Automatic Control 34
Open
Open-
-
loop step response for
loop step response for
“
“step response method
step response method”
”
0 2 4 6 8 10
0 0.2 0.4 0.6 0.8 1
0.79
0.79
--0.280.28
Closed
Closed
-loop step responses for
-
loop step responses for
“
“
Ultimate sensitivity method”
Ultimate sensitivity method
”
0 5 1 0
0 0 .5 1
0 5 1 0
0 0 .5 1
0 5 1 0
0 1 2
0 5 1 0
0 0 .5 1 1 .5
Kp Kp=1=1
Kp Kp=2=2
Kp Kp=4=4
Kp
Kp=8=8 KcKc=8=8
Tc