Tool Integration with FMI: Evaluating a Cruise Control

The functional Mock-up Interface (FMI) can be used to exchange models between a variety of tools using Functional Mock-up Units (FMUs). This example shows how to import an FMU of a cruise control model in Simulink and evaluate its performance in a car model in Wolfram SystemModeler.

This example only runs on Windows. To run this example, you'll need

SystemModeler 4.3 and Mathematica 10 or 11.

Please make a selection:

Get a
free trial
with download

Import FMUs

Import a model from another tool using SystemModeler's FMI import functionality.

Compare scenarios

Show the drastically different behavior in car speed when going up or down a hill.

SystemModeler interface evaluating a cruise control using FMI
The original model for the cruise control was created in Simulink®, using Simulink blocks. The FMI Toolbox for MATLAB®/Simulink®, developed by Modelon, was used to generate the FMU.
Evaluate the imported cruise control FMU by connecting it to a car model.
Speed deviations when going uphill.
Speed deviations when going downhill.
Find the scenarios for which the cruise control keeps the speed deviation inside reasonable limits. By analyzing the plot, it is evident that the cruise control handles upward slopes better than downward slopes, with less than 2.5% speed deviation for positive gradients up to 15 degrees.

Add FMUs to your Modelica models

Connect imported FMUs to other Modelica components in SystemModeler.

Run parameter sweeps

Evaluate the cruise control for different road slopes and speed settings.

es ja zh