*Proceeding Paper* **ACO-Based Optimal MIMO Sliding Mode Controller Design for a New Reconfigurable Unmanned Aerial Vehicle †**

**Khedidja Bouhabza 1,\*,‡, Mohamed Guiatni 1,‡, Yasser Bouzid 1,‡ and Mustapha Hamerlain 2,‡**


**Abstract:** The Optimized Multiple Inputs and Multiple Outputs Sliding Mode controller (MIMO-SMC) is intended to control the reconfigurable UAV, which can take on a variety of configurations while maintaining the efficiency of a conventional quadrotor in terms of hovering and precision handling. The Ant Colony optimization algorithm is used to calculate controller gains and to ensure optimal performance, such as small errors and lower energy consumption. The control goal is to allow the proposed UAV to track its trajectory for various configurations in the face of uncertain parameters to impose the position, altitude, and yaw angle while stabilizing its roll and pitch angles. Finally, simulation results are used to demonstrate the efficiency and performance of the proposed controller, and we calculate the energy consumption for each configuration.

**Keywords:** optimized; MIMO sliding mode; reconfigurable UAV; configurations; quadrotor; ant colony optimization; trajectory; energy consumption

#### **1. Introduction**

Reconfigurable UAVs are a new type of UAV that can use adaptive morphology, which involves changing the shape of the vehicle during flight to accomplish a specific task in a unique environment [1]. Rotors/arm: tiltable, steerable, rotatable, reconfigurable, transformable, convertible, unconventional [2], multirotors: foldable [3], with rotating arms, with changeable dimensions, and so on.

The authors developed a transformable multirotor with two-dimensional multiple bonds in references [3,4]. The latter has a unique architecture that allows it to completely change its morphology.

Different approaches have been proposed in the literature for the different types of quadrotors such as PID (the Proportional-Integral-Derivative) in [5–9], the linear quadratic [10]; feedback linearization [11–13], fuzzy logic (FL) control [14], Backstepping [15,16], and control by sliding mode [17–19].

In [20,21] proposed a classical PID for a tilting body multirotor that can switch to a vertical configuration. Scientists used an adaptive PID controller to control a foldable quadrotor in reference [22].

Other authors created a multi-link foldable quadrotor based on the Linear Quadratic Integral (LQI) [2]. The author investigated the use of Linear Quadratic Regulation (LQR) on a foldable quadrotor in [3]. The authors proposed a nonlinear controller of a rotor quadrotor based on feedback linearization in [23]. In [24], an optimal gain scheduling backstepping controller based on a Particle Swarm Optimization (PSO) algorithm will be designed and tested for a Transformable Quadrotor. A new design with generic modeling and an adaptive backstepping controller of a transformable quadrotor can be found in [25].

**Citation:** Bouhabza, K.; Guiatni, M Bouzid, Y.;Hamerlain, M. ACO-Based Optimal MIMO Sliding Mode Controller Design for a New Reconfigurable Unmanned Aerial Vehicle. *Eng. Proc.* **2023**, *29*, 9. https://doi.org/10.3390/ engproc2023029009

Academic Editors: Abdelmadjid Recioui, Hamid Bentarzi and Fatma Zohra Dekhandji

Published: 11 January 2023

**Copyright:** © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

The main contribution of this work is the optimal MIMO-SMC for the flight stability and rapid convergence of variable states of a new reconfigurable UAV in finite time. Furthermore, the MIMO-SMC's robustness will be tested against the uncertain parameters of the variable drone geometry. The primary control architecture is based on selecting between the various flight configurations. The gains of the MIMO-SMC controllers are obtained by using the Ant Colony Optimization (ACO) algorithm to minimize the error and energy criterion and establish which configuration consumed less energy.

The rest of the paper is structured as follows: Section 2 presents the reconfigurable UAV description and modeling. Section 3 explains the Integral Sliding Mode Controller (MIMO-SMC) design, and Section 4 describes the Ant Colony Optimization algorithm. Sections 5 and 6 present the simulation results as well as their interpretation. Section 7 examines a comparison of flight configurations. Section 8 is concerned with the conclusion and future works.

#### **2. The Reconfigurable UAV Description and Modeling**

The reconfigurable quadrotor has a very complex structure due to the change in configuration each time it adapts to a new morphology by slightly rotating the arms in [25].

#### *2.1. The Reconfigurable UAV's Description*

