Simcenter Prescan How to interface third party vehicle dynamics or other models with FMI FMU standard into Prescan

2023-12-12T13:43:00.000-0500
Prescan Teamcenter Share Simcenter Prescan Marketing

Summary

This article describes how to use the FMI FMU standard to interface with third party vehicle dynamics models or other models for including in the Prescan compilation sheet in Simulink.


Details

This article describes how to use the FMI FMU standard to interface with third party vehicle dynamics models or other models for including in the Prescan compilation sheet in Simulink.

One simple possibility is, if the vehicle dynamics model or also other model is created in Simulink, then it is directly embeddable into Prescan via Simulink, since Prescan has already an interface with Simulink. The model can just be copied into the compilation sheet and connected. In this case it might be that some conversions are needed.

The other possibility, which is more generic for interfacing is the FMI / FMU standard. 
The FMI standard can be used to import vehicle dynamics models into the compilation sheet and also the complete compilation sheet can be turned into an FMI and simulated on a FMI Simulator.

For that following prerequisites are needed:
  • FMI kit version 2.5 or higher
  • Microsoft Visual studio C++
If there is no FMI kit installed follow this steps:

Installation of the FMI toolbox:
Find more information on download here:
https://github.com/CATIA-Systems/FMIKit-Simulink

You need to unzip the FMI kit folder and then use the following commands to install the FMI kit in Matlab Simulink.

% add the folder to the MATLAB path
addpath(fullfile(pwd, 'FMIKit-Simulink-3.1'))

% initialize FMI Kit
FMIKit.initialize()

A message will be shown that the installation was successful. After this check on the compilation sheet useful blocks if the FMI Block Icon is shown as available. Before this close and restart Matlab Simulink. See below:


User-added image


User-added image

If everything is setup, open the experiment. Click on the car and open the object configuration. Navigate to the Tab vehicle dynamics. There, select user defined. Now you can select between unspecified, which gives the possibility to import other than Prescan vehicle dynamics or other models needed. Prescan has a template for Carsim and Trucksim, which will set up the connection and conversion for vehicle dynamics models. After choosing what is preferred, browse to the FMU. After building and starting Simulink, the FMU will be shown on the compilation sheet.

Go to the tab Wheel displacement and activate it. In the GUI go to experiment and then open the Simulation scheduler. There set the compilation sheet frequency to 200hz.

User-added image

User-added image

How a import looks like on the compilation sheet. When using a vehicle dynamics this FMU will be inside the vehicle model. By clicking on the FMU, option will pop up for settings such as input output and more.

User-added image

The red framed block shows the user specified dynamics block. Inside this the dynamics FMU model will be stored, where input ouput needs to be connected and set up. 

User-added image



 

KB Article ID# KB000128565_EN_US

Contents

SummaryDetails

Associated Components

Documentation Installer License Software