ControlHub

Pendulim Platform

The rotary inverted pendulum is an academic experimental setup for prototyping of feedback control algorithms. The pendulum platform of ControlHub is based on QUBE - Servo 2 from Quanser. The access to the pendulum experiment server is here (presently available only in the local network of Inria Lille due to security reasons)
   
A schematic representation of the rotary inverted pendulum (IP), also known as Furuta Pendulum, is shown on the above figure. This is a two-link mechanical system. The first link is the rotary arm rigidly connected on the one side to a rotor of an electrical motor being an actuator of the system. The second link is the pendulum installed at the other side of the rotary to the rotary arm. The pendulum's motion is possible only in the plane orthogonal to the rotary arm. The generalized coordinates $\theta$ and $\alpha$ describe the angular positions of the rotary arm and the pendulum, respectively. To obtain motion equations, the pendulum is considered as a lumped mass at its center.

Mathematical model

The following table presents the notation utilized for model description.
$\textbf{Symbol} $ $\textbf{Description}$
$\alpha$ Angle of the pendulum arm
$\theta$ Angle of the rotary arm
$m_p$ Mass of the pendulum
$L_p$ Length of the pendulum
$J_p$ Inertia of the pendulum
$D_p$ Pendulum damping coefficient
$L_r$ Length of the rotary arm
$J_r$ Rotary arm inertia
$D_r$ Viscous damping coefficient
$g$ Gravitation constant
$\tau$ Torque of servo motor
The dynamic model of the inverted pendulum is derived by means of the Euler-Lagrange method: \begin{equation} \frac{\partial^2L}{\partial t \partial \dot{q}_i}-\frac{\partial L}{\partial q_i}=Q_i. \end{equation} The Lagrangian of the pendulum is described as: \begin{equation} L=T-V \end{equation} where $T$ is the total kinetic energy of the inverted pendulum and $V$ is the total potential energy of the system. The variable $q_i$ represents the generalized coordinates, in our case, given by \begin{equation} q(t):=\begin{bmatrix} \theta(t) & \alpha(t) \end{bmatrix}^\top . \quad\quad \quad\quad \quad\quad \quad\quad \quad \quad ( 1 ) \label{generalcoor} \end{equation} Considering the defined generalized coordinates (1), the Euler-Lagrange equations become: \begin{equation} \begin{array}{cc} \dfrac{\partial^2 L}{\partial t \partial \dot{\theta}}- \dfrac{\partial L}{\partial \theta} =Q_1 \quad\quad & \quad \quad \dfrac{\partial^2 L}{\partial t \partial \dot{\alpha}}- \dfrac{\partial L}{\partial \alpha} =Q_2\\ \end{array} \end{equation} The generalized forces $Q_i$ describe non-conservative forces applied to the system. In our case, the generalized forces acting on the IP are: \begin{equation} \begin{array}{c c} Q_1 = \tau - D_r \dot{ \theta } \quad\quad & \quad\quad Q_2 = - D_p \dot{ \alpha } \end{array} \end{equation} The nonlinear dynamic equations of motion for the rotary inverted pendulum are: \begin{equation} \begin{array}{c} \left( \psi + 0.25 \zeta - 0.25 \zeta \cos( \alpha )^{2} + J_r \right) \ddot{\theta} - 0.5 \varpi \cos(\alpha) \ddot{\alpha}\\ \\ + 0.5 \zeta \sin(\alpha) \cos(\alpha) \dot{\theta} \dot{\alpha} + 0.5 \varpi \sin(\alpha) \dot{\alpha}^{2} =\tau - D_r \dot{\theta}\\ \end{array} \quad\quad \quad\quad \quad\quad \quad\quad \quad \quad ( 2 ) \label{Non-linear IP1} \end{equation} and \begin{equation} \begin{array}{c} - 0.5 \varpi \cos(\alpha)\ddot{\theta}+\left( J_p + 0.25 \zeta \right)\ddot{\alpha} - 0.25 \zeta \cos(\alpha) \sin(\alpha) \dot{\theta}^{2}\\ \\ - 0.5m_p L_p g \sin(\alpha) = -D_p \dot{\alpha} \end{array} \quad\quad \quad\quad \quad\quad \quad\quad \quad \quad ( 3 ) \label{Non-linear IP2} \end{equation} where $\zeta=m_p L_p^2$, $\psi=m_p L_r^2$ and $\varpi=m_p L_p L_r$. A torque generated by the servo motor and applied to the rotary arm is described by the following equation: \begin{equation} \tau=\tfrac{k_m(V_m-k_m\dot{\theta})}{R_m}, \end{equation} where $k_m$ is the motor back EMF (electromotive force) constant, $R_m$ is the terminal resistance and $V_m$ is the control input (the input voltage to the servo motor). Notice that for a generalized coordinate vector $q(t)$, the equations (2) and (3) can be transformed to the standard model of mechanical system: \begin{equation} J(q)\ddot{q} + C(q,\dot{q})\dot{q} + w(q)= \phi \label{mechanical_IP} \end{equation} where \begin{equation} \begin{array}{c} J(q)=\begin{bmatrix} Jr + \psi + \tfrac{1}{4} (\zeta - \zeta \cos^2 (\alpha)) & -\tfrac{1}{2} \varpi \cos(\alpha)\\ - \tfrac{1}{2} \varpi \cos(\alpha) & J_p+\tfrac{1}{4} \zeta \end{bmatrix}\\ \\ w(q)=\begin{bmatrix} 0 \\ -\tfrac{1}{2} g m_p L_p \sin(\alpha) \end{bmatrix}, \quad \phi=\begin{bmatrix} \tau \\ 0 \end{bmatrix}\\ \\ C(q)=\begin{bmatrix} \tfrac{1}{2} \zeta \sin(\alpha) \cos(\alpha) \dot{\alpha} + D_r & \tfrac{1}{2} \varpi \sin(\alpha)\dot{\alpha}\\ - \tfrac{1}{4} \zeta \sin(\alpha)\cos(\alpha) \dot{\theta} & D_p \end{bmatrix} \end{array} \end{equation}

Control System

Model is given by the equation (3)
Control input: $V_m$ - the input voltage to the servo motor
Measured output: $\alpha$ - the angle of the pendulum arm and $\theta$ - the angle of the pendulum arm

Control Tasks

Problem 1 (Stabilization):           Regulate $\alpha(t) \to 0$ (upper position) and $\theta(t)\to 0$
Problem 2 (Setpoint tracking):    Regulate $\alpha(t) \to 0$ (upper position) and $\theta(t)\to\mathrm{step}(t)$ (a step function with several levels)
Problem 3 (Trajectory tracking): Regulate $\alpha(t) \to 0$ (upper position) and $\theta(t)\to \theta^*(t)$ (a smooth desired reference function)

Control Research with Experiments on Pendulum Platform of ControlHub