You are on page 1of 27

# Chaptei 8 Fiequency Response

81

Chapter8FrequencyResponse
Goals
Explainwhatfrequencyresponseisandhowitisusedtocharacterizeunknownsystems
ExplainhowtogenerateaBodeplotfromaknowntransferfunction
ExplainhowtoanalyzetheBodeplotofanunknownsystemtodetermineitstransferfunction
ExplainhowtodeterminerelativestabilityfromaBodeplot
ExplainhowtodesignPIDcontrollersusingtheBodeplot
Introduction
Socalledfrequencyresponseisanotherverycommonmethodforlookingatsystems.Frequency
responsereferstoanalternativewayofexcitingasystem(asopposedtostepresponse,whereasystem
issubjectedtoasudden,constantinput).Anunknownsystemisexcitedwithasinusoidalinput,its
wordfrequencyisusedbecausetypicallythefrequencyoftheinputsinusoidischanged,andtheoutput
isobservedoverarangeofinputfrequencies.Thusoneuseofthismethodistocharacterizeunknown
systemsbyinputtingsinewavesofdifferentfrequenciesandobservingtheoutputanditsvariationwith
frequency.
Butfrequencyresponseandtheresultingplotsofthissinusoidalexcitationcanalsobeusedtogaugea
systembesidesthatgivenbytherootlocus.ThemainfromtheabovesinusoidalinputtestisaBode
plot,whichreallyconsistsoftwoplots,amagnitudeplotandaphaseangleplot.TheBodeplotcanbe
usedtoconfirmtherootlocusrenditionofthesystemandviceversa.
Bodeplots
Asstatedabove,themaingraphicaltoolofthefrequencyresponseapproachtosystemanalysisisthe
Bodeplot.TheBodeplotisalittleoddandtakessomegettingusedto.Thereisabruteforcewayto
generateaBodeplot,whichisdescribedhere.Thesystemisunknown.Itisablackboxthatwillbe
subjectedtosinusoidinputsofvaryingfrequencytodetermineitscontents.Theconventional
frequencyresponseexperimentisillustratedinFigure8.1.

Unknown
system
1 A, A,
A,
A,
2
3
1i 1o
1i
2o
3o
1i
1 1
2
2
3
3
Chaptei 8 Fiequency Response

82

Figure8.1Bruteforcefrequencyresponsedetermination
Thisfigureillustratesseveralthingsusingthethreesamplesinewaves.Itisnormalfortheexperimenter
differentsettings,usuallymovingfromslowtofast.Inalinearsystem,theoutputfrequencyisthesame
astheinputfrequency,asshownabove.Iftheoutputfrequencyandtheinputfrequencyarenotthe
same,thentheunknownsystemisnotlinear,andfrequencyresponsetechniquesareinvalidforfurther
analysis.Noteintheaboveexamplethatinthefirsttrial,theoutputamplitudeissmallerthantheinput
amplitude.Inthesecondtrial,theoutputamplitudeisnowlargerthantheinputamplitude.Inthelast
trial,theoutputamplitudeisonceagainsmallerthantheinputamplitude.Youmayhaveexperienced
suchaphenomenonyourselfwhendrivingacarwithunbalancedfronttires.Oneapproachesacertain
speed,andthesteeringwheelbeginstoshakebecauseoftheunbalance.Ifonedrivesfaster,the
shakingsubsides.Thatisresonance,whenoneisexcitingthesystematitsnaturalfrequency.
TheamplitudeormagnituderatioaboveisgiventhesymbolM.So=
A
c
A
i
.ItisobviousthatMisa
functionof,thedrivingfrequency.Lessobviousbutnoticeableuponcloserinspectionisthatthe
inputandoutputsinusoidshaveaphaseshift.Inthefirsttrial,theoutputisinphasewiththeinput,but
inthesecondandthirdtrials,thesinusoidisshiftedfurtherandfurtherbackinphase.Sothephase
angle,,isalsoafunctionof.Intrial1 =0.Intrial2 =90.Inthethirdtrial,itis180.The
minussignindicatesthatthephaseoftheoutputisshiftedback.So,forinstance,intrial2,apeakofthe
outputoccurs90afterthepeakoftheinput.Whatis90?Afullcycleofasinusoidis360,so90is
justaquarterofthat.Figure8.2showswhatanoscilloscopewouldlooklikecapturinganinputand
outputfromasinglefrequencyresponsetest.Withbothsinusoidsplotted,onecanthenseeand
interpretthephaseshift.
Chaptei 8 Fiequency Response

83

Figure8.2Oscilloscopeplotfromasinglefrequencyresponsetest
Inthisplot,channel1istheinputandchannel2theoutput(alwaysgoodpractice).Notethattheinput
andoutputfrequenciesarethesame,anindicationofalinearsystem.Thefrequencyatwhichthistrial
2n
6.550 mscc

