Trajectory Tracking Control of a Four Rotor Unmanned Aerial Vehicle Based on Continuous Sliding Mode Controller

In this paper, a nonlinear Continuous Sliding Mode control (CSMC) application is presented for trajectory tracking control of a four rotor unmanned aerial vehicle (UAV) called the Quadrotor, also known as micro helicopter. The proposed controller is tested with different time-varying reference routes to provide a stable flight for position control. To show the effectiveness of the designed CSMC, well-tuned PI controller is also applied to quadrotor for the same routes. The current position of the quadrotor is taken from accelerometer, gyroscope and ultrasonic sensors. The experimental results show that the CSMC is adequate to dealing with parameter uncertainties occur in the system dynamics while flying and has satisfactory performance in terms of robustness against to disturbances and error elimination when it compared with PI controller. DOI: http://dx.doi.org/10.5755/j01.eie.23.3.18325

1 Abstract-In this paper, a nonlinear Continuous Sliding Mode control (CSMC) application is presented for trajectory tracking control of a four rotor unmanned aerial vehicle (UAV) called the Quadrotor, also known as micro helicopter.The proposed controller is tested with different time-varying reference routes to provide a stable flight for position control.To show the effectiveness of the designed CSMC, well-tuned PI controller is also applied to quadrotor for the same routes.The current position of the quadrotor is taken from accelerometer, gyroscope and ultrasonic sensors.The experimental results show that the CSMC is adequate to dealing with parameter uncertainties occur in the system dynamics while flying and has satisfactory performance in terms of robustness against to disturbances and error elimination when it compared with PI controller.

I. INTRODUCTION
In recent years, with the competition between the developed countries, the great improvements have been seen in sea, land and air force defence systems.Thanks to these improvements, the Unmanned Systems have become very effective tools to demand some complex missions and have more strategic importance for military services, personnel purposes etc.As a kind of UAV, Quadrotor, whose number of usage increases nowadays, has been studied and become more popular research area in some services such as exploration, aviation, observation, security, intelligence and military.Quadrotor can perform fast and complex manoeuvres [1], autonomous tracking in structured [2] and unstructured places [3] and transport operations [4].Furthermore, Quadrotor can be designed such a way that this small and very effective vehicle is able to do more insecure missions that can be very hazardous for human beings and decreases the demand of human power in complex missions.However, the advantages that Quadrotor has, cannot be explained without analysing its complex nature clearly.Since Quadrotor has nonlinear system dynamics, it is hard to control it easily.To achieve and control this kind of systems, thanks to nonlinear controller, which are researched and designed in control engineering and relevant research areas, it is possible to come true a high level satisfied control performance.
In the past decade, different approaches have been proposed over the control of quadrotor.E. Altug et al. [5], performed a quadrotor control operation by limiting of vertical and yaw movements and the experimental results presented.G. M. Hoffmann et al. [6], realized a study that the input signal determines the path to be followed is recognized as the desired speeds and the coordinates of the points of the trajectory.It is constantly updated so that the control procedures to be followed in the input control, follows the quadrotor trajectory coordinates for each new point and speed.S. Bouabdallah et al. [7], compared the model-based PID and LQR control methods.The conventional PID controller is reported to be effective in small deterioration in the orientation angle and LQ control method is rendered successful results, depending on the model accuracy.F. Solc [8], has proposed a control approach for quadrotor using the state variables approach and addresses this system a simpler form by controlling the vertical speed and the angle with an internal controller.T. Krajnik et al [9], created a model of quadrotor according to the inner and outer loop control structure for a quadrotor which designed for virtual reality game.The image-based navigation and autonomous tracking results with quadrotor control are also given in experimental.S. Bouabdallah et al. [10], tested non-linear open and closed loop control of a quadrotor by using backstepping and sliding mode controller (SMC) methods to control Euler angles in a fixed height level.In the backstepping control method, quadrotor is accomplished at high irregularities in orientation angle.In the SMC method, due to the low amplitude vibrations in the sensors, average results depending partly switching on the nature of the controller are obtained.The SMC has been widely used in control applications for the last decades [11], [17] due to its useful properties such as robust to parameter variations, disturbance rejection and can be easily apply to nonlinear systems as well.Apart from these advantages, the controller has a side effect that is called chattering because of discontinuous movement of the controller.To solve this undesirable movement, some solutions have been proposed [18], [19].A. Benallegue et al. [20], applied a high-order sliding mode observer (HOSMO) to a quadrotor to estimate and observe the effects of the external disturbances.The simulation results indicate that the HOSMO can overcome the system's nonlinearity and performed very well under external disturbances.D. Lee et al. [21], presented an adaptive sliding mode controller (ASMC) for a quadrotor.They compared the proposed controller with a feedback linearization controller (FLC) that is very sensitive to noises also not robust to parameter uncertainty.The simulation results show that the ASMC is better than FLC in terms of dealing with sensor noises and parameter uncertainties.
In this paper, CSMC method is designed and applied to drive system's trajectory to keep the quadrotor in given reference path with small deviations.By obtaining a smoother control signal, chattering effect is reduced.

