Creating and exporting FMU > Principle of operation of the FMI export
FMI for Co-simulation
The FMI for Co-simulation specifications (ref. 7) define a method of coupling simulation models through co-simulation, each model being embedded in a simulator which includes a numerical solver, and the simulators are coupled rather than the models themselves. The specifications further define scenarios with simulators having the status of master and slave. The present Export Assistant is designed to generate a slave FMU for Co-simulation from any Simcenter Amesim model. The scenario describes a two-step process:
The model is first created with Simcenter Amesim using the usual sketch building facilities and available libraries, and the input and output variables are specified using an interface block. Once the slave FMU for Co-simulation is generated, it can be shipped to the final user, as shown in the figure below.
Figure 66: Export step, creation of a slave FMU from a Simcenter Amesim model
The final user imports the FMU into a FMI for Co-simulation environment that acts as a master simulator (see figure below), connects it to other models or FMUs, and performs a transient simulation of the coupled system using a co-simulation scheme.
Figure 67: Import step, use of the slave FMU
Co-simulation as a simulator coupling scheme states that there are as many numerical solvers involved as there are models to be coupled. Each model defines input variables and output variables that are used to connect the models together through their numerical solvers. More precisely, each numerical solver performs the transient simulation of the model for which it is responsible during a pre-defined time interval called a co-simulation time step. During this co-simulation time step it can take as many numerical time steps as required, especially if it is a variable step size solver that tries to bound the truncation error with respect to a given tolerance. The fundamental principle of co-simulation is that the numerical time steps taken by the numerical solvers are entirely uncorrelated with the co-simulation time steps.
At the end of this co-simulation time step, the output variables of the models are sampled and sent as input to the models they are connected to. Then, a new co-simulation time step takes place with the input variables kept constant, and the cycle repeats until the end of the simulation horizon. The size of a co-simulation time step is usually specified by the master simulator. It can be fixed in advance at the beginning of the co-simulation, or vary during co-simulation according to numerical criteria. The time stepping is exemplified in the case of a co-simulation involving two simulators in the figure below.
Figure 68: Co-simulation time stepping. In this figure, T is the co-simulation step size
As the exchanged variables are sampled at the end of a co-simulation time step and then hold constant during the next co-simulation time step, each simulator is seen as a discrete system by the other simulators. When co-simulation is used to couple systems that are already sampled, like for example a digital controller coupled through A/D and D/A converters to a plant system, the transient simulation of the co-simulated system is ensured to converge provided there is local convergence of each numerical solver. When co-simulation is used to couple continuous systems, stability issues can occur, especially when the systems are strongly coupled through physical ports that exchange energy. New high frequency dynamics can be created by the coupling itself, which are discretized by the co-simulation scheme. Ideally, choosing a small enough co-simulation time step size should avoid instability, but non-linear and non-stationary dynamics can make it hard to find the right step size to have simultaneously good stability margins and acceptable computational performances1. See ref. [7] for more details about the stability issues with co-simulation.
This is why, it seems advisable to use co-simulation to couple systems that are:
either naturally sampled, and adapting the time step to the sample period,
or weakly physically coupled, with slow dynamics lying in the coupling.
Note
The co-simulation time step is the most important parameter of a co-simulation. It can have a large impact on performances and accuracy of the results. It has to be set carefully with a good knowledge of the dynamics of the underlying systems. If high frequency dynamics lie in the coupling, the co-simulation step size is usually the result of a trade-off between computational performances and stability.
1
Stability analysis of co-simulation is outside of the scope of the FMI for Co-simulation 1.0 specification, and thus cannot be performed with the current tool.
Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Functional_Mockup_Interface/Principle_of_operation_2 · retrieved 2026-07-17