基本操作
以Carsim2016
为例:
以Carsim8
为例:
Carsim
与Simulink
的输入输出关系:
1.设置输入输出:
双击进入输入通道进行设置(如上双击ABS Import
):
双击进入输出通道进行设置(如上双击ABS Export
):
2.设置刹车制动工况:具体的说,在车辆运行过程中的指定时间进行刹车。
进入之后在此界面中,如下操作:
在双击之后的界面中,在此处设置制动开始的时间:
3.将carsim
中的模型send to simulink
之后,在每条线后显示输出数据
对比:多出来的数字显示每个端口的信号维度:(可以便于检查)
常见问题
问题1
:Wrong version of vehicle solver DLL.
一般是因为matlab
的版本设置错误:
问题2
:双击Simulink
中的Carsim S-Function
之后对应的位置是问号或者空白
下面选择i_i
是应为车辆配置选择的是Ind_Ind
,然后Simfile name
可以写为simfile.sim
或者Simfile.sim
都可以。
问题3
:输入输出维度不一致。This is not valid because the total number of input and output elements are not the same
Error in port widths or dimensions.
错误如下图:
针对此处的解决办法:
Carsim8.1
和Carsim2016
的两个区别
1.Carsim2016
相比Carsim8.1
在端口处多了一个Port
选项
Carsim8.1
端口选项如下:Carsim2016
端口选项如下:
任选一个,双击进入Port选项:
可得:(注意到:实际上Port
就是多个Import
的组合,主要是为了在复杂情况下可以对其端口进行区分)
2.输入端口配置有所不同,Carsim2016
可以根据挡墙要实现的情况进行选择。
Carsim8.1
的界面:Carsim2016
的界面: