Particle swarm optimization based proportional-derivative parameters for unmanned tilt-rotor flight control and trajectory tracking

ABSTRACT This paper presents the dynamic modelling and control technique for a tilt-rotor aerial vehicle operating in bi-rotor mode. This kind of aircraft combines two flight envelopes, making it ideal for scenarios that require hovering, vertical take-off/landing and fixed-wing capabilities. In this work, a detailed mathematical model is derived using Newton–Euler formalism. Based on the obtained model, a new control scheme that incorporates six Proportional-Derivative (PD) controllers is proposed for the attitudes (roll (φ), pitch (θ), yaw (ψ)) and the positions (x, y, z) of the aircraft. Then, intelligent Particle Swarm Optimization (PSO) and conventional Reference Model (RM) techniques are applied for optimal tuning of the controllers' parameters. The stability analysis is developed using the Lyapunov approach and its application to the tilt-rotor system in the case of intelligent and conventional PD controllers. Numerical results of two scenarios prove the efficiency of the controllers tuned using the PSO method. Indeed, its ability to track the desired trajectories is demonstrated through 3D path tracking simulations, even in the presence of wind disturbances. Finally, experimental tests of stabilization and trajectory tracking are carried out on our prototype. These testing showed that our tilt-rotor was stable and suitably follows the imposed trajectories.


