**3. Design of the control system**

In this section, the proposed nonlinear control for the TRMS platform is described. The proposed control is based on the division between the electrical and mechanical dynamics of the system and uses a cascade-type nonlinear control algorithm. **Figure 5** displays the proposed control scheme. As it can be observed, the proposed design is composed of two independent stages (or control loops) that are utilised to achieve stabilisation and precise trajectory tracking tasks for the controlled position of the generalised system coordinates. It should be noted that the proposed solution has been designed to overcome one of the limitations of the TRMS, which is the fact of being an underactuated system. As result of this fact, it only has two control actions (the input voltages of the main and tail rotors) to control the four degrees of freedom of the system (the pitch and yaw angles, and the angular velocities of the propellers). In this way, in order to meet this objective, once the dynamics of the TRMS have been decoupled, a nonlinear multivariable inner loop is closed to control the vector of the angular velocities, and then, a nonlinear multivariable outer loop is closed to control the vector of the generalised coordinates of the system. This solution, based on a control scheme with two nested loops, allows a simplification in the design procedure as a result of its division into two simpler processes. Moreover, the scheme can be implemented more easily and safely than the standard controllers.

**Figure 5.** Nonlinear control scheme for the TRMS.

In the following subsections we describe the specifications and objectives of each control loop, defined as the inner loop or electrical controller and the outer loop or mechanical controller.

#### **3.1. Inner loop control**

The objective of the inner loop control is to determine the input voltages of the main and tail rotors (simulated in the MATLAB®/Simulink® environment), () = , , in order to eliminate the difference between the vector of reference angular velocities, \*() = \* , \* , calculated in the outer loop stage (as will be described in the next subsection), and the current vector of angular velocities of the propellers of the TRMS, () = , .

The magnitude of the input control voltage vector, (), necessary to achieve an asymptotically stable convergent behaviour of the tracking error trajectories, is calculated as the following nonlinear control law:

$$\mu\left(t\right) = N^{-1}\left[\gamma\_{\mathfrak{e}}\left(t\right) - \Gamma\left(\mathfrak{so}(t)\right)\right] \tag{55}$$

where *N* and () where defined in Eqs. (10) and (11), respectively, and <sup>=</sup> γ, γ represents a vector of auxiliary control inputs, given by the following expression:

$$\mathbf{y}\_e(t) = -K\_P^e e\_\alpha(t) = -K\_P^e [\omega(t) - \omega^\*(t)] \tag{56}$$

where <sup>∈</sup> <sup>ℝ</sup>2×2 is a constant diagonal positive definite matrix that represents the design elements of a vector-valued classical proportional controller and <sup>=</sup> () − \*() is the angular velocity error vector, which satisfies the following predominantly linear dynamic:

$$
\dot{\omega}(t) + K\_P^e e\_{\phi}(t) = \mathbf{0} \tag{57}
$$

Finally, the coefficients of the matrix *KP e* are chosen so as to render the closed-loop characteristic polynomial vectors into a Hurwitz polynomial vector with desirable roots.

#### **3.2. Outer loop control**

angular velocities, and then, a nonlinear multivariable outer loop is closed to control the vector of the generalised coordinates of the system. This solution, based on a control scheme with two nested loops, allows a simplification in the design procedure as a result of its division into two simpler processes. Moreover, the scheme can be implemented more easily and safely than

In the following subsections we describe the specifications and objectives of each control loop, defined as the inner loop or electrical controller and the outer loop or mechanical controller.

The objective of the inner loop control is to determine the input voltages of the main and tail

calculated in the outer loop stage (as will be described in the next subsection), and the current

The magnitude of the input control voltage vector, (), necessary to achieve an asymptotically stable convergent behaviour of the tracking error trajectories, is calculated as the following

w

eliminate the difference between the vector of reference angular velocities, \*() =

( ) ( ) ( ) <sup>1</sup> ( ) - = - é ù ë û *u N t tt* **γ Γ** *<sup>e</sup>* , in order to

.

(55)

\* , \* ,

rotors (simulated in the MATLAB®/Simulink® environment), () = ,

vector of angular velocities of the propellers of the TRMS, () = ,

the standard controllers.

282 Nonlinear Systems - Design, Analysis, Estimation and Control

**Figure 5.** Nonlinear control scheme for the TRMS.

**3.1. Inner loop control**

nonlinear control law:

The aim of the outer loop control (mechanical controller) is to determine the required values for the angular velocities of the two rotors, *ω*\* () = \* , \* , which will be the reference inputs of the electrical loop (described in the above subsection), in order to eliminate the difference between the generalised coordinates of the TRMS, *q*() = , , and the reference trajectories for the generalised coordinates of the TRMS *q*\* () = \*,\* .

