Simple Flatness Condition for 2DOF Underactuated Mechanical Systems with Application to Controller Design

Page:

119-126

DOI:

https://doi.org/10.18280/mmep.070115

OPEN ACCESS

Abstract:

In this paper, a simple flatness condition for the two degree of freedom underactuated mechanical system has been derived. Differential geometry was used as a mathematical tool in the derivation of the flatness condition. The flatness condition has been found as a direct inner product between the covariant derivative of a vector field which annihilate the codistribution, that spanned by the force matrix and the force matrix itself. Several examples of underactuated mechanical systems are 2DOF systems, or mechanical systems underactuated by one control which can be reduced to 2DOF system. Systems that are classified as differentially flat have many useful features, which can be used in designing an effective controller for the nonlinear systems. The Translational Oscillator with Rotational Actuator (TORA) system is considered here as an example of a typical flat 2DOF underactuated mechanical system. The flat output is derived based on the obtained result here, and then a nonlinear controller is designed for a TORA system based on the flatness property, and using a Backstepping method to overcome the under actuation problem. The simulation results demonstrate the effectiveness of the proposed controller.

Keywords:

*flatness condition, 2DOF mechanical systems, underactuated mechanical system, TORA system*

1. Introduction

The nonlinear behavior of mechanical system has motivated the engineers and the mathematicians to develop theoretical tools that deal with this type of system. The differential geometry is one of the main mathematical topics tool used in the analysis and design for the controller of the nonlinear system [1, 2]. Recently a branch of mechanical system named as underactuated mechanical system is distinguished for its important application and wide appearance in real-life system. The underactuated mechanical system is a mechanical system with number of controllers is less than the number of the configuration variables that describes the mechanical system when using Euler-Lagrange equation to develop the system model. Underactuated system appears in a broad range of applications including Robotics, Aerospace Systems, Flexible Systems, Mobile Systems, and Locomotive Systems.

Differential flatness or shortly flatness was introduced about twenty years ago by Fliess et al. [3]. An intuitive idea of differential flatness can be given as follows; the integral curves of a flat system (these curves satisfy the system equations) can be mapped in a one-to-one way to ordinary curves (which need not satisfy any differential equation) in a space, which may have a different dimension than that of the original system state space [4].

Flatness is a property that characterizes the dynamical system behavior. If a system is flat then it is equivalent to a system without dynamics (trivial system) described by a collection of independent variables, the flat outputs, having the same number (number of outputs) as the number of controllers [3]. The main benefit of flatness property is that all states and inputs can be determined from the flat outputs (flat output and its derivative) without integration (one-to-one relations). The great feature of flat system is the trajectory generation. The trajectory is first designed in flat space and then reflected to system states and inputs through a one-to-one relation.

In underactuated mechanical system, the flatness property is very important where flat output is function only to configuration variables. The number of flat outputs is equal to number of controllers, which completely describe the mechanical system state [5]. Accordingly, the control system can be designed in the flat space easily since we have controller for each flat output; and by using the one-to-one relations, the system states is controlled to the desired locations.

Rathinam and Murray [6] introduced a method in a Riemannian geometry, which provide a complete characterization of configuration flatness for systems with *n* configuration variables and *n*-1 controllers and the range of control forces depends only on configuration variables. This method allows us to determine if such a system is configuration flat and, if so, provides a constructive method for finding all possible configuration flat outputs. Another test was carried out by Rathinam and Sluis [7] for differential flatness using the exterior algebra. The method consists of making an initial guess for *m*-1, (*m* inputs) of the flat outputs, which may involve parameters that are still to be determined. A choice of function of time for the *m*-1 output reduces the system to one with a single input.

The differential flatness-based approach was applied to the development of finite-time control laws to the underactuated crane systems in 2-dimensional (2D) space by Zhang et al. [8]. Kiefer et al. [9] used the flatness property to design a controller for a 3DOF helicopter with a slight modification of the generalized force to impose the flatness property to the 3DOF helicopter model. For the weight handling equipments (like crane), the controller based flatness with constraint Lagrangian system was designed by Kiss et al. [10].

Using flatness the trajectory generation and tracking for nonlinear control system was presented by Van Nieuwstadt et. al. [11] where a large class of industrial and military control problems consist of planning and following a trajectory in the presence of noise and uncertainty. For unconstrained system, nonlinear trajectory generations using flatness based optimal control technique with B-spline as a basic function in the flat space were covered by Milam, and Murray [12, 13]. While for a constrained mechanical system, a trajectory generation was suggested by Milam et al. [14].

The main contribution of the present work consists of deriving a simple condition that will enable us to examine whether the underactuated mechanical by one control is a flat system or not.

The organization of this paper is as follows: basic concept of flat system is presented in section two. The flatness condition for 2DOF underactuated mechanical systems is derived in section three, also for actuated and unactuated shape variable simple flatness conditions are derived in section three. The nonlinear controller design based on flatness property is presented in section (5) while the TORA system, as an application example, is covered in section (6). The numerical simulation for the proposed controller to the TORA system and the conclusions are presented in sections seven and eight, respectively.

2. Flat System

Flatness or differential flatness is an important property of underdetermined ordinary differential equation, which has the following form [6]:

$f^{\alpha}\left(x_{1}, x_{2}, \ldots, x_{n}, \dot{x}_{1}, \dot{x}_{2}, \ldots, \dot{x}_{n}\right)=0$

$\alpha=\{1,2, \ldots, m<n\}$ (1)

where, $x \in \mathcal{R}^{n}$ is the differential equations variables. The *m* underdetermined ordinary differential equations with number of variables *n *greater than the number of equations *m* is said to be differentially flat if there are outputs $y \in \mathcal{R}^{p}(p=n-m)$ known as flat outputs, such that:

$x_{i}=g_{i}\left(t, y, y^{(1)}, \ldots \ldots, y^{(l)}(t)\right)$

$y_{j}=h_{j}\left(t, x, x^{(1)}, \ldots \ldots, x^{(s)}(t)\right)$ (2)