[1uuu
mscc
scc
= 19.S roJscc.Butnormallytheexperimenterwhoproducedtheaboveplotispumping
recordsitwhilemakingthetest.
Thecurvewiththelargestamplitudeaboveisonchannel1,sotheinput.Sincetheverticalscaleofthe
twochannelsisthesame,itisobviousthatthereisamagnitudegainoflessthan1forthistrial.The
1.5blocks,sothemagnituderatioisH =
1.S
4
, = u.S7Sor8.5decibels(seebelow).Ittakessome
practicetopickthephaseangleoffofascreenshot.Ifwelookattheabove,wenotethatthehorizontal
oftheinputcurveanditsnextzerocrossingis90.Ifwelookatthepeakoftheoutputcurverelativeto
negativesignindicatesthattheoutputcurvelagstheinputcurve(theoutputcurvespeakhappensafter
theoscilloscope.
Chaptei 8 Fiequency Response

84

ThedependencyofMand onisthekeytounderstandingwhatisinsidetheblackbox.Thesetwo
quantitiesareplottedagainstintwoplots,whichtogetherareknownasaBodeplot.Theplotsare
alignedvertically,sothatbothhavethesamescale.AtypicalBodeplotisshowninFigure8.3.

TheBodeplothassomeuniquecharacteristics.First,isplottedonalogarithmicscale.Thisallowsone
toplotagreaterrangeoffrequenciesthanalinearscalewouldallow.Noteabovethatthescale
base10logarithmofaquantitymultipliedby20.So20log(M)isplotted,notMdirectly.Thereasonfor
thisisgivenbelow.isplotteddirectlyindegrees.Aboverangesfrom90atlowfrequenciesto180
athighfrequencies.
Thissummarizesthenormallaboratoryprocedurefollowedforcharacterizinganunknownsystemusing
frequencyresponseasopposedtostepresponse.Stepresponseisstillavalidmethod.Infactoftenthe
twoareusedtogethertoconfirmwhateachisshowing.Frequencyresponseprovides,however,afiner
insightintoanunknownsystemsstructure,sinceitrevealsresponsesfrequencybyfrequency.Some
partsofasystemmayhavenoresponseatoneexcitationfrequencybutbecomeactiveatanother
excitationfrequency.Thepresenceofallbutthedominantcomponentsofasystemareusuallynot
noticeableinastepresponse.
Bodeplotfromaknowntransferfunction
Chaptei 8 Fiequency Response

85

TheabovemethodforqueryinganunknownsystemproducesaBodeplot.ThentheBodeplotcanbe
interpretedtorevealthecomponentsoftheunknownsystem.TounderstandhowtointerpretaBode
plot,itisusefulknowhowtogenerateaBodeplotfromaknowtransferfunction.Theprocedurefor
doingthisissimple,onlygivenandnotprovenhere.Onereplacessinthetransferfunctionwithj.
ThenH = |0(])|,themagnitudeoftheresultingfunctionand = z0(]),theangleoftheresulting
function.Anexampleillustratesthisbest.
Example8.1
FindMandasfunctionsofforthetransferfunction0(s) =
15s
2s+1
.
Solution:
Onereplacesswithj : 0(]) =
15]o
2]o+1

Boththenumeratoranddenominatorarecomplexnumbers.Themagnitudeofafractionofcomplex
numbersisthemagnitudeofthenumeratordividedbythemagnitudeofthedenominator.So
H = H() =
1S
4
2
+1
2

Atsmallvaluesof ,H =
0
1
= u.Atlargevaluesof ,H =
15o
4o
2
=
15
2
.Thesevalues,convertedinto
decibels,showwherethemagnitudeplotoftheBodeplotstartsandends.
For,theangleofafractionofcomplexnumbersistheangleofthenumeratorminustheangleofthe
denominator.15j isontheimaginaryaxisforallvaluesof ,sotheangleofthenumeratorisalways
90.Inthedenominator,ifissmall,the1dominates.Itisapositiverealnumber,soitisatanangleof
0and=90(znum -zJcn).Ifislarge,2jdominates.Itisalsoontheverticalaxis,soitsangleis
denominatoris45.So=9045=45.thusstartsoffonthelefthandsideofthephaseplotat90.
confirmthisinMatlabwiththefunctionbode([15,0],[2,1]).ButtobeabletointerpretBodeplots,one
mustunderstandhowvaryingchangesthevalueofMand.
Bodeplotsofcommontransferfunctioncomponents
ordercomponentinthedenominatore.g.0(s) =
1
1s+1
numeratore.g.0(s) = I s + 1.)Ifthisisdone,Table8.1results.Thistablecanthenbeusedto
interpretBodeplotsofunknownsystemstoseewhatcommoncomponentstheycontain.Some
featuresofcommoncomponentsareworthemphasizing.

Chaptei 8 Fiequency Response

86

## Component Bodeplot Characteristics

Gain,K
0
0
20 log K
IfK>1,20logK>0
IfK<1,20logK<0
system,itsimplyshiftsthesystemslogmagcurve
up(K>1)ordown(K<1).
Differentiator,s
0
0
90
1
2
0

d
B
/d
c
d
IfK>1,20logK>0
IfK<1,20logK<0
system,itsimplyshiftsthesystemslogmagcurve
up(K>1)ordown(K<1).
Integrator,
1
s