As a previous step for determining the mechanical control law, a simplification in the dynamic mechanical modelling of the TRMS has been considered. If we assume that the movement of the platform is sufficiently smooth, the terms of the inertial counter torques, which are caused by the reaction produced by the changes in the rotational speed of each rotor, <sup>=</sup> ˙ and <sup>=</sup> ˙ included in Eqs. (53) and (54), can be considered negligible in comparison with the other terms. In this way, the dynamic equation of the mechanical part of the TRMS can be rewritten as:

$$\mathcal{M}\left(q\left(t\right)\right)\ddot{q}\left(t\right) + \mathcal{D}\left(q\left(t\right), \dot{q}\left(t\right)\right) = \mathcal{E}\left(q\left(t\right)\right)\Omega\left(t\right) \tag{58}$$

where the matrices (()), (()), and () were defined in the previous section and the new matrix ((), ˙()) = , is given by:

$$D\_{\psi} = \frac{1}{2} (J\_1 - J\_2) S\_{2\psi} \dot{\phi}^2 + \mathbf{g} \left( l\_{T\_1} m\_{T\_1} C\_{\psi} + l\_{T\_2} m\_{T\_2} S\_{\psi} \right) + \left( f\_{v\_{\psi}} \dot{\nu} + f\_{c\_{\psi}} \text{sgn}(\dot{\nu}) \right) \tag{59}$$

$$D\_{\phi} = -h\left(l\_{T\_1}m\_{T\_1}C\_{\psi} + l\_{T\_2}m\_{T\_2}S\_{\psi}\right)\dot{\psi}^2 + \left(\left(J\_2 - J\_1\right)S\_{2\psi}\right)\dot{\phi}\dot{\psi} + \left(f\_{\upsilon\_{\phi}}\dot{\phi} + f\_{\mathcal{C}\_{\dot{\phi}}}\text{sgn}\left(\dot{\phi}\right)\right) + C\_{\mathcal{C}}\left(\phi - \phi\_0\right) \tag{60}$$

The following nonlinear feedback control input vector, (), is synthesised as a multivariable proportional-derivative (PD) controller with a cancellation term:

$$\boldsymbol{\Delta}(t) = \boldsymbol{E}^{-1}\left(\boldsymbol{q}(t)\right)\Big|\,\boldsymbol{M}\left(\boldsymbol{q}(t)\right)\boldsymbol{\gamma}\_{\mathfrak{m}}\left(t\right) + \boldsymbol{\mathcal{D}}\left(\boldsymbol{q}(t),\dot{\boldsymbol{q}}(t)\right)\Big|\,\tag{61}$$

where () = γ, γ is given by the following expression:

$$\boldsymbol{\dot{\gamma}}\boldsymbol{\gamma}\_{\mathfrak{m}}\left(\boldsymbol{t}\right) = \ddot{\boldsymbol{q}}(\boldsymbol{t}) = \ddot{\boldsymbol{q}}^{\ast}\left(\boldsymbol{t}\right) - \boldsymbol{K}\_{D}^{\mathfrak{m}}\left(\dot{\boldsymbol{q}}(\boldsymbol{t}) - \dot{\boldsymbol{q}}^{\ast}(\boldsymbol{t})\right) - \boldsymbol{K}\_{P}^{\mathfrak{m}}\left(\boldsymbol{q}(\boldsymbol{t}) - \boldsymbol{q}^{\ast}(\boldsymbol{t})\right) \tag{62}$$

in which and <sup>∈</sup> ℝ2×2 are the diagonal positive definite matrices that represent the design elements of a vector-valued classical PD controller. Thereby, for the mechanical part, the closed loop tracking error vector, () = () − \*(), evolves governed by:

$$
\ddot{e}\_q(t) + K\_D^{\text{m}} \dot{e}\_q(t) + K\_P^{\text{m}} e\_q(t) = 0 \tag{63}
$$

The controller design matrices and have been selected based in the philosophy used for the electrical controller. They must be selected to render closed-loop characteristic polynomial vectors into a Hurwitz polynomial vector with desirable roots. Finally, the necessary angular velocity vector values, \*() = \* , \* , are obtained from the input control vector, () = , by performing the following operation:

