The aim of this project was to autonomously control a Tesla Model 3 vehicle to follow a desired trajectory around a simulated track using various control systems.
To achieve this goal, I developed two distinct controllers. The first controller is a Proportional-Integral-Derivative (PID) system, which regulated the vehicle's speed. The PID controller's parameters were tuned to maintain optimal speed based on the real-time feedback from the vehicle's sensors.Â
The second, more complex controller implemented was the Infinite Horizon Linear Quadratic Regulator (LQR). LQR was chosen for its effectiveness in managing the steering of the vehicle, particularly useful in maintaining stability and accuracy in trajectory following through sharp and continuous turns. Both controllers were programmed in Python and deployed using Webots simulation software.
The performance of the controller was tested by measuring the maximum deviation from the center of the track which was 4 meters. The deviations happened primarily at the sharper turns. While this deviation from the path is below the limit, it shows that there is still room for improvement. To fix this problem the controller can be upgraded so that the car will slow down on its own when it approaches a turn and speed up on straight roads.
Demonstration Video
Performance Statistics