Professional Documents
Culture Documents
Group:
37
Pg. No
2
16
17
Results
andDiscussion:
a)Weassumethatsecondordertranferfunctionsinparallelcanbeaddedjustlikefirstorder
transferfunctionsinparallel.Inordertoverifythishypothesis,weusedtheparameters
providedfortheprojectonsimulinkandcomparedtheresultingplotswiththeplotsobtained
bysummingthetransferfunctions.Thehypothesiswasverified.
Therefore,thefollowingtransferfunctionresults:
2 2
2 2
1
s
+
2
s+1
(
)( 2 s + 2 2 2 s+1)
1 1
2 2
( 1 s +2 1 1 s+1)
K 1 ( s + 2 2 2 s+1 ) K 2
G ( s )=G 1 ( s ) +G 2 ( s ) =
2 2
2
2 2
M
Forstepinput, U ( s )= s
2 2
( 1 s +2 1 1 s +1)( 2 s +2 2 2 s +1)
2 2
s ( 2 K 1 1 K 2) +s ( 2 2 2 K 12 1 1 K 2 ) + K 1K 2
Y ( s )=G ( s ) U ( s )=
Aninverseresponseoccurswhentheresponsefunctioncontainsarighthalfplanezero.A
righthalfplanezerooccurswhentherootofthenumeratorhasapositiverealpart.
Let
( 1 s +2 1 1 s +1)( 22 s2 +2 2 2 s +1)
2
s A + sB+C
Y ( s )=
2 2
2
2
with A= 2 K 1 1 K 2 ; B=2 2 2 K 12 1 1 K 2 ; C=K 1K 2
Usingthequadraticformula,
s=
B B24 AC
2A
Forarighthalfplanezerotooccur,oneofthefollowingconditionshavetobesatisfied:
1. If
B2 4 AC 0
B+ B 24 AC
B B 24 AC
>0
>0
,then
and
2A
2A
2. If
B2 4 AC <0
B
,then 2 A >0
Aftermuchmanipulation(seeappendixAforthemanipulationcharts),werequirethe
followingtoholdfortheretobeaninverseresponseifcondition1aboveweresatisfied:
i.
22 K 2 1 2 2 K 2
> >
>
1 1
K1
21 K 1
ii.
22 K 2 1 2 2 K 2
< <
<
1 1
K1
21 K 1
iii.
22 K 2 2 2
< <
21 K 1 1 1
2 K2 22
> >
2
1 K1 11
iv.
Similarly,werecondition2abovesatisfied,thefollowingwouldhavetoholdfortheretobe
aninverseresponse:
i.
22 K 2 2 2
< <
21 K 1 1 1
ii.
22 K 2 2 2
> >
21 K 1 1 1
Weverifytheaboveconditionsfortheparametersetprovidedinalaterpart.
K1
ParameterSet
1
2
3
4
3
3
4
4
K2
2
2
2.5
2
2.000
2.000
5.099
3.606
1.732
1.732
2.646
2.646
1.750
2.750
0.196
0.139
1.732
0.866
0.189
0.945
Table 1
b)
Thefollowingplotsaregeneratedforsecondordertransferfunctionsinparallelwiththe
abovementionedparametersets(theassociatedsimulinkblockdiagramsandmatlabcodes
havebeenaddedtoappendixB):
Figure 1
Weobserveherethatforparameterset2andparameterset3,aninverseresponseisobtained.
Wefindthisanopportunemomenttoverifythattheconditionsderivedin1(a)dohold.
Forthecaseofparameterset2,thedeterminant
B2 4 AC >0
.Thisfallsundercondition
2 K2 22
1mentionedin1(a). 2 > K > isobservedtoholdsince
1
1 1
1
22
K 0.67 2 2
=0.75, 2 =
=0.27 therbyverifyingourresult.
2
K1
1 1
1
Forthecaseofparameterset3,thedeterminant
B2 4 AC >0
.Thisfallsundercondition
22 K 2 1 2 2 K 2
1mentionedin1(a). 2 < K < < K isobservedtoholdsince
1
1 1
1
1
22
K 0.63 2 2
=0.27, 2 =
=0.50 therbyverifyingourresultagain.
2
K1
1 1
1
c)Forparameterset1,theoutputresponseissimilartothatofaFirstOrdertransferfunction,
hencethefirstorderstepresponseestimationmaybeused.
Figure 2
FromtheplotobtainedbyMatlab,63.2%oftheresponsewasroughlyobservedatt=8and
maximum response was Y=1, hence we can approximate the process with a first order
1
transferfunctionmodelwith =8andK=1,i.e. G ( s )= 8 s+ 1
Forparameterset2,
Fromtheresponsecurve,itcanbeseenthatitresemblesastepresponseofasecondorder
process with numerator dynamics. Therefore, the Balaguer, Alfaro and Arrietas Method
(2011)willbeused.MaximumresponseisK=1andatY=0.47,t 47%=18,atY=0.9,t90%=
37.Atminimumpoint,yp%=0.63,tp=5.
T 1 =0.6(t90%t47%)=0.6(3718)=11.4,
b =1
1 y p
e
t 'p
=1
1(0.63)
=1.5274
e5 /11.4
Fromfigure4,m=1.0888,n=1.4900
t '47 n
a =
=0.0816
m
Figure 3
Forparameterset3,weusetheempiricalmodelingpresentedbyDincel(EmreDincel,2013).
Thechoiceofthemodelisaconsequenceofthenatureofthestepresponseforparameterset
3,ascanbeseeninfigure1.Wehaveaninverseresponseinitiallyandasinusoidalresponse
afterthat.WeobservethattheDincelmodelcancaptureboththosefeatures.Thefollowing
parametersareevaluatedandasfollows:
Parameters
Formula
Value
Mp
y2 yf
y f y1
1.0947
ln(Mp )
2 +
ln( Mp)
n
tz
0.0288
( t 4 t 2 ) 1
0.2857
t 3 t 1
8.9313
t z 1 2
t z 1
sin( n )
t
( n )e
cos
2
+ 1
n
n2
z
yf
t 1 t 0
0.0842
1.4540
0
Table 2
ln( Mp) 2
+
NotethatDincelsmodelhasthefollowingformulafor :
.Thenegative
ln( Mp)
=
signinthemodelwasusedbecauseDincelsmodelhasavalueof Mp lessthan1.
Therefore,thenegativesignisusedsothatapositivevalueresultsforthedamping
coefficient, . However,ourresponsewassuchthatthevalueof Mp wasgreaterthan
1therebyrenderingthenegativesignredundantforouradoption.
ThetransferfunctionusingtheDincelmodelparametersisasfollows:
0.2857
2
s + 2(0.0288)(0.2857)s+
sL
K ( zs ) e
1.4540 ( 0.0842s )
G ( s )= 2
=
2
s +2 s+
n
Usingtheaboveinformation,weobtainthefollowingplotsinthetimedomain(associated
codesinappendixC):
Figure 4
TheprimaryreasonforusingtheDimcelmodelwastoincorporateboththefeaturesof
inverseinitialresponseandsinusoidalresponse.However,weobservethefitofthemodelis
notveryclosetotheresponsedatawhichisatradeoffwemustacceptinordertohavea
modelincorporatingtheabovementionedfeatures.
Forparameterset4,fromthefigure1,itcanbeseenthatitissimilartoanunderdamped
K
secondorderprocesswiththeformG(s)= 2 s2 +2 s+1 .Thepeaksoftheoscillationare
welldefinedandhavearoughlyconstantperiod.Hence,thetransferfunctionmodelcanbe
approximatedbyfindingtheovershootandperiod.Inthiscase,steadystategain,K=2.OS
4.652
=1.325andPeriod 3412=22.Sinceovershootwasfoundtobemorethan
2
1,resultinginanunstablestepresponse,thedecayratiowillbeusedinsteadtoapproximate
theparameters.Decayratio,DR=(3.12)/2.65=0.4151.AsDR=exp (2 1
and
2
Period= 1 2 ,solvingsimultaneouslyweget, =0.1386and =3.468.Thus,the
transfer function model to describe the step response of parameter set 4 is G(s)=
2
12.02 s +0.9613 s +1 .
2
Figure 5
10
:
d)Fortheregressionoftransferfunctionmodelstoobtaintherelevantparameters,thesame
method illustrated below has been applied to all 4 parameter sets achieve nonlinear
regression.First,anappropriatetransferfunctionmodelisselectedfromtheprovidedonesin
theproblemset.Next,thestepresponsefunction'sformulabasedontheselectedtransfer
function model is calculated in EXCEL based on the same time intervals used in the
SIMULINK simulation. Then, plots of both the SIMULINK function and the selected
functionaremappedonthesamemap.Finally,thesumofsquaredeviationbetweenboth
plotsiscalculated,andtheEXCEL'sSolverfunctionisusedtoobtaintheparameterswiththe
minimumsquaredeviationsum.
Simulink
Regressed plot
Figure 6
Forparameterset1,themodeltransferfunctionmodelselectedisthefirstordermodel.From
theEXCELSolverfunction,theregressedplotcanbeobtainedwhenK=1.005, =
9.452.Hencethetransferfunctionmodelforthissetderivedfromnonlinearregressionis
G ( s )=
1.005
9.452 s+1 .
Fig2:RegressionforParameterset2 Fig3:RegressionforParameterset3
11
Forsecondordernumeratordynamics,thegeneraltransferfunctioncanbeexpressedinthe
timedomainas
1
e
y (t)=K+ K [ a ]
2
1
(t )
)}
t
sin 1
K e
(t)
cos
1 2 (t )
UsingMATLAB,regressionwascarriedoutforParametersset2and3andthepredefined
functionusedforthiswaslsqcurvefit.Thisfunctionusesleastsquareregressionmethodto
obtainthemodelparametersandthedetailedMATLABcodesusedforthisareprovidedin
theAppendix.Table3showsthevaluesofparametersobtainedandtheinitialguesses
providedinMATLABtoobtaintheseparameters.
Parameter
Parameter
set2
0.9905
6.5745
set3
1.5978
4.5368
v ( 3 )= a
3.6323
5.5765
v ( 4 )=
0.9969
0.1377
v ( 5 )=
12.6253
8.2649
v(1)=K
v(2)=
InitialGuess
providedin
[3;3;3;3;3]
[3;3;3;3;3]
MATLAB
Table 3: Parameters for noise free response regression
12
Forparameterset4,
Simulink
Regressed plot
Figure 9
Themodeltransferfunctionmodelselectedisthesecondordermodel.FromtheEXCEL
Solverfunction,theregressedplotcanbeobtainedwhenK=2.0786, =3.3924, =
0.14821.Hencethetransferfunctionmodelforthissetderivedfromnonlinearregressionis
2.0786
G(s)= 11.5084 s 2 +1.0056 s+ 1 .
e)
Noisyresponses:
13
Astheempiricalmodelsinvolvesthereadingoffofspecificpointsfromthegraphs,the
transferfunctionmodelsobtainedfornoisyresponsewouldbesimilartotheonesobtained
fornoisefreeresponseasthesimilarpointswouldbeused.
Usingnonlinearregression,theparametersobtainedarealsoverysimilarbetweennoisyand
noisefreeresponse.Thisisduetotherelativelylownoiselevelof5%.Thesamemethodin
parts(c)and(d)isemployedtofindtherelevantparametersaswell.Thesamemodelswere
alsousedforeachparametersetsaswell.
Empiricalmethodsfornoisyresponse:
Forempiricalmethodwithnoise,thesamemethodsusedinpartcareappliedhereaswell.
For parameter set 1,
From the plot obtained by Matlab, 63.2% of the response was roughly observed at t=11 and
maximum response was Y=1.0662, hence we can approximate the process with a first order
1.0662
transfer function model with =11 and K=1.0662, i.e. G ( s )= 11 s +1
Figure 10
14
The Balaguer, Alfaro and Arrietas Method (2011) will be used again. Maximum response is
K=1.0651 and at Y= 0.47*1.0651, t 47% = 20.3, at Y= 0.9*1.0651, t 90% = 41. At minimum
point, yp%= 0.6643, tp= 6.4.
T 1 = 0.6(t90%-t47%) = 0.6(41-20.3) = 12.42,
b =1-
1 y p
e
t 'p
= 1-
10.6643
e6.4 /12.42
= 0.4381
20.3
0.4495
12.42
0.8412
=1.4086
The process with parameter set 2 can thus be described using the function,
K ( T 3 s+1 )
G(s)= ( T s+ 1 )( T s +1 )
1
2
(5.4409 s+1 )
= ( 12.42 s +1 ) (17.4953 s+1 )
(5.4409 s+1 )
217.292+29.9153 s+1
Figure 11
Forparameterset3,
15
Figure 12
s +2 n s+ n
Forparameterset4,
Simulink(noise)
Empirical(noise)
Figure 13
16
Simulink(noise)
Regressed plot(noise)
Figure 14
Forparameterset1,usingtheEXCELSolverfunction,regressedplotcanbeobtainedwhen
K=1, =9.0126.Hencethetransferfunctionmodelforthissetderivedfromnonlinear
1
regressionis G ( s )= 9.0126 s+ 1 .
Parameters2and3
17
Usingthesamemethodofregressionwiththesameinitialguesses,theparameterswere
obtainedfornoisyresponse.Table4showsthevaluesofparametersobtainedandtheinitial
guessesprovidedinMATLABtoobtaintheseparametersfornoisyresponse.
Parameterset2
v(1)=K
v(2)=
Parameterset3
0.9930
5.9983
1.5733
4.6826
v ( 3 )= a
3.1536
6.4763
v ( 4 )=
1.0781
0.1425
v ( 5 )=
12.4878
7.9149
InitialGuessprovidedin
MATLAB
[3;3;3;3;3]
[3;3;3;3;3]
Forparameterset4,usingtheEXCELSolverfunction,theregressedplotcanbeobtained
whenK=2.0751, =3.0044, =0.1400.Hencethetransferfunctionmodelforthis
2.0751
setderivedfromnonlinearregressionisG(s)= 9.0264 s 2+ 0.8412 s+1
Conclusion:
18
Weobservedthatinordertofitempiricalmodelstoresponses,acertaintradeoffhadtobe
madebetweenthefitofthemodelandthefeaturesexemplifiedbythem.Regressionmethods
seemedtoprovideabetterfitbutthenonlinearregressionisveryspecificforeachresponse.
Furthermore,extrapolationmustbedoneverycautiously.However,carewastakentoregress
the response until steady state was achieved thereby deeming extrapolation unnecessary
althoughsuchmaynotbethecasewithreallifemodels.Noiseofasmallmagnitudedidnot
heavilyinfluncetheresults.Albeitwithasmallsamplesize,ourhypothesisfrompart1(a)
wasverified.
APPENDIX B
19
The block diagrams for the 4 sets of parameters were done with their respective coefficients
on Simulink
Simulink Display:
After setting the stop time at 100.0 and running the Simulink simulation. The following
Matlab commands were used:
hold on;
grid on;
plot(t,h); plot(t,h1,'r'); plot(t,h2,'g'); plot(t,h3,'y')
title('Plot of process reponses against time'); xlabel('t'); ylabel('Y')
legend('set 1','set 2','set 3','set 4')
APPENDIXC:
20
FormodellingofParameter2(nonoise)usingBAAmethod:
RegressionforParameters2and3:
Forsecondordernumeratordynamics
functiony=SOND(v,t)
%v(1)=K
%v(2)=tau
%v(3)=taua
%v(4)=eta
%v(5)=theta
y=v(1)+v(1).*(v(3)v(2).*v(4)).*(1./(v(2).*sqrt(1(v(4)).^2)).*exp(v(4).*(t
v(5))./v(2)).*...
sin(sqrt(1(v(4)).^2).*(tv(5))./v(2)))...
21
v(1).*exp(v(4)./v(2).*(tv(5))).*cos(sqrt(1(v(4)).^2)./v(2).*(tv(5)));
end
ForParameter2:
v=lsqcurvefit(@SOND,[3;3;3;3;3],t,h1)
ymodel=SOND(v,t);
plot(t,ymodel,t,h1,'r')
ForParameter3
v=lsqcurvefit(@SOND,[3;3;3;3;3],t,h2)
ymodel=SOND(v,t);
plot(t,ymodel,t,h2,'r')
FormodellingofParameter2(noisyresponse)usingBAAmethod:
22
23