Modeling and Control of a Quadrotor Vehicle Subject to Disturbance Load

In this paper, a dynamic model of quadrotor vehicle is derived for theoretic and practical evaluation. Four transfer functions in different channels are converted from the state equations. To study the behavior of quadrotor subject to the external disturbance load, the FLC (fuzzy logic controller) is designed to compare with the PID (proportionalintegral-derivative) controller. Subsequently, Liapounov function is applied for stability analysis. Finally, simulation results are presented to illustrate the performance between FLC and PID. Considering model error, the evaluation simulations are divided into two parts, which describe the ability for rejecting external disturbance, setpoint tracking and disturbance rejection respectively. The simulation scheme demonstrates the FLC method outperforms the PID control scheme.


Introduction
In the recent years, quadrotor vehicle has been paid special attention due to its small size and flexible maneuverability 1 .The previously developments like PID control, Linear Quadratic control, back-stepping, slide mode control [2][3] are still used nowadays as suitable solutions for the quadrotors autonomous flying 1,4 .Considering the robust control in terms of process modeling errors and disturbance load, Lyapunov theory is introduced for the flight control design [5][6][7] .Backstepping is well known and widely used in the control of nonlinear system, especially in the trajectory tracking control of the UAV [8][9][10] .
However, the application of back-stepping depends on the actuated modeled system dynamics.Underactuated model will dramatically decrease the control quality.In this paper, the Liapounov function and fuzzy logic controller is proposed to achieve better performance for quadrotor control.

Modeling of quadrotor vehicle
As shown in Fig. 1, the quadrotor is an X-shaped four-rotor aircraft, with each rotor located in endpoints.
denote the relative position of a quadrotor with respect to an inertial coordinate, and represents attitude angles of the quadrotor.Set OM as the original point.XMYMZM is the inertia coordinates and XYZ is the body fixed coordinates.The transformation matrix between the two coordinates is written as: ( 1 ) Assume that the thrust generated by the four rotors is perpendicular to the aircraft.Therefore, in the body coordinates, the thrust is expressed as: Considering equations (1), (2), in inertial coordinate, the thrust analysis is: Let m denote the quality of the quadrotor.The acceleration of quadrotor in the inertial coordinate is given by: Similarly, the angular acceleration can be written as: Where, r is the length from rotor to the center of the mass of the quadrotor.Fi denotes the thrust of ith rotor.Ix, Iy and Iz are the rotational inertia of the quadrotor around X, Y and Z-axis respectively.Mi is torque generated by ith rotor.
In terms of the equations ( 4), ( 5), the dynamic equations can be yielded: ， the state equations are given as: Where, The transfer function of quadrotor can be presented: The parameters of the designed quadrotor are measured as follows: Table 1.Parameters of the quadrotor

PID control method
The PID control with simple structure has excellent stability by selecting appropriate proportion, differentiation and integration coefficients for disturbance rejection.Taking pitch channel as an example, the simulation results are conducted on the block diagram of PID control system in Fig. 3.

Fuzzy logic modified PID control implementation
The fuzzy logic modified PID controller (FLC) is also proposed in the same manner to compare with the performance of PID controller.A block diagram of fuzzy controller structure with a disturbance load is shown in Fig. 4. Where, NB is negative big, NM is negative middle, NM is negative small, Z0 is zero, PS is positive small, PM is positive middle, PB is positive big.For instance, if e is negative big "NB", e  is positive big "PB", so the control output U is supposed to be increased so as to eliminate system error.So U should be positive big "PB".

Convergence analysis
To further illustrate quadrotor's stability, a Lyapunov function approval is introduced.In terms of the pitch motion, it can be described as: In which,  is the measured angle, 0  is the desired angle, we usually set 0  =0.it is obtained: Assume nonlinear systems: . The progress of looking for a Lyapunov function is organized as follows: Where, a11, a12, a21, a22 are unknown coefficients.(2) Then we have: Recall (12), we have It is obvious to meet curl equation: which indicates the parameters chosen above is rational.(4) Therefore, the Lyapunov function can be yield as follows: Invoking ( 10), ( 14), we have To achieve the stability of the system, the condition , we just need design a fuzzy controller to adjust    , for satisfying either of the following conditions: 0 From the mentioned above, we can make a conclusion that the convergence in the model can be guaranteed.

