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]:=
Click for copyable input
A PID controller for the system:
In[2]:=
Click for copyable input
Model the prescribed constant relative speed as a step reference and simulate the response of the closed-loop system:
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
Out[4]=