II. DYNAMICS MODEL OF QUADROTOR
The dynamics of a quadrotor is similar to the motion of an object, which has six degrees of freedom in space [22]., , where I is inertia, g is gravity, G gyroscopic torque, () sk  are torques and T ; the total thrust force generated by the rotor and the thrust forces is given as follows .
In ( 2), i f is the lift force generated by the .i rotor, determined by i  rotor angular velocity and can be written as follows 2 .
Gyroscopic torque can be given as follows .
Then, the expressions of the total torques can be written as follows: where b is thrust factor and d is drift factor.Thus, a typical dynamic model of Quadrotor can be expressed in ( 7) [18].Here, , , x y z I represent the inertia of Quadrotor body in the X-Y-Z axis, represent the waste cycles per minute in a counter-clockwise direction, causing the gyroscopic effect on the rotor.Reference position and reference angles are defined as follows: ( ) ( ), ( ), ( ) , ( ) ( ), ( ), ( ) , ) , , , .
The error signals that occur while trajectory tracking can be defined as: , , , .Taking derivative of the both error signals, the following equation can be written: where and defined as given below.
is described as a virtual control vector to join the system in the cascade structure.After this definition, the open-loop system can be obtained by (9) in terms   and   instead of (1), the expressions written: .
is unifying term that express the connection between the inner loop and outer loop subsystems [24].In this study, system states determined as ( ) t Considering and using ( 13), ( 14) can be obtained:

III. CONTROL
In this section, the controller design and its mathematical explanation are given.

A. Sliding Mode Controller Design
Before designing the control algorithm, the errors must be defined as given below:

t x t t y t y t t h t h t
then, a sliding surface can be described in (16).
A SMC can be designed in a regular form as follows for a system [21]: In this state space description, 1 , x   and B is an m m  nonsingular matrix.The goal is to drive states of the system in the set S defined by where ( ) t  is the time dependent part of the sliding function, containing reference inputs to be applied to the controller.( ) x  denotes the state dependent part of the sliding function, ( , ).
x t


The derivation of the control involves the selection of a Lyapunov function ( ) V  and a desired form of derivative of the Lyapunov function such that closed-loop system is stable.The selected Lyapunov function is [26], [27] 1 , 2 which is positive definite and its derivative is the solution 0 ) , (  t x  will be stable if time derivative of the Lyapunov function cab be expressed as [28] , where P is a positive definite matrix.Thus, the derivative of the Lyapunov function will be negative and this will ensure the stability.Equations ( 21) and ( 22) lead to A solution for this equation is 0.
The expression for derivative of the sliding function is where are gain matrices and First, equivalent control is found by 0   and using (25) as: Second, using (25) the control input to the system can be found by the following: And the result of the short algebra can be written as Third, from time derivative of the sliding function Multiplying both sides with and using (31) ) .
Finally, when this equation is substituted in (32) the control is found as: The value of the control at the instant t is calculated from the value at the time ( ) t   and weighed sum of the control error  and its time derivative.Control described in (37) is continuous function everywhere except in the points of discontinuity of the function ( , ).
x t