Simulation
In this section, the performance of PID and FLC are compared by simulations, which are mainly divided into two parts.The first part is conducted in the presence of disturbance load; the second part presents the case with modeling error.

Disturbance rejection
According to Fig. 4, the time of simulation is 20s.During t=4-4.4s, a pulse signal disturbance load is introduced.The simulation result is shown in Fig. 6.The PID controller responds from peak to bottom during t=4.4-6.59s, the overshoot angle in negative direction reaches -0.85°.At about t=16.09s, the angle reaches the desired value.Fig. 6.Simulation results for fighting against a disturbance For FLC, the response wave reaches peak at about t=4.37s, and reaches trough at about t= 5.41s.The overshoot angle in negative direction is -0.8°.At about t=13.86s, the controlled angle reaches 0°.The FLC has faster response speed, smaller reverse overshoot than PID.Thus, fuzzy PID control scheme has stronger ability to resist a disturbance load.

Setpoint tracking
To identify the tracking abilities of PID and FLC, set the disturbances to zero.According to Fig. 3, Fig. 4, a step signal is introduced at initial time.In Fig. 7, when a step signal is introduced, the two systems make response at the same time.With PID, the response is faster than that of FLC during 1s-2s.As for FLC, it reaches the desired value at 10.3s, which is slightly earlier than that of PID.

Setpoint tracking& disturbance rejection
Fig. 8 shows the simulation results of the step response with a disturbance load.When a step signal is introduced at the beginning, the response of two systems just like what the Fig. 7 shows.When a disturbance is introduced within t=8-8.4s,It can be observed that both of two controllers quickly moves towards the maximum in negative direction.However, the response of FLC is more sensitive to the disturbance than that of traditional PID controller.It is apparent that the system controlled by FLC reaches the desired angle quickly.

With modeling error
A Considering process modeling error, a third order transfer function in pitch channel is applied as follows: 4430 870 105

.1. Setpoint tracking& disturbance rejection
Let the gain of disturbance be zero, a step signal is given to identify the ability of setpoint tracking of the third order transfer function.Meanwhile, a disturbance is introduced during 8s-8.4s.The simulation result is presented in Fig. 9.The result shows the angle can be controlled to its desired value within 20s.And the overshoot angle of FLC in negative direction is smaller.Therefore, FLC provides better performance.All the simulation results mentioned above indicate that the FLC controller can efficiently respond to the outside disturbance, thus show better performances than its counterpart.The reason lies in the fact that the FLC can automatically adjust kp, ki, kd in time according to the external conditions so as to maintain the stability of the control system.However, the three parameters of traditional PID is unchanged as soon as they are set in the initial time, that is to say, the traditional PID does not have the adaptive characteristics.

Conclusion
In the paper, a fuzzy logic modified PID (FLC) control scheme is designed to control stability of the quadrotor.Based on theoretical analysis, a Liapounov function is constructed to prove that the stability of the control system can be achieved.The difference between the actual angle and desired angle is presented as the error.The error and change-in-error are applied as inputs of the FLC.To further test the performance of the designed controller subjecting to the disturbance load, the simulation are conducted in MATLAB/ Simulink .The simulation results demonstrate that FLC response more quickly than PID control method, moreover, in terms of FLC, the angle can be controlled to its desired value within less time compared to its counterpart.

Fig. 1 . 1 F3Fig. 2 .
Fig. 1.Designed Quadrotor The quadrotor drives the posture and movement depending on the rotational thrust and torque of four rotors.As shown in Fig. 2, rotors 2, 4 and 1, 3 rotate in opposite direction for eliminating the yawing torque.If the four rotors rotate at the same speed, the aircraft will produce vertical motion.Change the speeds of rotors 4, 2 and keep the speeds of rotors 1, 3, the aircraft will produce pitch movement.Similarly, roll movement result from 1, 3 rotor's speeds change.If the yawing torque in the different diagonals cannot be cancelled, the yaw movement is achieved.

Fig. 4 .FigFig. 5 .
Fig. 4. Block diagram of FLC control system The error of angle (expressed by e ) and change of the angle error (expressed by e  ) are regard as inputs of FLC; U is the control output of the FLC.As a rule of a thumb, e and e  can be divided into seven grades (As shown in Fig. 5.).

Fig. 9 .
Fig. 9. Simulation of setpoint tracking & disturbance rejection of third order transfer function