Eq. (2) represents a one-to-one map between state *x* and its derivative up to (*s*) times, $x^{(1)}, \ldots \ldots, x^{(s)}$ and the flat output and its derivatives to (*s*) times. In the case of control system the following equation:

$f^{\alpha}\left(x_{1}, x_{2}, \ldots ., x_{n}, u_{1}, u_{2}, \ldots, u_{m}\right)=0$ (3)

with $\alpha=n$ considered as underdetermined equation with $(n+m)$ variables and therefore if there are *m* flat outputs $y=\left(y_{1}, \ldots \ldots, y_{m}\right)$ then the control system (3) is a flat system. Therefore and according to the above definitions, the trivial system (the flat outputs) completely specifies the curve of the original system. The time that is regarded as an independent condition is preserved in both the trivial system, which consist of flat output, and the original system. In addition, in a control system, the dimension of the trivial system is equal to the number of the controller in the control system and there is a one-to-one relation between the variable of the system including the controller with the flat output and its derivatives. More precisely, if the system has state $x \in \mathbb{R}^{n}$ and input $u \in \mathbb{R}^{m}$ then the system is flat if we can find outputs $y \in \mathbb{R}^{m}$ of the form:

$y=h\left(x, u, u^{(1)}, \ldots \ldots, u^{(r)}\right)$ (4)

Such that:

$x=\varphi\left(y, y^{(1)}, \ldots \ldots, y^{(q)}\right)$

$u=\alpha\left(y, y^{(1)}, \ldots \ldots, y^{(q)}\right)$ (5)

3. Flatness of Mechanical System Underactuated by One-Control

In this section, we will follow the results of the testing and setting approach to the flat outputs of the mechanical system underactuated by one-control introduced by Rathinam and Murray [6]. Then, the differential form of the flat outputs using simple inner product condition will be obtained. To state the result of Rathinam and Murray a quantity like the vector field $\xi$ and the distribution *D* is defined. The vector field $\xi$ is an annihilator to the codistribution $\Delta^{*}$ spanned by the force vector $F^{I}$ i.e. $\xi=\xi_{i} \frac{\partial}{\partial q_{i}}=a n n \Delta^{*}$ where $\Delta^{*}=\operatorname{span}\left[F^{1}, \ldots \ldots, F^{n-1}\right]$. The distribution *D* associated with the mechanical system is defined as:

$D=\operatorname{span}\left[\xi, \nabla_{\frac{\partial}{\partial q_{i}}} \xi: i=1, \ldots \ldots, n\right]$ (6)

where, span[.] is a subspace formed by a linear combination of the vectors $\left(\xi, \nabla_{\frac{\partial}{\partial q_{i}}} \xi: i=1, \ldots \ldots, n\right), \nabla$ is the covariant derivative and $\nabla_{\frac{\partial}{\partial q_{i}}} \xi$ denotes the covariant derivative of $\xi$ along $\frac{\partial}{\partial q_{i}}$

**Theorem (1) **[6]: Let $q$ be a point on $Q$ and $U$ be an open meighborhood of $q,$ and suppose $y: U \subset Q \rightarrow \mathbb{R}^{m}$ is a Submersion. If $y_{1}, \ldots, y_{m}$ are configuration flat outputs, then:

g(\operatorname{ker} T y, D)=0 (7)

where, $g(., .)$ is a bilinear map, which represents an inner product with respect to the Riemannian metric *g*. Conversely if $g(\operatorname{ker} T y, D)=0$ and if a certain regularity holds at *q*, then $y_{1}, \dots, y_{m}$ are configuration flat outputs around *q*. The regularity condition is that the ratios of functions in the following set should not all be the same at *q*:

$\left.\begin{array}{c}\nabla_{\eta}(\mathrm{g}(\xi, Z)): \mathrm{g}(\xi, Z), \\ \nabla_{\eta}\left(\mathrm{g}\left(\nabla_{z_{1}} Z_{2}, \xi\right)\right): \mathrm{g}\left(\nabla_{z_{1}} Z_{2, \xi}\right) \\ \nabla_{\eta}(\xi(V)): \xi(V)\end{array}\right\}$ (8)

where, $Z, Z_{1}, Z_{2}$ are arbitrary vector fields around *q* that are *y*-related to some vector field on $\mathbb{P}^{m}$ and $\xi, \eta$ are fixed non-vanishing vector fields such that $\xi=\xi_{i} \frac{\partial}{\partial q_{i}}=a n n \Delta^{*}=\operatorname{span}\{\xi\}$ and $\operatorname{ker} T y=\operatorname{span}\{\eta\}$. The regularity conditions can be checked in coordinates as follows. Choose a function $y_{0}$ that completes $y_{1}, \dots, y_{m}$ to acoordinate system. Then $y_{1}, \dots, y_{m}$ will be flat outputs if the following ratios of functions are not all identically equal in a local neighborhood:

$\frac{\partial}{\partial y_{0}}\left(\mathrm{g}\left(\xi, \frac{\partial}{\partial y_{j}}\right)\right): \mathrm{g}\left(\xi, \frac{\partial}{\partial y_{j}}\right), j=1, \ldots, m$ (9a)

$\frac{\partial}{\partial y_{0}}\left(\mathrm{g}\left(\nabla_{\frac{\partial}{\partial y_{k}}} \frac{\partial}{\partial y_{j}}, \xi\right)\right): \mathrm{g}\left(\frac{\nabla_{\partial}}{\partial y_{k}} \frac{\partial}{\partial y_{j}}, \xi\right)$ (9b)

$\frac{\partial}{\partial y_{0}}(\xi(V)): \xi(V)$ (9c)

If these are all identically equal that means $y_{1}, \dots, y_{m}$ are differentially dependent and another one-dimensional distribution must be tried.

To complete the tools used to derive the flat outputs using the known integrability theory of Frobenius [15], let $\eta$ is a non-trivial vector field such that $g(\eta, D)=0$, then the following conditions are equivalent:

$g(\operatorname{ker} T y, D)=0 \Leftrightarrow\left\langle\eta_{k}, d y_{i}\right\rangle=0$ (10)