0
0
-90
1
-
2
0
d
B
/
d
c
d
IfK>1,20logK>0
IfK<1,20logK<0
system,itsimplyshiftsthesystemslogmagcurve
up(K>1)ordown(K<1).
1
st
Ts+1
0
0
= 1/
B
20
d
B/dc
d
90
IfK>1,20logK>0
IfK<1,20logK<0
system,itsimplyshiftsthesystemslogmagcurve
up(K>1)ordown(K<1).
1
st
orderlag,
1
1s+1

0
0
= 1/
B
-20
d
B/d
cd
-90
IfK>1,20logK>0
IfK<1,20logK<0
system,itsimplyshiftsthesystemslogmagcurve
up(K>1)ordown(K<1).

Table8.1Bodeplotsofcommoncomponents(part1)

Chaptei 8 Fiequency Response

87

## Component Bodeplot Characteristics

2
nd
1
o
n
2
s
2
+
2
o
n
s + 1
0
0

n
4
0

d
B
/
d
c
d
180
Startsoutwith0logmag.Asymptotestartsa40
dB/dcdriseatbreakfrequency,whichisthenatural
frequency.
Behaviorrightaroundbreakfrequencydependson.
Phasecurvestartsat0andrisesto180degrees.Itisat
90degreesatbreakfrequency.
2
nd
orderlag,
1
1
n
n
2
s
2
+
2{
n
n
s+1

0
0

n
-4
0
d
B
/d
c
d
-180
Startsoutwith0logmag.Asymptotestartsa40
dB/dcdriseatbreakfrequency,whichisthenatural
frequency.
Behaviorrightaroundbreakfrequencydependson.
Phasecurvestartsat0andrisesto180degrees.Itisat
90degreesatbreakfrequency.

Table8.1Bodeplotsofcommoncomponents(part2)
ThistableshowstheasymptotesusedtodrawBodeplotsofthesecomponents.Thefirstandsecond
significantlyfromtheasymptotesintheneighborhoodof
n
.
Ingeneralansinthenumeratorcausesariseinthemagnitudeandphaseplots.Ansinthe
lagsstarttheirmagnitudeandphaseplotsat0.Atthebreakfrequency[
B
=
1
1
ordownward(lags).Thisrisingorfallingslopeforafirstorderisattherateof20dB/dcdforafirst
orderand40dB/dcdforasecondorder.
OnecantellalotbyinspectingthestartingpointsofaBodeplot,thelefthandsidesoftheplotsofan
unknownfunction.Ifthestartingslopeofthemagnitudecurveis0,thenthereisnodifferentiatornor
integratorpresentinthesystem.Ifthebeginningslopeofthemagnitudecurveisupward,thenone
manyintegratorsarepresent.Ifoneintegratorispresent,theupwardslopewouldbe20dB/dcd.If
constantof90,evenonthelefthandsideofthephaseplot.Sowithonedifferentiator,thephase
plotwouldstartat90andthemagnitudeplotwouldhaveaninitialupwardslopeof20dB/dcd.
Chaptei 8 Fiequency Response

88

NowwecanseewhyoneplotsMindecibelsandnotinnormalunitsinaBodeplot.Anunknown
0(s) =
16 (s + S)
s
2
(s + 1) (s + 7)
-
16 (] + S)
-
2
(] + 1) (] + 7)

Inthephaseplot,thephaseofthefunctionG(j)isthesumofthephaseanglesofthecomponents.
low,thesecomponentshaveaphaseangleof0.The
1
-o
2
= -
1
o
2
termhasaphaseof180.Sothe
|0(])| =
16
2
+ 9

2

2
+ 1
2
+ 49
= 16
2
+ 9
1

2

1

2
+1

1

2
+49

Butifwetakethelogofbothsidesandmultiplybothsidesby20togetdecibels
2u log(0(])) = 2u log _16
2
+ 9
1

2

1

2
+1

1

2
+49
]
2u log(0(])) = 2u log(16) +2u log [
2
+ 9 + 2u log _
1

2
] +
Sotheproductturnsintoasum,andasdecibelsonecansuperimposethemagnitudesofthe
componentstogettheentiremagnitudeofthetransferfunction.Thuswithboththemagnitudeand
phaseplots,onecansimplysuperimposethecomponentstogetthemagnitude(indecibels)andthe
phaseplotsoftheentiretransferfunction.
OfcourseininterpretingtheBodeplotofanunknownsystem,oneisseeingtheplotoftheentire
system,andonemustpickoutthecomponentsfromthewhole.Table8.1iskeytothis,becauseit
detailshowtheBodeplotsofindividualcomponents.Withanunderstandingofthesesystems
behaviorasvaries,onecanpicktheindividualcomponentsoutoftheBodeplotofanentireunknown
system.
InterpretingaBodeplotofanunknownsystemtogetitstransferfunction
getitstransferfunctionexperimentally.
Example8.2
AnalyzethefollowingBodeplotandsuggestthetransferfunctionthatproducedthisplot.
Chaptei 8 Fiequency Response

89