In this section, we will establish a reconfigurable UAV with four rotating arms that bend independently around the central body while keeping the angle of rotation *αi*(*t*)|*i*=1,...,4, using servomotors to allow for quick transitions between different configurations. To avoid propeller collisions, as shown in Figure 1a, six morphologies are used, as depicted in Figure 1b and Table 1.

**Figure 1.** (**a**): Description of the reconfigurable UAV [25], (**b**): the different configurations of reconfigurable UAV [25].


**Table 1.** Angles corresponding to each UAV's configuration.

The angles of the arms can vary independently during each rotation of the arms, which means the quadrotor's configuration changes, the center of gravity moves, and the inertia matrix and roll and pitch moments, in this case, change based on the arm orientations.

To perform a specific task in a specific area, our quadrotor's configuration changes, it adopts an adaptive morphology to that task, and it can transform from the classic configuration "X" to other specific configurations by rotating or extending its arms.

#### *2.2. The Reconfigurable UAV's Modeling*

When the configuration changes, the global position of the CoG changes. As a result, the inertia matrix 3×3(*αi*(*t*)), roll *τϕ*(*αi*(*t*)) and pitch *τθ* (*αi*(*t*)), moments, in this case, vary based on the arm angles *αi*(*t*). The linear and the angular velocity vectors of the body in the mobile frame *<sup>m</sup>* are represented, respectively: <sup>Λ</sup>*<sup>m</sup>* = (*u*, *<sup>v</sup>*, *<sup>w</sup>*)*<sup>T</sup>* <sup>∈</sup> <sup>R</sup><sup>3</sup> and *<sup>ς</sup>* = (*p*, *<sup>q</sup>*,*r*) <sup>∈</sup> <sup>R</sup>3. Let *<sup>Y</sup>* = (*ϕ*, *<sup>θ</sup>*, *<sup>ψ</sup>*)*<sup>T</sup>* <sup>∈</sup> <sup>R</sup><sup>3</sup> describe the orientation of the mobile and *<sup>ξ</sup>* = (*x*, *<sup>y</sup>*, *<sup>z</sup>*)*<sup>T</sup>* <sup>∈</sup> <sup>R</sup><sup>3</sup> denote its position in the fixed frame *<sup>i</sup>*.

The relation between the velocities and the external forces *f <sup>m</sup>* = *f m <sup>x</sup>* , *f <sup>m</sup> <sup>y</sup>* , *f <sup>m</sup> z T* <sup>∈</sup> <sup>R</sup><sup>3</sup> and moments *φ<sup>m</sup>* = *φ<sup>m</sup> <sup>x</sup>* , *φ<sup>m</sup> <sup>y</sup>* , *φ<sup>m</sup> z T* <sup>∈</sup> <sup>R</sup><sup>3</sup> applied to CoG can be presented using the Newton–Euler formalism as:

$$
\begin{bmatrix}
\mathfrak{m}\mathfrak{J}\_{3\times3}(\mathfrak{a}\_{i}(t)) & O\_{3\times3} \\
O\_{3\times3} & \mathfrak{I}\_{3\times3}(\mathfrak{a}\_{i}(t))
\end{bmatrix}
\begin{bmatrix}
\dot{\Lambda}^{m} \\
\dot{\xi}^{\dagger}
\end{bmatrix} + \begin{bmatrix}
\int\_{\mathcal{L}} \mathfrak{J} \times \mathfrak{m} \Lambda^{m} \\
\int\_{\mathcal{L}} \mathfrak{I} \times \mathfrak{I}(\mathfrak{a}\_{i}(t)) \xi \\
\end{bmatrix} = \begin{bmatrix}
f^{m} \\
\Phi^{m}
\end{bmatrix} \tag{1}
$$

#### *2.3. Control Matrix*

The control matrix <sup>Δ</sup>(*αi*(*t*)) <sup>∈</sup> <sup>R</sup>4∗<sup>4</sup> transforms the angular speeds of the propellers Ω<sup>2</sup> *i <sup>i</sup>*=1,...,4 to a total thrust force T and moments *τϕ*, *τθ*, *τψ*. It can be represented as follows:

$$
\Delta = \begin{bmatrix}
b & b[y\_{4,1}(t) - y\_G(t)] & b[\mathbf{x}\_G(t) - \mathbf{x}\_{4,1}(t)] & d \\
b & b[y\_{4,2}(t) - y\_G(t)] & b[\mathbf{x}\_G(t) - \mathbf{x}\_{4,2}(t)] & -d \\
b & b[y\_{4,3}(t) - y\_G(t)] & b[\mathbf{x}\_G(t) - \mathbf{x}\_{4,3}(t)] & d \\
b & b[y\_{4,4}(t) - y\_G(t)] & b[\mathbf{x}\_G(t) - \mathbf{x}\_{4,4}(t)] & -d \\
\end{bmatrix}^T
\tag{2}
$$

where *b* and *d* are the thrust and drag coefficients, respectively, and (*x*4,*i*, *y*4,*i*) are the CoG coordinates of the rotors.

The relation between the total thrust force, the moments applied to CoG and propeller square velocities is expressed as follows:

$$
\begin{bmatrix} \mathcal{T} \\ \tau\_{\varphi} \\ \tau\_{\theta} \\ \tau\_{\psi} \end{bmatrix} = \Delta \begin{bmatrix} \Omega\_1^2 \\ \Omega\_2^2 \\ \Omega\_3^2 \\ \Omega\_4^2 \end{bmatrix} \tag{3}
$$

The proposed UAV has twelve control inputs, where *u*<sup>1</sup> = T , *u*<sup>2</sup> = *τϕ*, *u*<sup>3</sup> = *τθ*, *u*<sup>4</sup> = *τψ* are used for the control of its altitude and attitude, while *u*5, *u*6, *u*7, *u*<sup>8</sup> control the arms rotation. The model used to design the controller is given by Equation (4) as:

$$\begin{cases} \ddot{\boldsymbol{\theta}} = \beta\_1(t)\dot{\boldsymbol{\theta}}\dot{\boldsymbol{\psi}} + \beta\_2(t)\dot{\boldsymbol{\theta}}\Omega\_r + \beta\_3(t)\boldsymbol{u}\_2 + \beta\_4(t)\dot{\boldsymbol{\phi}}^2 \\ \ddot{\boldsymbol{\theta}} = \beta\_5(t)\dot{\boldsymbol{\phi}}\dot{\boldsymbol{\psi}} + \beta\_6(t)\dot{\boldsymbol{\phi}}\Omega\_r + \beta\_7(t)\boldsymbol{u}\_3 + \beta\_8(t)\dot{\boldsymbol{\theta}}^2 \\ \ddot{\boldsymbol{\psi}} = \beta\_9(t)\dot{\boldsymbol{\theta}}\dot{\boldsymbol{\phi}} + \beta\_{10}(t)\boldsymbol{u}\_4 + \beta\_{11}(t)\dot{\boldsymbol{\psi}}^2 \\ \ddot{\boldsymbol{\pi}} = \boldsymbol{u}\_1\frac{\boldsymbol{u}\_x}{m\_y} + \beta\_{13}\dot{\boldsymbol{\pi}} \\ \ddot{\boldsymbol{\psi}} = \boldsymbol{u}\_1\frac{\boldsymbol{u}\_y}{m} + \beta\_{14}\dot{\boldsymbol{\psi}} \\ \ddot{\boldsymbol{\varphi}} = -\boldsymbol{g} + \boldsymbol{u}\_1\frac{\boldsymbol{c}\_\varphi\boldsymbol{c}\_\theta}{m} + \beta\_{12}\dot{\boldsymbol{\pi}} \\ \ddot{\boldsymbol{\pi}} = -\boldsymbol{g} + \boldsymbol{u}\_1\frac{\boldsymbol{c}\_\varphi\boldsymbol{c}\_\theta}{m} + \beta\_{12}\dot{\boldsymbol{\pi}} \end{cases} (4)$$
 
$$\boldsymbol{u}\_x = \boldsymbol{c}\_\theta\mathbf{s}\_\theta\mathbf{c}\_\varphi + \mathbf{s}\_\theta\mathbf{s}\_\varphi, \boldsymbol{u}\_y = \mathbf{s}\_\theta\mathbf{s}\_\theta\mathbf{c}\_\varphi - \mathbf{c}\_\theta\mathbf{s}\_\varphi \tag{5}$$

While *c*(.) = cos(.) and *s*(.) = sin(.).

Using Equations (1) and (4), the simplified control model can be determined as Equation (8). The state vector is given as:

$$X = \begin{bmatrix} \varphi, \dot{\varphi}, \theta, \dot{\theta}, \psi, \dot{\psi}, z, \dot{z}, \ge, \dot{x}, y, \dot{y} \end{bmatrix}^T \tag{6}$$

such as:

*X* = [*x*1, *x*2, *x*3, *x*4, *x*5, *x*6, *x*7, *x*8, *x*9, *x*10, *x*11, *x*12] *<sup>T</sup>* (7) ⎧ ⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨ ⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎩ *x*˙1 = *x*<sup>2</sup> *x*˙2 = *β*1(*t*)*x*4*x*<sup>6</sup> + *β*2(*t*)*x*4Ω*<sup>r</sup>* + *β*3(*t*)*u*<sup>2</sup> + *β*4(*t*)*x*<sup>2</sup> 2 *x*˙3 = *x*<sup>4</sup> *x*˙4 = *β*5(*t*)*x*2*x*<sup>6</sup> + *β*6(*t*)*x*2Ω*<sup>r</sup>* + *β*7(*t*)*u*<sup>3</sup> + *β*8(*t*)*x*<sup>4</sup> 2 *x*˙5 = *x*<sup>6</sup> *x*˙6 = *β*9(*t*)*x*2*x*<sup>4</sup> + *β*10(*t*)*u*<sup>4</sup> + *β*11(*t*)*x*<sup>6</sup> 2 *x*˙7 = *x*<sup>8</sup> *x*˙8 = −*g* + *u*<sup>1</sup> cos(*x*1) cos(*x*3) *<sup>m</sup>* + *β*12*x*<sup>8</sup> *x*˙9 = *x*<sup>10</sup> *x*˙10 = *u*<sup>1</sup> *ux <sup>m</sup>* + *β*13*x*<sup>10</sup> *x*˙11 = *x*<sup>12</sup> *x*˙12 = *u*<sup>1</sup> *ur <sup>m</sup>* + *β*14*x*<sup>12</sup> (8)

where:

*<sup>β</sup>*1(*t*) = *Iyy*(*αi*(*t*), d*i*(*t*)) <sup>−</sup> *Izz*(*αi*(*t*), d*i*(*t*)) *Ixx*(*αi*(*t*), d*i*(*t*)) , *<sup>β</sup>*2(*t*) = <sup>−</sup>J*<sup>r</sup> Ixx*(*αi*(*t*), d*i*(*t*)) , *<sup>β</sup>*3(*t*) = <sup>1</sup> *Ixx*(*αi*(*t*), d*i*(*t*)) *<sup>β</sup>*4(*t*) = −KA*<sup>x</sup> Ixx*(*αi*(*t*), d*i*(*t*)) , *<sup>β</sup>*5(*t*) = *Izz*(*αi*(*t*), d*i*(*t*)) <sup>−</sup> *Ixx*(*αi*(*t*), d*i*(*t*)) *Iyy*(*αi*(*t*), d*i*(*t*)) , *<sup>β</sup>*6(*t*) = <sup>J</sup>*<sup>r</sup> Iyy*(*αi*(*t*), d*i*(*t*)) *<sup>β</sup>*7(*t*) = <sup>1</sup> *Iyy*(*αi*(*t*), d*i*(*t*)) , *β*8(*t*) = −KA*<sup>y</sup> Iyy*(*αi*(*t*), d*i*(*t*)) , *<sup>β</sup>*9(*t*) = *Ixx*(*αi*(*t*), d*i*(*t*)) <sup>−</sup> *Iyy*(*αi*(*t*), d*i*(*t*)) *Izz*(*αi*(*t*), d*i*(*t*)) *<sup>β</sup>*10(*t*) = <sup>1</sup> *Izz*(*αi*(*t*), d*i*(*t*)) , *<sup>β</sup>*11(*t*) = −KA*<sup>z</sup> Izz*(*αi*(*t*), d*i*(*t*)) , *<sup>β</sup>*<sup>12</sup> <sup>=</sup> −KD*<sup>z</sup>* <sup>m</sup> , *<sup>β</sup>*<sup>13</sup> <sup>=</sup> −KD*<sup>x</sup>* <sup>m</sup> , *<sup>β</sup>*<sup>14</sup> <sup>=</sup> −KD*<sup>y</sup>* <sup>m</sup> , <sup>Ω</sup>*<sup>r</sup>* <sup>=</sup> 4 ∑ *i*=1 (−1)*i*+1Ω<sup>2</sup> *i* (9)

