You are on page 1of 8

Transient Response Analysis Using Matlab

LAB#8
Transient Response Analysis Using Matlab
Calculate Mp For 2nd order Systems With Fixed Omegan
Calculate Tr And Ts For 2nd order Systems With Fixed Omegan
Compare obser!ed !alues to lab !alues
In Control Systems lab, we need good estimates of the overshoot, rise time, and settling
time of a given second-order system. hese estimates are hel!f"l when designing
controllers to meet time-domain s!ecifications.
hese-domain time s!ecifications were designed for the ste!-in!"t system res!onse.
#ther in!"ts, s"ch as a ram! or a $"ic% !"lse may be better analy&ed by "sing other
s!ecifications s"ch as !hase delay.
'ote that these estimates are only acc"rate for second-order systems with no &eros.
(or e)am!le, a non-minim"m-!hase &ero co"ld have a significant effect on the settling
time. *owever, these estimates still re!resent the essential $"alities of higher-order
systems with two dominant !oles. (or this reason, (ran%lin advocates "sing sim!le
estimates rather than e)act fits+ designers sho"ld normally "se them as ro"gh
g"idelines anyway.
Second-order System Model:
Any second-order system of the form
%,--s.!/01-s.!200
may be rewritten as
%1wn32,-s32 . 21&eta1wn1s . wn320
where wn is the nat"ral fre$"ency and &eta is the dam!ing coefficient.
Control Lab Definitions:
4! - -!ea% o"t!"t - steady state0,ste! si&e
t5r - rise time from /67 of the ste! si&e to 867 of the ste! si&e
t5s - settling time from control start to the system staying within 97 of the steady state -
bigger bo"nd than in (ran%lin since o"r systems are often noisy.
Estimates
(or reference, first consider the estimates fo"nd in common te)tboo%s.
(ran%lin, Section :.;, gives
4! < e)!--!i1&eta,s$rt-/-&eta3200
t5r < 2.2,-&eta1wn0
t5s < ;.=,-&eta1wn0
>"o, Section ?-9, gives
4! < e)!--!i1&eta,s$rt-/-&eta3200
t5r < -/-6.;/=?1&eta.2.8/?1&eta320,wn for &eta@/
t5s < :.2,-&eta1wn0 for &eta@6.=8+ and t5s < ;.91&eta,wn for &etaA6.=8
#"r form"las for estimating these val"es areB
4! < e)!--!i1&eta,s$rt-/-&eta3200 for &eta@/+ and 4! < 6 for &etaA/
t5r < -/.2 - 6.;91&eta . 2.=1&eta320,wn for &eta@/.2+ and t5r < -;.?1&eta-/.20,wn for
&etaA/.2
t5s < -6.91log- -/-&eta320,;660 0,-&eta1wn0 for &eta@6.?+ and t5s < -=.=1&eta-/.=0,wn for
&etaA6.?
hese form"las were modified from earlier versions of the lab man"al, and it is easy to
see that their heritage traces bac% to >"oCs boo%. *owever, in !ractice, there were
consistent errors in the older form"las+ and these ca"sed certain bi&arre concl"sions in
st"dent lab re!orts.
herefore, better val"es were chosen thro"gh trial and error, according to two g"iding
!rinci!lesB the coefficients sho"ld be sim!le and the mis!rediction error sho"ld be small.
In order to hel! with this tas%, this 4atlab scri!t was written. It sim"lates a n"mber of
system &etas, determines 4!, t5r, and t5s for each &eta, and !lots the estimated and
observed val"es.
Matlab code:
7 Calc"late 4!, tr, and ts for 2nd order systems with fi)ed omega5n


clear
close all
clc

individ"al5!lots<6+ 7 select whether to ma%e individ"al !lots showing the observed
val"es

7&etas<D6.2B6.69B6.=, 6.?, 6.8, 6.8, /, /.2, /.9, 2E+ 7 Food re!resentation
&etas<6.2B6.62B/.=6/+ 7 GCom!leteG sam!ling
7&etas<6.=8B6.66/B6.?2+ 7 &oom in on tro"ble

wn</+ 7 Leave at /+ the relationshi! of wn is well %nown

sys<HI+
for i</Blength-&etas0
sysHiI<tf-wn1wn, D/, 21&etas-i01wn, wn1wnE0+ 7 omega5n</
end

Dy,tE<ste!-DsysHBIE, 6B6.6/B260+

7 Calc"late 4!
4!<ma)-y-B,B00-/+

