自适应巡航控制系统
使用模型预测控制器模拟自适应巡航控制
- Library:
Model Predictive Control Toolbox / Automated Driving
描述
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
非负标量
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安全后距离。
Longitudinal velocity
— Ego vehicle velocity
非负标量
M/s的自我车辆速度。
相对距离
— Distance between lead vehicle and ego vehicle
正标量
铅车和自我车辆之间的距离。要计算此信号,请从铅车辆位置减去自我车辆位置。
Relative velocity
— Velocity difference between lead vehicle and ego vehicle
scalar
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 longitudinal acceleration
- 最低自我车辆加速
负标量
Minimum ego vehicle longitudinal acceleration constraint in m/s2。当运行时最小加速度变化时,请使用此输入端口。
Dependencies
要启用此端口,请选择使用外部来源为了Minimum longitudinal acceleration范围。
Maximum longitudinal acceleration
- 最大自我车辆加速
正标量
M/S的最大自我车辆纵向加速约束2。当运行时最大加速度变化时,请使用此输入端口。
Dependencies
要启用此端口,请选择使用外部来源为了Maximum longitudinal acceleration范围。
启用优化
- 控制器优化启用信号
scalar
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
要启用此端口,请选择使用外部信号启用或禁用优化范围。
外部控制信号
- 适用于自我车辆的纵向加速度
scalar
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
纵向加速
- 加速控制信号
scalar
M/S的加速控制信号2由控制器生成。
Parameters
Parameters Tab
Ego Vehicle ModelLinear model from longitudinal acceleration to longitudinal velocity
- 自我车辆模型
tf(1,[0.5,1,0])
(默认)|LTI模型|线性系统标识工具箱™模型
从自我车辆纵向加速度到其纵向速度的线性模型,指定为LTI模型或线性系统识别工具箱模型。控制器通过增强自我车辆动态模型来创建其内部预测模型。
Programmatic Use
块参数:Egomodel |
类型:string, character vector |
Default:"tf(1,[0.5,1,0])" |
纵向速度的初始条件
- 自我车辆模型的初始速度
20
(默认)|非负标量
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 to lead vehicle
10
(默认)|非负标量
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.
该值用于计算以下内容:
Minimum safe following distance. For more information, see安全后距离。
控制器初始条件。有关更多信息,请参阅Initial Conditions。
Programmatic Use
块参数:默认空间 |
类型:string, character vector |
Default:"10" |
Maximum velocity
- 最大纵向速度
50
(默认)|正标量
M/s的最大自我车辆纵向速度。
Programmatic Use
块参数:最大程度 |
类型:string, character vector |
Default:“ 50” |
Minimum longitudinal acceleration
- 最低自我车辆加速
-3
(默认)|负标量
Minimum ego vehicle longitudinal acceleration constraint in m/s2。
如果最小加速度随时间变化,请添加Minimum longitudinal acceleration通过选择到块的输入端口使用外部来源。
Programmatic Use
块参数:微型电路 |
类型:string, character vector |
Default:“ -3” |
Maximum longitudinal acceleration
- 最大自我车辆加速
2
(默认)|非负标量
M/S的最大自我车辆纵向加速约束2。
如果最大加速随时间变化,请添加Maximum longitudinal acceleration通过选择到块的输入端口使用外部来源。
Programmatic Use
块参数:MaxAcceleration |
类型:string, character vector |
Default:“ 2” |
Sample time
- 控制器样本时间
0.1
(默认)|正标量
控制器样本时间为几秒钟。
Programmatic Use
块参数:Ts |
类型:string, character vector |
Default:"0.1" |
Prediction horizon
- 控制器预测范围
10
(默认)|positive integer
控制器预测范围步骤。控制器预测时间是样本时间和预测范围的乘积。
Programmatic Use
块参数:预测 |
类型:string, character vector |
Default:"30" |
Controller behavior
- 闭环控制器性能
0.5
(默认)|scalar between0
和1
闭环控制器性能。默认参数值提供了平衡的控制器设计。指定A:
较小的值可以通过更平滑的控制动作产生更健壮的控制器。
Larger value produces a more aggressive controller with a faster response time.
当您修改此参数时,更改将立即应用于控制器。
Programmatic Use
块参数:ControllerBehavior |
类型:string, character vector |
Default:“ 0.5” |
堵塞Tab
Use suboptimal solution
- 在指定的迭代次数之后应用次优的解决方案
离开
(默认)|上
配置控制器在指定的最大迭代次数之后应用次优的解决方案,从而确保控制器的最差执行时间。
有关更多信息,请参阅次优QP解决方案。
Dependencies
After selecting this parameter, specify the最大迭代编号范围。
Programmatic Use
块参数:suboptimal |
类型:string, character vector |
Default:“离开” |
最大迭代编号
— Maximum optimization iterations
10
(默认)|positive integer
最大数量控制器优化迭代。
Dependencies
要启用此参数,请选择Use suboptimal solution范围。
Programmatic Use
块参数:maxiter |
类型:string, character vector |
Default:"10" |
使用外部信号启用或禁用优化
— Add port for enabling optimization
离开
(默认)|上
To add the启用优化input port to the block, select this parameter.
Programmatic Use
块参数:OptMode |
类型:string, character vector |
Default:“离开” |
使用外部信号无扰之间的转移ACC and other controllers
- 添加外部控制信号输入端口
离开
(默认)|上
Select this parameter to add the外部控制信号输入端口到块。
Programmatic Use
块参数:TrackMode |
类型:string, character vector |
Default:“离开” |
创建ACC子系统
- 创建自定义控制器
button
生成自定义ACC子系统,您可以为应用程序修改。自定义控制器的配置数据导出到MATLAB®工作空间是一个结构。
You can modify the custom controller subsystem to:
修改默认MPC设置或使用高级MPC功能。
修改默认控制器初始条件。
使用不同的应用程序设置,例如距离定义后的自定义保险箱。
Model Examples
算法
安全后距离
By default, the model predictive controller computes the safe following distance constraint; that is, the minimum relative distance between the lead and ego vehicle, as:
Here:
DS是个默认间距范围。
GT是个时间空隙输入信号。
VE是个Longitudinal velocity输入信号。
要定义其他安全的以下距离约束,请在堵塞tab, clicking创建ACC子系统。
Initial Conditions
By default, the model predictive controller assumes the following initial conditions:
自我车辆和铅车的纵向速度等于纵向速度的初始条件parameter value.
Ego vehicle longitudinal acceleration is zero.
领先车辆和自我车辆之间的相对距离是:
Here:
DS是个默认间距范围。
GT是时间差距,被认为是
1.4
。VE是个Initial longitudinal velocity范围。
If the initial conditions in your model do not match these conditions, the纵向加速output can exhibit an initial bump at the start of the simulation.
要修改控制器初始条件以匹配您的模拟,请在堵塞tab, clicking创建ACC子系统。
Extended Capabilities
C/C ++代码生成
Generate C and C++ code using Simulink® Coder™.
PLC Code Generation
使用Simulink®PLCCoder™生成结构化文本代码。万博1manbetx
Version History
matlab명령
다음matlab명령명령해당링크를했습니다했습니다。
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
选择一个网站
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:。
您还可以从以下列表中选择一个网站:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
美洲
- AméricaLatina(Español)
- 加拿大(英语)
- 美国(英语)