When these equations are adapted for position control system as shown in Fig. 2, the following equations can be written for outer loop as given below:  

IV. EXPERIMENTAL RESULTS
In this section, the experimental results are presented to show the effectiveness and performance of both controllers.Also, the results obtained are shown in Fig. 3 and Fig. 4 for helix, and in Fig. 5 Fig. 6 for zigzag routes, respectively.First, the helix reference route is chosen for testing both controller to compare their performances.The helix route is important to test the controllers' performance for the path that changes occur through the flight in the x, y and h axes.In Fig. 3 and Fig. 4, the CSMC and PI controller results are given respectively with reference and measured values for trajectory tracking in the x, y and h.Besides the generated reference control signals are also given for inner loop.As seen from the Fig. 4, the PI controller is insufficient to eliminate the errors occurred through the flight due to the direction changes for three axes.Also, the amplitude value of oscillation in 1  generated by PI controller is bigger than CSMC and this causes vibration on Quadrotor while flying.Furthermore, the Fig. 3 illustrates that CSMC is better than PI controller in terms of trajectory tracking, robust to internal and external disturbances owing to the sensor noise and environmental effect such as wind.Also, the proposed controller is able to overcome parameter variations in the system.Moreover, the CSMC has less delay compared with the PI controller as seen especially in the X axis direction.In the second experiment given in Fig. 5 and Fig. 6 for the CSMC and PI controller respectively, the zigzag reference route is applied to demonstrate how the controller responses the sudden changes occur between X and Y axes.The CSMC has shorter rising and settling time compared with the PI controller and has better performance for trajectory tracking.In the Y axis where sudden changes occur, the CSMC achieves satisfactory tracking performance and has created lower amplitude reference control signal that needed for the inner loop control.Moreover, the CSMC has no overshoot and follows the reference route with less error when compared with the PI controller.On the other hand, the PI controller has undershoot/overshoot in the X and Y axes.The experimental results show that the CSMC is adequate to dealing with parameter variations due to changing battery mass and also is outperformance in terms of robustness to disturbances owing to the sensor noise and environmental effect such as wind.Also, the CSMC achieves better trajectory tracking with small tracking error.
In addition, the proposed controller gives fast response with very small overshoot and has produced chattering-free control signals as well as producing lower amplitude reference control signal that is suitable and needed for the inner loop control when it compared with the PI controller.

V. CONCLUSIONS
In this paper, the CSMC is proposed and validated on Quadrotor to show its robustness against to disturbances which are due to sensor noise and environmental wind effect, coping with parameter variations, path tracking performance and error elimination capability.A well-tuned conventional PI controller is also applied to the quadrotor to show the priority of the proposed controller.The experimental results show that the CSMC controller shows better trajectory tracking performance with having less overshoot, less delay and smaller tracking error when it compared to the responses of PI.Also, the proposed controller produced control signals with acceptable chattering level and lower amplitude reference control signals that is suitable and needed for the inner loop to realize a highly satisfactory trajectory tracking.To conclude, the applied CSMC controller results in better responses than PI controller to control the trajectory tracking of quadrotor under changing references.


quadrotor is presented by
for trajectory tracking.Analysing the study in[25], virtual control signal

and 4 B
are multiplier coefficients of the control signals of the system.

3 . 4 .
The helix route reference tracking results for CSMC.The helix route reference tracking results for PI controller.

Fig. 5 .
The helix route reference tracking results for CSMC.

Fig. 6 .
The zigzag route reference tracking results for PI controller.