You are here:   Home > RT-MBDyn > Tests

Tests

A Simple Test case: Pendulum Control


A test case is presented here: a remotely controlled inverse pendulum.
  • MultiBody analysis: MBDyn running on a single machine, with a single hard real-time node directly connected with the control node through a ethernet connection. RTAI-NetRpc handles the remote calls over a RTNet layer.
  • Real-time control: running on a single machine, with mixed hard/soft real-time network nodes. The hard node is connected to the multibody solver, while the soft nodes can be accessed from the internet. At each time step, the control process reads angular position and angular velocity of the pendulum from a mailbox on the remote (MBDyn) node and writes the required controlling torque on another remote mailbox to be read by MBDyn.
  • Control monitoring: RTAI-Lab running from any node connected to the general-purpose network or on the same machine running the control locally or via the loop-back network device. Indeed the simulation may be started, stopped and monitored from any remote node.
network diagram

Fig.1 Soft/Hard RT Network Diagram

pendulum control Simulink model
Fig.2 Pendulum Control Simulink Model

The Simulink controller is running on a computer connected to the multibody simulation node over a hard real-time network and to the monitoring node over a soft real-time network. Control monitoring with RTAI-Lab may be run on this same machine connected to the control process locally or via the loop-back network device. 

xrtailab screenshot

Fig.3 Nodes Screenshots

This screenshot is taken from a node connected to the controlling node over a soft real-time network. XRTAI-Lab is running in the foreground, monitoring the pendulum control on a remote node. Meanwhile, more non-real-time applications using TCP/IP are running in the background.

Powered by CMSimple|