Sie sind auf Seite 1von 15

26/7/2016

ControlTutorialsforMATLABandSimulinkIntroduction:SystemAnalysis

Tips
TIPS

ABOUT

Effects

BASICS

SearchControlTutorials

HARDWARE

INDEX

NEXT

INTRODUCTION CRUISECONTROL MOTORSPEED

http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=SystemAnalysis

1/15

26/7/2016

ControlTutorialsforMATLABandSimulinkIntroduction:SystemAnalysis
SYSTEM
MODELING
ANALYSIS

CONTROL

Introduction:System
Analysis
Onceappropriatemathematicalmodelsofasystem
havebeenobtained,eitherinstatespaceortransfer

PID

functionform,wemaythenanalyzethesemodelsto

ROOTLOCUS

predicthowthesystemwillrespondinboththetime
and frequency domains. To put this in context,

FREQUENCY
STATESPACE
DIGITAL

control systems are often designed to improve


stability, speed of response, steadystate error, or
prevent oscillations. In this section, we will show
howtodeterminethesedynamicpropertiesfromthe
systemmodels.

SIMULINK

KeyMATLABcommandsusedinthistutorialare:tf
MODELING

,ssdata,pole,eig,step,pzmap,bode,ltiview

CONTROL

Related
Tutorial
Links
Time
Response
Activity
Frequency
Response
Activity

Related
External
Links
Time
Response
Intro
Video
Freq
Response
Intro
Video

Contents
http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=SystemAnalysis

2/15

26/7/2016

ControlTutorialsforMATLABandSimulinkIntroduction:SystemAnalysis

TimeResponseOverview
FrequencyResponseOverview
Stability
SystemOrder
FirstOrderSystems
SecondOrderSystems

TimeResponseOverview
Thetimeresponserepresentshowthestateofadynamicsystemchanges
in time when subjected to a particular input. Since the models we have
derived consist of differential equations, some integration must be
performedinordertodeterminethetimeresponseofthesystem.Forsome
simple systems, a closedform analytical solution may be available.
However,formostsystems,especiallynonlinearsystemsorthosesubject
to complicated input forces, this integration must be carried out
numerically. Fortunately, MATLAB provides many useful resources for
calculatingtimeresponsesformanytypesofinputs,asweshallseeinthe
followingsections.
Thetimeresponseofalineardynamicsystemconsistsofthesumofthe
transient response which depends on the initial conditions and the
steadystate response which depends on the system input. These
correspond to the free (homogeneous or zero input) and the forced
(inhomogeneousornonzeroinput)solutionsofthegoverningdifferential
equationsrespectively.

FrequencyResponseOverview
Alltheexamplespresentedinthistutorialaremodeledbylinearconstant
coefficientdifferentialequationsandarethuslineartimeinvariant(LTI).LTI
systems have the extremely important property that if the input to the
systemissinusoidal,thenthesteadystateoutputwillalsobesinusoidalat
the same frequency but in general with different magnitude and phase.
These magnitude and phase differences as a function of frequency
comprisethefrequencyresponseofthesystem.
The frequency response of a system can be found from the transfer
function in the following way: create a vector of frequencies (varying
between zero or "DC" to infinity) and compute the value of the plant
transfer function at those frequencies. If

is the openloop transfer

function of a system and is the frequency vector, we then plot


versus

. Since

is a complex number, we can plot both its

magnitudeandphase(theBodePlot)oritspositioninthecomplexplane
(the Nyquist Diagram). Both methods display the same information in

http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=SystemAnalysis

3/15

26/7/2016

ControlTutorialsforMATLABandSimulinkIntroduction:SystemAnalysis

(the Nyquist Diagram). Both methods display the same information in


differentways.

