with AutoFOCUS3, OpenModelica and Overture
The following example works as described on Windows only.
Linux: A manual workaround is required as of now. Please contact us if you
would like to try the example on this platform.
macOS is not supported as of now.
The example at hand illustrates the co-simulation capabilities of AutoFOCUS 3 and shows how this feature can be leveraged for tool-interoperability.
To highlight the potential of the Functional Mock-up Interface (FMI) standard, we consider a controlled inverted pendulum.
On the one hand, both the pendulum's dynamics and the PID controller are modeled using OpenModelica - a tool dedicated to the development of continuous systems.
The input and environment models, on the other hand, have been developed in AutoFOCUS 3 and Overture respectively - both representing models with a discrete notion of time.
The system to be simulated is an inverted pendulum mounted on a platform on rails.
The pendulum's movement is parallel to the platform's tracks. Moreover, the inclination of the pendulum is assumed to be measurable. This results in a controllable system.
The goal of the simulated system is not only to stabilize the pendulum given some disturbances acting on the pendulum.
In addition, the inclination of the pendulum shall be able to be controlled by an input signal.
Illustration of the inverted pendulum.
The environment model responsible for simulating the disturbances acting on the pendulum is developed in Overture by means of the Vienna Development Method (VDM).
The input model providing the desired inclination of the pendulum over time is developed using AutoFOCUS 3, relying on the stream-processing semantics of the FOCUS theory.
Finally, the system model including the dynamics of the inverted pendulum as well as the PID controller are modeled in OpenModelica leveraging the continuous semantics of the Modelica language and the vast libraries of the tool.