$i=1,2, \dots \ldots, m$ and $k \geq 1$ is an integer.

In witch, the existence of $\eta$ vector field depends on the dimension of *D*. Since $\operatorname{dim} D \leq n-1$ for flat system, then this proves the existence of $\eta$. Also from the condition, $g(\operatorname{ker} T y, D)=0$ the kernel to the tangent subspace of the flat outputs *y* is orthogonal to the distribution *D* with respect to metric *g* and that means $\eta$ is the kernel to the tangent space to flat outputs. The kernel to $T y$, spanned by $\operatorname{ker} T y=\operatorname{span} T\left\{\cap_{i=1, \ldots m} y_{i}=c_{i}\right\}$.These vector fields annihilate the differential form of the flat outputs, i.e., $\left\langle\operatorname{ker} T y, d y_{i}\right\rangle=0, i=1,2, \ldots \ldots, m,$ or $\left\langle\eta, d y_{i}\right\rangle=0$.

**Remark (1) :** The flat output is directly computed from its differential form if $d y_{i}$ is exact otherwise

**Proof:** Appendix A

Therefore theorem (1) does not only enable us to test the flatness of underactuated mechanical system but also guarantee getting *m* flat outputs as proved above.

**Remark (2):** The flat outputs for a mechanical system depend only on the configuration variables and named as configuration flat [6].

4. Flatness Condition for 2DOF Underactuated Mechanical System

The main contribution of this work is to derive a simple flatness condition for the 2DOF underactuated mechanical system given below. Three corollaries are also obtained for the special forms of the 2DOF underactuated system. Finally, the flat output and the relations between the states, inputs and the flat output and its derivatives are derived for the TORA system. Based on flatness property a nonlinear controller is then designed using Backstepping method.

The 2DOF underactuated mechanical system described by the following Euler-Lagrange differential equation

$\frac{d}{d t}\left(\frac{\partial L}{\partial \dot{q}_{i}}\right)-\frac{\partial L}{\partial q_{i}}=F_{i} u$

where, $i=1,2$ and $u \in \mathcal{R}$. The main contribution of the present work is given in the following condition; The 2DOF underactuated mechanical system is a differentially flat system if and only if the following condition holds:

$\left\langle\nabla_{\frac{\partial}{\partial q_{j}}} \xi, F\right\rangle=0, j=1,2$ (11)

where, $\xi$ is a vector field, which satisfies the inner product $\langle\xi, F\rangle=0$ and $\nabla_{\frac{\partial}{\partial q_{j}}} \xi$ is the covariant derivatives with respect to $\frac{\partial}{\partial q_{1}}$ and $\frac{\partial}{\partial q_{2}}$.

The existence of $\xi$ is obvious since *F* span a one-dimensional sub-space. Then following theorem (1), the dimension of the distribution *D* must equal to one in order for the system (1) to be a flat system. The distribution *D* spanned by $D=\operatorname{span}\left\{\xi, \nabla_{\frac{\partial}{\partial q_{1}}} \xi, \nabla_{\frac{\partial}{\partial q_{2}}} \xi\right\}$. Therefore $\nabla \frac{\partial}{\partial q_{1}} \xi$ and $\nabla \frac{\partial}{\partial q_{2}} \xi$ must be collinear to $\xi$ in order to $\operatorname{dim} D$ equal to one and that means $\nabla \frac{\partial}{\partial q_{1}} \xi$ and $\nabla \frac{\partial}{\partial q_{2}} \xi$ annihilate *F *i.e. satisfy the inner product condition given in Eq. (11).

To compute the flat output, the integrable differential form of the flat output *y *for the 2DOF underactuated mechanical system is given by:

$d y=d q_{1}+\left(\frac{m_{21} \xi_{1}+m_{22} \xi_{2}}{m_{11} \xi_{1}+m_{12} \xi_{2}}\right) d q_{2}$ (12)

where, $\xi_{1}$ and $\xi_{2}$ are the elements of $\xi $ vector field and $m_{i j}$ are the elements of the inertia matrix. The distribution *D* spanned by $\xi(D=\operatorname{span}\{\xi\})$. Let $\eta$ be given by $=\eta^{1} \frac{\partial}{\partial q_{1}}+\eta^{2} \frac{\partial}{\partial q_{2}}, \eta^{2}=1$. The $\eta$ vector field is computed such that the condition $g(\eta, \xi)=0$ holds. As a result $\eta$ becomes $\eta=-\left(\frac{m_{21} \xi_{1}+m_{22} \xi_{2}}{m_{11} \xi_{1}+m_{12} \xi_{2}}\right) \frac{\partial}{\partial q_{1}}+\frac{\partial}{\partial q_{2}}$. Also let $d y$ be given by $d y=d q_{1}+a(q) d q_{2}$ then, $\langle\eta, d y\rangle=0, a(q)$ is calculated as $a(q)=\frac{m_{21} \xi_{1}+m_{22} \xi_{2}}{m_{11} \xi_{1}+m_{12} \xi_{2}}$; therefore, $d y=d q_{1}+\left(\frac{m_{21} \xi_{1}+m_{22} \xi_{2}}{m_{11} \xi_{1}+m_{12} \xi_{2}}\right) d q_{2}$.

Note that $d y$ is integrable differential form (the one-form of dimension 2 is always integrable [15]).

The following corollaries for 2DOF underactuated mechanical system with actuated and unactuated shape variables are stated (the inertia matrix is function to the shape variables $q_{s}$). These types of mechanical systems are the main examples of underactuated system studied in many research works [16, 17].

**Corollary (1):** The 2DOF underactuated mechanical system with actuated shape variable is flat if and only if the mass element $m_{11}$ is constant. Accordingly the flat output is given by:

$y=q_{1}+\int_{0}^{q_{2}} \frac{m_{21}(s)}{m_{11}} d s$ (13)

**Proof:** Appendix B

The Acrobot is an example of a non-flat 2DOF underactuated mechanical system with an actuated shape variable [18], and that according to Corollary (1), where m11 is not constant.

