« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Enhanced Control Systems
Design a Vehicle Crash Controller for an Automated Highway System
Design a PID controller to maintain the specified relative speed between two automobiles and guide the active vehicle as commanded.
The automobile system model.
In[1]:=
X
autoSystem = TransferFunctionModel[Unevaluated[{{1./((s + 2) (8.3 + s))}}], s, SamplingPeriod ->None, SystemsModelLabels -> None];
A PID controller for the system.
In[2]:=
X
pid = PIDTune[autoSystem, {"PID", "KappaTau"}, "PIDData"];
Model the prescribed constant relative speed as a step reference and simulate the response of the closed-loop system.
In[3]:=
X
OutputResponse[pid["ReferenceOutput"], UnitStep[t], {t, 0, 1.5}];
In[4]:=
X
OutputResponse[pid["ReferenceOutput"], UnitStep[t], {t, 0, 1.5}];; Plot[%, {t, 0, 1.5}, PlotRange -> All]
Out[4]=