Main Content

yaw Stability on Varying Road Surfaces

此示例显示了如何在不同的道路表面上运行车辆动力学双车道更改操作,分析车辆偏航稳定性并确定操纵成功。

ISO 3888-2 defines the double-lane change maneuver to test the obstacle avoidance performance of a vehicle. In the test, the driver:

  • Accelerates until vehicle hits a target velocity

  • Releases the accelerator pedal

  • 将方向盘转向路径进入左车道

  • 将方向盘转向路径回到右车道

Typically, cones mark the lane boundaries. If the vehicle and driver can negotiate the maneuver without hitting a cone, the vehicle passes the test.

有关参考应用程序的更多信息,请参阅Double-Lane Change Maneuver

helpersetupdlc;

运行一个Double-Lane改变策略

1.打开车道更改参考发电机块。默认情况下,操作设置为具有这些参数:

  • 纵向入口速度设定- 35英里 /小时

  • 车辆宽度— 2 m

  • 横向参考位置断点andLateral reference data— Values that specify the lateral reference trajectory as a function of the longitudinal distance

2.在可视化子系统中,打开3D发动机块。默认情况下,3D Engineparameter is set to禁用。有关3D可视化引擎平台要求和硬件建议,请参阅Unreal Engine Simulation Environment Requirements and Limitations

3.运行机动。在模拟运行时,请查看车辆信息。

mdl ='DLCReferenceApplication';SIM(MDL);
# # #开始连续模型参考仿真build ### Successfully updated the model reference simulation target for: Driveline ### Successfully updated the model reference simulation target for: PassVeh14DOF ### Successfully updated the model reference simulation target for: SiMappedEngineV Build Summary Simulation targets built: Model Action Rebuild Reason ========================================================================================== Driveline Code generated and compiled Driveline_msf.mexw64 does not exist. PassVeh14DOF Code generated and compiled PassVeh14DOF_msf.mexw64 does not exist. SiMappedEngineV Code generated and compiled SiMappedEngineV_msf.mexw64 does not exist. 3 of 3 models built (0 models already up to date) Build duration: 0h 5m 23.197s

  • In the Vehicle Position window, view the vehicle longitudinal distance as a function or the lateral distance.

  • In the Visualization subsystem, open the Lane Change scope block to display the lateral displacement as a function of time. The red and orange lines mark the cone boundaries. The blue line marks the reference trajectory and the green line marks the actual trajectory. The green line does come close to the red line that marks the cones.

  • In the Visualization subsystem, if you enable the 3D Engine block visualization environment, you can view the vehicle response in theAutoVrtlEnv窗户。

扫除表面摩擦

Run the reference application on three road surfaces with different friction scaling coefficients. Use the results to analyze the yaw stability and help determine the success of the maneuver.

1。In the double-lane change reference application model DLCReferenceApplication, open the Environment subsystem. The Friction block parameter恒定值指定摩擦缩放系数。默认情况下,摩擦缩放系数为1。0。The reference application uses the coefficient to adjust the friction at every time step.

2. Enable signal logging for the velocity, lane, and ISO signals. You can use the Simulink® editor or, alternatively, these MATLAB® commands. Save the model.

  • Enable signal logging for the Lane Change Reference Generator outport Lane signal.

mdl ='DLCReferenceApplication';ph=get_param('DLCReferenceApplication/Lane Change Reference Generator',,,,'PortHandles'); set_param(ph.Outport(1),'DataLogging',,,,'on');
  • Enable signal logging for the Passenger Vehicle block outport signal.

ph=get_param('DLCReferenceApplication/Passenger Vehicle',,,,'PortHandles'); set_param(ph.Outport(1),'DataLogging',,,,'on');
  • In the Visualization subsystem, enable signal logging for the ISO block.

set_param([MDL'/Visualization/ISO 15037-1:2006'],'Measurement',,,,'使能够');

3. Set up a vector with the friction scaling coefficients,Lambdamu,,,,that you want to investigate. For example, to examine friction scaling coefficients equal to0.9,,,,0.95,,,,and1。0,在命令行中输入:

lambdamu = [0.9,0.95,1.0];numexperiments =长度(lambdamu);

4. Create an array of simulation inputs that setsLambdamuequal to the Friction constant block parameter.

foridx = numExperiments:-1:1 in(idx) = Simulink.SimulationInput(mdl); in(idx) = in(idx).setBlockParameter([mdl'/Environment/Friction'],...'价值',,,,['(4,1)。*',,,,num2str(lambdamu(idx))]);end

5. Set the simulation stop time at 25 s. Save the model and run the simulations. If available, use parallel computing.