#### **3. The Reconfigurable UAV's Control**

#### *3.1. Control Structure*

The variable parameters of the reconfigurable drone are characterized by the change in its structure. Furthermore, the proposed MIMO-SMC will be applied and tested in the presence of these uncertain parameters, such as CoG, inertia, arm angles *αi*(*t*) and control matrix, to ensure that the state variables converge rapidly towards the sliding surface and, ultimately, the equilibrium point in finite time.

The rotation of the servomotors close to the main body causes the arms to vary by angles *αi*, whereas the rotation of the servomotors is attached to the primary arms *γi*. There are blocks that generate the desired trajectories (*xd*, *yd*, *zd* and *ψ*). Our UAV's attitude and translations are controlled in two ways: by varying the position of the arms or the angular speeds of the four rotors. The two controls *ux* and *uy* are employed to calculate the desired roll and pitch angles. The servomotors that rotate the arms are controlled by PID controllers as follows:

#### *3.2. MIMO Sliding Mode Control (MIMO-SMC) Design*

This subsection describes the robust nonlinear controller design for a new reconfigurable UAV.

The sliding mode approach for MIMO nonlinear input-output systems has been proposed in [26]. To the best of our knowledge, this approach has never been applied for quadrotors. To do so, we follow the steps below:


We will go through the following procedures to synthesise the control law: We split our model state space of UAV Equation (8) into six subsystems, we write each subsystem in the form of differential input/output equations, we take the first subsystem

$$SS\_1 = \begin{cases} \dot{\mathbf{x}}\_1 = \mathbf{x}\_2\\ \dot{\mathbf{x}}\_2 = \beta\_1(t)\mathbf{x}\_4\mathbf{x}\_6 + \beta\_2(t)\mathbf{x}\_4\Omega\_{\mathbb{R}} + \beta\_3(t)\boldsymbol{\mu}\_2 + \beta\_4(t)\mathbf{x}\_2^2 \end{cases} \tag{10}$$

The sliding surface is chosen as Hurwitz Polynomials, so we obtain the Sliding surface as follows:

$$S\_i = \mathfrak{e}\_i + \mathfrak{a}\_{j+1}\mathfrak{e}\_i + \mathfrak{a}\_j\mathfrak{e}\_i; j = 1, 3, 5, 7, 9, 11\tag{11}$$

Using the candidate Lyapunov function:

$$V\_i = \frac{1}{2} S\_i^2 > 0 \tag{12}$$

*V*˙ *<sup>i</sup>* < 0, which leads to *SiS*˙ *<sup>i</sup>* < 0, which is the necessary condition of sliding, is required to ensure stability in the Lyapunov sense. The following is how we decide on the attractiveness condition:

$$\dot{S}\_{i} = -L\_{i}\tanh(S\_{i}) - M\_{i}S\_{i} = \text{\textquotedblleft}\dot{e}\_{i} + a\_{j+1}\ddot{e}\_{i} + a\_{j}\dot{e}\_{i} \tag{13}$$

As a result of inserting what we need in the previous Equation (13), the control law derivatives are:

