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 15
Lecture 15
Root locus: Design with
Root locus: Design with MatlabMatlab
Frequency response
Frequency response
2008/09 MECH466 : Automatic Control 2
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
A design example (review)
A design example (review)
Consider a systemConsider a system
Analysis of CL system for Analysis of CL system for C(sC(s)=1)=1
Damping ratio Damping ratio ζζ=0.5=0.5
UndampedUndampednatural freq. natural freq. ωωnn=2 =2 rad/srad/s
RampRamp--error constant error constant KvKv=2=2
Performance specificationPerformance specification
Damping ratio Damping ratio ζζ=0.5=0.5
UndampedUndampednatural freq. natural freq. ωωnn=4 =4 rad/srad/s
RampRamp--error constant error constant KvKv=50=50
G(s
G(s)) C(s
C(s))
Plant Plant Controller Controller Re Re Im Im Desired pole Desired pole
Lead & lag compensators (review)
Lead & lag compensators (review)
Lead compensatorLead compensator
Improve transient responseImprove transient response
Improve stabilityImprove stability
Lag compensatorLag compensator
Reduce steady state errorReduce steady state error
Lead-Lead-lag compensatorlag compensator
2008/09 MECH466 : Automatic Control 5
SISO Design Tool in
SISO Design Tool in
Matlab
Matlab
GraphicalGraphical--user user interface (GUI) that interface (GUI) that allows you to design allows you to design compensators. compensators.
Type Type ““sisotoolsisotool””in in Matlab
Matlabprompt.prompt.
Select Select ““Root locusRoot locus”” from
from ViewÆViewÆDesign Design Plots configuration Plots configuration..
Root locus plot Root locus plot
2008/09 MECH466 : Automatic Control 6
SISO Design Tool (cont
SISO Design Tool (cont
’
’
d)
d)
Input the plantInput the plant
Import the plant sysGImport the plant sysG from
from FileFileÆÆImportImport
SISO Design Tool (cont
SISO Design Tool (cont
’
’
d)
d)
You will see the root You will see the root locus plot for
locus plot for
The default setting The default setting C(s
C(s)=1.)=1.
The corresponding The corresponding closed
closed--loop poles are loop poles are indicated by pink indicated by pink squares.
squares.
SISO Design Tool (cont
SISO Design Tool (cont
’
’
d)
d)
Add a pole & a zero Add a pole & a zero of a compensator, of a compensator, and adjust its gain: and adjust its gain:
If necessary, move If necessary, move the pole and zero the pole and zero
by clickby click--andand--drag, ordrag, or
DesignDesignÆÆEdit Edit Compensator
2008/09 MECH466 : Automatic Control 9
SISO Design Tool (cont
SISO Design Tool (cont
’
’
d)
d)
See the step responseSee the step response
DesignÆDesignÆEdit CompensatorEdit Compensator……ÆÆAnalysis PlotsAnalysis Plots
2008/09 MECH466 : Automatic Control 10
SISO Design Tool (cont
SISO Design Tool (cont
’
’
d)
d)
Modify the pole/zero for “Modify the pole/zero for “goodgood””step responsestep response
SISO Design Tool (cont
SISO Design Tool (cont
’
’
d)
d)
Add a pole & a zero of Add a pole & a zero of
If necessary, adjust controller parameters.If necessary, adjust controller parameters.
Announcement
Announcement
See the updated schedule for Lab 4 See the updated schedule for Lab 4
MECH466_LabSchedule_0809 (Mar 5).pdf. MECH466_LabSchedule_0809 (Mar 5).pdf.
If your group wants to perform Lab 4 on Tuesday If your group wants to perform Lab 4 on Tuesday March 24 (4
March 24 (4--6pm, or possibly 66pm, or possibly 6--8pm), please 8pm), please contact me ASAP.
2008/09 MECH466 : Automatic Control 13
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
2008/09 MECH466 : Automatic Control 14
What is frequency response?
What is frequency response?
We would like to analyze a system property by We would like to analyze a system property by applying a
applying a test sinusoidal inputtest sinusoidal inputr(t) and r(t) and observing a response
observing a response y(ty(t).).
Steady state response ySteady state response yssss(t) (after transient dies (t) (after transient dies out) of a system to sinusoidal inputs is called out) of a system to sinusoidal inputs is called
frequency response frequency response..
System
System
A simple example
A simple example
RC circuitRC circuit
Input a sinusoidal voltage Input a sinusoidal voltage r(tr(t))
What is the output voltage What is the output voltage y(ty(t)?)? R
R
C
C
r(t
r(t)) y(ty(t))
An example (cont
An example (cont
’
’
d)
d)
TF (R=C=1)TF (R=C=1)
r(t)=r(t)=sin(tsin(t))
0 5 10 15 20 25 30 35 40 45 50 -1
-0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
r y
At steady
2008/09 MECH466 : Automatic Control 17
An example (cont
An example (cont
’
’
d)
d)
Derivation of Derivation of y(ty(t))
Inverse LaplaceInverse Laplace
0 as t goes to infinity.
0 as t goes to infinity.
Partial fraction expansion
Partial fraction expansion
(Derivation for general
(Derivation for general G(sG(s) is given at the end of lecture slide.)) is given at the end of lecture slide.)
2008/09 MECH466 : Automatic Control 18
Response to sinusoidal input
Response to sinusoidal input
How is the steady state output of a linear system How is the steady state output of a linear system when the input is sinusoidal?
when the input is sinusoidal?
Steady stateSteady stateoutput output
FrequencyFrequencyis same as the input frequencyis same as the input frequency
AmplitudeAmplitudeis that of input (A) multiplied byis that of input (A) multiplied by
PhasePhaseshifts shifts GainGain
G(s
G(s))
y(t
y(t))
Frequency response function
Frequency response function
For a stable system For a stable system G(sG(s), ), G(jG(jωω) () (ωωis positive) is is positive) is called
called frequency response function (FRF)frequency response function (FRF)..
FRF is a complex number, and thus, has an FRF is a complex number, and thus, has an amplitude
amplitudeand a phaseand a phase..
First order exampleFirst order example
Re
Re
Im
Im
First order example revisited
First order example revisited
FRFFRF
Two graphs representing FRFTwo graphs representing FRF
Bode diagram (Bode plot) (Today and next lecture)Bode diagram (Bode plot) (Today and next lecture)
2008/09 MECH466 : Automatic Control 21
Bode diagram (Bode plot) of
Bode diagram (Bode plot) of
G(j
G(j
ω
ω
)
)
Bode diagram consists of Bode diagram consists of gain plotgain plot& & phase plotphase plot
Log
Log--scalescale
2008/09 MECH466 : Automatic Control 22
Bode plot of a 1st order system
Bode plot of a 1st order system
TF TF
10-2 10-1 100 101 102 -50
-40 -30 -20 -10 0
10-2 10-1 100 101 102 -100
-80 -60 -40 -20 0
Corner frequency Corner frequency
Exercises of sketching Bode plot
Exercises of sketching Bode plot
First order systemFirst order system
Remarks on Bode diagram
Remarks on Bode diagram
Bode diagram shows amplification and phase Bode diagram shows amplification and phase shift of a system output for sinusoidal inputs with shift of a system output for sinusoidal inputs with various frequencies.
various frequencies.
It is very useful and important in analysis and It is very useful and important in analysis and design of control systems.
design of control systems.
The shape of Bode plot contains information of The shape of Bode plot contains information of stability, time responses, and much more! stability, time responses, and much more!
It can also be used for system identification. It can also be used for system identification. (Given FRF experimental data, obtain a transfer (Given FRF experimental data, obtain a transfer function that matches the data.)
2008/09 MECH466 : Automatic Control 25
System identification
System identification
Sweep frequencies of sinusoidal signals and Sweep frequencies of sinusoidal signals and obtain FRF data (i.e., gain and phase). obtain FRF data (i.e., gain and phase).
Select G(sSelect G(s) so that ) so that G(jG(jωω) fits the FRF data.) fits the FRF data. Agilent Technologies: FFT Dynamic Signal Analyzer
Agilent Technologies: FFT Dynamic Signal Analyzer
Unknown
Unknown
system
system
Generate sin signals Generate sin signals Sweep frequencies Sweep frequencies
Collect FRF data Collect FRF data Select
Select G(sG(s))
2008/09 MECH466 : Automatic Control 26
Summary and exercises
Summary and exercises
Frequency response Frequency response
Steady state response to a sinusoidal inputSteady state response to a sinusoidal input
For a linear system, sinusoidal input generates For a linear system, sinusoidal input generates
sinusoidal output with
sinusoidal output with same frequencysame frequencybut but different different
amplitude and phase
amplitude and phase..
Bode plot is a graphical representation of Bode plot is a graphical representation of frequency response function. (
frequency response function. (““bode.mbode.m””))
ExercisesExercises
Read Section 10.1.Read Section 10.1.
Solve Problem 10.1.Solve Problem 10.1.
Another example of FRF
Another example of FRF
Second order systemSecond order system
Re
Re
Im
Im
Derivation of frequency response
Derivation of frequency response
Term having denominator of
Term having denominator of G(sG(s))
0 as t goes to infinity.