Import FMUs
Use theFMUblock to import Functional Mockup Units (FMUs) into Simulink®.
The FMU block automatically selects the FMU mode based on the existing FMU you want to import:
Co-Simulation
— Integrate FMUs that implement an FMI Co-Simulation interface. These FMUs can contain local solvers used for tool coupling.Model Exchange
— Integrate FMUs that implement an FMI Model Exchange interface. These FMUs do not contain local solvers. Instead, these FMUs inherit solvers from Simulink.
This block supports FMI versions 1.0 and 2.0. For FMI version 2.0, if your FMU contains both Co-Simulation and Model Exchange elements, the block detects this state and prompts you to select the mode you want the block to operate in.
You can use your FMU block as you do other Simulink blocks. These blocks support normal and accelerator modes.
This topic assumes that you provide a.fmu
file.
FMU XML File Directives
The default parameter values derive from the corresponding parameterstart
value defined in the FMUModelDescription.xml
file. A block parameter value overwrites the initial value of the corresponding parameter defined in the FMU binary implementation.
Simulink interprets these FMU tags accordingly.
FMU Tag | 万博1manbetx |
---|---|
|
Interprets |
|
Interprets block parameter as edit field |
|
Interprets block parameter as edit field |
|
Interprets block parameter as check box |
|
Interprets block parameter as drop-down list |
|
Interprets as UTF-8 encoded string |
The FMU block supports the following encoding formats for the model description XML file:
ISO-8859–1
UTF-8
UTF-16
Additional Support and Limitations
Capability | FMI Version 2.0 Support | FMI Version 1.0 Support |
---|---|---|
节省SimState基工作区 |
||
Fast restart |
||
Simulation Stepper |
||
Solver Jacobian |
||
Linearize models |
||
Declare parameter as tunable and tune it during simulation |
||
For Each subsystem blocks |
||
Parameters of type string |
||
Rapid Accelerator, software-in-the-loop (SIL), processor-in-the-loop (PIL) modes |
||
Code generation |
||
Model coverage |
||
Simulink Design Verifier™ |
||
Model reference in accelerator mode |
FMU Import Examples
For examples of importing FMUs into and System objects, seeIntegrating FMUs for Simulationin Simulink Examples:
Example | Description |
---|---|
Importing a Co-Simulation FMU into Simulink |
This model shows how to use the FMU block to load an FMU file that supports Co-Simulation mode. |
Importing a Model Exchange FMU into Simulink |
This model shows how to use the FMU block to load an FMU file that supports Model Exchange mode. |
Using Bus Signals and Structure Parameters in the FMU Import Block |
This model shows how to use bus signals and structure parameters in an FMU block that supports Model Exchange mode. |