7 Calc"late tr
7 /6 !ercent - same as in (ran%lin
sel6<logical-y-B,B0A<6./0+
sel/<logical-y-B,B0A<6.80+
t6<DE+
t/<DE+
tr<DE+
for i</Blength-&etas0
tm!6<t-sel6-B,i00+
tm!/<t-sel/-B,i00+
t6-i0<tm!6-/0+
t/-i0<tm!/-/0+
end
tr<t/-t6+

7 Calc"late ts
thresh<6.69+ 7 9 !ercent - bigger than in (ran%lin
sel<logical-abs-y-B,B0-/0A6.690+
ts<DE+
for i</Blength-&etas0
tm!<t-sel-B,i00+
ts-i0<tm!-length-tm!00+
end
ts+

7 Show the mar%ed !lots as !roof of !ro!er detection
if-individ"al5!lots0
for i</Blength-&etas0
fig"re
!lot-t,y-B,i0,C%-C0+
hold on+

7 Show the set !oint
!lot-D6 26E,D/ /E,C%BC0+

7 Show overshoot
!lot-D6 26E,D/.4!-i0, /.4!-i0E,CbBC0+

7 Show rise time
!lot-Dt6-i0 t6-i0E,D6 /.=E,CgBC, Dt/-i0 t/-i0E,D6 /.=E,CgBC, Dt6-i0 t/-i0E,D6.9 6.9E,CgBC0+

7 Show settling time
!lot-Dts-i0 ts-i0E,D6 /.=E,CrBC0+ 7D6 26E,D6.89 6.89E,CrBC, D6 26E,D/.69 /.69E,CrBC,

title-s!rintf-CJJ&eta<76.2fC, &etas-i000+
end
end 7if-individ"al5!lots0


7 Com!are observed val"es to lab val"es
fig"re+
th4!<DE+
for i</Blength-&etas0
if-&etas-i0@/0
th4!-i0<e)!--!i1&etas-i0,s$rt-/-&etas-i01&etas-i000+
else
th4!-i0<6+
end
end
!lot-&etas,4!,C%.C, &etas,4!,C%-C, &etas,th4!,Cb.C0+
title-C4! chec%C0+
legend-CobservedC, CobservedC, CestimatedC0+
)label-CJ&etaC0+
ylabel-C!ercent overshootC0+

fig"re+
thtr<DE+
for i</Blength-&etas0
if-&etas-i0@/.20
thtr-i0<-/.2-6.;91&etas-i0.2.=1&etas-i01&etas-i00,wn+
else
thtr-i0<-;.?1&etas-i0-/.20,wn+
end
end
!lot-&etas,tr,C%.C, &etas,tr,C%-C, &etas,thtr,Cb.C0+
title-Ct5r chec%C0+
legend-CobservedC, CobservedC, CestimatedC, CLocationC, CSo"thKastC0+
)label-CJ&etaC0+
ylabel-Crise time 1 Jomega5nC0+

fig"re+
thts<DE+
for i</Blength-&etas0
if-&etas-i0@6.?0
thts-i0<--6.9,&etas-i0,wn01log-6.66291-/-&etas-i01&etas-i000+
else
thts-i0<-=.=1&etas-i0 - /.=0,wn+
end
end
!lot-&etas,ts,C%.C, &etas,ts,C%-C, &etas,thts,Cb.C0+
title-Ct5s chec%C0+
legend-CobservedC, CobservedC, CestimatedC0+
)label-CJ&etaC0+
ylabel-Csettling time 1 Jomega5nC0+
Verification
*ere are some re!resentative !lotsB
*ere we see that the form"la for overshoot matches reality $"ite nicely. he small error
near &eta</.= is d"e to terminating the sim"lation at t<26, before the system had f"lly
risen to /.

*ere we see that the rise time form"la is acc"rate as well. here are slight im!erfections, b"t
the general trends are well !reserved.

*ere we see how the n"mber of large oscillations has a maLor effect on settling time.
(or &etaA6.?, no oscillations e)ceed /697 of the ste! si&e+ therefore, the settling times
rise smoothly as the dam!ing coefficient increases and slows the system res!onse. At
&eta<6.?, the first oscillation e)ceeds /697+ at &eta<6.;;, the second oscillation falls
below 897, and at &eta<6.:, the third brea%s over /697.
Beca"se of the com!le)ity which wo"ld be re$"ired to model each brea% e)actly, o"r
estimate sim!ly !rovides an "!!er bo"nd on the settling time. Also note that this gra!h
e)aggerates the magnit"de of the effect+ the c"rves at &eta<6.=8 and &eta<6.?6 loo%
$"ite similar+ their difference is almost negligible
LAB AS>B
Calc"late 4!, tr, and ts for 2nd order systems with fi)ed omega5n
(#M
N-s0,M-s0<2,-s32 . 2s .90
On<2.2:=
Peta<6.;;?2
r<6.:/+
s</.6;=9+-observed0
s</.;/+-estimated0
7os<6.2/9;
#bserved from Fra!hB
Interval for time rise<.:=-.6;
6.88c-t0<6.:82+

You might also like