$$\begin{split} \dot{\mathcal{U}}\_{2} &= \frac{1}{\beta\_{3}} [\dddot{\mathbf{x}}\_{1d} - \beta\_{1} (\ $\mathbf{x}\_{2}\mathbf{x}\_{6} + \$ \theta\_{6}\mathbf{x}\_{2}\mathbf{D}\_{7} + \ $\tau\mathbf{l}\mathbf{l}\_{3} + \$ \mathbf{s}\mathbf{x}\_{4}\mathbf{z}^{2}) (\beta\mathbf{s}(t)\mathbf{x}\_{2}\mathbf{x}\_{4} + \beta\_{10}(t)\mathbf{u}\_{4} + \beta\_{11}(t)\mathbf{x}\_{6}\mathbf{z}^{2}) \\ - \beta\_{2} (\beta\_{5}\mathbf{x}\_{2}\mathbf{x}\_{6} + \beta\_{6}\mathbf{x}\_{2}\mathbf{D}\_{7} + \beta\_{7}\mathbf{l}\mathbf{l}\_{3} + \beta\_{8}\mathbf{x}\_{4}^{2}) \Omega\_{r} - a\_{2} (\beta\_{1}(t)\mathbf{x}\_{4}\mathbf{x}\_{6} + \beta\_{2}(t)\mathbf{x}\_{4}\Omega\_{r} + \beta\_{3}(t)\mathbf{u}\_{2} + \beta\_{4}(t)\mathbf{x}\_{2}^{2} \\ &- \ddot{\mathbf{x}}\_{1d} ) - a\_{1} (\mathbf{x}\_{2} - \dot{\mathbf{x}}\_{1d}) - L\_{1}\tanh(\mathbf{S}\_{1}) - M\_{1}\mathbf{S}\_{1} \end{split} \tag{14}$$

where *α*1, *α*2, *L*<sup>1</sup> and *M*<sup>1</sup> are positive parameters.

We repeat the previous steps to demonstrate asymptotic stability and extract the other controllers.

#### **4. Optimization**

We decided to employ optimization techniques because choosing parameters took a long time due to guesswork. We will propose a metaheuristics-based optimization technique and use it to identify the optimum control law parameters that were previously synthesized. Ant Colony Optimization (ACO) is used to obtain optimal parameters of the MIMO Sliding Mode Controller in [27,28].

For the creation of probable good solutions, ACO uses a pheromone matrix *τ* = *τij*, and *τ*<sup>0</sup> > 0 is the initial value of this matrix. The probability *Pij* of selecting a node *j* at node *i* is given by Equation (15).

$$P\_{ij} = \frac{\pi\_{ij}(t)]^a [\eta\_{ij}(t)]^b}{\sum\_{i,j \in T^A} [\pi\_{ij}(t)]^a [\eta\_{ij}(t)]^b}, \text{ if } \ i, j \in T^A \tag{15}$$

Heuristic functions are represented by:

$$
\eta\_{ij}(t) = \frac{1}{k\_j} \tag{16}
$$

*a* and *b* are constants that govern the pheromone and heuristic values' proportionate influence on the ant's decision. *T<sup>A</sup>* is the path taken by the ant *A*. The amount of pheromone Δ*τ<sup>A</sup> ij* on each path can be calculated as follows:

$$
\Delta \mathbf{r}\_{ij}^A = \begin{cases}
\frac{L^{\min}}{L^A} \text{ if } \ i, j \in T^A \\
0
\end{cases} \tag{17}
$$

*L<sup>A</sup>* denotes the value of the A ant's objective function. *Lmin* is the best response that the ants have established up to the present iteration. Pheromone dissipation is a method of preventing an infinite rise in real ants. It also enables the forgetting of negative decisions.

$$\pi\_{i\bar{j}}(t) = P\pi\_{i\bar{j}}(t-1) + \sum\_{A=1}^{NA} \Delta \pi\_{i\bar{j}}(t) \tag{18}$$

where *NA* is the number of ants, and *P* is the evaporation rate 0 < *p* <= 1. Using the optimization approach mentioned in the previous paragraph, we explore optimization in the situation of search parameter's optimal control laws applied to the quadrotor. To do so, we use the control laws from section three and modify them.

The number of iterations is set at 100, and we take the performance criteria for optimizing the energy supplied by the controller *J*<sup>1</sup> and the mean quadratic error *J*2, where:

$$\begin{cases} I\_1 = \frac{1}{k} \sum\_{i=1}^{4} u\_i^2 \\ I\_2 = \frac{1}{k} \Sigma e\_i^2 \end{cases} \tag{19}$$
  $\text{with} \quad i = q, \theta, \psi, z, x, y$ .

#### **5. Simulation Results**

We will perform a flight scenario to assess the efficiency of the proposed controller for reconfigurable UAV attitude and altitude stabilization, which are implemented and discussed in this section. We used the Simulink/Matlab code to create a trajectory scenario (square). Our proposed UAV will follow each trajectory with different morphologies (Table 1). Because of the figures' large number, we chose just two configurations. The first will be in the form "O", and the second will be in the form "*Y I*, as shown in Figures 2–5.

**Figure 2.** Three−dimensional trajectory and Euler angles of MIMO−SMC in "H" configuration.

**Figure 3.** Input signalsof MIMO−SMC in "H" configuration.

**Figure 4.** Three−dimensional trajectory and the responses positions of MIMO−SMC in "YI" configuration.

**Figure 5.** Input signals of MIMO−SMC in "YI" configuration.

#### **6. Results Interpretation**

