« View all new features in
Mathematica
9
◄
previous

next
►
New in
Mathematica
9
›
Enhanced Control Systems
Design a Smith Predictor for a Tank Reactor
An isothermal continuous stirredtank reactor (CSTR) can be modeled by a firstorderplustimedelay system.
In[1]:=
X
reactor = TransferFunctionModel[Unevaluated[{{E^(\[Delta] s)/(1 + s)}}], s, SamplingPeriod >None, SystemsModelLabels > None];
Designing a PI controller with the delay set to zero results in an unstable closedloop system.
In[2]:=
X
pi = PIDTune[reactor /. \[Delta] > 0, "PI"]; closedloop = SystemsModelFeedbackConnect[SystemsModelSeriesConnect[pi, reactor]]
Out[2]=
In[3]:=
X
pi = PIDTune[reactor /. \[Delta] > 0, "PI"]; closedloop = SystemsModelFeedbackConnect[SystemsModelSeriesConnect[pi, reactor]]; OutputResponse[closedloop /. \[Delta] > 2, UnitStep[t  1], {t, 0, 12}]; Plot[%, {t, 0, 12}, PlotRange > All, ImageSize > Medium]
Out[3]=
Use
SmithDelayCompensator
to create a stabilizing controller for the timedelay system.
In[4]:=
X
smith = SmithDelayCompensator[reactor, pi]; closedloopSmith = SystemsModelFeedbackConnect[ SystemsModelSeriesConnect[smith, reactor]]
Out[4]=
In[5]:=
X
smith = SmithDelayCompensator[reactor, pi]; closedloopSmith = SystemsModelFeedbackConnect[ SystemsModelSeriesConnect[smith, reactor]]; OutputResponse[closedloopSmith /. \[Delta] > 2, UnitStep[t  1], {t, 0, 12}]; Plot[%, {t, 0, 12}, PlotRange > All, ImageSize > Medium]
Out[5]=