Sharing | FMU Generator User Manual is here!

Sharing | FMU Generator User Manual is here!

FMU Generator is a tool used in TSMaster to package models to generate FMU files, currently supports FMI3.0 and FMI2.0 versions, FMU type only supports Co-Simulation (CS), i.e., Co-Simulation FMU.In this article, we will introduce the FMU Generator User's Manual and the related examples, ultra-detailed introduction, come to watch!

Keywords: TSMaster, FMU, FMI


The following table lists the styles and symbols used in the manual.

Styles and symbols used in the manual
Styles and symbols used in the manual

FMU is a cross-language simulation interface for describing simulation models that follow the FMI standard.There are three FMU types for the FMI standard, namely:

  • The Model Exchange (ME) FMU describes a simulation using mathematical equations. To properly simulate a real system, the FMU Import tool must connect the FMU to a numerical solver. The numerical solver sets the FMU state, asks for the state derivatives, determines the appropriate step size, and decides how to compute the state at the next time step.
  • The Co-Simulation (CS) FMU includes a built-in numerical solver. To properly simulate the real system, the FMU Import tool sets up the FMU inputs, asks the FMU to advance at a given time, and reads the FMU outputs.
  • The Scheduled Execution (SE) scheduled execution interface exposes each model partition. The scheduler provided by the importer can control the execution of each model partition separately.

The FMU generator consists of the following four main areas:

  • toolbar area
  • Export Settings Area
  • Signal display and editing area
  • Database/System Variables Browser Area
FMU Generator
Figure 1:FMU generator interface

3.1 Toolbar area

For exporting FMUs, deleting signals and updating the database.

The toolbar icons are described below:

Toolbar Icon Description

3.2 Export settings area

Used to configure the FMI/FMU identifier, description, version, type, simulation step, and RPC type.

The FMU export configuration parameters are as follows:

parametersdescriptive
identifiersCan only contain letters, numbers and underscores, and must begin with a letter or underscore
descriptiveCan be any character
FMU versionCurrently available in either version 3.0 or 2.0
FMU typeCurrently only co-simulation (CS) is supported
pacemakerSetting the co-simulation step size
RPC TypeCurrently, only local RPC is supported, and the FMU exported by local RPC is not supported to be called by TSMaster.

3.3 Signal Display and Editing Area

It is used to display the signals in the FMU file that need to be exported, and you can configure the category, channel, and value type of the signal. The checkbox in the first column is used to select whether to activate this signal or variable.


  1. Select the FMU version and set parameters such as identifier, description, FMU type, simulation step, and RPC type
  2. Add the desired signal or variable to the database, system variable browser
  3. Modify the category of the signal in the signal display and editing area, and edit the checkboxes to confirm that they need to be exported.
  4. Click the Export button in the toolbar and select the export path to generate the FMU file.
  5. Import the generated FMUs into the simulation software and realize co-simulation with TSMaster.

The FMU example is used to demonstrate the functionality of TSMaster and Simulink co-simulation. The example simulates the following equation:

FMU Example

Where Torque is the input of FMU and Carspeed is the output of FMU, the value of Torque is obtained from Simulink and Carspeed is calculated from TSMaster, the example flow is as follows.

▲ First, use the FMU generator in TSMaster to generate an FMU for FMU version 2.0. The configuration interface of the FMU generator is shown in the following figure.

FMU Sample Project Configuration Interface
Figure 2:FMU sample project configuration interface

▲ Then import fmu in Simulink and build the model shown below, with sine wave amplitude of 10, bias of 10, and other parameters by default.

Simulink model
Fig. 3:Simulink modeling

▲ Create python applet in TSMaster to simulate the relationship between Torque and Carspeed (virtual relationship).

TSMaster Engineering Configuration
Figure 4:TSMaster Project Configuration

▲ Start Simulink simulation and get the result as shown below. In the following figure, the blue color is the Torque input and the yellow line is the Carspeed output.

Simulink simulation display interface
Fig. 5:Simulink simulation display interface
Tip:
1. Software download:
Click on the software download link below to download and install directly, beta version is recommended:

2. Software upgrades:
You can check for upgrades to the latest version within the software, provided that your computer has an Internet connection.

Note: TOSUN Technical Support Email:support@tosunai.cnWe welcome inquiries! (Company and contact information must be indicated)

发表回复

en_USEnglish
×
×

产品入口: 产品添加到购物车

Download location

Please click the download button below to start experiencing the powerful TSMaster features. Thank you for your support!

Beta version updated weekly, full version updated monthly
Installation environment
  • 1
    Windows 7 SP1 or higher, supports Win10, and WIn11.

    Operating System

  • 2
    8GB

    random access memory (RAM)

  • 3
    At least 550MB of free space

    disk space

  • 4
    Dual-core (2-core) or higher

    CPU

Please ensure that your computer meets at least these requirements in order to install and run the TSMaster software successfully. If your computer does not meet these requirements, it may cause performance problems or not run the software properly. You may want to consider upgrading your hardware if you need smoother running features.