PreScan Coupling with CarSim
PreScan与CarSim联合仿真
PreScan 8.4 – June 2018
www.tassRestrictedational.com
Tutorial - Connection to 3rd Party
PreScan coupling with CarSim
Software used in this tutorial:
PreScan 8.4.0
CarSim 2018.1
•
•
• Matlab/Simulink 2017b
Restricted
29-6-2018
2
Connection to 3rd Party
PreScan coupling with CarSim
1. 启动CarSim,选择 Create new database from a consolidated parsfile
2. 点击 Continue,加载提前配置好的车辆模型 '
/Demo_PreScanCarSim3D/ Demo_PreScanCarSim3D.cpar‘
3. 在同目录下新建一个文件夹 CarSim_Data 来储存数据。选择它会弹出下方的界面,点击lock 解锁
Restricted
3
Connection to 3rd Party
PreScan coupling with CarSim
4. 确认使用的Matlab版本与PreScan的相同,确认模型之后点击 Send to Simulink
Restricted
29-6-2018
4
Connection to 3rd Party
PreScan coupling with CarSim
5. 会弹出右侧的窗口,包含一个 .mdl 文件,对应
CarSim中搭建好的汽车动力学模型
6. 通过这个Simulink窗口打开PreScan的cs文件,并将
PreScan中原有的汽车动力学模型替换为CarSim模型:
Restricted
29-6-2018
5
Connection to 3rd Party
PreScan coupling with CarSim
7. 通过PreScan启动Matlab,添加CarSim安装路径下的 solvers 文件夹到路径中
8. 打开cs文件,进入到 Demo_PreScanCarSim3D_cs/Audi_A8_1/CarSim_Vehicle,如下图
Restricted
29-6-2018
6
Connection to 3rd Party
PreScan coupling with CarSim
9. 将CarSim S-function 调用的.sim文件设置为CarSim_Data文件夹下的simfile.sim
Restricted
29-6-2018
7
Connection to 3rd Party
PreScan coupling with CarSim
11. 运行仿真!
注意:运行仿真时要保持CarSim启动
Restricted
29-6-2018
8