**Corollary (2):** 2DOF underactuated mechanical system with unactuated shape variable is differentially flat if and only if the following conditions hold:

$m_{11}=$const. $\&$

$2 m^{11} \frac{\partial m_{12}}{\partial q_{2}}+m^{21} \frac{\partial m_{22}}{\partial q_{2}}=0$ (14)

The flat output is then equal to:

$y=q_{1}+\int_{0}^{q_{2}} \frac{m_{21}(s)}{m_{22}(s)} d s$ (15)

**Proof:** Appendix C

Note that, for a potential energy $V=V(q)$ the term $\xi(V)$ is a Lie-derivative with respect to $\xi $, i.e. $\xi(V)=\xi^{i} \frac{\partial V}{\partial q^{i}}$.

**Remark (3): **The Penduput, the Cart-Pole system and the double Inverted Pendulum are all non-flat underactuated mechanical systems with unactuated shape variables because the element $m_{11}$ of the inertia matrix for all these systems is a function of the shape variable $q_{s}$. The inertia matrices of the Penduput, the Cart-Pole system and the double Inverted Pendulum are as derived by Olfati-Saber [18].

**Corollary (3):** 2DOF underactuated mechanical system with constant inertia matrix and constant force vector F, namely:

$\frac{\partial m_{i j}}{\partial q_{k}}=0, \& \frac{\partial F_{i}}{\partial q_{k}}=0, \quad i, j, k=1,2$ (16)

is a flat system with flat output of the form;

$y=q_{1}+\left(\frac{m_{21} \xi^{1}+m_{22} \xi^{2}}{m_{11} \xi^{1}+m_{12} \xi^{2}}\right) q_{2}$ (17)

**Proof****:** Appendix D

5. Controller Design Based on Flatness Property

In this section, a controller for a 2DOF underactuated mechanical system based on flatness property will be proposed. As a first step, the form of the underdetermined differential equation for a general underactuated system by one control is presented next.

The underdetermined differential equation for a flat mechanical system underactuated by one control is generally given by:

$F\left(y, \dot{y}, \ddot{y}, q_{o}\right)=0$ (18)

where, *y* is the flat output, $y \in \mathcal{R}^{n-1}$ and $q_{o} \in\left[q_{1}, \dots \dots, q_{n}\right]$ is one of the configuration variables which appears in Eq. (18) without its differentials [6]. Eq. (18) can also be written as

$\ddot{y}=f_{1}(y, \dot{y})+g\left(q_{o}\right)$ (19)

For the 2DOF case $y \in \mathcal{R}^{1}$ and $q_{o} \in\left[q_{1}, q_{2}\right]$. By letting $y=q_{1}$ and $q_{o}=q_{2}$, the dynamic equations for the 2DOF system becomes:

$\begin{aligned} \ddot{y} &=f_{1}(y, \dot{y})+g_{1}\left(q_{2}\right) \\ \ddot{q}_{2} &=f_{2}\left(y, y, q_{2}, \dot{q}_{2}\right)+g_{2}\left(y, y, q_{2}, \dot{q}_{2}\right) u \end{aligned}$ (20)

For the underactuated mechanical system given by Eq. (20), the Backstepping method is utilized with $q_{2}$ as a virtual controller which it controls the flat output $y$ in the underdetermined equation. Therefore the idea behind this design approach is to use the virtual controller to regulate the flat output, then the actual control $u$ objective is to force the configuration variable $q_{2}$ to follow the virtual controller. To this end the flat output regulated to zero and consequently the configuration variables are also regulated to the desired values.

Petar V. Kokotovic and others [19] developed a technique named as Backstepping to design stabilizing controls for a special class of nonlineardynamical systems. The Backstepping approach is a step-by-step algorithm, which construct the feedback control based on a Lyapunov function. In this work designing a Backstepping control will be non-Lyapunov-based and hence an additional condition is imposed to ensure the stability of the control system. This condition is the input to state stability (ISS) introduced by Sontag [20] for interconnected system as will be explained later.

As mentioned above, the first step is the design of the virtual control denoted by $q_{2 v}$ then the control $u$ is designed to regulate the error between $q_{2}$ and $q_{2} v$ to zero after a certain period of time. Let $q_{2} v$ be chosen such that the flat output dynamics

$\ddot{y}=f_{1}(y, \dot{y})+g_{1}\left(q_{2 v}\right)=f(y, \dot{y})$ (21)

is an asymptotically stable. Then define the following error function

$e=q_{2}-q_{2 v}$ (22)

Now by differentiating $e$ twice, we get

$\begin{aligned} \ddot{e}=\ddot{q}_{2}-\ddot{q}_{2 v}=& f_{2}\left(y, \dot{y}, q_{2}, \dot{q}_{2}\right)+g_{2}\left(y, \dot{y}, q_{2}, \dot{q}_{2}\right) u \\ &-\ddot{q}_{2 v} \end{aligned}$ (23)

The control law that will stabilize the error function $e$ can be taken as;

$u=\frac{1}{\mathrm{g}_{2}}\left\{-k_{1} e-k_{2} \dot{e}+\ddot{q}_{2 v}-f_{2}\right\}, k_{1}, k_{2}>0$ (24)

However the control law as given in Eq. (24) cannot succeed in regulating the flat output and the configuration variable $q_{2}$ unless the following conditions are satisfied:

- Singularity in control input: $g_{2}\left(y, \dot{y}, q_{2}, \dot{q}_{2}\right) \neq 0$ at any point $\left(y, \dot{y}, q_{2}, \dot{q}_{2}\right)$.
- ISS property: The term $\delta\left(y, \dot{y}, q_{2}\right)$ for the flat dynamics

$\begin{aligned} \ddot{y} &=f_{1}(y, \dot{y})+g_{1}\left(q_{2 v}\right)+\delta\left(y, \dot{y}, q_{2}\right) \\ &=f(y, \dot{y})+\delta\left(y, \dot{y}, q_{2}\right) \end{aligned}$ (25)

