This project demonstrates the application of Model Predictive Control (MPC) to regulate the speed of a Porsche Taycan model under the influence of road slope disturbances. The primary goal is to test the robustness of the MPC algorithm when subjected to constant disturbances, such as varying road slopes, and evaluate its performance in achieving smooth control with minimal overshoot.
The dynamic model represents a car of mass
-
$C_d$ : Drag coefficient -
$A$ : Reference area -
$\rho$ : Air density -
$v$ : Speed
Additionally, the model incorporates the road slope
-
$m = 2140$ kg (mass of Porsche Taycan Turbo) -
$C_d \cdot A = 0.513$ m² (drag-area product) -
$\rho = 1.293$ kg/m³ (air density) - Max speed: 260 km/h
- Acceleration: 0–100 km/h in 3.2 s
To simulate a real-world response, a first-order actuator model with transfer function
The MPC algorithm is implemented using a nonlinear MPC object (nlmpc) in MATLAB. The architecture in Simulink comprises:
- A Nonlinear MPC block
- Repeating sequence blocks for speed reference and slope disturbances (
$\theta = 0^\circ$ ,$10^\circ$ ,$-10^\circ$ ) - The Porsche Taycan dynamic model
- A unit delay block for feedback of the last control input
- Output variable weight: 1
- Manipulated variable weight: 0
- Manipulated variable rate of change weight: 0.002
The simulation demonstrates smooth control with minimal overshoot under varying slopes. However, a steady-state error is observed during uphill or downhill conditions, a common limitation of traditional MPC. Future work will focus on addressing this issue by making the controller "offset-free."
This project is developed by Simone Bertoni. Learn more about my work on my personal website - Simone Bertoni - Control Lab.
For further communication, connect with me on LinkedIn.