Date post: | 18-Aug-2015 |
Category: |
Documents |
Upload: | jaspreet964 |
View: | 242 times |
Download: | 1 times |
OverviewofPoleZeroPlots Polesandsystemstability Factoringtransferfunctions Realpolesandzeros Complexpolesandzeros Relationshiptoimpulseresponse Relationshiptofrequencyresponse(Bodeplots)J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 1PrerequisiteandNewKnowledgePrerequisiteknowledge AbilitytondLaplacetransformsofsignals FamiliaritywithBodeplotsandeectsofpolesandzerosonthemagnitudeandphaseresponseNewknowledge Abilitytointerpretpole-zeroplots Betterunderstandingoftherelationshipofhowthelocationsofpolesandzerosonthecomplexplaneaectsthefrequencyresponse Abilitytorelatethefrequencyresponsetoapole-zeroplotJ.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 2PolesandStabilityAssumeallofthepolesinatransferfunctionH(s)areunique. ThenH(s)canbewrittenasfollowsusingpartialfractionexpansion:H(s) =N(s)D(s)=N
=1k
s p
L1{H(s)} = h(t) =N
=1k
e+p
tu(t) Notetheexpansionisintermsofthepoles,ratherthan p
If
|h(t)| dt < ,theLTIsystemisbounded-inputbounded-output(BIBO)stable Thatis |h(t)| < < forallt h(t)isboundedif Re{p
} < 0forall ThesystemisBIBOstableifandonlyifallthepolesareinthelefthalf ofthecomplexplaneJ.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 3Pole-ZeroPlotsH(s) =N(s)D(s)Zeros: rootsofN(s)Poles: rootsofD(s) Polesmustbeinthelefthalfplaneforthesystemtobestable Asthepolesgetclosertotheboundary,thesystembecomeslessstablePole-ZeroPlot: plotofthezerosandpolesonthecomplexsplane Youwillusethesethroughoutthejuniorsequence(ECE32x)andincontrolsJ.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 4Example1: Pole-ZeroPlotsUseMATLABtogenerateaPole-ZeroplotforasystemwiththefollowingtransferfunctionH(s) =s21s3+ 4s2+ 6s + 4UsingtheMATLAB,wecanquicklyndtherootsH(s) =(s + 1)(s 1)(s + 2)(s + 1 j)(s + 1 + j)Isthesystemstable?Thepole-zeroplot,impulseresponse,andstepresponseareshownonthefollowingslides.J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 5Example1: LTISystemPlots2 1.5 1 0.5 0 0.5 121.510.500.511.52RealImaginary10110010140200Frequency (rad/s)Magnitude (dB)101100101180135904504590135180Frequency (rad/s)Phase (o)0 1 2 3 4 500.51Time (s)h(t)J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 6Example1: MATLABCodefunction [] = FirstExample ();%==============================================================================% Preprocessing%==============================================================================functionName = sprintf(%s,mfilename ); % Get the function namefileIdentifier = fopen([ functionName .tex],w);DrawSystemPlots ([1 0 -1],[1 4 6 4]);fileName = sprintf(%s,functionName );print(fileName ,-depsc);fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\\ newslide\n);fprintf(fileIdentifier ,\\ slideheading{Example \\ arabic{exc}: LTI System Plots}\n);fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\\ includegraphics[scale =1]{ Matlab/%s}\n,fileName );%==============================================================================% Post Processing%==============================================================================fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\\ newslide \n);fprintf(fileIdentifier ,\\ slideheading{Example \\ arabic{exc}: MATLAB Code}\n);fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\t \\ matlabcode{Matlab/%s.m}\n,functionName );J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 7fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\\ newslide \n);fprintf(fileIdentifier ,\\ slideheading{Example \\ arabic{exc}: DrawSystemPlots MATLAB Code}\n);fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\t \\ matlabcode{Matlab/DrawSystemPlots.m }\n);fclose(fileIdentifier );J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 8Example1: DrawSystemPlotsMATLABCodefunction [] = DrawSystemPlots(num ,den)%==============================================================================% Preprocessing%==============================================================================zeros = roots(num);poles = roots(den);both = [poles;zeros];%==============================================================================% Figure Layout Parameters%==============================================================================leftEdge = 0.09;rightEdge = 0.03;bottomEdge = 0.10;topEdge = 0.02;verticalSpacing = 0.13;horizontalSpacing = 0.08;plotWidth = (1-rightEdge -leftEdge - horizontalSpacing )/2;plotHeight = (1-bottomEdge -topEdge -2* verticalSpacing )/3;%==============================================================================% Create the Axes%==============================================================================figure;FigureSet(1,Slides);haPoleZero = axes(Position ,[leftEdge bottomEdgeJ.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 9plotWidth 1-topEdge -bottomEdge ]);haImpulse = axes(Position ,[leftEdge+plotWidth+horizontalSpacing bottomEdge +0*( plotHeight+verticalSpacin]);haPhase = axes(Position ,[leftEdge+plotWidth+horizontalSpacing bottomEdge +1*( plotHeight+verticalSpacin]);haMagnitude = axes(Position ,[leftEdge+plotWidth+horizontalSpacing bottomEdge +2*( plotHeight+verticalSpacin]);%==============================================================================% Draw the Pole Zero Plot%==============================================================================axes(haPoleZero );p = get(haPoleZero ,Position );width = p(3);height = p(4);xMin = min(real(both ));xMax = max(0,max(real(both )));xRange = xMax -xMin;xLimits = [xMin -0.05*xRange xMax+0.05*xRange ];yMin = min(imag(both ));yMax = max(imag(both ));yRange = max(yMax -yMin ,xRange );yLimits = [yMin -0.05*yRange yMax+0.05*yRange ];if diff(xLimits) < (width/height)*diff(yLimits)xCenter = mean(xLimits );xRange = (width/height )*diff(yLimits );xLimits = xCenter + [-xRange xRange ]/2;elseif diff(yLimits) 180) = phase(phase >180) - 360; % Wrap anything above 180 to -180axes(haMagnitude );h = semilogx(omega ,20* log10(magnitude),r);set(h,LineWidth ,1.2);xlim([omega (1) omega(end )]);yMin = floor(min (20* log10(magnitude ))/20)*20;yMax = ceil (max (20* log10(magnitude ))/10)*10;J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 11ylim([yMin yMax ]);set(haMagnitude ,YGrid,On);box off;xlabel(Frequency (rad/s));ylabel(Magnitude (dB));axes(haPhase );h = semilogx(omega ,phase ,r);set(h,LineWidth ,1.2);xlim([omega (1) omega(end )]);ylim ([ -180 180]);set(haPhase ,YTick ,[ -180:45:180]);set(haPhase ,YGrid,On);box off;xlabel(Frequency (rad/s));ylabel(Phase (^o));%==============================================================================% Draw the Impulse Response%==============================================================================if length(num)length(poles)axes(haImpulse );tFinal = 5/abs(max(real(poles ))); % Five of the slowest (largest) time constansys = tf(num ,den);[y,t] = impulse(sys ,tFinal );if max(t)>.1 ,xLabel = Time (s);elset = t*1000;xLabel = Time (ms);J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 12endh = plot(t,y,g);set(h,LineWidth ,1.2);xlim ([0 t(end )]);ylim([min(y)-0.05*range(y) max(y)+0 .05*range(y)]);AxisLines;box off;xlabel(xLabel );ylabel(h(t));end%==============================================================================% Select the Axes Font Size and Style%==============================================================================AxisSet (6);J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 13FactoringtheTransferFunctionH(s) =N(s)D(s)=bmsm+ bm1sm1+ + b1s + b0ansn+ an1sn1+ + a1s + a0=bmans(s z1)(s z2) . . . (s zm)(s p1)(s p2) . . . (s pn)= c
mk=1(s zk)
nk=1(s pk) Asweveseenbefore,therearemanyequivalentexpressionsfortransferfunctions Polezeroplotsaremosteasilyconstructedandunderstoodbyexpressingthetransferfunctioninfactoredform(myterm)J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 14FactoredFormMagnitudeH(s) = c
mk=1(s zk)
nk=1(s pk)|H(s)| = |c|
mk=1|s zk|
nk=1|s pk|H(s) = c +m
k=1(s zk) n
k=1(s pk) ThemagnitudeofH(s)atanyvalueofs(says = j)isequaltotheproductoflengthsofthezerovectorsdividedbytheproductofthelengthsofthepolevectors TheangleofH(s)isthesumofangleofthezerovectorsminusthesumoftheanglesofthepolevectors Howdowedeterminetheselengthsandanglesfromthepole-zeroplot?J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 15Example2: SingleZeroConsiderthetransferfunctionH(s) = s z. Whatisthemagnitudeandphaseats = so?soz-zsoso-zIm{s}Re{s} Youcanthinkofeachcomplexnumberasavectorinthecomplexplanestartingattheoriginandendingatthecomplexnumber sozisjustthevectorsumofsoand z Letusdenotethelengthofthisvectoras()J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 16Example2: SingleZeroMagnitudeandPhasesoz-zsoso-zIm{s}Re{s} Themagnitudeofacomplexnumber,sayc = + j,istheEuclideanlengthofthevector, |c| =
2+ 2 ThephaseistheangleofthevectorrelativetotherealaxisJ.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 17Example3: SinglePoleConsiderthetransferfunctionH(s) =1sp. Whatisthemagnitudeandphaseats = so?H(s) =1s p|H(s)| =1|s p|=1()H(s) = 1s p= (s p)J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 18SingleZeroContinuedRe{s}sop-psoso-pIm{s} Themagnitudeofacomplexnumber,sayc = + j,istheEuclideanlengthofthevector, |c| =
2+ 2 ThemagnitudeofH(s)isinverselyproportionaltothelengthofthevectortothepole: |H(s)| 1(s) Thephaseisthenegativeoftheangleofthevectorrelativetotherealaxis: H(s) = (s)J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 19ThinkingabouttheImaginaryAxisRe{s}z-zsoso-zIm{s}joRe{s}p-psoso-pIm{s}jo Inmostapplicationsweareinterestedinthefrequencyresponseofthesystem Thatis,H(s)ats = jfor> 0 Inthecomplexsplane,thisrepresentsthepositiveportionoftheimaginaryaxisJ.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 20MagnitudeImpactofPolesandZeros|H(j)| = |c|
mk=1|j zk|
nk=1|j pk| ThemagnitudeofH(j)isProportionaltotheproductofmagnitudesofthedistancetoallzeros: |H(j)| |j zk| = ()Inverselyproportionaltotheproductofmagnitudesofthedistancestoallpoles: |H(j)| 1|jpk|=1() ThusAtfrequencieswherejisnearzeros,themagnitudewillbedecreasedAtfrequencieswherejisnearpoles,themagnitudewillbeincreasedJ.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 21MagnitudeImpactofPolesandZerosH(j) = c +m
k=1(j zk) n
k=1(j pk) ThecomplexphaseangleofH(j)isthesumoftheanglestoallzerosminusthesumoftheanglestoallpolesJ.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 22Example4: ThinkingMoreaboutZerosRe{s}z-zsoso-zIm{s}jo Atwhatfrequencyisthemagnitudeatitsminimum,min = argmin|H(j)|? Atwhatfrequencyisthemagnitudeatitsmaximum,max = argmax|H(j)|? Atwhatfrequencyisthemagnitude2 1.41itsminimum? Atwhatfrequencyisthephase 0?45?90?J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 23Example4: LTISystemPlots0 0.2 0.4 0.6 0.8 100.511 0.8 0.6 0.4 0.2 00.60.40.200.20.40.6RealImaginary1011001010102030Frequency (rad/s)Magnitude (dB)101100101180135904504590135180Frequency (rad/s)Phase (o)J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 24Example4: MATLABCodefunction [] = RealZero ();%==============================================================================% Preprocessing%==============================================================================functionName = sprintf(%s,mfilename ); % Get the function namefileIdentifier = fopen([ functionName .tex],w);DrawSystemPlots ([1 1] ,[1]);fileName = sprintf(%s,functionName );print(fileName ,-depsc);fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\\ newslide\n);fprintf(fileIdentifier ,\\ slideheading{Example \\ arabic{exc}: LTI System Plots}\n);fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\\ includegraphics[scale =1]{ Matlab/%s}\n\n,fileName );%==============================================================================% Post Processing%==============================================================================fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\\ newslide \n);fprintf(fileIdentifier ,\\ slideheading{Example \\ arabic{exc}: MATLAB Code}\n);fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\t \\ matlabcode{Matlab/%s.m}\n\n,functionName );J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 25fclose(fileIdentifier );J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 26Example5: ThinkingMoreaboutPolesRe{s}p-psoso-pIm{s}jo Atwhatfrequencyisthemagnitudeatitsminimum,min = argmin|H(j)|? Atwhatfrequencyisthemagnitudeatitsmaximum,max = argmax|H(j)|? Atwhatfrequencyisthemagnitude12 0.707itsmaximum? Atwhatfrequencyisthephase 0?45?90?J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 27Example5: LTISystemPlots1 0.8 0.6 0.4 0.2 00.60.40.200.20.40.6RealImaginary10110010140200Frequency (rad/s)Magnitude (dB)101100101180135904504590135180Frequency (rad/s)Phase (o)0 1 2 3 4 500.51Time (s)h(t)J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 28Example5: MATLABCodefunction [] = RealPole ();%==============================================================================% Preprocessing%==============================================================================functionName = sprintf(%s,mfilename ); % Get the function namefileIdentifier = fopen([ functionName .tex],w);DrawSystemPlots ([1] ,[1 1]);fileName = sprintf(%s,functionName );print(fileName ,-depsc);fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\\ newslide\n);fprintf(fileIdentifier ,\\ slideheading{Example \\ arabic{exc}: LTI System Plots}\n);fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\\ includegraphics[scale =1]{ Matlab/%s}\n\n,fileName );%==============================================================================% Post Processing%==============================================================================fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\\ newslide \n);fprintf(fileIdentifier ,\\ slideheading{Example \\ arabic{exc}: MATLAB Code}\n);fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\t \\ matlabcode{Matlab/%s.m}\n\n,functionName );J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 29fclose(fileIdentifier );J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 30Real PolesandZeros ThedistanceofrealpolesandzerostotheimaginaryaxisdeterminesthebreadthofthefrequencyresponsePolesandzerosthatarefurtherawayhaveabroaderfrequencyresponse(largercornerfrequency)Polesandzerosthatareneartheimaginaryaxishaveanarrowfrequencyresponse(smallercornerfrequency) Conversely,theimpulseresponse(timedomain)isLongerforpolesandzerosneartheimaginaryaxis(longtimeconstant)Shorterforpolesandzerosfarawayfromtheimaginaryaxis(shorttimeconstant)J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 31Example6: ThinkingMoreaboutPolesDrawthesystemplotsforLTIsystemswithsinglerealpolesatp = 100andp = 1000 radians/s. Whataretheimpulseresponsesofthesesystems? WhatarethepiecewiselinearBodeplotapproximationsofthesesystems? Whatarethetimeconstantsofthesesystems?J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 32Example6: ImpulseResponsesJ.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 33Example6: BodePlotsJ.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 34Example6: TimeConstantof0.010 s100 80 60 40 20 06040200204060RealImaginary10110210340200Frequency (rad/s)Magnitude (dB)101102103180135904504590135180Frequency (rad/s)Phase (o)0 10 20 30 40 50050100Time (ms)h(t)J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 35Example6: TimeConstantof0.010 s1000 800 600 400 200 06004002000200400600RealImaginary10210310440200Frequency (rad/s)Magnitude (dB)102103104180135904504590135180Frequency (rad/s)Phase (o)0 1 2 3 4 505001000Time (ms)h(t)J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 36Example6: MATLABCodefunction [] = RealPoles ();%==============================================================================% Preprocessing%==============================================================================functionName = sprintf(%s,mfilename ); % Get the function namefileIdentifier = fopen([ functionName .tex],w);poles = [-100 -1000];for c1=1: length(poles)pole = poles(c1);DrawSystemPlots ([-pole],[1 -pole ]);plotName = sprintf(%s-%d,functionName ,-pole);print(plotName ,-depsc);fprintf(fileIdentifier ,%%=============================================================================fprintf(fileIdentifier ,\\ newslide\n);fprintf(fileIdentifier ,\\ slideheading{Example \\ arabic{exc}: Time Constant of %5.3f\\ unit{s}}\n ,1/100fprintf(fileIdentifier ,%%=============================================================================fprintf(fileIdentifier ,\\ includegraphics[scale =1]{ Matlab/%s}\n\n,plotName );end%==============================================================================% Post Processing%==============================================================================fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\\ newslide \n);J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 37fprintf(fileIdentifier ,\\ slideheading{Example \\ arabic{exc}: MATLAB Code}\n);fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\t \\ matlabcode{Matlab/%s.m}\n\n,functionName );fclose(fileIdentifier );J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 38ComplexPolesandZeros Realpolesandzerosareveryconstrained,whenviewedfromthepole-zeroplotperspective Limitedtotherealline(negativerealline,forpoles) Complexpolesandzerosgiveusmuchmoreexibilityinshapingthefrequencyresponse Permitustoplacepolesandzerosneartheimaginaryaxis Enablesustomorerapidlyincrease(withpoles)ordecrease(withzeros)thefrequencyresponseJ.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 39PairofComplexPolesAunity-gainlowpasssecond-ordertransferfunctionisoftheformH(s) =2ns2+ 2ns + 2n=2n(s p1)(s p2)p1,2 = (
21) n niscalledtheundampednatural frequency (zeta)iscalledthedampingratio If 1,thepolesarereal If 0 < < 1,thepolesarecomplex If = 0,thepolesareimaginary: p1,2 = jn If< 0,thepolesareintherighthalfplane(Re{p} > 0)andthesystemisunstableJ.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 40SingleComplexPoleRe{s}Im{s}nn
1 2ncos = AtwhatfrequencyisthemagnitudeofH(j)maximized? AtwhatfrequencyisthemagnitudeofH(j)equalto12ofitsmaximum? AtwhatfrequencyisthemagnitudeofH(j)minimized? Whateectdoeshaveonthefrequencyresponse?J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 41Example6: DampingRatio0.00140 20 0 20 4010080604020020406080100RealImaginary101102103402002040Frequency (rad/s)Magnitude (dB)101102103180135904504590135180Frequency (rad/s)Phase (o)0 10 20 30 40 501000100Time (s)h(t)J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 42Example6: DampingRatio0.01040 20 0 20 4010080604020020406080100RealImaginary101102103402002040Frequency (rad/s)Magnitude (dB)101102103180135904504590135180Frequency (rad/s)Phase (o)0 1 2 3 4 51000100Time (s)h(t)J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 43Example6: DampingRatio0.10040 20 0 20 4010080604020020406080100RealImaginary1011021034020020Frequency (rad/s)Magnitude (dB)101102103180135904504590135180Frequency (rad/s)Phase (o)0 0.1 0.2 0.3 0.4 0.550050Time (s)h(t)J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 44Example6: DampingRatio0.50060 50 40 30 20 10 0 1080604020020406080RealImaginary10110210340200Frequency (rad/s)Magnitude (dB)101102103180135904504590135180Frequency (rad/s)Phase (o)0 20 40 60 80 10002040Time (ms)h(t)J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 45Example6: DampingRatio0.95080 60 40 20 010080604020020406080100RealImaginary1011021036040200Frequency (rad/s)Magnitude (dB)101102103180135904504590135180Frequency (rad/s)Phase (o)0 10 20 30 40 500102030Time (ms)h(t)J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 46Example6: DampingRatio1.000100 80 60 40 20 010050050100RealImaginary1011021036040200Frequency (rad/s)Magnitude (dB)101102103180135904504590135180Frequency (rad/s)Phase (o)0 10 20 30 40 500102030Time (ms)h(t)J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 47Example6: DampingRatio1.050140 120 100 80 60 40 20 015010050050100150RealImaginary1011021036040200Frequency (rad/s)Magnitude (dB)101102103180135904504590135180Frequency (rad/s)Phase (o)0 10 20 30 40 50 600102030Time (ms)h(t)J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 48Example6: MATLABCodefunction [] = ComplexPoles ()%==============================================================================% User -Specified Parameters%==============================================================================zeta = [0.001 0.01 0.1 0.5 0.95 1 1.05];omegan = 100;%==============================================================================% Preprocessing%==============================================================================functionName = sprintf(%s,mfilename ); % Get the function namefileIdentifier = fopen([ functionName .tex],w);for c1=1: length(zeta)num = omegan ^2;den = [1 2*zeta(c1)* omegan omegan ^2];DrawSystemPlots(num ,den);fileName = sprintf(%s-%d,functionName ,c1);print(fileName ,-depsc);fprintf(fileIdentifier ,%%=============================================================================fprintf(fileIdentifier ,\\ newslide\n);fprintf(fileIdentifier ,\\ slideheading{Example \\ arabic{exc}: Damping Ratio %5.3f}\n,zeta(c1));fprintf(fileIdentifier ,%%=============================================================================fprintf(fileIdentifier ,\\ includegraphics[scale =1]{ Matlab/%s}\n\n,fileName );endJ.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 49%==============================================================================% Post Processing%==============================================================================fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\\ newslide \n);fprintf(fileIdentifier ,\\ slideheading{Example \\ arabic{exc}: MATLAB Code}\n);fprintf(fileIdentifier ,%%==============================================================================\ nfprintf(fileIdentifier ,\t \\ matlabcode{Matlab/%s.m}\n\n,functionName );fclose(fileIdentifier );J.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 50Summary Polezeroplotsgivefurtherinsightintotransferfunctions Thephase H(j)Decreasesto 90foreachpoleIncreasesto 90foreachzero,dependingonwhetheritisintheleftorrighthalfofthecomplexsplane Themagnitude |H(j)|isInverselyproportionaltothedistancetoeachpoleProportionaltothedistancetoeachzeroJ.McNames PortlandStateUniversity ECE222 PoleZeroPlots Ver. 1.02 51