is input to state stable (ISS), where $\delta\left(y, \dot{y}, q_{2}\right)=g_{1}\left(q_{2}\right)-g_{1}\left(q_{2 v}\right)$.

The ISS will ensure that the flat output *y* is bounded for a bounded disturbance $\delta\left(y, \dot{y}, q_{2}\right)$ in Eq. (25). A constructive version of the ISS is given by Sepulchre et al. [21]. Namely the linear growth condition is introduced in this reference (theorem 4.7, p.129) to ensure the stability of the state for bounded input. In the subsequent section the linear growth property will be used to prove the stability of the derived controller for the TORA system.

Note that, regulating the flat output and its differentials leads to regulate the configuration variables $\left(q_{1}, q_{2}\right)$, since there is a one to one relation between the configuration variables and the flat output and its differentials.

6. Application Example: The TORA System

The TORA system is used here as an application example to the present work. It consists of translational oscillating platform, which is controlled via a rotational eccentric mass as shown in Figure 1 [22, 23]. The rotating eccentric mass on the platform is actuated by a dc motor. The motion of the eccentric mass applies a force to the platform which can be used to damp the translational oscillations [24]. The motor torque is considered as the control variable, and the task is to derive a control law, based on the flatness property, to asymptotically stabilize the system at the desired equilibrium point.

**Figure 1.** The TORA system

The equations of motion which are derived using Euler-Lagrange equation are given by [25]:

$\ddot{x}=\frac{\left(m * e^{2}+I\right)}{\Delta}\left\{m * e * \sin (\theta) * \dot{\theta}^{2}-k x\right\}$

$-\frac{(m * e * \cos (\theta))}{\Delta}$ (26a)

$\begin{aligned} \ddot{\theta}=& \frac{(m * e * \cos (\theta))}{\Delta}\left\{k x-m * e * \sin (\theta) * \dot{\theta}^{2}\right\} \\ &+\frac{(M+m)}{\Delta} u \\ \Delta &=(M+m)\left(m e^{2}+I\right)-(m * e * \cos (\theta))^{2} \end{aligned}$ (26b)

where,* M* is the cart mass, *m* is the unbalanced mass with a moment of inertia *I* about its center of mass, located at a distance *e* from its rotational axis, *k* is a linear spring constant and u is the control action (torque). Let *x* be the platform translation and $\theta$ is the eccentric mass angle.

The platform translation *x* and eccentric mass angle $\theta$ are the two configuration variables for the TORA system. The inertia matrix and the potential energy for the TORA system are:

$\left.\begin{array}{c}M=\left[\begin{array}{cc}M+m & \operatorname{mecos}(\theta) \\ \operatorname{mecos}(\theta) & m e^{2}+I\end{array}\right] \\ V(x, \theta)=\frac{1}{2} k x^{2}\end{array}\right\}$ (27)

The TORA system, according to corollary (1), where the actuated shape variable $\theta$, is a flat system where $m_{11}$ equal to constant ($m_{11}=M+m$). The flat output from Eq. (12) is given by:

$y=x+\int_{0}^{\theta} \frac{\operatorname{mecos}(s)}{(M+m)} d s=x+\left(\frac{m e}{M+m}\right) \sin (\theta)$ (28)

The underdetermined equation is found by differentiating Eq. (28) twice:

$(M+m) \ddot{y}+k x=0$ (29)

where, according to Eq. (19), $k x=g\left(q_{o}\right)$ i.e., $q_{o}=x$. Using Eq. (29) as the underdetermined differential equation leads to a singularity in control input. Therefore, by eliminating *x* from Eqns. (28) and (29), the underdetermined equation becomes:

$\ddot{y}=-\left(\frac{k}{M+m}\right) y+\frac{k m e}{(M+m)^{2}} \sin (\theta)$ (30)

The TORA system can know be described by the underdetermined Eq. (30) and Eq. (26b) for the eccentric mass angle $\theta$. According to Backstepping method we need first to design a stabilizing virtual control for the underdetermined Eq. (30). Eq. (30) in terms of the virtual control $\mathcal{V}$ is:

$v=-\tan ^{-1}(c \dot{y})$ (31)

As suggested by Jankovic et al. [24], the virtual control that will asymptotically stabilize the flat output *y* is chosen as:

$v=-\tan ^{-1}(c \dot{y})$ (32)

where, $c>0$ is a constant. Now define $\xi=\theta-v$, then Eq. (30) becomes:

$\ddot{y}=-\left(\frac{k}{M+m}\right) y+\frac{k m e}{(M+m)^{2}} \sin (v+\xi)$ (33)

To test the ISS property, Eq. (33) can be written as:

$\ddot{y}=-\left(\frac{k}{M+m}\right) y+\frac{k m e}{(M+m)^{2}} \sin (v)+g(v, \xi) \xi$ (34)

where,

$\frac{k m e}{(M+m)^{2}} \sin (v+\xi)=\frac{k m e}{(M+m)^{2}} \sin (v)+g(v, \xi) \xi$ (35)

and $g(v, \xi)$ can be computed as follows [26]:

$g(v, \xi)=\frac{k m e}{(M+m)^{2}} \int_{0}^{1} D_{\xi} \sin (v+\tau \xi) d \tau$

Clearly $\sin (v+\tau \xi)$ is globally Lipschitz function; that means $g(v, \xi)$ is a bounded quantity. To show that Eq. (34) is ISS, we first refer to $g(v, \xi) \xi$ as the interconnected term [21], then we can state that $g(v, \xi) \xi$ is a linear growth term. Namely,

$|g(v, \xi) \xi| \leq L|\xi|$ (36)

where, $\quad|g(v, \xi)| \leq L$. Since the interconnected term is bounded with respect to the flat output and its differential then Eq. (34) is ISS.

To derive the actual control law, we differentiate the new state $\xi$ twice because the relative degree between $\xi$ and $\mathcal{U}$ is two;

$\ddot{\xi}=\ddot{\theta}-\ddot{v}=f(\theta, \dot{\theta}, x, \ddot{v})+g(\theta) u$ (37)

