« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Enhanced Control Systems
Connecting Time-Delay Systems
When two time-delay systems are connected in series, the delays can sum in the resulting system.
In[1]:=
X
{tfm, ssm} = {TransferFunctionModel[ Unevaluated[{{E^(-5 s)/(1 + 2 s)}}], s, SamplingPeriod ->None, SystemsModelLabels -> None], StateSpaceModel[{{{0, 1}, {-3, -(2/3)}}, {{0}, {SystemsModelDelay[ 7/3]}}, {{1, 0}}, {{0}}}, SamplingPeriod ->None, SystemsModelLabels -> None]};
In[2]:=
X
series = SystemsModelSeriesConnect[tfm, ssm] // Simplify
Out[2]=
In[3]:=
X
Plot[Evaluate[ Table[OutputResponse[sys, UnitStep[t], {t, 0, 20}], {sys, {tfm, ssm, series}}]], {t, 0, 20}, PlotLegends -> {"tfm", "ssm", "series"}]
Out[3]=
Time delays can sum in a feedback connection as well.
In[4]:=
X
feedback = SystemsModelFeedbackConnect[ssm, tfm] // Simplify
Out[4]=
In[5]:=
X
Plot[Evaluate[ Table[OutputResponse[sys, UnitStep[t], {t, 0, 20}], {sys, {tfm, ssm, feedback}}]], {t, 0, 20}, PlotLegends -> {"tfm", "ssm", "feedback"}]
Out[5]=