Solution:
BycomparingtheplotwiththeentriesofTable8.1,onecanseealmostimmediatelythatthisisan
magnitudeplotisnot0(soitisnotafirstorderlag),andthephaseangleisaconstant90.Butisthere
0
thissystemisanintegratorwithagain.Againsmagnitudecurveisastraightlineat20log(K),sothe
effectofagainistodisplacethemagnitudecurveupward(ifK>1)ordownward(ifK<1).Sincethe
2u JB log(K) = 2S JB
log(K) =
2S
2u
= 1.2S
K = 1u
1.25
= 18
Sothesuggestedtransferfunctionis
0(s) =
18
s

OneshouldalwaysthenconfirmthisconjecturebycheckingitwiththeMatlabbode()functionhere
bode([18],[1,0]).
Chaptei 8 Fiequency Response

810

thephasecurve.Theabilityofthegaincurvetochangemagnitudebuthavenoeffectonphasewillbe
exploitedindesigningcontrollersusingBodeplots.
Example8.2
AnalyzetheBodeplotofFigure8.3andconjecturewhattransferfunctionproducedthisplot.

Solution:
Thefigureisreproducedhereforconvenience.Featurestonoticeare:
Themagnitudeplotstartsoffwithanupwardslope.Theslopeseemstobe20dB/dcd,sothis
0
slopingpartofthecurvepassesthrough10
0
Thephasecurvestartsat90andendsat180,soatotalphaseshiftof270.Eachsinthe
denominator(integrator,1
st
orderlag)dropstheeventualphaseangleby90(a2
nd
orderlag
dropsitby180).
Chaptei 8 Fiequency Response

811

function.Thiscanbeconfirmedalsobyinspectingthefinalslopeofthemagnitudecurve.Itis40
dB/dcd.Thisindicatesanexcessoftwossinthedenominator.
Nowitissomewhatdifficulttoascertainwherethesetermswithssinthedenominatorhavetheirbreak
frequencies(1
st
orderlags)ornaturalfrequency(2
nd
orderlags).Alotseemstobehappeningbetween
1< <10.Thereisnoevidentbumpinthemagnitudecurve,however,whichwouldindicatethe
presenceofanunderdampedsecondorderinthedenominator(a2
nd
orderlag).Soperhapsforafirst
guessitisusefultospeculatethattherearethree1
st
orderlagsinthistransferfunctionbetween1and
10.Theirproximitywithinthisnarrowrangewillmakeithardtoidentifythemindividually.
Thephaseplotofa1
st
orderlagshowsthatatthebreakfrequency(
B
)thephasehasdroppedby45.
Ifonelooksforthefrequencywherethephaseis45belowthestartingfrequency,onecanspeculate
thatthatisthebreakfrequencyforthefirst1
st
orderlag.Intheabovephaseplot,thiswouldbeat
0
andthenextverticalline.10
0
=1,and10
1
=10.Sothenextverticalline
after10
0
is2.Thehalfwaypointisnot,however,1.5,sincethelogarithmicscaleisuneven.Sothe
halfwaypointwouldbemorelike1.3.Wecanspeculatethenthatthefirst1
st
orderlagisat=1.3.
Each1
st
orderlagbringsintotala90phaseshifttothephasecurve.Ifthethreesupposed1
st
order
lagswereallwidelyseparatedontheaxis,onecouldjustlookonthephasecurvewhere was45,
45,and135tofindthethreebreakfrequencies.Butapparentlythethree1
st
orderlagsarejammed
togetherwithinanarrowrangeof,sothesecondonebecomesactivebeforetheeffectofthefirst
onehassubsided.So
B2
willoccurbefore =45,and
B3
occurbefore=135.Thusweareleft
withonlythechoiceofguessingatthesebreakfrequencies,thenmakingaBodeplotoftheresulting
thereisamatch.Try
B1
=1.3,
B2
=6,and
B3
=12.Thesegive1
st
orderlagsof
1
1
1.3
s+1
,
1
1
6
s+1
,and
1
1
12
s+1

Forthegain,weneed
2u Jb log(K) = -14 JB
K = 1u
-14
20
= u.2
Sothefirststabatatransferfunctionis
0(s) = u.2 s
1
1
1.S
s + 1

1
1
6
s + 1

1
1
12
s + 1
=
u.2 s 1.S 6 12
(s + 1.S)(s + 6)(s +12)
=
19 s
(s +1.S)(s + 6)(s + 12)

TheMatlabcommandsequence
>>s=tf(s)
>>g=19*s/((s+1.3)*(s+6)*(s+12))
Chaptei 8 Fiequency Response

812

>>bode(g)

givestheBodeplotofourconjecturedtransferfunction:

Figure8.4Bodediagramofsurmisedfunction
Acomparisonofthetwoplotsshowsthattheyarenottoofarremovedfromoneanother,soasafirst
refinethefittotherequiredexactness.
StabilityviaBodeplotsgainandphasemargin
AnothertypeofusefuldiagramincontrolsistheNyquistdiagram.OurfocushereisontheBode
diagram,butyoushouldknowwhataNyquistdiagramis.TogettheNyquistDiagramforatransfer
functionG(s)thisiswhatyoudo.JustlikefortheBodeplot,replacetheswithj.Thenyouvarythe
frequency,,overtherange0.Foreach,youwillgetacomplexnumber:G(j)=[Mag(G(j)),
one,apolarplot.ThisiscalledtheNyquistdiagram.
It'seasytogetNyquistdiagramsinMatlab.Youmightwanttotrythefollowingcommands:
>> s = zpk( ' s' )
>> gol = 1/ ( ( s+2) *( s+5) )
>> nyqui st ( g0l )
Chaptei 8 Fiequency Response

813

YoucanalsogetaNyquistdiagraminsideMatlab'sltiviewer:
>> s = zpk( ' s' )
>> gol = 1/ ( ( s+2) *( s+5) )
>> l t i vi ew( gol )
plot(choicesontheleft).Thenontheright,underResponseType,firstitem,chooseNyquist.
TheNyquistdiagramisusefulprimarilyfordeterminingsystemstability.Whatyouneedtoknowisthis:
Forastablesystem(noclosedlooppolesintherighthalfplane),theopenloopsystemwillhavethese
properties:
1. When = -180,Mshouldbe<1
2. WhenM=1, shouldbe>180
Thesefactsareneededtounderstandgainandphasemargin.
Thegainmarginandphasemarginareusefulfordeterminingrelativestability,i.e.notjustwhetheror
notasystemisstablebutalsohowstablethesystemis.
20log =0dB M
= 0
=180

GM
=phasecrossoverfrequency
12.06dB

Figure8.5Gainmargin
Figure8.5showsaportionofatypicalBodePlotforanopenlooptransferfunction.Itillustrateswhat
thegainmargin(G
M
)is.AswasstatedinthediscussionofNyquiststability,when =180,Mshouldbe
<1.TofindG
M
,firstfindthephasecrossoverfrequency,
GM
.Thisisthefrequencywherethephase
curvepassesthrough180.Getthemagnitudeatthatfrequency.Intheaboveplot,G
M
=12.06dB.
Whatthismeansisthatat
GM
theactualmagnitudeis
M=10
12.06/20
=0.2495
Chaptei 8 Fiequency Response

814

RememberthatnegativemagnitudesontheBodemagnitudeplotmeanactualvaluesofmagnitudethat
arebetween0and1.
<1).Theaddedgaindoesnotaffectthe curvebecauseK's for all > 0. Sotheaboveshowsthata
K=12.06dB=10
12.06/20
=4.01
Notethat4.01*0.2495=1.0.
ThephasemarginreflectsthesecondNyquiststabilitycriterion:whenM=1, shouldbe>
180.
20log =0dB M
= 0
= 180
=143.6

M
=gain crossoverfrequency

Figure8.6Phasemargin
Figure8.6showsaportionofatypicalBodeplotforanopenlooptransferfunction.Itillustrateswhat
thephasemargin(
M
)is.Tofind
M
,firstfindthegaincrossoverfrequency,
M
. Thisisthefrequency
whereM=1.RecallatM=1,20dBlogM=20log1=0.So
M
iswherethemagnitudecurvecrosses
theaxis.Getthephaseatthatfrequency.Intheaboveplot, at
M
is143.6.Thephasemarginis
theamountthephaseangleisabove = -180atthegaincrossoverfrequency.

M
=143.6(180)=36.4
AruleofthumbforgoodresponseisG
M
>6dB,30<
M
<60.
Example8.3
ForthesystemwhoseBodePlotisgivenbelow,find
1)
GM

2)
M

Chaptei 8 Fiequency Response

815

3) G
M

4)
M

Figure8.7Bodeplotofunknownfunction

Chaptei 8 Fiequency Response

816

Solution:

Figure8.8Solutiontoaboveexample
Forpracticeyoumightwanttotrytodeterminethetransferfunctionforthesystemabove.
Analternatewayandanongraphicalwaytosolvetheaboveproblemisfirsttodeterminethetransfer
function.Forthisexampleitis
0
0L
=
S
s(s +1)(s +S)

Youcanlookforthephasecrossoverfrequencyandthegaincrossoverfrequencybytrialanderror.Put
withj, andlet varyfromsmallvaluestolargevalues.
Sinceboththemagnitudecurveandthephasecurvegenerallyslopedowntotheright,you
shouldfindthephasecrossoverfrequencyfirst.Keeptryingvaluesofjuntilyoufindout
where=180.Thisisthephasecrossoverfrequency.Getthemagnitudeatthispointand
calculate20logM.ThisisthevalueMatthephasecrossoverfrequency.20log(M)isthegain
margin.
KeeplookingtotherightuntilyoufindthepointwhereM=1.Thisisthegaincrossover
frequency.Getthephaseatthisfrequency.Then

M

GM
G
M
=20dB

M
=180138
=42deg
Chaptei 8 Fiequency Response

817

M
= (180)
Performanceandgainandphasemargin
M
and%OS.
Therelationshipbetween
M
andis

M
= 9u - aictan
_
-2
2
+ 1 + 4
4
2

