Design, Modeling, and Control of Tiltable Tri-Rotors UAV

ABSTRACT


INTRODUCTION
The unmanned aerial vehicles (UAVs) have proven their reliability and capability in many fields during the past few years, hence they come in different shapes and designs to meet the full requirement of their design purpose [1].
Tri-copters commonly come in two shapes (Y) and (T) and the rotors are located at the free end of each arm.The most common problem with tri-copter is the yawing problem which is caused by unpaired or asymmetrical locations placing of propellers.This problem can be overcome using co-axial rotors [2], manipulating propeller speeds [3], or by controlling the propeller thrust direction [4,5].Thrust vectoring has a benefit of stabilizing and boosting the tri-copter speed and acceleration and it can be achieved by adding a specific mechanism using a servo motor in different configurations [4][5][6].
Tiltable tri-rotors UAVs are the most efficient regarding power consumption, compact design, and agility [7].Yet, it can be challenging in control means, therefore the researchers have verified many models and control techniques in that field.For example, a nonlinear (H∞) filter is developed in study [8], an LQR controller is implemented in study [9], a neural network is used to control the UAV in study [10], and the most common control method is PID controller [11].Several optimization methods are used to adjust the PID controller parameters used in the tri-copter.For example, grey wolf optimization is used in study [12], particle swarm optimization (PSO) is used in study [13], genetic algorithm is also implemented in that aspect in studies [14,15].
The power consumption of UAVs can be a problem in longterm flights which is reduced in tri-copters [16] and it can be further improved and give better performance if it is combined with propeller vectoring [17].
In this paper, a T-shaped Tri-rotor UAV with a tilting mechanism for each rotor is proposed.The proposition is going through modeling and controlling the UAV using feedback linearization and a PID controller.T shape was chosen because it is easy to assemble and have higher strength rating [18].
The main contributions of this work are: (1) To derive a complete dynamic model for the T-shaped Tri-copter with tiltable propellers, (2) To design a control system using PID with feedback linearization, (3) to optimize the PID performance with optimization algorithm and test its results.
The paper consists of 5 sections.We have been through section (1) introduction, section (2) is about the mathematical model of the UAV, section (3) the control system which includes feedback linearization and PID algorithm, section (4) discusses the simulation results.Finally, in section (5) the conclusion of this paper is presented.

MATHEMATICAL MODEL & DYNAMIC MODEL Figure 1. Tri-rotors UAV schematic
In this section, the mathematical equations that represent forces, torque, and drag torque acting on the UAV are represented.The schematic drawing of the drone along with the acting axes are shown in Figure 1.
The parameters of the UAV are cited from the study [19] as a prototype model and are shown in the Table 1.

Forces
There are four forces acting on the UAV: the forces produced by three rotors and the gravitational force.

Rotors produced forces
The individual forces produced by each rotor can be written as shown below: where, ω m (.) is the is the rotational speed and α (.) is the tilting angle of the corresponding motor where (.) represent the corresponding letter for each arm (l) for left arm, (r) for right and (b) for back arm.
The forces acting on the center of mass COM (O) are: The general form for the rotation matrix from the local coordinates to the O coordinate is: where,  ( ) ,  ( ) is the cosine and sine function respectively.From Figure 1, the , , and  are taken as: From  to O:   = 0,   = 0 and   = 90.From  to O:   = 0,   = 0 and   = −90.
The summation of the forces can be written as:

Gravitational force
The gravitational force in earth coordinates system is: and the gravitational force in (O) coordinate system is: By multiplying the gravitational force with rotation matrix in Eq. ( 3).(earth to O).

Torques
There are two types of torques produced by each rotor the torque produced by the lifting force of the rotors and the drag torque that is produced by the aerodynamic force acting on the propeller's blades in the opposite direction of the rotation.

Rotors torques
The torque acting on the COM of the UAV can be described by: where  (.)  is a vector that represent the position of the propeller in COM coordinates O, and × referes to a cross product.Therefore, the total torque acting on O is equal to:

Dynamic model
The dynamic model is obtained through this section.Assuming that the Tri copter is rigid body of a fixed mass using Newton-Euler second law of motion for bodies with fixed mass we get.
where,  is the vehicle acceleration,   and   are the velocity and the angular velocity vectors respectively,   is the inertia matrix all with respect to O coordinates system, and (  ) is the skew matrix of the angular velocity.From Eq. ( 19).  ̇ can be written as: and for the torque we have: From Eq. ( 22).we get: and the position and attitude formula are [20]: where,  ˙ and  ˙ are respectively the attitude and the position of the UAV with respect to earth coordinates also  is the rotational matrix of the angular velocity from O to earth coordinates and it is given in research [20]. where, and    is rotational matrix from O to earth coordinates.Now, Eq. ( 20)-( 25) can describe the dynamic behavior of the UAV.

CONTROL DESIGN
This section is concerned with the design of feedback linearization which is used for solving the output coupling problem along with the PID controller.The PID then tuned with genetic optimization method, and it result are shown in the next section.

Feedback linearization
For the output we have: and its first and second derivatives are: where,  ̇ is defined as: By applying rotation matrix properties, we have: By substituting Eq. ( 20), Eq. ( 23), and Eq.(33) in Eq. (31).we get: Then the input terms are separated from the equation: where, The input terms can be written as: where, det  ≠ 0 and its inverse always exist for all system states  ∈ ℝ.
The degree of the compact system above is r = r1 + r2 =2 + 2 = 4 which is equal to the number of the dynamic equations and there is no zero dynamics.By choosing a new input.(43) The linearized system is considered as a double integrator which represents a single degree of freedom for translational and rotational motion.Hence it is one of the most fundamental systems that represents many applications [21].