Introduction
Unmanned Aerial Vehicles (UAVs) are rapidly becoming more popular due to the recent technological advancements in many civilian and military applications, including photography, agricultural support, natural disaster support, earth science research assistance, hostile zone reconnaissance, hazardous biological or chemical agent detection, border detection, etc. These diversified applications have created the need for a single aerial vehicle with the ability to efficiently perform multiple tasks. Within this scope, different models that have received attention are aircrafts with a tilting mechanism known as tilt-rotors. These aerial vehicles combine the capabilities of rotorcraft models (hovering, aggressive manoeuvring, vertical take-off/ landing (VTOL)), with those of fixed wing models (speed, flight endurance). The focus of this paper is on VTOLs that have two rotors adjusted in tandem. The two rotors are independently coupled with a type of revolute joint, typically a servomotor, with the ability to tilt the entire rotor.
Newton-Euler formalism is used to derive the mathematical model of the tilt-rotor, which is a six Degrees of Freedom system (6-DoF) that is, highly nonlinear, complex (intensively coupled), and under-actuated (6-DoF with only 4 control inputs). This complexity makes the control system a delicate task. Modelling and control of small-scale tilt-rotor UAVs have been addressed by several authors in the literature by proposing alterative configurations as well as control strategies. Gress presented a dual-fan aircraft that relies on two tilting rotors to handle the attitude [1]. In [2], Kendoul et al. presented a similar configuration inspired by Gress's mechanism with the centre of gravity below the tilting axis, allowing the UAV to obtain a significant pitching moment. In [3], Fantoni detailed the tilt-rotor modelling and full control. A nonlinear control scheme that incorporates a function obtained from decoupled dynamics is proposed in [4]. The control scheme is applied to a real prototype for hover control. In [5], Yan et al. suggested a design of the attitude control for a small unmanned tilt-rotor aircraft. Another nonlinear/linearized dynamic and corresponding design of the attitude control is exhibited in [6]. To perform the control design, Backstepping and Integral Backstepping control strategies are used for the stabilization of tilt-rotor UAVs in [7] and [8]. In [9], the authors modelled and controlled a tilt-rotor UAV for path tracking. The linearized error model is obtained from the nonlinear model, which is used to synthesize a H∞ and a multi-objective H2/H∞ controllers by using the LMI approach. Saeed detailed a review on the platform design, dynamic modelling and control of hybrid UAVs in [10].
Regarding the control of rotary aerial vehicles such as quadrotors, there are several studies regarding both linear and nonlinear controllers [11][12][13]. For practicality, the linear controllers, especially Proportional-Integral-Derivative (PID)/Proportional-Derivative (PD)/Proportional-Integral (PI), are easy to design, simple to tune and generally very useful [14]. These controllers have been successful for quadrotor control [13,15]. However, tuning these controllers' parameters is very important to achieve optimal performance. In this scope, the conventional methods can be used. They include the methods of Ziegler-Nichols [16], Graham-Lathrop [17], Naslin [18], Cohen-Coon, Reference Model [19,20] and other techniques. The use of the Reference Model (RM) method for PID/PD/PI tuning proves to be quite easy and useful compared to other techniques, since it indicates the manner in which the poles should be modified so that the system response meets the specified performance. However, a disadvantage of using this technique is that it is necessary to employ a linear model, which is only an approximation of the complex dynamics of the UAV. In [20], the classical RM method demonstrated its superiority to Ziegler-Nichols and Graham-Lathrop in control systems. Furthermore, this classical method has shown its performance in our recent works of quadrotor control [21][22][23].
Metaheuristic algorithms have emerged as powerful tools leveraged to effectively solve complex optimization problems compared to conventional algorithms. In general, there are two categories of the most popular metaheuristics: Evolutionary Algorithms (EAs) and Swarm Intelligence algorithms (SI). Particle Swarm Optimization (PSO) [24] and Genetic Algorithms (GAs) [25][26][27] are the best-known SI and EA algorithms. However, the PSO method has provided superior performance because it can escape from local optimization problems and requires less computation time (no evolution operators such as mutation). Thus PSO implementation can be easily conducted. In recent works of quadrotor control [21][22][23][27][28][29], PSO and GA algorithms work directly on the quadrotor nonlinear system to search optimal parameters for PID and PD controllers. Comparing PSO results to those of GA illustrates that both give good performance, but PSO has achieved faster responses, especially when PD controllers are used [21]. These results prove that PSO and GA techniques are highly competitive to explore the optimal solutions in quadrotor control.
The main contribution of this work lies in proposing a new design technique based on classical and intelligent PD controllers to improve the results of the tilt-rotor full control. In our previous work [21], the performance of PD controllers optimized using the intelligent PSO and the classical RM methods was sufficiently demonstrated for quadrotor control. In the present work, our proposed control design is based on six PDs optimized with PSO and RM methods: three controllers for angles (φ, θ , ψ) and three for positions (x, y, z). The control law is selected to minimize a quadratic criterion of errors. The obtained PSO and RM results can be compared to Backstepping [7], Integral Backstepping [8], GA [30] and Root-Locus [30] as they relate to tilt-rotor control. Moreover, flight test experiments will be carried out on our prototype, which is currently being assembled at the laboratory within this project framework.
The remainder of this paper is organized as follows. Tilt-rotor's dynamical model is revisited in Section 2. Our control design technique using RM and PSO methods are detailed in Section 3. Simulation and experimental results are presented and discussed in Section 4. Finally, Section 5 provides our conclusion.

Tilt-rotor's structure
Tandem tilt-rotors are classified in the category of the most complex flying machines due to many physical effects influencing their dynamics. A tandem tilt-rotor consists of two rotors radically tilted in opposite directions as shown in Figure 1. This configuration does not require swash plate or anti-torque, which makes its mechanics much less complicated [31].
Four servomotors are used to manage this underactuated aircraft. The two internal servos allow tilting the rotors with an angle α and the two externals with an angle β. Basically, by acting cleverly on the rotors' powers and the tilting angles, the aircraft could perform the following: an ascent/descent; a tilting to left/right by an angle φ (rolling); a movement forward/backward by an angle θ (pitching) and an overturning by an angle ψ (Yawing) [31].