$$\boldsymbol{\alpha}^\* \begin{pmatrix} t \\ \end{pmatrix} = \begin{bmatrix} \boldsymbol{\alpha}\_m^\* \\ \boldsymbol{\alpha}\_t^\* \\ \end{bmatrix} = \begin{bmatrix} \text{sgn} \left( \boldsymbol{\alpha}\_m \left| \boldsymbol{\alpha}\_m \right| \right) \cdot \sqrt{\left\| \boldsymbol{\alpha}\_m \left| \boldsymbol{\alpha}\_m \right|} \\\ \text{sgn} \left( \boldsymbol{\alpha}\_t \left| \boldsymbol{\alpha}\_t \right| \right) \cdot \sqrt{\left\| \boldsymbol{\alpha}\_t \left| \boldsymbol{\alpha}\_t \right|} \end{bmatrix} \tag{64}$$

#### **4. Results**

This section describes the numerical simulations carried out in the MATLAB®/Simulink® environment for the sake of verifying the efficiency of the proposed control approach in terms of quick convergence of the tracking errors to a small neighbourhood of zero, smooth transient responses and low control effort. In the simulations, the desired reference trajectory for the pitch () and the yaw () angles have been defined by the next expression:

( ) (( ) ) ( ( )) ( ) 11 2 2

&& & & & *D h l m C l m S J J S f f sgn C TT T T <sup>c</sup> <sup>c</sup>* (60)

fy

 y

The following nonlinear feedback control input vector, (), is synthesised as a multivariable

=- + + - + + + -

is given by the following expression:

**<sup>γ</sup>** ( ) == - - - - ( ) ( ) ( () ()) ( () ()) *tt t t t t t* && && && *\*m \* m \**

the closed loop tracking error vector, () = () − \*(), evolves governed by:

and

( ) ( )

*sgn*

*sgn*

\* \*

w

w

ê ú

design elements of a vector-valued classical PD controller. Thereby, for the mechanical part,

for the electrical controller. They must be selected to render closed-loop characteristic polynomial vectors into a Hurwitz polynomial vector with desirable roots. Finally, the necessary

\* ,

, by performing the following operation:

( )

ww

ë û <sup>×</sup> ë û

This section describes the numerical simulations carried out in the MATLAB®/Simulink® environment for the sake of verifying the efficiency of the proposed control approach in terms of quick convergence of the tracking errors to a small neighbourhood of zero, smooth transient

*t tt tt*

*mm mm <sup>m</sup>*

 ww

*\* ω* (64)

 ww

ww

é ù é ù <sup>×</sup> ê ú = = ê ú

2 12 *v* 0

 f  f

 f f

f

( ) ( ( )) ( ( )) ( ) ( ( ) ( )) <sup>1</sup> *t t t t tt* , - <sup>=</sup> é ù <sup>+</sup> ë û **Ω γ** & *E q M q Dq q <sup>m</sup>* (61)

*m DP q q Kq q Kq q* (62)

<sup>∈</sup> ℝ2×2 are the diagonal positive definite matrices that represent the

& (*ttt* ) ++= && () () 0 *m m <sup>q</sup> Dq P q e Ke Ke* (63)

have been selected based in the philosophy used

\* , are obtained from the input control vector,

 f

2

proportional-derivative (PD) controller with a cancellation term:

y

f

where () = γ, γ

and

The controller design matrices

() =

**4. Results**

angular velocity vector values, \*() =

*t*

in which

yy

284 Nonlinear Systems - Design, Analysis, Estimation and Control

$$\begin{aligned} \mathbf{q}^\* \begin{pmatrix} t \\ \end{pmatrix} = \begin{bmatrix} \boldsymbol{\nu}^\* \\ \boldsymbol{\phi}^\* \end{bmatrix} = \begin{bmatrix} A\_{\mathbf{0}\_\psi} + A\_{\mathbf{l}\_\psi} \left( 2 \sin \left( \alpha\_{\mathbf{l}\_\psi} t \right) + \sin \left( \alpha\_{\mathbf{2}\_\psi} t \right) \right) \\\\ A\_{\mathbf{l}\_\phi} \sin \left( \alpha\_{\mathbf{l}\_\phi} t \right) + A\_{\mathbf{2}\_\phi} \left( \sin \left( \alpha\_{\mathbf{2}\_\phi} t \right) + \sin \left( \alpha\_{\mathbf{3}\_\phi} t \right) \right) \end{bmatrix} \end{aligned} \tag{65}$$

where \*() = \*(),\*() is the reference trajectory vector of the generalised coordinates, and the values of the constants used in the above expressions are given by:

$$A\_{\rm{0}\_{\nu}} = 0.4 \text{ rad}; \quad A\_{\rm{l}\_{\nu}} = 0.1 \text{ rad}; \quad A\_{\rm{l}\_{\phi}} = 0.8 \text{ rad}; \quad A\_{\rm{2}\_{\phi}} = 0.3 \text{ rad}; \tag{66}$$

