文章目录
(前面这一段是简介,用处有限,可以跳过)
Functional Mock-up Interface (FMI) is standardized interface to be used in computer simulations to support both model exchange and co-simulation of dynamic models provided using different simulation tools. (See the web site https://www.fmi-standard.org for definitive information about
FMI.)
功能模拟接口(FMI) 是用于计算机仿真的标准化接口,支持与不同的仿真工具联合仿真。(有关FMI的确切信息,请参见网站https://www.fmi-standard.org。)
One means for combining simulation tools with FMI is through co-simulation, where each tool is represented in the form of a Functional Mock-up Unit (FMU). Starting with version 2016.0, BikeSim, CarSim, and TruckSim support FMI co-simulation by including the capability to automatically generate a slave VS FMU.
联合仿真是一种将仿真工具与FMI相结合的方法,其中每个工具都表现为一个功能模拟单元(FMU)。从2016.0版开始,BikeSim、CarSim和TruckSim都支持FMI联合仿真,包括自动生成从属的VS FMU。
This memo is a tutorial that describes how you can create a VS FMU from BikeSim, CarSim, or TruckSim, and run it within the Simulink environment. The example involves a simple antilock brake system (ABS) example that has long been provided in databases for VehicleSim products.
本备忘录是一个教程,介绍了如何从BikeSim、CarSim或TruckSim创建VS FMU,并在Simulink环境中运行它。这个例子涉及到一个简单的防抱死制动系统(ABS)的例子,这个例子在早期的版本就已经提供了。
Notes BikeSim, CarSim, and TruckSim are typically run in Simulink using VS S-Functions, without needing FMI. This memo describes co-simulation with Simulink because this third-party software tool is the most familiar to users of VehicleSim products. The example ABS controller is not intended for specialists in ABS or brake system modeling. Rather, the point is to show how to set up a VS FMU to work in another environment. This memo shows datasets and results from CarSim. Nearly identical datasets are provided in BikeSim and TruckSim.
注意,BikeSim、CarSim和TruckSim通常在Simulink中使用VS S-Functions运行,不需要FMI。本教程描述了与Simulink的联合仿真,因为第三方软件和VehicleSim产品非常相似。示例中使用的ABS控制器不适用于ABS或制动系统建模方面的专家。相反,教程的重点是展示如何设置VS FMU在另一个环境中工作(以FMU方式于matlab进行联合仿真)。本教程显示了来自CarSim的数据集和结果。在BikeSim和TruckSim中提供了几乎相同的数据集。
In order to follow this tutorial, you must have your VehicleSim product installed with version 2016.0 or newer and Simulink 2015a or newer (from The MathWorks), with the MATLAB Pilot Support package installed. The document assumes you have a basic understanding of how to use your VehicleSim product; if you have not done so, please go through the Quick Start Guide. You should also be familiar with Simulink, and should first read the Tech Memo available from the VehicleSim product Help menu: Running a VS Math Mode