Generalized coordinates
For a better understanding of the tilt-rotor's dynamic modelling, different working hypotheses have been assumed. A rigid and symmetrical structure (Diagonal inertia matrix); a rigid propellers (negligible effect of deformation during rotation); thrust and drag forces are proportional to the square of the rotors' speed (a close approximation of the aerodynamic behaviour); and the centre of mass is below the origin of the body fixed frame. Figure 2 shows the modelling diagram of the tandem tilt-rotor.
Let I = (I x , I y , I z ) be the inertial fixed frame and B = (B x , B y , B z ) the body frame. Two more auxiliary frames are related to rotors 1 and 2, respectively.
The motion equations for a rigid body of mass m, that is subjected to the force of the body F tot ∈ R 3 and the pair M tot ∈ R 3 applied to the centre of mass are given by the Newton-Euler formalism. These can be written as follows in the initial frame I and the body frame B.
where V = (ẋ,ẏ,ż) T ∈ R 3 is the velocity vector of the tilt-rotor and ⊗ is the cross product. The passage between frames B and I is given by the rotational matrix R in (3). The rotation matrices R x (β i ) and R y (α i ) are written in (4) and (5). These matrices are obtained by tilting x and y axes with angles (β i ) and (α i ), which transform the thrust vectors into force vectors applied to the gravity centre G of the system.

Translational dynamics
The total force F I tot acting on the gravity centre G is the sum of the gravity force F I g , and the thrust force F I G , as expressed in (6).
The direction of the thrust can be redirected by tilting the propellers. During the hover, the thrust force T i (i = 1, 2) produced by the rotor "i" is supposed proportional to the square of its rotational speed, as expressed in (7). C T > 0 is an aerodynamic coefficient depending on the geometry of the blades and the fluid density (the air in this case). The total thrust force F B G is expressed in reference B by (8), where the vertical axe is defined by e B 3 = (0, 0, 1).

Rotational dynamics
The tilt-rotor is subjected to the gyroscopic torque M B gyro , the drag torque M B prop , the thrust torque M B thrust and the adverse reactionary torque M B react . The total moment can be expressed in (13).
Gyroscopic torque: When rotating the two rotors of the aircraft, gyroscopic moments are created. These moments are defined by the product of the kinetic moments of the propellers. According to the inertia measurements carried out, it is considered that J rx = J ry = J rz = J r . Indeed, the gyroscopic moments expressed in A 1 and A 2 are given by (14) and the total gyroscopic moment M gyro in reference B is written in (15).
(15) Actuators torque: These moments are derived from the thrust vector T i and the translational movements of the tilt-rotor that is represented by the displacement vector d i in B as follows: (16) Drag torque: When the blades turn, they are subjected to drag forces producing moments around the aerodynamic centre O. These moments act toward the opposite direction to the rotation of the blades.
where Q i = C Q ω 2 i (i = 1, 2) represents the drag force of each propeller and C Q denotes the blade's aerodynamic friction.
Adverse reactionary torque: This parasitic torque is caused by tilting each rotor. In fact, when a servo-motor exerts a torque on a rotor to force it to rotate, it provides in a reaction torque M B react that acts on the rigid body of the tilt-rotor.
is the inertia matrix of the rotor group and all its associated rotary components. Considering J px = J py = J p , the reactionary moment can be written as follows: Thus the rotational equations can be represented as in [8], by the following: where

Control design
The vehicle's motion equations, that were given in (9)- (11) and (22), are nonlinear and strongly coupled.
Therefore, a simplified model should be proposed in order to manage the system dynamics. By considering equalled tilt angles (α 1 = α 2 = α, β 1 = β 2 = β) and small rotations (cos x = 1, sin x = x), the aforementioned equations become as follows: where For an appropriate control of the aircraft system described by (26) Verification of the PD controllers' inputs can be achieved either through simulations or by conducting physical flight tests such that α acts directly on θ and β influences φ. Just as U 2 acts on ψ and U 1 on z. Consequently, U 2 , α and β are considered control inputs for ψ, θ and φ, respectively. For x and y, it should be noticed that they are influenced by θ and φ, which are implicitly influenced by α and β (control inputs for θ and φ), respectively. Next, to handle the under-actuated part (Cartesian positions), U 1 , φ and θ are used to create three virtual control inputs so that every output will be controlled separately. Physically, these virtual controls mean that the translation motion along x, y and z are controlled indirectly by the three common inputs (U 1 , φ, and θ). These virtual controls are given by (34). The desired trajectories of roll (φ d ) and pitch (θ d ) are obtained by inversing (34).
Moreover, during horizontal flight, z remains constant; so,z = [((cos φ cos θ C T U 1 )/m) − g)] = 0. U 1 is then fixed to a constant value equal to [C T /(cos φ cos θ)] in the expressions of φ and θ . Figure 3 shows the complete control system for the tandem tilt-rotor. The blocs (φ controller, θ controller, ψ controller and z controller) consist of four PDs used to stabilize the attitudes (φ, θ and ψ angles) and the altitude z. Two more PD controllers (x and y controllers) are added for positions control (x and y). The inputs' parameters are divided into two parts, the desired and sensor signals. Desired signals for positions and yaw angle (x d , y d , z d , and ψ d ) are fixed by the pilot or the autopilot program. When sensor signals for desired roll and pitch angles (φ d and θ d ) are computed from ψ d and the outputs of x, y and z controllers (U x , U y and U 1 ). All PD controllers' parameters need optimal tuning so that the six system responses are as stable, fast, precise and robust as possible.

