« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Enhanced Control Systems
Design a PID Liquid Level Controller for a Boiler
Compute a two-degree-of-freedom PID controller that can maintain a desired liquid level for a drum boiler.
Enter the models.
In[1]:=
X
{valve, boiler} = {TransferFunctionModel[ Unevaluated[{{1.2/(0.8 s + 1)}}], s, SamplingPeriod ->None, SystemsModelLabels -> {{None}, {None}}], TransferFunctionModel[ Unevaluated[{{(0.1 (1 - 2 s))/(s (5 s + 1))}}], s, SamplingPeriod ->None, SystemsModelLabels -> {{None}, {None}}]};
Obtain the two-degree-of-freedom controller.
In[2]:=
X
pid2dof = PIDTune[SystemsModelSeriesConnect[valve, boiler], "PID", "PIDData", PIDFeedforward -> 0.5];
The response of the closed-loop system to a set point change of 5.
In[3]:=
X
level = OutputResponse[pid2dof["ReferenceOutput"], 5 UnitStep[t], {t, 0, 65}];
In[4]:=
X
Plot[{level, 5 UnitStep[t]}, {t, 0, 65}, PlotRange -> All]
Out[4]=