where, $f(\theta, \dot{\theta}, x, \ddot{v})=\frac{(m * e * \cos (\theta))}{\Delta}\left\{k x-m * e * \sin (\theta) * \dot{\theta}^{2}\right\}-\ddot{v}$ and $g=\frac{(M+m)}{\Delta}$. Finally, the control law that will globally asymptotically stabilize $\xi$ (Eq. (37)) is given by:

$u=-\frac{1}{\mathrm{g}}\left\{f(\theta, \dot{\theta}, x, \ddot{v})+\lambda_{1} \xi+\lambda_{2} \dot{\xi}\right\}, \lambda_{1} \& \lambda_{2}>0$ (38)

**Figure 2.** Platform position vs. time (*c*=15)

**Figure 3.** Eccentric mass angle vs. time (*c*=15)

The control objective here is to regulate the flat output and its differentials which lead to regulate the platform position as consequence to the flatness property of the TORA system.

The numerical simulations for the TORA system model as given in Eq. (26) use the following parameter values [27]:

$\begin{aligned} M=1.3608 \mathrm{kg}, & m=0.096 \mathrm{kg}, e=0.0592 \mathrm{m} \\ k=186.3 \mathrm{N} / \mathrm{m}, & I=0.0002175 \mathrm{kg} \mathrm{m}^{2} \end{aligned}$

While the control parameters are; *c*=15), $\lambda_{1}=8$ and $\lambda_{2}=15$. In Figure 2 the cart position is plotted with time where the damping effect due the control action stabilizes the cart in less than 5 second while in Figures 3 and 4 the eccentric mass angle $\theta$ and the control effort are plotted. The damping effect to the eccentric mass is directly related to the design parameter* c* as can be seen here: when $\xi \rightarrow 0$ we have $\theta=-\tan ^{-1}(c \dot{y})$ or $\tan (\theta)=-c \dot{y} \Rightarrow \sin (\theta)=\frac{-c \dot{y}}{\sqrt{1+(c \dot{x})^{2}}}$, then Eq. (23) becomes;

$\ddot{y}=-\left(\frac{k}{M+m}\right) y-\frac{c k m e}{(M+m)^{2} \sqrt{1+(c \dot{y})^{2}}} \dot{y}$

This point is demonstrated in Figure 5, where *c*=25.

**Figure 4.** Control action (N.m) vs. time (*c*=15)

**Figure 5.** Platform position vs. time (*c*=25)

7. Conclusions

In the present work a simple flatness condition was derived for a class of mechanical systems known as underactuated mechanical systems. To derive the flat outputs, the equivalence relation (Eq. (10)) was proposed based on the integrability theory. This led to complete the tools required for testing the flatness (theorem (1)) and deriving the flat outputs for a mechanical system underactuated by one control. Applying these tools to a 2DOF underactuated mechanical system led to derive a simple flatness condition and to the integrable differential form of the flat output. Additionally, the flatness test is found in corollaries (1) to (3) as simple condition depending only on the elements of inertia matrix beside the actuation type, where the underactuated mechanical system are classified as actuated and unactuated shape variable.

Depending on the flatness property for the 2DOF underactuated mechanical system, a control law was derived using Backstepping method. The TORA system was used in this work as an application example and it is found flat according to corollary (1), and a nonlinear control law was designed. The effectiveness of the designed controller to the TORA system was demonstrated via numerical simulation by giving an initial displacement of 0.025*m *to the platform from its equilibrium point.

Appendix

**Appendix A**

If $d y_{i}$ is an exact differential then the flat output *y* can be obtained by direct integration of $dy$. Otherwise the differential form is still integrable because the *n*-1 linearly independent differential form are always integrable where $\operatorname{dim}\left[d\left(d y_{i}\right) \wedge\left(d y_{1} \wedge \ldots \ldots \wedge d y_{n-1}\right)\right]>n$ with the use of an integration factor $\gamma$ to get $\tilde{y}$.

**Appendix B**

For the 2DOF, unactuated shape variable the force vector (one-form) is expressed by $F=d q_{s}$. Let $q_{2}=q_{s}$, then: $F=d q_{2}$. The $\xi$ vector field satisfies the condition $\nabla_{\frac{\partial}{\partial q_{j}}} \xi, i=1,2$ that is $\xi=\frac{\partial}{\partial q_{1}}$. The covariant derivatives $\nabla_{\frac{\partial}{\partial q_{i}}} \xi, i=1,2$ are equal to $\nabla_{\frac{\partial}{\partial q_{i}}} \xi=\nabla_{\frac{\partial}{\partial q_{i}}} \frac{\partial}{\partial q_{1}}=\Gamma_{i 1}^{k} \frac{\partial}{\partial q_{k}}$. The flatness condition is;

$\left\langle\Gamma_{i 1}^{k} \frac{\partial}{\partial q_{k}}, d q_{2}\right\rangle=0$ or $\left\langle\Gamma_{i 1}^{1} \frac{\partial}{\partial q_{1}}+\Gamma_{i 1}^{2} \frac{\partial}{\partial q_{2}}, d q_{2}\right\rangle=0$