RM control
Reference Model (RM) technique is a linear method that allows the correction of any system's behaviour ("n" order), by approaching its performance to a desired first-or second-order system. To control the behaviour of the tilt-rotor system, the linear model should be considered. For this reason, a simplification of the nonlinear equations in (26)-(31) is conducted. The parameters that insignificantly affect the dynamic model for φ, θ and ψ, are removed. For x, y and z expressions, the parameters that directly influence these outputs are conserved. The obtained model can be seen in (36). It is derived from the complete nonlinear model with small rotations and not obtained by linearization. Then, the Laplace Transform is applied to obtain the transfer functions in (37), where U 1 is considered as a constant in the transfer functions of φ and θ.
The desired reference's behaviours for the six outputs are those of first-order systems given by τ and T s (τ and T s are respectively the desired time constant and the settling time). Therefore, the dominant pole is to place at −1/τ and the other pole on left of −1/τ in the complex plane [19,20]. These desired behaviours for angles (φ, θ , ψ) and positions (x, y, z) correspond to the characteristic polynomials D s (p) in (38), where s = {φ, θ, ψ, x, y, z}, α = 50 and τ = T s /3 = 0.1 s. Then, for each output (φ, θ, ψ, x, y, z), the closed-loop transfer functions including PD controllers are computed, and their denominators are denoted D Hs (p) in (39).
The PDs gains can be extracted by identifying the coefficients of C s (p) and D Hs (p) [19,20] term by term. The obtained parameters will be validated on the nonlinear tilt-rotor model.