Stability
Forourpurposes,wewillusetheBoundedInputBoundedOutput(BIBO)
definition of stability which states that a system is stable if the output
remainsboundedforallbounded(finite)inputs.Practically,thismeansthat
thesystemwillnotblowupwhileinoperation.
The transfer function representation is especially useful when analyzing
systemstability.Ifallpolesofthetransferfunction(valuesofsatwhichthe
denominator equals zero) have negative real parts, then the system is
stable.Ifanypolehasapositiverealpart,thenthesystemisunstable.Ifwe
viewthepolesonthecomplexsplane,thenallpolesmustbeintheleft
halfplane(LHP)toensurestability.Ifanypairofpolesisontheimaginary
axis,thenthesystemismarginallystableandthesystemwilloscillate.The
polesofaLTIsystemmodelcaneasilybefoundinMATLABusingthepole
command,anexampleifwhichisshownbelow:

s=tf('s');
G=1/(s^2+2*s+5)
pole(G)

G=

s^2+2s+5

Continuoustimetransferfunction.

ans=
1.0000+2.0000i
1.00002.0000i

Thus this system is stable since the real parts of the poles are both
negative.Thestabilityofasystemmayalsobefoundfromthestatespace
representation. In fact, the poles of the transfer function are the
eigenvalues of the system matrix A. We can use the eig command to
calculate the eigenvalues using either the LTI system model directly,
eig(G)orthesystemmatrixasshownbelow.

[A,B,C,D]=ssdata(G);
http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=SystemAnalysis

4/15

26/7/2016

ControlTutorialsforMATLABandSimulinkIntroduction:SystemAnalysis

eig(A)

ans=
1.0000+2.0000i
1.00002.0000i

SystemOrder
Theorderofadynamicsystemistheorderofthehighestderivativeofits
governingdifferentialequation.Equivalently,itisthehighestpowerofsin
the denominator of its transfer function. The important properties of first,
second,andhigherordersystemswillbereviewedinthissection.

FirstOrderSystems
First order systems are the simplest dynamic systems to analyze. Some
commonexamplesincludecruisecontrolsystemsandRCcircuits.
Thegeneralformofthefirstorderdifferentialequationisasfollows
(1)
Thefirstordertransferfunctionis
(2)

DCGain
The DC gain,

, is the ratio of the magnitude of the steadystate step

response to the magnitude of the step input. From the Final Value
Theorem, for stable transfer functions the DC gain is the value of the
transferfunctionwhens=0.Forfirstordersystemsequalto

TimeConstant
The time constant

is the time it takes for the system to

reach63%ofthesteadystatevalueforastepresponseortodecreaseto
37% of the inital value for an impulse response. More generally, it
represents the time scale for which the dynamics of the system are
significant.
Poles/Zeros
Thereisasinglerealpoleat

.Therefore,thesystemisstableif is

positiveandunstableif isnegative.Therearenozeros.
StepResponse
Wecancalculatethesystemtimeresponsetoastepinputofmagnitudeu
http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=SystemAnalysis

5/15

26/7/2016

ControlTutorialsforMATLABandSimulinkIntroduction:SystemAnalysis

Wecancalculatethesystemtimeresponsetoastepinputofmagnitudeu
usingtheMATLABfollowingcommands:

k_dc=5;
Tc=10;
u=2;

s=tf('s');
G=k_dc/(Tc*s+1)

step(u*G)

G=

10s+1

Continuoustimetransferfunction.

Note:MATLABalsoprovidesapowerfulGUI(LTIViewer)foranalyzingLTI
systemswhichcanbeaccessedusing,ltiview('step',G).
IfyourightclickonthestepresponsegraphandselectCharacteristics,
youcanchoosetohaveseveralsystemmetricsoverlaidontheresponse:
peakresponse,settlingtime,risetime,andsteadystate.
SettlingTime
Thesettlingtime, ,isthetimerequiredforthesystemouputtofallwithin
http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=SystemAnalysis

6/15

26/7/2016

ControlTutorialsforMATLABandSimulinkIntroduction:SystemAnalysis

acertainpercentage(i.e.2%)ofthesteadystatevalueforastepinputor
equivalentlytodecreasetoacertainpercentageoftheinitialvalueforan
impulseinput.Thesettlingtimesforfirstordersystemforthemostcommon
tolerances are provided in the table below. Note that the tighter the
tolerance, the longer the system response takes to settle to within this
tolerance,asexpected.
10%