Then to satisfy this condition the Christoffel symbol $\Gamma_{i 1}^{2}$ must equal to zero, where the Christoffel symbol $\Gamma_{i 1}^{2}$ is computed as $\Gamma_{i 1}^{2}=\frac{1}{2} m^{2 j}\left\{\frac{\partial m_{j 1}}{\partial q_{i}}-\frac{\partial m_{i 1}}{\partial q_{j}}\right\}$. The mass matrix appears above is function only to shape variable $q_{2}$. For $i=1$, we have $\Gamma_{11}^{2}=-\frac{1}{2} m^{22} * \frac{\partial m_{11}}{\partial q_{2}}$ and for $i=2, \Gamma_{21}^{2}=\frac{1}{2} m^{22}\left\{\frac{\partial m_{21}}{\partial q_{2}}-\frac{\partial m_{21}}{\partial q_{2}}\right\}=0$. Therefore, $\Gamma_{i 1}^{2}$ is equal to zero if and only if $m_{11}$ is constant which satisfies the flatness condition (11). To show that this condition is the only condition for flatness, we have to proof that the regularity condition is satisfied without any additional condition. To start, let $y_{o}=q_{1}$, then $\frac{\partial}{\partial y}=\frac{\partial}{\partial q_{1}}, \frac{\partial}{\partial y_{o}}=-\frac{m_{21}\left(q_{2}\right)}{m_{11}} \frac{\partial}{\partial q_{1}}+\frac{\partial}{\partial q_{2}}$. The first regularity condition is given by $\frac{\partial}{\partial y_{0}}\left(g\left(\frac{\partial}{\partial q_{1}}, \frac{\partial}{\partial q_{1}}\right)\right): g\left(\frac{\partial}{\partial q_{1}}, \frac{\partial}{\partial q_{1}}\right)$ and it is computed as $0: m_{11}$. Also the second regularity condition is $\frac{\partial}{\partial y_{0}}\left(g\left(\nabla \frac{\partial}{\partial q_{1}} \frac{\partial}{\partial q_{1}}, \frac{\partial}{\partial q_{1}}\right)\right): g\left(\nabla \frac{\partial}{\partial q_{1}} \frac{\partial}{\partial q_{1}}, \frac{\partial}{\partial q_{1}}\right)$ and is computed as; $\frac{\partial}{\partial y_{0}}\left(m_{11} \Gamma_{11}^{1}\right): m_{11} \Gamma_{11}^{1} \Rightarrow 0: 0$.

Since the two ratios are unequal, therefore the output *y* is a flat output provided that $m_{11}$* is constant as a sufficient condition for flatness* and irrespective to the potential energy form.

**Appendix C**

For unactuated shape variable case, the force vector *F* is given by $F=d q_{1}$. Accordingly, $\xi=\frac{\partial}{\partial q_{2}}$. Then by follow the flatness condition (11), we have

$\left\langle\nabla_{\frac{\partial}{\partial q_{i}}} \frac{\partial}{\partial q_{2}}, d q_{1}\right\rangle=0 \quad$ or $\quad\left\langle\Gamma_{i 2}^{k} \frac{\partial}{\partial q_{k}}, d q_{1}\right\rangle=0$

This leads to the following condition: $\Gamma_{i 2}^{1}=0$, where Christoffel symbols $\Gamma_{i 2}^{1}$ are equal to $\Gamma_{12}^{1}=\frac{1}{2} m^{11} \frac{\partial m_{11}}{\partial q_{2}}$, $\Gamma_{22}^{1}=m^{11} \frac{\partial m_{12}}{\partial q_{2}}+\frac{1}{2} m^{21} \frac{\partial m_{22}}{\partial q_{2}}$. To satisfy the above $\Gamma_{i 2}^{1}=0$, we get the following condition for flatness:

$m_{11}=$const.$\& 2 m^{11} \frac{\partial m_{12}}{\partial q_{2}}+m^{21} \frac{\partial m_{22}}{\partial q_{2}}=0$

To check the regularity condition, let $y_{0}=q_{2}$, then we have $\frac{\partial}{\partial y}=\frac{\partial}{\partial q_{1}}, \frac{\partial}{\partial y_{o}}=\frac{\partial}{\partial q_{2}}-\frac{m_{21}\left(q_{2}\right)}{m_{22}\left(q_{2}\right)} \frac{\partial}{\partial q_{1}}$. The first regularity condition is given by $\frac{\partial}{\partial y_{0}}\left(g\left(\frac{\partial}{\partial q_{2}}, \frac{\partial}{\partial q_{1}}\right)\right): g\left(\frac{\partial}{\partial q_{2}}, \frac{\partial}{\partial q_{1}}\right)$, $\frac{\partial}{\partial y_{0}}\left(m_{21}\right): m_{21}$ and for the second regularity condition

$\frac{\partial}{\partial y_{0}}\left(\mathrm{g}\left(\nabla \frac{\partial}{\partial q_{1}} \frac{\partial}{\partial q_{1}}, \frac{\partial}{\partial q_{2}}\right)\right): \mathrm{g}\left(\nabla \frac{\partial}{\partial q_{1}} \frac{\partial}{\partial q_{1}}, \frac{\partial}{\partial q_{2}}\right)$

$\Rightarrow \frac{\partial}{\partial y_{0}}\left(\mathrm{g}\left(\Gamma_{11}^{k} \frac{\partial}{\partial q_{k}}, \frac{\partial}{\partial q_{2}}\right)\right): \mathrm{g}\left(\Gamma_{11}^{k} \frac{\partial}{\partial q_{k}}, \frac{\partial}{\partial q_{2}}\right)$

$\Rightarrow \frac{\partial}{\partial y_{0}}\left(m_{12} \Gamma_{11}^{1}+m_{22} \Gamma_{11}^{2}\right): \mathrm{g}\left(m_{12} \Gamma_{11}^{1}+m_{22} \Gamma_{11}^{2}\right) \Rightarrow 0: 0$

where, $\Gamma_{11}^{k}=0$. This result leads to two cases, depending on $m_{21}$. If $m_{21} \neq 0$ then the system is flat, otherwise if $m_{21}=0$, then the mechanical system is flat if the following third regularity condition $\frac{\partial}{\partial y_{0}}(\xi(V)): \xi(V)$ differs from 0: 0.

**Appendix D**

For a system with inertia matrix satisfying Eq. (16), the Christoffel symbols are zero $\Gamma_{i j}^{k}=0, i, j, k=1,2$. In addition, $\xi$ consists of constant elements then $\nabla \frac{\partial}{\partial q_{i}} \xi$ is equal to zero as can be deduced from the covariant derivative, given by

$\nabla_{\frac{\partial}{\partial q_{i}}} \xi=\xi^{k} \Gamma_{j k}^{i} \frac{\partial}{\partial q_{i}}+\frac{\partial \xi^{k}}{\partial q_{j}} \frac{\partial}{\partial q_{k}}$

Hence, the flatness condition (11) is satisfied and the system is flat. Also the flat output can be derived directly using Eq. (12).

