Automated Driving Using Model Predictive Control
Model predictive control (MPC) is a discrete-time multi-variable control architecture. At each control interval, an MPC controller uses an internal model to predict future plant behavior. Based on this prediction, the controller computes optimal control actions. For more information on model predictive control, seeMPC Design.
You can use MPC in automated driving applications to improve vehicle responsiveness while maintaining passenger comfort and safety. Applications can include:
Adaptive cruise control — For an example, seeAdaptive Cruise Control System Using Model Predictive Control.
Lane-keeping assist — For an example, seeLane Keeping Assist System Using Model Predictive Control.
Lane-following control — For an example, seeLane Following Control with Sensor Fusion and Lane Detection.
Parking — For an example, seeParallel Parking Using Nonlinear Model Predictive Control.
Obstacle avoidance — For an example, see使用自适应Mod避障el Predictive Control.
MPC has several features that are useful for automated driving.
MPC Feature | Description | More Information |
---|---|---|
Explicitly handle input and output constraints | When computing optimal control moves, an MPC controller accounts for any input and output constraints on the system. For example, you can specify constraints for:
|
|
Predict ego vehicle behavior across a receding horizon | An MPC controller uses an internal model of the vehicle dynamics to predict how the vehicle will react to a given control action across a prediction horizon. This behavior is analogous to a human driver understanding and predicting the behavior of their vehicle. | |
Preview reference trajectories and disturbances across prediction horizon | If you can anticipate reference trajectories or disturbances across the prediction horizon, an MPC controller can incorporate this information when computing optimal control actions. This behavior is analogous to a human driver previewing the road ahead of their vehicle. | Signal Previewing |
Update internal vehicle model at run time | If the dynamics of the ego vehicle vary over time, such as for velocity-dependent steering dynamics, you can update the controller internal model using adaptive MPC. | Adaptive MPC |
Generate code | You can automatically generate code for deploying model predictive controllers. | 生成代码和部署控制器实时Targets |
Simulation in金宝app
To simplify the initial development of automated driving controllers, Model Predictive Control Toolbox™ software provides Simulink®blocks for adaptive cruise control, lane-keeping assistance, and path following. These blocks provide application-specific interfaces and options for designing an MPC controller.
Block | Description |
---|---|
Adaptive Cruise Control System | Track a set velocity and maintain a safe distance from a lead vehicle by adjusting the longitudinal acceleration of an ego vehicle. |
Lane Keeping Assist System | Keep an ego vehicle traveling along the center of a straight or curved road by adjusting the front steering angle. |
Path Following Control System | Keep an ego vehicle traveling along the center of a straight or curved road while tracking a set velocity and maintaining a safe distance from a lead vehicle. To do so, the controller adjusts both the longitudinal acceleration and front steering angle of the ego vehicle. |
For other automated driving applications, such as obstacle avoidance, you can design and simulate controllers using the other model predictive control Simulink blocks, such as theMPC Controller,Adaptive MPC Controller, andNonlinear MPC Controllerblocks. For an example that uses an adaptive model predictive controller, see使用自适应Mod避障el Predictive Control.
Controller Customization
For theAdaptive Cruise Control System,Lane Keeping Assist System, andPath Following Control Systemblocks, you can generate a custom subsystem, which you can then modify for your application. This option is useful when you want to:
Modify default MPC settings or use advanced MPC features
Modify the default controller initial conditions
Use different application settings, such as a custom safe following distance definition for adaptive cruise control
To create a custom subsystem, click the corresponding button for the block you are using. For example, to create a custom subsystem for anAdaptive Cruise Control Systemblock, on theBlocktab, clickCreate ACC subsystem. The software creates a Simulink model that contains a subsystem with the same configuration as your original controller. You can modify this subsystem and directly substitute it back into your original model, replacing the controller block.
Integration withAutomated Driving Toolbox
If you have Automated Driving Toolbox™ software, you can integrate your model predictive controller with systems for:
Object detection and tracking
Lane boundary detection
Path planning
Sensor fusion
For examples, see:Adaptive Cruise Control with Sensor Fusion,Lane Keeping Assist with Lane Detection, andLane Following Control with Sensor Fusion and Lane Detection.