5%

2%

1%

Ts=2.3/a=2.3Tc

Ts=3/a=3Tc

Ts=3.9/a=3.9Tc

Ts=4.6/a=4.6Tc

RiseTime
The rise time,

, is the time required for the system output to rise from

some lower level x% to some higher level y% of the final steadystate


value.Forfirstordersystems,thetypicalrangeis10%90%.
BodePlots
The Bode Plots show the magnitude and phase of the system frequency
response,

.WecangeneratetheBodeplotsinMATLABusingthe

bode(G)command.

bode(G)

Again the same results could be obtained using the LTI viewer GUI,
ltiview('bode',G)
TheBodeplotsusealogarithmicfrequencyscale,sothatalargerrangeof
frequencies are visible. Also, the magnitude is represented using the
logarithmicdecibelunit(dB)definedas:
(3)
http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=SystemAnalysis

7/15

26/7/2016

ControlTutorialsforMATLABandSimulinkIntroduction:SystemAnalysis

Likefrequency,thedecibelscaleallowsustoviewamuchlargerrangeof
magnitudesonasingleplot.Also,asweshallseeinsubsequenttutorials,
when systems are combined or controllers are added, transfer functions
areoftenmultipliedtogether.UsingthedBscale,wemaysimplyaddthe
magnitudes of the transfer functions. Note, we may also add the phase
anglesthoughthesearenotshownonalogscale.
The low frequency magnitude of the first order bode plot is

The magnitude plot has a bend at the frequency equal to the absolute
valueofthepole(ie.

),andthendecreasesat20dBforeveryfactor

oftenincreaseinfrequency(20dB/decade).Thephaseplotisasymptotic
to 0 degrees at low frequency, and asymptotic to 90 degrees at high
frequency. Between frequency 0.1a and 10a, the phase changes by
approximately 45 degrees for every factor of ten increase in frequency
(45degrees/decade).
WewillseeintheFrequencyMethodsforControllerDesignSectionhowto
use Bode Plots to calculate closed loop stability and performance of
feedbacksystems.

SecondOrderSystems
Secondordersystemsarecommonlyencounteredinpractice,andarethe
simplest type of dynamic system to exhibit oscillations. In fact many real
higher order systems are modeled as second order to facilitate analysis.
ExamplesincludemassspringdampersystemsandRLCcircuits.
Thegeneralformofthefirstorderdifferentialequationisasfollows
(4)
Thefirstordertransferfunctionis
(5)

DCGain
The DC gain,

, again is the ratio of the magnitude of the steadystate

stepresponsetothemagnitudeofthestepinput,andforstablesystemsit
isthevalueofthetransferfunctionwhen

.Forsecondordersystems,
(6)

DampingRatio
The damping ratio is a dimensionless quantity charaterizing the energy
losses in the system due to such effects as viscous friction or electrical
resistance.Fromtheabovedefinitions,
http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=SystemAnalysis

8/15

26/7/2016

ControlTutorialsforMATLABandSimulinkIntroduction:SystemAnalysis

resistance.Fromtheabovedefinitions,

(7)

NaturalFrequency
The natural frequency is the frequency (in rad/s) that the system will
oscillateatwhenthereisnodamping,

.
(8)

Poles/Zeros
Thesecondordertransferfunctionhastwopolesat:
(9)
UnderDampedSystem
If

,thenthesystemisunderdamped.Bothpolesarecomplexvalued

withnegativerealpartsthereforethesystemisstablebutoscillateswhile
approachingthesteadystatevalue.

k_dc=1;
w_n=10;
zeta=0.2;

s=tf('s');
G1=k_dc*w_n^2/(s^2+2*zeta*w_n*s+w_n^2);

pzmap(G1)
axis([311515])

http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=SystemAnalysis

9/15

26/7/2016

ControlTutorialsforMATLABandSimulinkIntroduction:SystemAnalysis