References

[1] Isidori, A. (1985). Nonlinear Control Systems: An Introduction. Springer, New York. http://dx.doi.org/10.1007/BFb0006368

[2] Sastry S.S. (1999). Nonlinear Systems: Analysis, Stability and Control. Springer, New York.

[3] Fliess, M., Levine, J., Martin, P., Rouchon, P. (1994). Flatness and defect of nonlinear systems: Introductory theory and examples. Int. Journal of Control, 61(6): 1327-1361.

[4] L´evine, J. (2009). Analysis and Control of Nonlinear Systems. Springer, Verlag Berlin Heidelberg.

[5] Murray, R.M., Rathinam, M., Sluis, W. (1995). Differential flatness of mechanical control systems: A catalog of prototype systems. Proceedings of the 1995 ASME International Mechanical Engineering Congress and Exposition, San Francisco, pp. 12-17.

[6] Rathinam, M., Murray, R.M. (1998). Configuration flatness of Lagrangian systems underactuated by one control. SIAM Journal on Control and Optimization, 36(1): 164-179. http://dx.doi.org/10.1137/S0363012996300987

[7] Rathinam, M., Sluis, W.M. (1995). A test for differential flatness by reduction to single input systems. IFAC Proceedings Volumes, 29(1): 2138-2143. http://dx.doi.org/10.1016/S1474-6670(17)57988-4

[8] Zhang, Z., Wu, Y., Huang, J. (2017). Differential-flatness-based finite-time anti-swing control of underactuated crane systems. Nonlinear Dynamics, 87(3): 1749-1761. http://dx.doi.org/10.1007/s11071-016-3149-7

[9] Kiefer, T., Kugi, A., Kemmetmuller, W. (2004). Modeling and flatness-based control of a 3DOF helicopter laboratory experiment. 6th IFAC Symposium on Nonlinear Control Systems Design (NOLCOS).

[10] Kiss, B., Levine, J., Ph. Mullhaupt. (2000). Modeling and motion planning for a class of weight handling equipments. Proceeding of the 14th International Conf. on Systems Engineering, Conventry, UK.

[11] Van Nieuwstadt, M., Rathinam, M., Murray, R.M. (1998). Differential flatness and absolute equivalence of nonlinear control systems. SIAM Journal on Control and Optimization, 36(4): 1225-1239. http://dx.doi.org/10.1137/S0363012995274027

[12] Milam, M.B. (2003). Real-time optimal trajectory generation for constrained dynamical systems. Ph.D. Thesis, California Institute of Technology, Pasadena, California.

[13] Murray, R.M. (2006). Real-Time Trajectory Generation. Lecture 3-1, Caltech CDS, USA.

[14] Milam, M.B., Mushambi, K., Murray, R.M. (2000). A new computational approach to real-time trajectory generation for constrained mechanical systems. Proceeding of the Conf. on Decision and Control, Sydney, NSW, Australia. http://dx.doi.org/10.1109/CDC.2000.912875

[15] Boothby, W.M. (2003). An Introduction to Differentiable Manifolds and Riemannian Geometry. New York, Academic.

[16] Hauser, J., Sastry, S., Kokotovic, P. (1992). Nonlinear control via approximate input-output linearization. IEEE Trans. On Automatic Control, 37(3): 392-398. http://doi.org/10.1109/9.119645

[17] Olfati-Saber, R. (2000). Global configuration stabilization for the VTOL aircraft with strong input coupling. Proceeding of the 39th Conf. on Decision and Control, Sydney, Australia, 47(11): 1949-1952. http://dx.doi.org/10.1109/TAC.2002.804457

[18] Olfati-Saber, R. (2001). Nonlinear control of underactuated mechanical systems with application to robotics and aerospace vehicles. Ph.D. Dissertation, Dept. Elect. Eng. Comput. Sci., Massachusetts Inst. Technol., Cambridge, MA.

[19] Kanellakopoulos, I., Kokotovic, P.V., Morse, A.S. (1991). Systematic design of adaptive controllers for feedback linearizable systems. IEEE Trans. on Automatic Control, 36(11): 649-654. http://dx.doi.org/10.1109/9.100933

[20] Sontag, E.D. (1989). Smooth stabilization implies coprime factorization. IEEE Trans. Automatic Control, 34(4): 435-443. http://dx.doi.org/10.1109/9.28018

[21] Sepulchre, R., Jankovic, M., Kokotovic, P. (1997). Constructive Nonlinear Control. Springer, London. http://dx.doi.org/10.1007/978-1-4471-0967-9

[22] Wan, C.J., Bernstein, D.S., Coppola, V.T. (1996). Global stabilization of the oscillating eccentric rotor. Nonlinear Dynamics, 10: 49-62. http://dx.doi.org/10.1007/BF00114798

[23] Wu, Y., Sun, N., Fang, Y., Liang, D. (2017). An increased nonlinear coupling motion controller for underactuated multi-TORA systems: Theoretical design and hardware experimentation. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 49(6): 1186-1193. http://dx.doi.org/10.1109/TSMC.2017.2723478

[24] Jankovic, M., Fontaine, D., Kokotovic, P.V. (1996). TORA example: Cascade and passivity-based control designs. IEEE Trans. On Control Systems Technology, 4(3): 292-297. http://dx.doi.org/10.1109/87.491203

[25] Bupp, R.T., Bernstein, D.S., Coppola, V.T. (1995). A benchmark problem for nonlinear control design. Proceedings of 1995 American Control Conference - ACC'95, Seattle, WA, USA. http://doi.org/10.1109/ACC.1995.532759

[26] Sontag, E.D. (1998). Mathematical Control Theory. New York, Springer, second edition. http://dx.doi.org/10.1007/978-1-4684-0374-9

[27] Nazrulla, S., Khalil, H.K. (2008). A Novel Nonlinear Output Feedback Control Applied to the TORA Benchmark System. Proceedings of the 47th IEEE Conference on Decision and Control Cancun, Mexico. http://dx.doi.org/10.1109/CDC.2008.4739390