Butonecanoftenuseasimplificationofthisunwieldyrelationship.For < 0.6,
M
100. = 0.6
correspondswith%OS=9.5%,soforallbutsmallovershootspecifications,thissimplerelationshipcan
beused.
AndaswesawinChapter4,therelationshipbetween%OSand is
%0S = c
-_
{n
_1-{
2
_
1uu%or =
-In (%0S 100% )
n
2
+In
2
(%0S 100% )

Thespeedofasystemdependsonand
n
.FromChapter4weknow
I
P
=
n
o
n
1-
2
andI
S
=
4
o
n

n
isafunctionofandthegaincrossoverfrequency,
M
:

n
=

4M
_
-2
2
+ 1 + 4
4

or

4M
=
_
-2
2
+ 1 +4
4

n

Inpracticeitisoftendifficulttoseparatethetwosystemperformanceindices%OSandspeed.One
speedofthesystem.TakethesystemshowninFigure8.7forexample.Toincreasethephasemargin
magnitudecrosses0dBshifttotheleft,i.e.toalowerfrequency.Butloweringthegaincrossover
frequencymakesthesystemslower.
Chaptei 8 Fiequency Response

818

seenonaBodediagram.RecallfromChapter6thattheopenlooptransferfunctionisusedtoanalyze
ss
)andthatthestaticerrorconstantsK
p
,K
v
,andK
a
areusedtocalculatethe
willhavee
ss
=0andsoon.Thetypeofthesystemisthenumberoffreeintegratorsintheopenloop
diagrams.Anintegratorhasa20dB/dcdslopeonthelefthandsideoftheBodemagnitudeplotanda
90phaseanglefortheentirerangeofontheBodephaseplot.SoiftheBodeplotofanopenloop
systemhasonlynonzeropolesandzerosi.e.neitherpolesnorzerosattheoriginthemagnitudeplot
willstartoffwithaflatrunbeforebreakingupordown.Thephaseplotwillalsobeginat0.Thisisa
type0system.Atype1system,withitssinglefreeintegrator,willthushaveamagnitudeplotwitha20
dB/dcdslopeandaphaseplotthatstartsoutat90.Atype2systemwillhaveamagnitudeplotwitha
startingslopeof40dB/dcdslopeandastartingphaseangleof180.
PIDcontrollerdesignviaBodeplots
error,toreducepercentovershoot,andtosetthespeedofasystem.Rememberalsothatwhatonecan
andcannotdooftendependsonthecapabilitiesoftheactuator.Onecan,forinstance,designa
controllertoproducealloftheoutputcommandsthatwillmeetanyaimssetforthesystem.Butifthe
actuatoristooweaktoperformtheseactions,itwillsimplysaturateanddomuchlessthanisbeing
issaturating.Ifitissaturatingoften,thenoneneedstopurchaseandinstallabiggeractuatororback
performanceshortfalls.Abiggeractuatoralsostressesthesystem,theplant,more.Forexamplea
largerhydrauliccylinderwillbeabletoproducemoreforcethanasmallerone,thuscausingmore
accelerationontheplant.Theinternalstructureofthedevicebeingacceleratedmaynotbedesignedto
takesuchhighaccelerations.Thusonemustalwaysbeawareoftheconsequencesdownstreaminthe
loopwhenalargeractuatorisinstalled.
Todesignacontrollerforasystemviafrequencyresponse,weusetheBodediagramoftheopenloop
andsensor.ThusithelpstoseewhateachvariantofthePIDcontrollercontributestothesystem.The
Pcontroller
Figure8.9showstheBodediagramforaPonlycontrollerwithK
P
astheproportionalgain.Sinceonlya
magnitudeplotfortheexistingsystem.Thegainmargin,G
M
,ofthesystemisdefinedastheamountof
Chaptei 8 Fiequency Response

819

designingaproportionalcontroller,oneneedstobeawarethatforthesystemtoremainstable,
K
P
< 1u
u
M
20

Figure8.9BodecontributionofaPonlycontroller
Aswehaveseen,acommonobjectiveindesigningacontrolleristoletthesystemhaveaspecified
percentovershoot(%OS).AndaswesawinChapter4,%OSisintimatelytiedtothedampingratio,:
%0S = c
-_
{n
_1-{
2
_
1uu%or =
-In (%0S 100% )
n
2
+In
2
(%0S 100% )

Thereisalsoacloserelationshipbetweenphasemargin,
M
,and. For <0.6,
M
100.=0.6
correspondswith%OS=9.5%,soforallbutsmallovershootspecifications,thissimplerelationship
applies.ThusthedesignprocedureforaPonlycontrollerforaspecified%OSwouldbeasfollows:
1. Fromthe%OSspecified,onedetermines
2. Fromthisonedeterminestherequired
M

3. Onelooksattheexistingsystemandfindsthefrequencywhere=180+
M

4. OnefindsthevalueofMatthisfrequency
5. OnesetsK
P
sothat20dBlog(K
P
)raisesorlowersthemagnitudesothatitis1atthisfrequency
marginismeasured.
PIcontroller
Aswehaveseen,aPIcontrollerhasthetransferfunction
2
0

l
o
g

K
K
P
P
Chaptei 8 Fiequency Response

820

0
PI
(s) = K
P
+
K
I
s
=
K
P
s +K
I
s
= K
P
_s +
K
I
K
P
]
1
s
= K
I
_
K
P
K
I
s +1]
1
s

attheorigin).The
1
s
whyoneusesaPIcontroller.