PSO control
To control the nonlinear and fully coupled tilt-rotor system defined by (26)-(31), the intelligent nonlinear method of Particle Swarm Optimization (PSO) is more suitable and can be directly applied to control nonlinear systems.
In 1995, Eberhart and Kennedy have developed the stochastic PSO method in order to optimize complicated problems [24]. The basic PSO principle was inspired from the social behaviour of animals moving in swarm as bird flocking. Looking for food, each bird estimates the flying speed based on the personal experience and the information obtained through interaction with other swarm members. Birds are considered as particles dispersed in the solutions' space of the optimization problem [24].
Each particle i stores the best position Pbest i (g) and the best solution in its vicinity. Pgbest represents the position of the lowest fitness value in the swarm (41). The new position X ij of the particle i = {1, 2 . . . N} is given by (42) and the new velocity V ij is updated according to (43).
where • j = {1, 2 . . . D} for the particle's coordinates in a Ddimensional search space ; • Pbest ij (g − 1) is the best position found by the particle i at iteration (g − 1); • Pgbest ij (g − 1) is the best position found by the neighbourhood at iteration (g − 1); • w, C 1 and C 2 are weighting coefficients.
Instead of linear PD controllers, intelligent PSO have to seek the optimal controllers' parameters for the six tilt-rotor's outputs (φ, θ, ψ, x, y, z). Indeed, the N particles are initialized in a 12-dimensional search space (D = 12) for the six PDs. In this study, the number N is chosen to be 200. The coordinates of a particle represent the potential PDs gains (K pφ , K dφ , K pθ , K dθ , K pψ , K dψ , K px , K dx , K py , K dy , K pz , K dz ). Since these parameters will likely have different values, their interval limits are set according to each PD gain value. Therefore, 12 matrices of dimension 1 × N (for the 12 PDs gains) are obtained using random functions multiplied by suitable coefficients. The global initialization matrix of dimension 12 × N is obtained by concatenating the 12 generated matrices. The velocity matrix of dimension 12 × N is initialized by considering small random numbers so that the search space boundaries are not achieved [32,33].
The weighting coefficients govern the process of finding the best solution and reflect the sociability of the particles. In order to move the particles towards the best solutions, selection of these coefficients must ensure a compromise between local and global exploration of the search space. Numerous values of w are tested, and the compromise between local and global exploration was noticed for w = 0.8. The degree of influence of the best local and global positions in the swarm or the velocities relative to these solutions are regulated through the confidence coefficients C 1 and C 2 . These coefficients are defined for each particle to increase the particles' diversification in the entire search space. They are represented by matrices with dimension of 200 × swarm size and set in the interval [0, 0.8] for C 1 and [0, 1.2] for C 2 .
The performance of each particle is then measured according to a predefined fitness function, denoted F. This fitness is defined in Equation (44) as the sum of the mean squared errors "E s ", where s = {φ, θ , ψ, x, y, z}. These errors are calculated based on the differences in behaviours between the inputs and outputs of the tiltrotor. Finally, the maximum number of iterations G is considered the stop criterion and fixed at 20.

Stability analysis
The state vector is defined to be T . Then, the system (26)-(31) can be simplified as follows, where Y i and u i are respectively the ith output and the ith input of system (26)- (31).
In this study, f i and g i are unknown nonlinear continuous functions. In addition, it is assumed that the system (26)-(31) is controllable. So, we consider that g −1 i exists.
The adaptive PD controllers were to best approximate the ideal unknown command [34,35].
where u sl = [u 1 sl u 2 sl u 3 sl u 4 sl u 5 sl u 6 sl ] T ; u i sl = −α i sl s i − β i sl tanh(s i / i ); α i sl > 0; β i sl > 0; and i are small positive constants.
Let e = [e 1 e 2 e 3 e 4 e 5 e 6 ] T = X d − X be the tracking error. Then, the sliding surface can be defined as in [34] and [35].
Therefore, Equation (50) becomes Considering the system defined in (45), the time derivative of the sliding surface can be obtained as follows: where v i =Ẍ di + λ iėi and u = u * ensure optimal convergence of s. Choose the Lyapunov function: The derivative of (53) iṡ The 12 PD controller gains K pi and K di were considered here as adjustable parameters. To do this, an adaptive mechanism would be developed to minimize a quadratic criterion of the error between the ideal unknown command u * i and the provided command u pdi , resulting from the PD controllers. The ideal control law (49) was then approximated by PD controllers of the form.
where u i = T (e i )θ sli and θ sli = [K pi K di ]. The objective is to approximate u * i by an adaptive command based on PD controllers. From Equation (52), Substituting (57) into (56) giveṡ By using the following augmented Lyapunov function: In order to ensureθ sli = s i g i γ (e i ), the optimal parameters θ * sli = [K * pi K * di ] should be well chosen to minimize both s i and θ sli .
The global closed loop stability has been considered for both proposed methods. The adjusted RM control method ensures that all the poles of the closed loop system contain negative real terms. For this purpose, the transfer functions presented in Section 3.2 (Equation (37)) have been used. Obviously, this only guarantees stability close to the equilibrium point defined for the linear model, which is a local stability constraint. Therefore, to study the margin of the local stability, simulations have been performed using the designed controllers on the full nonlinear model of the UAV. This means that the validity range of the controllers designed from the linear transfer functions is tested through simulations in Section 4. This is not an overall guarantee of stability, but rather validates a range of operations with a high degree of confidence for the control design. On the other hand, the PSO control algorithm is devoted to automatically calculate the PD controllers' gains online for autonomous stabilized flight of the nonlinear tilt-rotor. To study the convergence of the tracking error, as well as the stability of the closed loop, PSO considers the fitness function. This function must ensure no oscillations (overshoot around 0%) and achieve the system stabilization in a reasonable settling time. Therefore, if this function is chosen as the quadratic error between the desired and actual outputs, PSO seeks over generations to reduce the static or the dynamic error that convergences to zero when t → ∞. Thus s i converges to zeros and θ sli = θ sli − θ * sli converges to zeros, which ensures the convergence of θ sli to θ * sli and consequently the law u pdi to u * pdi .

