MV-7011: Co-Simulation with Activate via Function Mockup Interface (FMI)
In this tutorial, you will learn about the process of setting up an MBS model to co-simulate with Activate by following the FMI.
The co-simulation “flavor” of the FMI prescribes a protocol for different software to iteratively communicate data with one another, thus enabling multiple solvers to co-simulate amongst one another.
By leveraging this interface, MotionSolve can co-simulate with Activate, or with any other software that supports the FMI standard. To do this, the MotionSolve model is first converted to a Functional Mockup Unit (FMU) which is a stand-alone modeling unit that represents the MotionSolve model. FMUs adhere to the protocol prescribed by the FMI and can thus be imported or exported by software that support this interface.
MotionSolve can export an FMU of type “co-simulation” which can be imported into other software such as 1-D simulators. The type “co-simulation” implies that the MotionSolve FMU is responsible for calculating its part of the solution i.e. MotionSolve is invoked at the time co-simulation is started.
This tutorial will describe the steps required to:
- Open and inspect the MBS model
- Export an FMU from MotionView
- Use the FMU to run a co-simulation analysis using Activate
- Review co-simulation results in Activate
A model representing a quad-rotorcraft is used for this tutorial. The model structure, rotor blades etc. are modeled using MotionView/MotionSolve and Activate is used to control the spin rate of the rotors to control the thrust and lateral movement of the rotor. Roll forces are applied to the rotorcraft to mimic the effect of wind. The aim of the simulation is to control the thrust to make the rotor achieve a target height.
Software required to complete this tutorial successfully:
- HyperWorks 2017.1 or later
- sT/Activate 2017.1 or later
Review the Model
Export MDL as an FMU
Import the FMU in Activate
Environment Variable | Value |
---|---|
ALTAIR_FMU_ROOT | Installation root directory. Windows example: D:\Program Files\Altair\2020.0\hwdesktop Or Linux example: home\user\2020.0\altair\hwdesktop |
Run the Activate Model
Review the Results
The altittude1 scope shows the altitude of the rotor craft. After about 8 seconds, the quadrotor seems to stabilize at the desired height.
The ScopeXY scope shows the target X, Y path (red) vs. the actual X, Y path (pink) of the quadrotor.
You can retrieve results from the MotionSolve output files like the MRF, ABF, PLT, H3D etc. You may also create expressions in your MotionSolve model that are used solely to monitor the system.