This report details the design and evolution of a complete Adaptive Cruise Control (ACC) system, from initial dynamic modeling to a final implementation using Model Predictive Control (MPC).
The foundation of the project is a longitudinal vehicle dynamics model. The net force on the vehicle dictates its acceleration according to Newton's second law:
-
Rolling Resistance (
$F_{roll}$ ):$$F_{roll} = C_{rr} \cdot m \cdot g$$ -
Aerodynamic Drag (
$F_{aero}$ ):$$F_{aero} = 0.5 \cdot \rho \cdot C_d \cdot A \cdot V_{ego}^2$$
The control strategy evolved through several stages to meet performance requirements.
The initial controller was a standard PID designed to track a driver-set speed (
To handle multiple driving scenarios, a hierarchical architecture was developed using Stateflow. This high-level controller determines the operational mode (NoTarget or Following) and outputs the primary control objective: the desired acceleration (a_des_final).
- In
NoTargetmode,a_des_finalis calculated to achieve the driver's set speed. - In
Followingmode,a_des_finalis calculated to maintain a safe following distance based on the time-gap policy:$$D_{des} = D_{standstill} + T_{gap} \cdot V_{ego}$$
To robustly track the a_des_final command while respecting physical limits, the low-level PID was replaced with a Model Predictive Controller (MPC). The MPC's objective is to calculate the optimal propulsion force (
-
Prediction Model: The controller uses a discrete-time state-space model to predict future acceleration:
$$a_x(k+1) = A \cdot a_x(k) + B \cdot F_{prop}(k)$$ Where$k$ is the current time step,$a_x$ is the vehicle's actual acceleration, and$A, B$ are matrices derived from the linearized physical model. -
Optimization Problem: At each time step
k, the MPC calculates the optimal sequence of future force commands by minimizing a cost functionJ. This function balances tracking performance against passenger comfort (minimizing jerk).$$\min_{F_{prop}} J(k) = \sum_{i=1}^{N_p} w_{accel} (a_{x,pred}(k+i) - a_{des_final}(k+i))^2 + \sum_{i=0}^{N_c-1} w_{jerk} (\Delta F_{prop}(k+i))^2$$ Where:-
$(a_{x,pred} - a_{des_final})^2$ is the squared tracking error for acceleration. -
$(\Delta F_{prop})^2$ is the squared change in force, which penalizes jerk. -
$w_{accel}$ and$w_{jerk}$ are the tuning weights that define the trade-off between performance and comfort. This minimization is performed subject to the vehicle's physical constraints: $0 \le F_{prop} \le F_{max}$ $a_{min} \le a_x \le a_{max}$ $\Delta F_{min} \le \Delta F_{prop} \le \Delta F_{max}$
-
-
Receding Horizon Principle: The controller calculates the optimal plan over the future horizon but only implements the very first force command,
$F_{prop}(k)$ . At the next time step, it measures the new vehicle state and repeats the entire optimization to generate a new, updated plan. This makes the controller robust to real-world disturbances.
The final system architecture, a high-level Stateflow controller providing a reference to a low-level MPC, is robust, high-performing, and correctly models the advanced control strategies used in modern automotive applications. It successfully balances the logical complexity of mode-switching with the mathematical rigor of constrained, optimal control.