Simulation results
To prove the efficiency of the proposed controllers' design, simulation tests were performed for the tiltrotor attitudes (φ, θ, ψ) and positions (x, y, z) control. The performance of the controllers was examined for two desired trajectories. In both cases, 12 PDs gains are determined using the conventional RM and intelligent PSO methods. The main objective was to confirm the ability of PSO to stabilize the unmanned tilt-rotor and to perform aggressive manoeuvres even under the presence of forcible disturbances. Table 1 gives the tilt-rotor's parameters. Table 2 presents the suggested dynamic trajectories and the considered conditions. Table 3 lists the PDs gains achieved by using the RM and PSO methods for controlling the six outputs (φ, θ, ψ, x, y, z).

First trajectory tracking
In order to hover the tilt-rotor at a determined position's coordinates without overturning, the inputs for the desired positions and yaw angle (x d , y d , z d , ψ d ) are considered step signals of 30 m, 20 m, 10 m, and 0 • , respectively. Figure 4 shows the step responses for the corresponding outputs (x, y, z, ψ) that were obtained by PSO and RM. Since the desired roll and pitch angles (φ d and θ d ) are computed from the chosen pitch angle (ψ d ) and the outputs of x and y controllers, they will  have different desired values. It depends on the determined values of the previous mounted controllers for x and y positions. Figure 5 illustrates the obtained curves for the desired sensor signals as well as the controlled responses. Table 4 presents the corresponding performance of PSO and RM results for the tilt-rotor's outputs (φ, θ , ψ, x, y, z) in hover-flight. In the same table, the results of Backstepping [7], Integral Backstepping [8], Genetic Algorithm (GA) [30] and Root-Locus [30] methods are included (T s : settling time, (x 0 , y 0 , z 0 , φ 0 , θ 0 , ψ 0 ): initial values of (x, y, z, φ, θ, ψ); (x p , y p , z p , φ p , θ p , ψ p ): peak values of (x, y, z, φ, θ, ψ); (x ∞ , y ∞ , z ∞ , φ ∞ , θ ∞ , ψ ∞ ): final values of (x, y, z, φ, θ , ψ); and (E x , E y , E z , E φ , E θ , E ψ ): mean squared errors of (x, y, z, φ, θ, ψ)). The rotors' angular speeds and tilting angles are shown in Figure 6.
As can be seen from the obtained responses in Figures 5 and 6 and Table 4, the search for the parameters of PDs by RM provides reliable accuracy in the results. This method respects the established set of specifications, but it requires a linear model, which is only an approximation of the complex dynamics of the UAV. The self-adaptive controllers optimized using PSO track the altitude and attitudes with better performance.
Comparing PSO results with Backstepping [7], Integral Backstepping [8], GA [30] and Root-Locus [30] methods shows that PSO performs responses of positions (x, y, z) and yaw angle (ψ) with 0% overshoot and reduces the settling times to 3.4503 s, 2.7608 s and 0.0172 s, respectively. For the position y, the value of T s increases to 4.1445 s with 0% overshoot, compared to 3.9795 s for Backstepping with 5% overshoot. Therefore, the peak values of positions and yaw (x p , y p , z p , ψ p ) obtained with our proposed PSO are closer to their corresponding final values (x ∞ , y ∞ , z ∞ , ψ ∞ ) than Integral Backstepping [8] in hover-flight to position (0, 0, 2).
The controlled roll and pitch angles with PSO perfectly follow the sensor signals (φ d , θ d ), and their curves  are very close to the desired curves (reduced mean squared errors E s ). This implicitly influences positions (x and y) and improves performance.
In this test, the ability of PSO to ensure the aircraft stability is validated (Figures 4 and 5), as the error values have decreased in time and converged to zeros in less than 5 s for the six outputs. The tilt-rotor is then stabilized in the position (x, y, z) = (30, 20, 10), which needs a heightened level of energy to hold against gravitational effects. Figure 6 indicates that the angular speed of both rotors in starter mode can move up to 356 rad/s. After that, the speed is fixed for about 4 rad/s and UAV become stabile. These achievements are the result of the modified initialization strategy, the good tuning of the weighting coefficients w, C 1 and C 2 , and the appropriate choice of a performed fitness function.