$$
\alpha\_{\text{l}\_{\text{yr}}} = 0.0785 \text{ rad/s}; \quad \alpha\_{\text{l}\_{\text{yr}}} = 0.0157 \text{ rad/s}; \tag{67}
$$

$$
\rho\_{\mathbf{l}\_{\phi}} = 0.157 \text{ rad/s}; \quad \rho\_{\mathbf{\hat{2}\_{\phi}}} = 0.0785 \text{ rad/s}; \quad \alpha\_{\mathbf{\hat{3}\_{\phi}}} = 0.0157 \text{ rad/s}; \tag{68}
$$

On the other hand, the values used in the simulation of the dynamic model of the TRMS, electrical parameters (main and tail rotors), mechanical parameters and dimensional parameters of the platform are detailed in **Tables 1**–**5**. The initial position of the TRMS has been defined as 0() = 0,0 <sup>=</sup> 0, 0 rad, representing a different value of the initial position than the reference trajectory vector. This choice of the starting position has been made to demonstrate the exponential convergence of the desired trajectories. With regard to the controller design parameters, it must be remarked that they have been selected to make the dynamics of the inner loop much faster than the outer loop dynamics, all this in order to ensure the functioning of the cascade controller [26]. The resulting values are as follows:

$$K\_P^\mathbf{f} = \text{diag}(10.5, 6.2);\tag{69}$$

$$K\_{\mathbf{D}}^{\mathfrak{m}} = \operatorname{diag}\left(8.20, 3.85\right); \quad K\_{\mathbf{P}}^{\mathfrak{m}} = \operatorname{diag}\left(13.20, 2.205\right);\tag{70}$$

**Figures 6** and **7** show the performance of the proposed control scheme. **Figure 6** illustrates a comparative between the desired trajectory, \*() = \*(),\*() , and the real trajectory of the TRMS, () = (),() . The difference between these trajectories, or, in other words, the error vector of generalised coordinates, () = () − \*() = () − \*(),() − \*() , is represented in **Figure 7**. The exponential convergence of the desired trajectories is observed, with the error bounded to a small neighbourhood to zero, and the robustness against large initial errors.

**Figure 6.** Real and desired evolution of the vector of generalised coordinates of the TRMS, () = (),() .

**Figure 7.** Evolution of the error vector of the generalised coordinates of the TRMS, () = () − \*() = () − \*(),() − \*() .

Another graph that shows the excellent performance of the outer control loop is shown in **Figure 8**, where the auxiliary control input vector of the mechanical proportional-derivative (PD) controller (Eq. (62)) can be observed. This figure shows the quick convergence of the auxiliary control inputs of the mechanical controller to a small value of the origin in the reference trajectory tracking vector error phase space, (), in a globally asymptotic exponential dominated manner.

with the error bounded to a small neighbourhood to zero, and the robustness against large

**Figure 6.** Real and desired evolution of the vector of generalised coordinates of the TRMS, () = (),() .

**Figure 7.** Evolution of the error vector of the generalised coordinates of the TRMS,

Another graph that shows the excellent performance of the outer control loop is shown in **Figure 8**, where the auxiliary control input vector of the mechanical proportional-derivative (PD) controller (Eq. (62)) can be observed. This figure shows the quick convergence of the auxiliary control inputs of the mechanical controller to a small value of the origin in the

() = () − \*() = () − \*(),() − \*() .

initial errors.

286 Nonlinear Systems - Design, Analysis, Estimation and Control

**Figure 8.** Evolution of the auxiliary control input vector of the mechanical multivariable PD controller, () = γ(), γ() .

**Figure 9.** Real and desired evolution trajectories of the angular velocity vector, \*() = \* (), \*() and () = (), () .

**Figure 10.** Evolution of the angular velocity error vector, () = () − \*()= [() − \* (), () − \*()] .

**Figure 11.** Evolution of the input voltage vector of the TRMS, () = (), () .

On the other hand, the efficiency of the inner loop control (electrical controller) is depicted in **Figure 9**, including a comparative between the reference angular velocity vector, \*() = \* (), \*() , obtained from the output of the outer loop, and the real magnitudes of angular velocity vector, () = (), () . The evolution of the angular velocity error vector, () = () − \*() = () − \* (), () − \*() , is also shown in **Figure 10**.

To conclude this section, the input voltages in the MATLAB®/Simulink® environment, () = (), () , for the main and tail rotors, are represented in **Figure 11**. From these graphs, it can be observed that the proposed control scheme has been realised to avoid saturations on these voltages, which in the simulation MATLAB®/Simulink® environment have been set to ±2.5 V (similarly to the real prototype platform).