Figures 2 and 4 show that the reconfiguration can follow the desired trajectory for two scenarios and for the two configurations. We observe some errors along the three axes at first (*x*, *y*, *z*) for the "H" configuration compared to the "YI" configuration. The system's responses for MIMO-SMC show the rapid convergence of variable states (*x*, *y*, *z*) to their reference states (*xd*, *yd*, *zd*) in finite time. We also observe a good tracking of Euler angles (*φ*, *θ*, *ψ*) to their desired attitude (*φd*, *θd*, *ψd*). We can also notice that once the desired positions and attitudes are reached, the errors in position and attitude converge to zero.

Figures 3 and 5 show control inputs, with the control signal *u*<sup>1</sup> stabilizing around a constant that corresponds to the altitude *z* and the sliding surface *Sz*. The changes in the two control signals *u*<sup>2</sup> and *u*<sup>3</sup> are determined by the dynamics of *Sφ* and *Sθ* and *u*<sup>3</sup> in the square trajectory, and for the "H" configuration, it is more energetic compared to the "YI" configuration, as well as very low values of *u*4, resulting in low power consumption.

We remark that the "YI" configuration consumes less energy compared to the "H" configuration. The proposed control technique ensures rapidity, accuracy and strong stability of the system, demonstrating that the quadrotor can track its desired trajectory in our scenario and for two configurations of our reconfigurable UAV. Furthermore, it is obvious that MIMO-SMC decreases the chattering phenomena, errors and energy consumption.

#### **7. Comparative Study**

First, let us define the energy consumed by the vehicle during the flight.

$$E\_c = \int\_{t\_0}^{t\_f} \sum\_{i=1}^4 \pi\_i(t) \Omega\_i(t) dt \tag{20}$$

where *τi*(*t*) is the torque generated by motor *i*, and Ω*i*(*t*) is the angular speeds of the propellers at time *t*. We assess the consumed energy by the reconfigurable UAV in each configuration for a trajectory (square) under an optimal control approach (MIMO-SMC based on ACO) using Equation (20), which is summarized in Table 2.

**Table 2.** Consumed energy by each configuration.


We calculate the percentage difference between the consumed energy obtained with the classic "X" configuration compared to the energy consumed with the YI configuration, which is 3%, and between the YI configuration and H, it is 18%. The YI configuration consumes less energy compared to other special configurations ("X", "H", O", "Y" and "T"). This comparative study quantifies the amount of energy consumed by the reconfigurable UAV in each configuration. To optimize the energy consumed along a predefined trajectory, we change the configuration "X", "H", "O", "Y", "YI" and "T" of the reconfigurable drone during the flight to accomplish a well-defined mission, which will be the objective of future work.

#### **8. Conclusions and Future Work**

We are interested in reconfigurable UAVs in this work. When compared to conventional drones, there are several advantages, including the reduction in energy consumed during flight, handling and transporting of objects, execution of specific missions, and various configurations. These new drones are distinguished primarily by a transformable and complex mechanical structure, which makes modeling and control of the latter very difficult tasks. We were able to establish the use of a generic model in the literature in this manuscript. After that, we ordered the drone proposed by the Multiple Inputs and Multiple Outputs Sliding Mode Controller in order to stabilize it in flight while taking into account uncertain parameters caused by aerial transformation for our scenario and for each configuration. As well as the adequate gains of the control, we used the Ant Colony optimization technique. Finally, several simulations were run to demonstrate the efficiency of the proposed controller in terms of precision, speed, and stability, and we concluded which configuration consumed the least amount of energy.

We hope to confirm the results obtained in the future by applying the proposed controller to a real reconfigurable UAV, estimating disturbances, using genetic algorithms, and changing configurations during flight.

**Author Contributions:** Methodology, M.G.; software, K.B., M.G., Y.B., M.H.; validation, K.B., M.G., Y.B., M.H.; formal analysis, K.B., M.G., Y.B.; writing—original draft preparation, K.B.; writing—review and editing, K.B.; visualization, M.G.; funding acquisition, M.G., Y.B. All authors contributed equally to this work. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding

**Institutional Review Board Statement:** Not applicable

**Informed Consent Statement:** All authors have read and agreed to publish this work.

**Data Availability Statement:** Not applicable

**Conflicts of Interest:** The authors declare that they have no conflict of interest.

#### **References**


**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
