During the modeling real technical
systems the problem of combination of the mechanical part with parts of
different kinds (automatic control, electrical machines, hydraulics etc.)
arises. The Matlab/Simulink environment is the most popular tool for technical
computing. Universal Mechanism includes UM Control module, which provides
interface between Universal Mechanism and Matlab/Simulink. The user can compile
his/her own Matlab/Simulink model and attach it into the Universal Mechanism.
Matlab/Simulink interface gives the user a possibility to include unlimited
number of Matlab/Simulink libraries and interactively turn on/off interfaces.
Simulation of mechanical systems with imported Matlab/Simulink models supposes the following steps to be done.
- Creating the model of a control scheme in Matlab/Simulink.
- Exporting the created model from Matlab/Simulink as a Dynamic-Loaded Library (DLL).
- Creating the model of a mechanical system in Universal Mechanism (UM Input program).
- Loading created UM-model in the UM Simulation, importing Matlab/Simulink DLL into an UM-model and setting connection between a mechanical part and a control scheme with the help of Matlab/Simulink interface wizard.
- Simulating dynamics of the obtained model.
See also:
1. Getting started:
using Matlab/Simulink interface
The model of the inverted pendulum is shown below. The model consists of a cart
of mass M and a pendulum of mass m and moment of inertia I.
The control scheme has one input - phi angle (deviation of the pendulum
from the vertical position) and one output - F force, which should be
applied to the cart to keep the pendulum in the inverted position.
The Matlab/Simulink model of the control for the inverted pendulum (so called PID controller) is shown in the picture below. It is necessary to include "IN" and "OUT" components into the model. These components are used for future connection of the Matlab/Simulink model with UM-model. In the model of the inverted pendulum we have the only input (pendulum angle from vertical) and output (force that acts on the cart).
![]() |
![]() |
|---|---|
| Inverted pendulum |
Data flow |
The Matlab/Simulink model of the control for the inverted pendulum (so called PID controller) is shown in the picture below. It is necessary to include "IN" and "OUT" components into the model. These components are used for future connection of the Matlab/Simulink model with UM-model. In the model of the inverted pendulum we have the only input (pendulum angle from vertical) and output (force that acts on the cart).
![]() |
|---|
| Matlab/Simulink model of the control system |
![]() |
|
|---|---|
| Free motion | Controlled motion |
The model of the yard locomotive is shown below. Traction DC motors with the automatic control are modeled in the Matlab/Simulink environment and then are added to the mechanical part of the locomotive. Integration of the mechanical and electrical parts gives us full electromechanical model of the locomotive. The model gives possibilities to determine processes (vibrations) in a power train, traction torques for start-up and steady state motion, skid control, etc. The angular velocity of the rotor is the input data for the model of the DC motor, traction electromagnetic torque is applied to the rotor (from the Matlab/Simulink model of the motor).
![]() |
![]() |
|---|---|
| Model of the yard locomotive TEM21 | Matlab/Simulink model of a DC motor |











