Back to projects
MPC Cruise Controller for a Car

EPFL · Model Predictive Control

MPC Cruise Controller for a Car

A Model Predictive Control mini-project (EPFL, Prof. Colin Jones) building a cruise controller for a car on a highway. The car follows a kinematic bicycle model whose state is (x, y, θ, V) and input (δ, uT), with longitudinal forces Fmotor, Fdrag = ½ρCd·Af·V² and Froll = Cr·m·g. I derived the Jacobians A = ∂f/∂x and B = ∂f/∂u analytically to linearize the dynamics about a steady-state cruising point.

Because steering barely couples to speed near cruise, the system splits into a longitudinal controller (velocity via throttle) and a lateral one (position and heading via steering), each a smaller QP. Both were designed for recursive constraint satisfaction: input constraints on δ and uT, a quadratic cost with state weight Q and input weight R (a smaller R longitudinally to allow crisp throttle, a larger position weight laterally), a 5-second prediction horizon, and a terminal set Xf computed as a maximal invariant set with terminal weight Qf to guarantee stability and feasibility.

To reject persistent disturbances (wind, slope), I augmented the longitudinal model with a disturbance state and built a Luenberger-style observer that estimates state and disturbance together; feeding that estimate into the MPC prediction gives offset-free tracking. On a 15-second nonlinear simulation with a step reference from 80 to 120 km/h, velocity and lateral references were tracked accurately, all constraints held, and the estimator converged quickly to the true disturbance.

Model Predictive ControlOptimizationLinearizationState EstimationMATLAB
Imane Jennane · Robotics & Computer Vision Engineer