This is an optional module that enables co-simulation capabilities in Chrono.
Read the introduction to modules for a technical background on the modularity of the Chrono project.
Features
The COSIMULATION module allows users to perform cosimulation with other software that accept data exchange via TCP/IP sockets.
The most relevant case is the cosimulation with the Simulink product, to simulate subsystems like controls, pneumatic systems or electric circuits that interact with Chrono::Engine mechanisms.
The Simulink technology is well known for its ease of use: it is a graphical tool built on top of Matlab that allows the building of control systems, pneumatic and hydraulic circuits, drivetrains, electrical power systems, etc. By adopting a co-simulation approach, you can simulate, for example, an excavator bow with Chrono::Engine and its hydraulic subsystems with Simulink.
Here are the main features:
- easy C++ functions to send/receive datagrams using TCP/IP sockets from Chrono::Engine
- a CEcosimulation.mdl block is provided, to be inserted in your Simulink models as a ready-to-use interface to Chrono::Engine
- examples are provided.
Requirements
- To run applications based on this module:
- you must have Simulink installed.
- you must have Instrument Control Toolbox for Simulink installed.
- To build this module:
- you must have a socket library (both Linux and Windows have these by default and you should not need to install any library)
Building instructions
- Repeat the instructions for the full installation, but when you see the CMake window, you must add the following steps:
- Set the
ENABLE_MODULE_COSIMULATION
as 'on', then press 'Configure' (to refresh the variable list) - Press 'Configure' again, then 'Generate', and proceed as usual in the installation instructions.
Amesim
Dymola
etc.
Anyway, currently, only examples and files for Simulink are provided.
How to use it
- Look at the API section of this module for documentation about classes and functions.
- Look at the C++ source of demos to learn how to use the functions of this module.