主要内容

自适应巡航控制系统

使用模型预测控制器模拟自适应巡航控制

  • Library:
  • Model Predictive Control Toolbox / Automated Driving

  • 自适应巡航控制系统block

描述

The自适应巡航控制系统block simulates an adaptive cruise control (ACC) system that tracks a set velocity and maintains a safe distance from a lead vehicle by adjusting the longitudinal acceleration of an ego vehicle. The block computes optimal control actions while satisfying safe distance, velocity, and acceleration constraints using model predictive control (MPC).

要自定义控制器,例如使用高级MPC功能或修改控制器初始条件,请单击创建ACC子系统

端口

输入

展开全部

自我车辆速度设定点以m/s为单位。当没有铅车辆时,控制器会跟踪此速度。

Safe time gap in seconds between the lead vehicle and the ego vehicle. This time gap is used to calculate the minimum safe following distance constraint. For more information, see安全后距离

M/s的自我车辆速度。

铅车和自我车辆之间的距离。要计算此信号,请从铅车辆位置减去自我车辆位置。

Velocity difference in meters per second between lead vehicle and ego vehicle. To calculate this signal, subtract the ego vehicle velocity from the lead vehicle velocity.

Minimum ego vehicle longitudinal acceleration constraint in m/s2。当运行时最小加速度变化时,请使用此输入端口。

Dependencies

要启用此端口,请选择使用外部来源为了Minimum longitudinal acceleration范围。

M/S的最大自我车辆纵向加速约束2。当运行时最大加速度变化时,请使用此输入端口。

Dependencies

要启用此端口,请选择使用外部来源为了Maximum longitudinal acceleration范围。

Controller optimization enable signal. When this signal is:

  • 非零,控制器执行优化计算并生成一个纵向加速control signal.

  • Zero, the controller does not perform optimization calculations. In this case, the纵向加速output signal remains at the value it had when the optimization was disabled. The controller continues to update its internal state estimates.

Dependencies

要启用此端口,请选择使用外部信号启用或禁用优化范围。

Actual longitudinal acceleration in m/s2applied to the ego vehicle. The controller uses this signal to estimate the ego vehicle model states. Use this input port when the control signal applied to the ego vehicle does not match the optimal control signal computed by the model predictive controller. This mismatch can occur when, for example:

  • The自适应巡航控制系统不是主动控制器。当控制器不活跃时,保持准确的状态估计会阻止控制器活跃时控制信号中的凸起。

  • 加速执行器失败,并且没有为自我车辆提供正确的控制信号。

Dependencies

要启用此端口,请选择使用外部控制信号进行ACC和其他控制器之间的浮力转移范围。

Output

展开全部

M/S的加速控制信号2由控制器生成。

Parameters

展开全部

Parameters Tab

Ego Vehicle Model

从自我车辆纵向加速度到其纵向速度的线性模型,指定为LTI模型或线性系统识别工具箱模型。控制器通过增强自我车辆动态模型来创建其内部预测模型。

Programmatic Use

块参数:Egomodel
类型:string, character vector
Default:"tf(1,[0.5,1,0])"

Initial velocity in m/s of the ego vehicle model, which can differ from the actual ego vehicle initial velocity.

该值用于配置模型预测控制器的初始条件。有关更多信息,请参阅Initial Conditions

Programmatic Use

块参数:intialegovelocity
类型:string, character vector
Default:"20"

Minimum spacing in meters between the lead vehicle and the ego vehicle. This value corresponds to the target relative distance between the ego and lead vehicles when the ego vehicle velocity is zero.

该值用于计算以下内容:

Programmatic Use

块参数:默认空间
类型:string, character vector
Default:"10"

M/s的最大自我车辆纵向速度。

Programmatic Use

块参数:最大程度
类型:string, character vector
Default:“ 50”
Adaptive Cruise Controller Constraints

Minimum ego vehicle longitudinal acceleration constraint in m/s2

如果最小加速度随时间变化,请添加Minimum longitudinal acceleration通过选择到块的输入端口使用外部来源

Programmatic Use

块参数:微型电路
类型:string, character vector
Default:“ -3”

M/S的最大自我车辆纵向加速约束2

如果最大加速随时间变化,请添加Maximum longitudinal acceleration通过选择到块的输入端口使用外部来源

Programmatic Use

块参数:MaxAcceleration
类型:string, character vector
Default:“ 2”
模型预测控制器设置

控制器样本时间为几秒钟。

Programmatic Use

块参数:Ts
类型:string, character vector
Default:"0.1"

控制器预测范围步骤。控制器预测时间是样本时间和预测范围的乘积。

Programmatic Use

块参数:预测
类型:string, character vector
Default:"30"

闭环控制器性能。默认参数值提供了平衡的控制器设计。指定A:

  • 较小的值可以通过更平滑的控制动作产生更健壮的控制器。

  • Larger value produces a more aggressive controller with a faster response time.

当您修改此参数时,更改将立即应用于控制器。

Programmatic Use

块参数:ControllerBehavior
类型:string, character vector
Default:“ 0.5”

堵塞Tab

配置控制器在指定的最大迭代次数之后应用次优的解决方案,从而确保控制器的最差执行时间。

有关更多信息,请参阅次优QP解决方案

Dependencies

After selecting this parameter, specify the最大迭代编号范围。

Programmatic Use

块参数:suboptimal
类型:string, character vector
Default:“离开”

最大数量控制器优化迭代。

Dependencies

要启用此参数,请选择Use suboptimal solution范围。

Programmatic Use

块参数:maxiter
类型:string, character vector
Default:"10"

To add the启用优化input port to the block, select this parameter.

Programmatic Use

块参数:OptMode
类型:string, character vector
Default:“离开”

Select this parameter to add the外部控制信号输入端口到块。

Programmatic Use

块参数:TrackMode
类型:string, character vector
Default:“离开”

生成自定义ACC子系统,您可以为应用程序修改。自定义控制器的配置数据导出到MATLAB®工作空间是一个结构。

You can modify the custom controller subsystem to:

  • 修改默认MPC设置或使用高级MPC功能。

  • 修改默认控制器初始条件。

  • 使用不同的应用程序设置,例如距离定义后的自定义保险箱。

算法

展开全部

Extended Capabilities

C/C ++代码生成
Generate C and C++ code using Simulink® Coder™.

PLC Code Generation
使用Simulink®PLCCoder™生成结构化文本代码。万博1manbetx

Version History

Introduced in R2018a