Vehicle Lane Keeping using Model Predictive Control

November 2024 - December 2024


MPC Trajectory on un-smoothed circle track

Overview

This final project for my Model Predictive Control (MPC) class at UC Berkeley investigated trajectory tracking in autonomous vehicle lane keeping. My team and I aimed to create a controller that can maintain lane position through a winding road. Our main Deliverables were:

  • A ”Sense” function that returns reference

    position and trajectory to a track based

    on the car’s current velocity and position

  • A non linear dynamics model that takes

    vehicle parameters as inputs

  • Investigation of effects car parameters/

    track smoothness have on MPC

    performance (testing robustness)

MPC Trajectory on smoothed perfect circle track

Method

We simulated and tested the controller using Python. Pyomo and Ipopt were used extensively as tools to formulate optimization problems and solve non-linear convex optimization problems. We used a simple kinematics bicycle model to represent the vehicle and generated various tracks using python. We designed our optimization problem to minimize deviation from the reference trajectory as well as penalize excessive control inputs such as large accelerations and sharp steering angles.

MPC Trajectory on unsmoothed Random Track

Results

The results highlight the MPC controller’s strengths and limitations. On structured and predictable tracks like the perfect circle, the controller demonstrated excellent trajectory tracking and smooth control actions. The smoothed random track tested the controller’s adaptability, and its performance remained robust, handling moderate complexity with ease. However, the un-smoothed random track revealed limitations in handling abrupt changes in trajectory, with higher deviations and computational demands. Although these findings do suggest potential areas for improvement (refining the cost function, extending the prediction horizon, etc.), the un-smooth track we generated is an edge case with very sudden turns that simply might be past the limits of what we’d expect any vehicle to drive, especially considering the high velocity we are tracking.

Previous
Previous

Streimer Duct Lift

Next
Next

Magnetometer Chassis