Second trajectory tracking
Unlike the first trajectory which involves hovering at determined coordinates, the effect of the proposed technique in a case of spiral trajectory will be shown. Figure 7 shows the tracking of the desired trajectory for each position coordinate (x, y, z) and the rotation of the tilt-rotor with the yaw angle. For this case, the error in z is null. However, the PSO responses are near the desired signals on the x and y axes. In addition, the yaw angle (ψ) reaches the final value in time of 0.5 s without overshoot. Responses of the desired and controlled roll (φ) and pitch (θ ) angles are illustrated in Figure 8, where it can be clearly observed that PSO perfectly follows the sensor signals.
In starter mode (x, y, z) = (0, −2, 2), low energy is applied, as shown in Figure 9, where the rotors turn Table 4. PSO and RM obtained performance for the tilt-rotor's outputs (φ, θ, ψ, x, y, z) while hovering, and comparisons with Backstepping [7], Integral Backstepping [8], GA [30] and Root-Locus [30] Figure 10 shows the tracking of the desired and    controlled trajectories in 3D plan. These results clearly show the possibility of our system to follow trajectories with precision in all variables (altitude z, translation motion of x and y, and the yaw angle).
To test the robustness of the PSO controllers, external disturbances are considered. The most external effects acting on the tandem tilt-rotor are the wind disturbances along the z -axis. Usually, the flight control of UAVs, subjected to the wind disturbances challenge, seeks to find the optimal control to keep track of a desired trajectory in a windy region. The tilt-rotor has to compensate for trajectory deviations. In the simulations, the wind disturbances are modelled in this   work by a random signal of variable amplitude and inserted in the closed loop scheme of altitude z. However, these disturbances induce variations of the coupled tilt-rotor's outputs, which make the control procedure very complex. The tracking results of the proposed PSO controllers for tilt-rotor's tracking in a region of winds are depicted in Figures 11 and 12.
From these figures, it can be revealed that the PSO controllers resist the disturbance effects and provide responses close to the desired ones. A small deviation from the desired original sinusoidal trajectory can be observed in Figure 11 for positions (x and y). This is assumed to be in order to keep an altitude z close to the desired path. A stable constant yaw angle (ψ) reaches its final value in 0.5 s without overshoot. From Figure 12, the controlled roll (φ) and pitch (θ) angles perfectly follow the desired path with minor variations. Also, the obtained controlled trajectory for positions (x, y, z) in the 3D plan is observed very near to the results found when controlling the system without perturbations injection. Consequently, the PSO method has proved its efficiency and robustness for tilt-rotor control.
Taking into consideration the proposed control effort indexes, the PDs optimized by PSO are the most comprehensive choice. For this reason, the obtained set of parameters will be adopted during the simulations and the flight tests.