Figure8.10BodecontributionofaPIcontroller
Figure8.10showstheBodeplotofaPIcontroller.Thereareseveralfeaturestonotice.Theeffectof
theintegratorcanbeseenbytheinitial20dB/dcdslopeatthelowfrequencies,onthelefthandsideof
thediagram.Onealsonotesonthephaseplotthatbeginsat90,alsoanartifactoftheintegrator.
Thusthecontrollerwillbringe
ss
I
/K
P

dynamicsofthesystemitsgain,phasemargin,orphasecrossoverfrequency(relatedtosystem
speed)onecoulddothefollowing:
1. SetK
P
suchthatK
I
/K
P
2
0

l
o
g

K
K
I
I
1
s
1
s
90
K
K
K
K
K
K
s+1
s+1
P
P
P
I
I
I
1 100 10 0.1
Composite
Chaptei 8 Fiequency Response

821

2. SetK
I
sothattheflat,highfrequencypartofthePImagnitudecurverunsalongtheaxis.This
willmakethegainathigherfrequenciesthesameasitisintheuncompensatedsystem.
Amoregenerictuningmethod,onethatdoesnotnecessarilypreserveexistingsystemdynamics,would
be:
2. LookattheBodediagramoftheresultingopenlooptransferfunctiontoseewhatelseneedsto
bedone.Stilltobedeterminedisthelocationofthecontrollerpoleandtheoverallcontroller
ofthezerotogettherequired
M
,whichisrelatedtoandthe%OSofastepinput.Fromthis
analysis,setthelocationofthebreakfrequencyofthe1
st
Thisbreakfrequencyisthen1/T(=
B
).
GC

needstobetogetthe
M
needed.
makethefrequency
GC
phasemarginiswhatwasspecified.Checkthestepresponsetoseeifthe%OSiswithin
specifications.
Ofcourseasalwaystheproblemofactuatorsaturationmustbetakenintoaccount.MovingK
I
/K
P
tothe
leftmeansincreasingK
P
,andsincethescaleonaBodeplotislogarithmic,movingK
I
/K
P
theleftmeansincreasingK
P
byafactorof10.Soduetoactuatorlimitations,itmaybeimpossibletoset
K
I
sohighormoveK
I
/K
P
sofartotheleft.Onemayhavetocompromisewithareductioninsystemgain
andafasterK
I
/K
P
.Thereductioninsystemgainwilldepresstheexistingsystemsmagnitudeplotand
pushthegaincrossoverfrequencytotheleft,whichrepresentsanincreaseinsystemresponsetime.
IncreasingK
I
/K
P
meansthatthephasecorrectionto0maynotoccursoonenough,sotheexistingphase
marginofthesystemmaybelowered.Thuswillbelowered,andthe%OSwillcorrespondingly
stateerroroftenbringswithittheconsequencesthatthesystemspeedanditsstabilitysuffers.
PDcontroller
ThetransferfunctionofaPDcontrolleris
0
P
(s) = K
P
+K

s = K

_s +
K
P
K

] = K
P
_
K

K
P
s +1]
frequencyisatK
P
/K
D
.TheBodeplotforthiscontrollerisshowninFigure8.11.NotethatthePD
controllerwillraisetherighthandendofboththemagnitudeandphaseplotsoftheexistingopenloop
system.Byraisingthephaseplot,oneincreasesthephasemargin
M
.Thisincreasesandthuslowers
%OS.Sothesystembecomesmorestable.Thiseffectisnotsoeasytodesign,becausetherighthand
endofthemagnitudeplotisalsoraised.Thisshiftsthegaincrossoverfrequency
M
totheright.
Chaptei 8 Fiequency Response

822

Shiftingthisfrequencytotherightisbeneficial.Becauseoftherelationshipgivenabovebetween
n

and
M
,thiswillmakethesystemfaster.But,initself,moving
M
totherightbringsoneintoaregion
highfrequencyendoftheexistingopenloopsystem.Thistendstoraisethephasemargin,stabilizing
thesystem.ButthePDcontrolleralsoliftstherighthandendofthemagnitudeplot.Thismovesthe
gaincrossoverfrequencytotheright,whichspeedsthesystemup.Butsincethephasecurvegenerally
hasanegativeslope,thebenefittothephasecurvecontributedbythephasecontributionofthePD
controllerisnotfullyrealized.Theexamplebelowillustratesthis.

Figure8.11BodecontributionofaPDcontroller
AsfarassettingK
P
andK
D
goes,asimplifyingstrategywouldbetosetK
P
=1.ThensetK
D
sothatK
P
/K
D
is
intheproperlocationtoliftthephasecurveaswanted.
Example8.4
Asystemhastheopenlooptransferfunction
0
0L
(s) =
1Suu
(s + 1)(s +S)(s + 1S)

ThestabilityofthissystemcanbegaugedusingthesequenceofMatlabcommands:
>> s = t f ( s )
>> gol = 1500/ ( ( s+1) *( s+5) *( s+15) )
>> mar gi n( gol )
2
0

l
o
g

K
K
P
P
90
K
K
K
K
K
K
s+1
s+1
D
D
D
P
P
P
1 100 10 0.1
Composite
Chaptei 8 Fiequency Response

823

