Bicycle Model of a Buggy Car

For my Linear Control Systems Class we were tasked with designing a controller in python in order to keep a CMU Buggy Car to follow a preplanned trajectory (position graph in blue).  Minor amounts of noise was added to the system for the controller to be tested.  The velocity along the trajectory (xd graph) was up to the user and the departure from the lane (y, minDist graph) was to be kept under 6.  The controller could only change the rate of the wheels turn (deltad, graph not shown) and the Force (F graph) applied.  The controller to stay in the lane was a Linear Quadratic Regulator and the controller to control the velocity was a proportional integral derivative controller.  In addition, bang bang control was used to get the buggy started and around the sharpest turn.

Controller Figure