set_param(mdl,“停止时间”,,,,'25') save_system(mdl) tic; simout = parsim(in,'ShowSimulationManager',,,,'on'); toc;
[08-JUL-2021 10:11:51]检查平行池的可用性... [08-JUL-2021 10:11:51]开始在平行工人上开始模拟工人... [08-JUL-2021 10:11 10:11金宝app:53]平行工人上的加载项目... [08-JUL-2021 10:11:53]在并行工人上配置模拟缓存文件夹... [08-JUL-2021 10:11:53]在并行工人上加载模型... [08-JUL-2021 10:12:13]运行模拟... [08-JUL-2021 10:12:41]完成了3个模拟运行中的1个[08-JUL-2021 10:12:42]完成3个模拟运行中的2个[08-JUL-2021 10:14:12]完成了3个模拟运行中的3个[08-JUL-2021 10:14:13]清理并行工人...经过的时间为151.636393秒。

6. After the simulations complete, close the Simulation Data Inspector windows.

使用仿真数据检查器分析结果

使用仿真数据检查器检查结果。您可以使用UI或命令行函数。

1。Open the Simulation Data Inspector. On the Simulink Toolstrip, on theSimulation标签,下Review Results,,,,clickData Inspector

  • In the Simulation Data Inspector, selectImport

  • In theImportdialog box, clearlogsout。选择simout(1),,,,simout(2),,,,and模拟(3)。选择Import

  • 使用仿真数据检查器检查结果。

2.或者,使用这些MATLAB命令创建6个图。前三个地块标志着上车道边界,UB,下车道边界,LB,横向车辆距离,y,每次运行。

The next three plots provide the lateral acceleration,是的,横向车辆距离,y,,,,and yaw rate,r,每次运行。

foridx = 1:numExperiments%创建SDI运行对象simoutrun(idx)=金宝app simulink.sdi.run.create;simoutrun(idx).name = ['lambdamu =',num2str(lambdamu(idx))];添加(simoutrun(idx),'vars',,,,simout(idx));endsigcolor=[1 0 0];foridx = 1:numExperiments% Extract the maneuver upper and lower lane boundariesubsignal(idx)=getSignalByIndex(simoutRun(idx),1); ubsignal(idx).LineColor = sigcolor; lbsignal(idx)=getSignalByIndex(simoutRun(idx),2); lbsignal(idx).LineColor = sigcolor;endsigcolor = [0 1 0; 0 0 1; 1 0 1];foridx = 1:numExperiments%提取横向加速度,位置和偏航率ysignal(idx)=getSignalByIndex(simoutRun(idx),27); ysignal(idx).LineColor =sigcolor((idx),:); rsignal(idx)=getSignalByIndex(simoutRun(idx),77); rsignal(idx).LineColor =sigcolor((idx),:); asignal(idx)=getSignalByIndex(simoutRun(idx),79); asignal(idx).LineColor =sigcolor((idx),:);endSimulink.sdi.view Simulink.sdi.setSubPlotLayout(numExperiments,2);foridx = 1:numExperiments% Plot the lateral position and lane boundariesPlotonSubplot(Ubsignal(idx),(IDX),1,true);PlotonSubplot(lbsignal(idx),(idx),1,true);PlotonSubplot(ysignal(idx),(idx),1,true);endforidx = 1:numExperiments% Plot the lateral acceleration, position, and yaw rateplotOnSubPlot(asignal(idx),1,2,true); plotOnSubPlot(ysignal(idx),2,2,true); plotOnSubPlot(rsignal(idx),3,2,true);end

              

结果与这些图相似,该图表明车辆的偏航速率大约为。6rad/s when the friction scaling coefficient is equal to1

进一步的分析

To explore the results further, use these commands to extract the lateral acceleration, steering angle, and vehicle trajectory from thesimoutobject.

1.提取横向加速度和转向角。绘制数据。结果与此图相似。他们表明,当摩擦缩放系数为1

figureforidx = 1:numExperiments%提取数据log = get(simout(idx),“登录”); sa=log.get('Steering-wheel angle')。是的=log.get(“横向加速”)。legend_labels {idx} = ['lambdamu =',num2str(lambdamu(idx))];% Plot steering angle vs. lateral accelerationplot(sa.Data,ay.Data) holdonend%将标签添加到图legend(legend_labels,'Location',,,,'best'); title(“横向加速”) xlabel('Steering Angle [deg]') ylabel('Acceleration [m/s^2]') gridon

2.提取车辆路径。绘制数据。结果与此图相似。他们表明,当摩擦缩放系数为0.9

figureforidx = 1:numExperiments%提取数据log = get(simout(idx),“登录”); x = log{3}.Values.Body.InertFrm.Cg.Disp.X.Data; y = log{3}.Values.Body.InertFrm.Cg.Disp.Y.Data; legend_labels{idx} = ['lambdamu =',num2str(lambdamu(idx))];百分比地点位置plot(y,x) holdonend%将标签添加到图legend(legend_labels,'Location',,,,'best'); title('Vehicle Path') xlabel('Y Position [m]') ylabel('x位置[m]') gridon

也可以看看

|

References

[1] ISO 3888-2:2011。乘用车 - 严重换车的测试轨道

相关示例

更多关于