PID controller
After linearizing the system, it is now possible to apply a linear PID controller.The PID controller is considered the best choice in terms of its simple implementation and high efficiency [22].The PID controller can be described mathematically as follows [23]: where,   is the proportional gain,   is the integral gain,   is the derivation gain, and () is the error signal.For this system, there are 6 PID controllers divided between attitude and position.Each of them is separately tuned with GE optimization method using the integral time absolute error (ITAE) as a cost function.

PID parameters tunning using GA
Genetic algorithm was first invented in 1975 by John Holland [24].It follows the basic idea of evolution by adapting to the environment and natural selection.It starts by choosing a population combining its solutions (genetic crossover), applying mutation and modifying the population with the best solution.That idea is the same as natural selection and can be used to minimize a specific cost function.Table 2 shows the PID's parameters gained from GA along with ITAE values.The parameters for the position controller were gained from applying (1 m) as a desired position while the those for attitude controller were gained by applying (10 deg) as a desired attitude.Figure 2 shows the altitude and attitude responses for the nominal system.The settling time for all the responses is less than 2 sec.Figure 3 shows the uncertainty response of the system after changing the mass from (2.3 kg) to (3 kg), and the arm length from (0.3 m) to (0.2 m).

RESULTS
The mathematical model of the tri-copter is implemented for simulation in MATLAB Simulink platform.Parameter values in Table 1 and Table 2 are used in the simulations.Table 2 also shows the ITAE values for the nominal system and the ITAE values of the uncertainty test.The result obtained using GE shows less ITAE than using a traditional tunning method with the PID compared with [4].
Figure 4 shows the response of the system to an impulse disturbance.
The system block diagram is shown in Figure 5.The validity and accuracy of the proposed controller are examined by applying two flight scenarios.The scenario starts when the UAV initially at rest at (1,0,0) coordinates.It starts to fly to a one-meter height (1,0,1) in two seconds then it follows a circular path of one meter radius around the origin (0,0,0).The circular shape formula is: where,   = 1,   = 1,   = 1 rad/sec , and   = 1 rad/ sec.
Figure 6 shows a circle path tracking flight.From the figure it can be noticed that there is a small deviation at the start of the circular path and this is due to the controller endeavour to catch the desired position.Once the actual UAV path coincided with the desired one, the response is stabilized, which is a proof of the designed controller accuracy.It means that the servo motors take the action to move the UAV to a desired position while keeping its body levelled.
Figure 8 shows the servo angles and the motors speeds values during the circular path tracking.It is clear that the propeller speeds settle at a specific value while the servo motors updated continuously to help the UAV track the circular path.In order to test the system in more complicated situation, ∞ -shaped flight scenario is applied.The scenario starts at (0,0,0) coordinate.The UAV begins to fly to a one-meter height in two seconds.After that, it will start flying in an infinity shaped path.The path was created using the Eq. ( 43) and Eq. ( 44), where   = 1,   = 0.5,   = 1 , and   = 0.5 .Figure 9 shows the tracking of a flight path.Figure 10 shows the position and the attitude tracking of the second scenario.It shows that the UAV tracks the desired altitude while keeping it attitude at zero.Thanks to the propellers thrust vectoring done by the servo motors to provide a horizontal force for the tri-rotor UAV movement.Figure 11 shows the servo angles and the motors speeds.Both the servos and the propellers did not exceed the pre-designed limits which is (-60, 60) degrees and (3600) rpm respectively.To compare both scenarios the ITAE is calculated for the altitude during the flights and for both scenarios as shown in Table 3.

CONCLUSION
The present work aims to provide a complete mathematical model along with a simple control scheme for the case of a trirotors UAV.
T shaped tri-copter is designed, and a complete non-linear mathematical model is formulated based on the Newton-Euler method and extracted using the system dynamic equations.Due to the strong coupling between rotational and translational output, the system is linearized using input-output feedback linearization method.The linear system is controlled using six PID controllers: Three for the position and the others for the attitude control.The PID controllers were tuned using GA as an optimization method to reach to the best performance in terms of the ITAE while maintaining the servo angles and rotors' speeds in their design limits.Two flight scenarios are then performed to illustrate the overall system efficiency.These applied scenarios prove the controller ability to track different desired path with a very good performance.The frame of the UAV should be made using a strong light weighted materials such as carbon fiber for example.Brushless motors and (180 deg) servo should be used to construct the tiltable rotors along with gyroscopes, and a control unit.The battery should have high power capacity and it should be light weighted.Despite the all the results obtained so far including all the responses, disturbance test, uncertainty test, and scenarios the actual experimental model will define the validity of this model.

Figure 4 .Figure 5 .
Figure 4. System response to a disturbance

Figure 6 .
Figure 6.Circle path scenario Figure 7 shows the position and attitude responses during the flight.It can be seen that the system tracks the desired position well while keeping the attitude values at almost zeros.It means that the servo motors take the action to move the UAV to a desired position while keeping its body levelled.Figure8shows the servo angles and the motors speeds values during the circular path tracking.It is clear that the propeller speeds settle at a specific value while the servo motors updated continuously to help the UAV track the

Figure 7 .
Figure 7. Position and attitude tracking of the circular path

Figure 8 .
Figure 8. UAV actuators responses during the circular flight scenario 4.2 Infinity shape flight

Figure 10 .Figure 11 .
Figure 10.Position and attitude tracking of the infinity path