Figure8.12Bodeplotofaboveopenlooptransferfunction
Obviouslythesystemisnotverystable.Itisdesiredtoincreasethephasemarginto60whilenot
loweringthelowfrequencygainofthesystem.Todothis,wewilldesignaPDcontroller.Ifoneignores
thebreakfrequencyofthePDcontroller,thephasecontributionis45.Soifwesetthebreakfrequency
controllerwillhaveK
P
=1tokeepthelowfrequencygainasitwasintheoriginalsystem.Thenweset
K
D
=1/3,sothatK
P
/K
D
=3.Thus0
P
=
1
3
(s + S).Wetrythisusing,again,theMatlabmar gi n( gol )
function:
>> gpd = ( 1/ 3) *( s+3)
>> gol pd = gpd * gol
>> mar gi n( gol pd)

Thisproduces

## Chaptei 8 Fiequency Response

824

Figure8.13PDcompensatedsystemofExample8.4

Thusaimingforaphaseelevationof53togivea
M
of60,wehavecomeupshort.Becauseofthe
simultaneouselevationofthemagnitudecurve,thegaincrossoverfrequencyhasshiftedtotheright,so
thephasemarginisstilltoolow.Thesolutionistosetthegaincrossoverfrequencylower,thusaimfor
morephasecontribution,tocompensatefortherightwardshiftofthegaincrossoverfrequency.The
problemwiththisisthatthismakestheelevationofthemagnitudecurveevenlargertoo.Infactas
M
isshiftedeverfurtherleftwardbyloweringK
D
,theincreaseinthecontributionofphasedeclineswhile
theincreaseinthecontributionofmagnitudestaysthesame.Furthertrialshifting
M
leftwardshows
thatusingthismethod,achievinga
M
of60isimpossible.

AnalternativemethodologywouldbetoallowK
P
tofloattoo.Asshown,shifting
M
rightwardactually
spedupthesystem.Ifthemaingoalistoachievea
M
of60,onecouldemploynowagainreduction
toachievethisgoal.ByacloserinspectionoftheBodeplotofthisfunction,oneseesthatataround10
applyingagainreductionof22dB,onewillachievea
M

2u JB log(K
P-uddtonuI
) = -4 JB
K
P-uddtonuI
= 1u
-
4
20
= u.6S1
Thisyields
Chaptei 8 Fiequency Response

825

Figure8.14AlternativemethodofPDcontrolforExample8.4
Thuswithalittlereductioninlowfrequencygain(K
P
desiredresult.
PIDcontroller
ThePIDcontrollerhasthetransferfunction
0
PI
(s) = K
P
+
K
I
s
+ K

s =
K

s
2
+K
P
s +K
I
s

acombinationofaPIandaPD.Thepoleattheoriginisinstalledtoincreasethesystemtypeandthus
reduceovershoot.
Ifthenumeratoroftheabovetransferfunctionisanalyzed,onecanseethatthezeroswillbeat
s =
-K
P
_ K
P
2
- 4K

K
I
2K

K
I
> K
P
2
.Otherwisethezeroswillberealasshownin
Figure8.15.
Chaptei 8 Fiequency Response

826

Figure8.15Zero/polemapofPIDcontroller
TheBodeplotofthePIDcontrollerisshowninFigure8.16.Noteworthyfeaturesare
TheintegratorgivestheMplotaninitialslopeof20dB/dcd.Thefirstzerothenturnsthisdrop
intoaflatrun.Thesecondzeroproducesanupwardslopeof20dB/dcdafterthesecondbreak
frequency.
Thephasecurvestartsat90becauseoftheintegrator.Thefirstzeroliftsthisby90to0.The
secondzeroliftsthisanother90toahighfrequencyvalueof90.Thisphaseliftisusedto
increasethephasemarginofthesystemtowhichthecontrollerisapplied.Ifthezerosarefar
apart,theflatrunoftheMplotwillbelongandthetwophaseliftswillbedistinct.Ifthezeros
areclosertogether,theflatrunwillbeshortandthephaseliftswillbesomewhatcombined
(onewillnotbefinishedbeforetheotherbegins).
doesnotaffectthephaseplot,becausethephasecontributionofagainis0forall.
Theliftingofthemagnitudeplotbythesecondzerohasapositiveeffect.Thismakesthephase
crossoverfrequencyhigherbecauseitliftstherighthandendofthemagnitudecurveofthe
existingsystem.Butsincethephasegenerallydecreaseswithw,thisliftingmaymakethephase
loweratthehighergaincrossoverfrequency,so
M
islower.Thisscenarioistheproblemwith
PDcontrolasseenonaBodediagram.TheproblemsnotedaboveforPDcontrolgenerally
applytotheDpartofPIDcontroltoo.
Im
Re
KK4KK
K+K4KK
P
P
P
P
2
2
D
D
D
D
I
I
2K
2K
Chaptei 8 Fiequency Response

827

Figure8.16BodecontributionofaPIDcontroller
SymmetricalOptimumafrequencyresponsebasedPIDtuningmethod
Problems
2
0

l
o
g

K
K
90
T
T
T
T
1
s
1
s
s+1
s+1
s+1
s+1
2
2
1
1
1 100 10 0.1
Composite