Test prototype and experimental results
In this part, we present the implementation results of the PSO algorithm for optimal control of the tiltrotor UAV. In order to demonstrate PSO performance, we conducted several experiments on our prototype (Figure 13), which is currently being assembled within this project's framework.
The tilt-rotor prototype is equipped with Bluetooth RS232 TTL HC-05 module for communication with a smartphone Galaxy J7 Pro (the ground station software). The 4000 mAh GLACIER battery is chosen to supply two SunnySky X2814-8 1000 kV motors. It is also connected with two DC-DC LM2596 converters to supply two MG995 Tower Pro 180 servomotors. Moreover, the control system integrates a MPU6050 accelerometer and gyroscope to provide the exact values of the aircraft's position. This position must be calibrated to determine the reference values by performing measurements while keeping the tilt-rotor horizontal. The flight control system is based on Arduino Uno R3 autopilot. The Arduino Uno R3 board consists of an ATMEGA328 microcontroller, which contains 2 K SRAM, 1 KB EEPROM, 32 K flash memory, a crystal oscillator of 16 MHz, 14 PWM digital Input/output pins and 6 analog inputs. Two brushless ESC 30A (Electronic Speed Control) are connected to the motors, the Arduino, and the battery. The MPU6050 and the Bluetooth HC-05 module are also connected to the Arduino. The structure also contains two EPP1045 propellers with their protections and an aluminium alloy chassis. The control of this prototype is conducted through the use of an Android application that was developed in the Blynk environment. The interface builder Blynk is used as remote hardware control to ensure communication between the smartphone and the hardware. The connection between the ground station software and the aircraft is established via the Bluetooth HC-05 module to activate/disactivate the motors' and servomotors' control. These instructions communicated to the Arduino card through the HC-05 module, and then      converted into PWM signals to control the motors and servomotors [36]. In these experimental flight tests, the goal was to achieve stabilization of the tilt-rotor while compensating for any external disturbances. It should be noted that to control our prototype, we designed an Android application. This application allows us to act directly on the rotational speed of the rotors and on their inclination (manual pilot), or to make the tilt-rotor UAV follow a predefined trajectory(autopilot). Several tests were conducted, such as moving the tilt-rotor from the position (x, y, z) = (0m, 0m, 0m) to the hovering point (x, y, z) = (1m, 1m, 2.5m). Figures 14-16 present the obtained simulation results during the vehicle's hoverflight and horizontal translations.
The rotors' angular speed and tilting angle values used as control inputs are shown in Figure 17. Table 5 gives the obtained performance. Besides the implementation simplicity, the tilt-rotor was able to successfully perform the hover flight, where the aircraft was stabilized in the desired position and maintained zero attitude (φ, θ , ψ) = (0 • , 0 • , 0 • ). The maximum deviate differences are less than 0.1 m in the x, y and z directions.
Once the first trajectory was tested, the experiments transitioned into a much more complex trajectory: a helix ending with a circle as shown in Figure 18. The rotors' angular speed and tilting angle values are given in Figure 19. The system has been shown to allow the tilt-rotor to take-off reliably when commanded to fixed positions (see Figures 18 and 19). During this second test, the mean square errors (E s ) were 98, 77, 34, 2.3, 1.2, and 0, respectively for the positions (x, y, z) and attitudes (φ, θ , ψ). Additionally, the tilt-rotor maintained closer to the laboratory ceiling (2.5 m in altitude z) while making the complete circle. It can be clearly seen that the fluctuations of the angles and angular rates are minimal, and the maximum deviate errors of the attitudes are less than 5 • . The tilt-rotor was stable near the hovering condition, and

Conclusion
In this paper, based on the dynamical model established through Newton-Euler formalism, robust PD controllers were incorporated in a complete control design for the six tilt-rotor's outputs (positions (x, y, z) and attitudes (φ, θ, ψ)). The obtained numerical results confirmed the efficiency of the proposed control scheme for two different trajectories. These results also indicate that the Reference Model (RM) method can provide satisfactory performance that fits behaviours close to the reference ones, but non-linearity was not considered. The PD controllers based on article Swarm Optimization (PSO) were found to be more efficient and robust for the tilt-rotor control, regardless of the trajectory and even in the presence of external wind disturbances. 3D plan results showed the ability of our system to closely follow the determined trajectories. The flight experiments were carried out on the proposed prototype, in which the planned PSO controllers' design was validated. These findings are the result of the efficiency of the proposed controllers' design, the performance of the adaptive PD controllers and the well settings of PSO parameters including the modified initialization strategy.