20-sim is a modeling and simulation software package for mechatronic systems. It runs on PC-computers with a Windows OS (Vista, 7, 8, 8.1 and 10) and requires 450 MB of disk space. With 20-sim, models can be created graphically, similar to drawing an engineering scheme. With these models, the behaviour of dynamic systems can be analyzed and control systems can be designed. 20-sim models can be exported as C-code to be run on hardware for rapid prototyping and HIL-simulation.
The image above shows 20-sim with a model of a controlled hexapod. The mechanism is generated with the 3D mechanics feature and connected with standard actuator and sensor models from the mechanics library. The hexapod is controlled by PID controllers which are tuned in the frequency domain. Everything that is required to build and simulate this model is inside the package. No external software or compiler is needed! This article gives a small introduction to 20-sim.
- Bond Graph: Elements for building bond graph models.
- Iconic Diagrams: Components for building physical systems.
- Electric: Components for building electric networks.
- Mechanical: Components for building translational and rotational mechanical structures.
- Hydraulics: Components for building hydraulic systems.
- Thermal: Components for modelling heat transfer.
- Block Diagrams: Blocks for building block diagram models: Linear and non-linear blocks, sources & sinks, transfer functions.
- Examples: Example models showing the basic use of the library models.
Models in 20-sim are hierarchically oriented. The model on top is called the main model. It is constructed out of graphical elements which are called submodels. Submodels can be easily connected. Depending on the submodel, the connection can be a shared variable or a physical connection. A submodel itself can be constructed from multiple submodels, and these submodels themselves can be constructed with submodels, going many layers deep. At the bottom of the hierarchy, the models are described by sets of equations. These models are called equation models.
Equation models are specified in a special language called SIDOPS++. SIDOPS++ has great resemblance with Maple, Matlab and other mathematical software packages.
The picture above shows an example of an equation model. 20-sim equation models have a basic layout indicated by keywords
Parameters: Definition of values, that do not change during simulation.
Variables: Definition of values that do change during simulation.
Equations: The actual equations.
Equations are relations between parameters and variables and indicated by an equal (=) sign. Various mathematical functions and operators are available for use in equations.
- Controller Design Editor: This feature helps users to design feedback systems with a linear plant, controller and pre-filter. Open and closed loop responses can be investigated using Bode and Nyquist plots.
- 3D Mechanics Editor: 3D mechanical systems are notoriously difficult to model using 1D elements. Therefore, the 3D Mechanics Editor enables the user to define mechanical systems by dragging and dropping bodies, joints and other objects in a 3D workspace. The corresponding set of optimized differential equations is generated automatically.
- Wizards: Various wizards will help you to create motion profiles, define cams, build servo motors and much more.