step(G1)
axis([0302])

SettlingTime
Thesettlingtime, ,isthetimerequiredforthesystemouputtofallwithin
a certain percentage of the steady state value for a step input or
equivalentlytodecreasetoacertainpercentageoftheinitialvalueforan
impulseinput.Forasecondorder,underdampedsystem,thesettlingtime
canbeapproximatedbythefollowingequation:
(10)

The settling times for the most common tolerances are presented in the
followingtable:
10%

5%

2%

1%

Ts=2.3/(zeta*wn)

Ts=3/(zeta*w_n)

Ts=3.9/(zeta*w_n)

Ts=4.6/(zeta*w_n)

PercentOvershoot
Thepercentovershootisthepercentbywhichasystemexceedsitsfinal
steadystatevalue.Forasecondorderunderdampedsystem,thepercent
overshootisdiretlyrelatedtothedampingratiobythefollowingequation:
(11)

For second order under damped systems, the 2% settling time,


time,

, rise

, and percent overshoot, %OS, are related to the damping and

naturalfrequencyasshownbelow.
http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=SystemAnalysis

10/15

26/7/2016

ControlTutorialsforMATLABandSimulinkIntroduction:SystemAnalysis

(12)

(13)

(14)

OverDampedSystems
If

, then the system is over damped. Both poles are real and

negative therefore the system is stable and does not oscillate. The step
responseandapolezeromapofanoverdampedsystemarecalculated
below:

zeta=1.2;

G2=k_dc*w_n^2/(s^2+2*zeta*w_n*s+w_n^2);

pzmap(G2)
axis([20111])

step(G2)
axis([01.501.5])

http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=SystemAnalysis

11/15

26/7/2016

ControlTutorialsforMATLABandSimulinkIntroduction:SystemAnalysis

CriticallyDampedSystems
If

, then the system is critically damped. Both poles are real and

have the same magnitude,

. Critically damped systems

approachsteadystatequickestwithoutoscillating.Nowchangethevalue
ofthedampingto1,andreplotthestepresponseandpolezeromap.

zeta=1;

G3=k_dc*w_n^2/(s^2+2*zeta*w_n*s+w_n^2);

pzmap(G3)
axis([11111])

step(G3)
axis([01.501.5])

http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=SystemAnalysis

12/15

26/7/2016

ControlTutorialsforMATLABandSimulinkIntroduction:SystemAnalysis

UndampedSystems
If

,thenthesystemisundamped.Inthiscase,thepolesarepurely

imaginary therefore the system is marginally stable and oscillates


indefinitely.

zeta=0;

G4=k_dc*w_n^2/(s^2+2*zeta*w_n*s+w_n^2);

pzmap(G4)
axis([111515])

step(G4)
axis([050.52.5])

http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=SystemAnalysis

13/15

26/7/2016

ControlTutorialsforMATLABandSimulinkIntroduction:SystemAnalysis

BodePlot
WeshowtheBodeMagnitudeandPhasePlotsforalldampingconditions
ofasecondordersystembelow:

bode(G1,G2,G3,G4)

legend('underdamped:zeta<1','overdamped:zeta>1','criticallydamped:ze

The magnitude of the bode plot of a second order system drops off at
40dB per decade, while the relative phase changes from 0 to 180
degrees at 90 degrees per decade. For the under damped systems, we
alsoseearesonancepeaknearthenaturalfrequency,

=10rad/s.The

sharpness of the peak depends on the damping in the system, and is


charaterizedbythequalityfactor,orQFactor,definedbelow.TheQfactor
isanimportantpropertyinsignalprocessing.
(15)
http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=SystemAnalysis

14/15

26/7/2016

ControlTutorialsforMATLABandSimulinkIntroduction:SystemAnalysis

PublishedwithMATLAB7.14

AllcontentslicensedunderaCreativeCommonsAttributionShareAlike4.0
InternationalLicense.

http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=SystemAnalysis

15/15

Das könnte Ihnen auch gefallen