# Research on Adaptive Trajectory Tracking Algorithm for a Quadrotor Based on Backstepping and the Sigma-Pi Neural Network

Authors: Zhiming Chen; Kang Niu; Lei Li
Journal: International Journal of Aerospace Engineering
 (2019)

---

## Abstract

In this paper, adaptive tracking control is applied to improve performances of an underactuated quadrotor helicopter with respect to attitude and position control. Firstly, the dynamic model is presented. Then a new trajectory tracking algorithm is designed by using the sigma-pi neural network and backstepping. The paper designs the sigma-pi neural network compensation control law and gives the Lyapunov-type stability analysis. Then the corresponding numerical simulations are performed by using MATLAB. Simulation results are shown to demonstrate the effectiveness of the proposed control strategy, which could reduce tracking error, decrease tracking time, and improve the anti-interference ability of the system.


---

## Body

## 1. Introduction

Presently, the quadrotor is very popular since it can not only vertically take-off and land but also swiftly manoeuvre in any direction [1]. However, the quadrotor is well known to be a nonlinear, underactuated, and highly coupled system. Therefore, how to design a flying control system has become a challenging research.In recent years, researchers have proposed many control methods for the quadrotor system, such as PID method and LQR [2–5]. Although those methods can control UAVs well in some respect, the tracking accuracy performance is terrible when the speed of the UAV increases or the UAV performs large maneuvering. In addition to the above methods, the signal compensation method is used to improve attitude control performances of roll and pitch channels in the condition of a large maneuvering flight [6]. Reference [7] introduces the LQT to improve tracking performance, but this method mainly focuses on decreasing energy consumption. The feedback linearization is used to divide the quadrotor system into two fully actuated subsystems [8], but this method focuses on stabilizing the quadrotor instead of tracking a desired trajectory. The gain scheduling control method is used to get acceptable performance, but this method is the severe trade-off between control performance and the number of the required trim points [9]. Backstepping technique with command filtering is used to finish the control of trajectory tracking, and it uses second-order filter quaternion to get the desired angular velocity vector [10]. The adaptive backstepping sliding mode control technique is used to finish the attitude control, which can reduce the tremor phenomenon of the first-order fixed gain sliding mode [11]. Reference [12] uses the integrator backstepping approach in position and yaw trajectory tracking of the quadrotor. Reference [13] derives the BIOAC (backstepping-based inverse optimal attitude controller) to solve the attitude rapidly located problem, when the input limit is in a large manoeuvre condition.In recent years, many researchers apply the neural network to UAV control. Reference [14] discusses the BP neural network to train the data and construct the dynamics of the UAV. Reference [15] uses the only INS data and neural network to generate hover command and applies this method on JR Ergo 60. The multilayer feedforward network (MFN) is designed to detect obstacles in highways and uses backpropagation algorithm to supervise the training of the proposed neural network by minimizing the square error function via descending gradient criteria [16]. Reference [17] designs an adaptive inverse controller to realize UAV formation flight, combining with the BP neural network. Reference [18] designs an adaptive sliding mode control based on two neural networks for quadrotor stabilization, which presents solutions to conventional control drawbacks as chattering phenomenon and dynamical model imprecision.Combining the sigma-pi neural network with backstepping, this paper presents an algorithm of trajectory tracking control for quadrotor UAVs. The sigma-pi neural network control law is established to compensate for the trajectory tracking error. At the same time, the paper gives the proof of stability by using Lyapunov function. The comparative simulation shows that the tracking error will be reduced considerably, the tracking time will be shortened, and the jitter of the attitude angle will be decreased.The paper is organized as follows. The nonlinear quadrotor UAV dynamic model and the sigma-pi neural network are given in Section2. In Section 3, the sigma-pi neural network control law is designed and the stability analysis of the control law will also be given. Some comparative simulations are given in Section 4. At last, Section 5 will conclude this paper.


## 2. Quadrotor Dynamic Modelling

### 2.1. Coordinate Definition

To describe the UAV motion, the Earth coordinate frameSE and the body coordinate frame SB are used in this paper. At the same time, in the paper, SE is assumed as the inertial coordinate and the Earth’s rotation is negligible. SB is fixed to the quadrotor body. The detailed information of those two reference coordinate frames are shown in Figure 1.Figure 1
Reference coordinate framesSE and SB.As shown in Figure1, F1F2F3F4 represent the rotor thrust. T1T2T3T4 represent the moment generated by each rotor. φθψ are Euler angles. mg represents the gravity.


### 2.2. Quadrotor Dynamic Modelling and Parameters

When modelling the quadrotor UAV, the paper considers that the UAV is just affected by gravity, rotor thrust, and aerodynamic drag during the flight. Using Newton’s kinematics law, the dynamic equations can be written in the following form:(1)x¨y¨z¨φ¨θ¨ψ¨=uxU1m−fxẋmuyU1m−fyẏm−g+uzU1m−fzżmIy−Izθ̇ψ̇Ix+U2dIxIz−Ixφ̇ψ̇Iy+U3dIyIx−Iyθ̇φ̇Iz+U4Iz,where fxfyfz denotes the aerodynamic drag coefficient. Uii=2,3,4 represents the resultant moment. U1=∑i=14Fi represents the resultant force. IxIyIz represents the moment of inertia about the x-axis, y-axis, and z-axis. ux, uy, and uz represent U1 in the x,y,z direction, which is equal to the following formulas, respectively.
(2)ux=cosφsinθcosψ+sinφsinψ,uy=cosφsinθsinψ−sinφsinψ,uz=cosφcosθ.


## 2.1. Coordinate Definition

To describe the UAV motion, the Earth coordinate frameSE and the body coordinate frame SB are used in this paper. At the same time, in the paper, SE is assumed as the inertial coordinate and the Earth’s rotation is negligible. SB is fixed to the quadrotor body. The detailed information of those two reference coordinate frames are shown in Figure 1.Figure 1
Reference coordinate framesSE and SB.As shown in Figure1, F1F2F3F4 represent the rotor thrust. T1T2T3T4 represent the moment generated by each rotor. φθψ are Euler angles. mg represents the gravity.


## 2.2. Quadrotor Dynamic Modelling and Parameters

When modelling the quadrotor UAV, the paper considers that the UAV is just affected by gravity, rotor thrust, and aerodynamic drag during the flight. Using Newton’s kinematics law, the dynamic equations can be written in the following form:(1)x¨y¨z¨φ¨θ¨ψ¨=uxU1m−fxẋmuyU1m−fyẏm−g+uzU1m−fzżmIy−Izθ̇ψ̇Ix+U2dIxIz−Ixφ̇ψ̇Iy+U3dIyIx−Iyθ̇φ̇Iz+U4Iz,where fxfyfz denotes the aerodynamic drag coefficient. Uii=2,3,4 represents the resultant moment. U1=∑i=14Fi represents the resultant force. IxIyIz represents the moment of inertia about the x-axis, y-axis, and z-axis. ux, uy, and uz represent U1 in the x,y,z direction, which is equal to the following formulas, respectively.
(2)ux=cosφsinθcosψ+sinφsinψ,uy=cosφsinθsinψ−sinφsinψ,uz=cosφcosθ.


## 3. Sigma-Pi Neural Network and Control Law Design

### 3.1. Sigma-Pi Neural Network

Compared with other neural networks, the sigma-pi neural network uses summation neurons and quadrature neurons to construct the hidden layers. It not only preserves the highly nonlinear mapping ability but also increases the flexibility of the network. So, according to the specific problems, which can construct appropriate neural networks to improve the learning efficiency of the neural network.Figure2 takes a three-layer sigma-pi neural network as an example, which includes the input layer, product layer, and output layer. The input x is an N-dimensional vector and xk is the kth component of x. The inputs are weighted and fed to a layer of K linear product units, where K is the desired order of the network. Let hji be the output of the jth product units for the ith output, yi. Then
(3)hji=∏kwkjixkβ+θji,yi=σ∑jhji,where wkji is an adjustable weight from input xk to the jth product units of the ith output and θji is an adjustable threshold of the jth product units of the ith output. β represents the basis function vector. σx denotes the nonlinear activation function and is selected as the logistic function, σx=1/1+e−x for all the results reported in this paper. In this paper, it should be noted that connections from product units to an output have fixed weights. Thus, there is no notion of hidden units in the network and fast-learning rules can be used.Figure 2
A sigma-pi neural network.In this paper, the signal layer sigma-pi neural network which just have the input layer and product units to compensate for the error of attitude and position will be used. Then the attitude compensation control law will be designed first, and in this section, the detailed derivation process and the Lyapunov stability analysis will be provided. Followed by using the same method, this paper will give the position compensation control law.


### 3.2. Adaptive Control Law Design

Combing with the backstepping control method, this paper introduces the sigma-pi neural network into the position and attitude control system to improve trajectory tracking performances. The control loop with sigma-pi neural network compensation control is shown in Figure3, which consists of the command filter module, position control module, attitude control module, dynamic model of the UAV, and sigma-pi neural network.Figure 3
The control loop with sigma-pi neural network compensation.As can be seen in Figure3, the “state” outputted by the dynamic model consists of x,y,z,ẋ,ẏ,ż,φ,θ,ψ,φ̇,θ̇,ψ̇. Before designing the sigma-pi neural network compensation attitude and position control law, it is more convenient to establish a state-space model to design a control system for the quadrotor UAV. Then the state-space system for the UAV dynamic model described in (1) can be expressed as follows.
(4)ẋ1ẋ2ẋ3ẋ4ẋ5ẋ6ẋ7ẋ8ẋ9ẋ10ẋ11ẋ12=x2Iy−Izθ̇ψ̇Ix+U2dIxx4Iz−Ixφ̇ψ̇Iy+U3dIyx6Ix−Iyθ̇φ̇Iz+U4Izx8uxU1m−fxẋ8mx10uyU1m−fyẏ10mx12−g+uzU1m−fzż12m.


### 3.3. Attitude Control Law Design

In this section, the attitude control law will be designed. As shown in Figure4, which is part of Figure 3, the quadrotor attitude control loop is composed of the command filter, attitude control module, and sigma-pi neural network module.Figure 4
The quadrotor attitude control loop.As can be seen in Figure4, the attitude angle control instruction φd,θd,ψd will be filtered by the command filter module. Then it combines the states of the quadrotor UAV to get the attitude errors. In addition, the sigma-pi neural network module will combine the states of the quadrotor UAV with Uang which is the current attitude control input Uang=U2,U3,U4T to get the compensation control input US‐P. Then combining US‐P with attitude errors, the attitude control module will calculate the control input for the roll, pitch, and yaw of the quadrotor. Using these attitude control inputs U1,U2,U3,U4, the dynamic model calculates the parameter in each channel to control the attitude and output states of the quadrotor UAV. And the “state” outputted by the dynamic model contains x,y,z,ẋ,ẏ,ż,φ,θ,ψ,φ̇,θ̇,ψ̇.Now, this paper begins designing the attitude control law. Considering the modelling error and external disturbances, equation (4) can be shown in following equation.
(5)Ẋ1=X2,Ẋ2=fX1,X2,U+US‐P−e~,where X1=φθψxyzT; e~=eφeθeψexeyezT denotes the modelling error and external disturbances; US‐P represents the sigma-pi control input.In this paper, the single-layer sigma-pi neural network is used to compensate for the error. So,US‐P can be expressed as follows.
(6)US‐P=WTβ,where WT denotes the weight coefficient matrix; β represents the basis function vector which is defined as follows:
(7)β=kronkronC1,C2,C3,where “kron” represents the Kronecker product and in the attitude control system, C1,C2,C3 are defined as follows:
(8)C1=0.01ẇẇ2T,C2=0.01φdθdψdUS‐PφUS‐PθUS‐PψT,C3=φθψT.To design the adaptive control law, the paper defines thatU∗ is the optimal sigma-pi neural network control input. Then we will get the following equation.
(9)U∗=W∗Tβ,US‐P−U∗=WTβ−W∗Tβ=W~∗Tβ,where W∗T is the optimal weight coefficient matrix; then the error between the optimal control input and the modelling error can be expressed as follows:
(10)US‐P−e~=W~∗Tβ+U∗−e~.Now, this paper takes the roll channel as an example to design the appropriate adaptive control law and give the Lyapunov-type stability analysis. Firstly, we define the roll anglex1φ tracking error as follows:
(11)z1=x1d−x1.Then the Lyapunov-type equationVz1 and the appropriate first-order differential equation V̇z1 can be defined as the following equations:
(12)Vz1=12z12,(13)V̇z1=z1ẋ1d−x2.According to equation (13), x2 can be defined as x2=ẋ1d+α1z1α1>0 to satisfy the stability of the Lyapunov function. Then V̇z1=−α1z12<0.The roll angle rateẋ1φ error can be defined using the same method z2=x2d−x2. Then we can define the Lyapunov function which is rated to z1 and z2.
(14)Vz1,z2=12z12+12z22+12γW~φTW~φ.Then the first order differential equationV̇z1,z2 can be defined as the following equation:
(15)V̇z1,z2=z1ż1+z2ż2+1γφW~φTW~̇φ,z2=x2d−x2.Combining with equations (4), (5), and (11) and defining x2d=ẋ1d+α1z1, ẋ2 in equation (4) can be expressed as follows:
(16)ẋ2=x4x6a1+b1U2+W~φTβφ+US‐P∗φ−eφ,where a1=Iy−Iz/Ix and b1=d/Ix.Then substituting equation (16) into (15) can get the following equation:
(17)V̇z1,z2=z1ż1+z2ż2+1γφW~φTW~̇φ,ż2=x¨1d+α1ż1−ẋ2,ẋ2=x4x6a1+b1U2+W~φTβφ+US‐P∗φ−eφ.According to (17), we can select the control input U2 and the sigma-pi neural network compensation control law as follows:
(18)U2=1b1z1+α1z2−α12z1−x4x6a1+α2z2,α1>0,α2>0,W~̇φ=−γφz2βφ.Substituting equation (18) into (17), the first-order differential Lyapunov function V̇z1,z2 is as follows:
(19)V̇z1,z2=−α1z12−α2z22+z2US_P∗φ−eφ≤−α1z12−α2z22+εz2=−α1z12−z2α2z2−ε.According to (18), if z2 satisfies z2>ε/α2, the Lyapunov function is V̇z1,z2<0. The system is stable. Otherwise, the system is not. If z2 does not satisfy z2>ε/α2, then the paper defines the sigma-pi adaptive control law W~̇φ=0.Using the same method, we can get the adaptive sigma-pi neural network control law of the pitch and the yaw channel.(20)U3=1b2z3+α3z4−α32z3−x2x6a3+α4z4,W~̇θ=−γθz4βθ,U4=1b3z5+α5z6−α52z5−x4x2a5+α6z6,W~̇ψ=−γψz6βψ.Using the same approaches of the roll channel, thenz3,z4,z5,z6 are defined as follows:
(21)z3=x3d−x3,z4=x4d−x4x4d=ẋ3d+α3z3α3>0,z5=x5d−x5,z6=x6d−x6x6d=ẋ6d+α6z6α6>0.


### 3.4. Position Control Law Design

To reduce the trajectory tracking error, this paper also adds the sigma-pi neural network to quadrotor position control loop which is shown in Figure5, which is part of Figure 3. As can be seen in Figure 5, the position control loop is also composed of the command filter module, position control module, and sigma-pi neural network module.Figure 5
The quadrotor position control loop.As can be seen in Figure5, xd,yd,zd represent the desired position instruction, which will be filtered by the command filter module. The “state” outputted by the dynamic model contains x,y,z,ẋ,ẏ,ż,φ,θ,ψ,φ̇,θ̇,ψ̇. It is different from the attitude control loop and the position control loop which defines the basis function vector β as follows:
(22)β=kronkronCp1,Cp2,Cp3,where “kron” represents Kronecker product and in the position control loop, Cp1,Cp2,Cp3 are defined as follows:
(23)Cp1=0.01dd2T,Cp2=0.01xdydzdxyzUS‐PxUS‐PyUS‐PzT,Cp3=xyzT,where d in (23) denotes the distance error between the desired position and the current states.Using the same method, we can get the sigma-pi neural network compensation control law in thex,y,z direction.
(24)W~̇x=−γxzxβx,W~̇y=−γyzyβy,W~̇z=−γzzzβz,where zx,zy,zz represent the position error.After deriving the formula, integrating equations (18), (20), and (24) can get the sigma-pi neural network compensation control law of attitude and position.
(25)W=Wφ,Wθ,WψT,W=Wx,Wy,WzT.Then substituting equations (7), (22), and (25) into equation (6) can get the sigma-pi neural network compensation of the system.


## 3.1. Sigma-Pi Neural Network

Compared with other neural networks, the sigma-pi neural network uses summation neurons and quadrature neurons to construct the hidden layers. It not only preserves the highly nonlinear mapping ability but also increases the flexibility of the network. So, according to the specific problems, which can construct appropriate neural networks to improve the learning efficiency of the neural network.Figure2 takes a three-layer sigma-pi neural network as an example, which includes the input layer, product layer, and output layer. The input x is an N-dimensional vector and xk is the kth component of x. The inputs are weighted and fed to a layer of K linear product units, where K is the desired order of the network. Let hji be the output of the jth product units for the ith output, yi. Then
(3)hji=∏kwkjixkβ+θji,yi=σ∑jhji,where wkji is an adjustable weight from input xk to the jth product units of the ith output and θji is an adjustable threshold of the jth product units of the ith output. β represents the basis function vector. σx denotes the nonlinear activation function and is selected as the logistic function, σx=1/1+e−x for all the results reported in this paper. In this paper, it should be noted that connections from product units to an output have fixed weights. Thus, there is no notion of hidden units in the network and fast-learning rules can be used.Figure 2
A sigma-pi neural network.In this paper, the signal layer sigma-pi neural network which just have the input layer and product units to compensate for the error of attitude and position will be used. Then the attitude compensation control law will be designed first, and in this section, the detailed derivation process and the Lyapunov stability analysis will be provided. Followed by using the same method, this paper will give the position compensation control law.


## 3.2. Adaptive Control Law Design

Combing with the backstepping control method, this paper introduces the sigma-pi neural network into the position and attitude control system to improve trajectory tracking performances. The control loop with sigma-pi neural network compensation control is shown in Figure3, which consists of the command filter module, position control module, attitude control module, dynamic model of the UAV, and sigma-pi neural network.Figure 3
The control loop with sigma-pi neural network compensation.As can be seen in Figure3, the “state” outputted by the dynamic model consists of x,y,z,ẋ,ẏ,ż,φ,θ,ψ,φ̇,θ̇,ψ̇. Before designing the sigma-pi neural network compensation attitude and position control law, it is more convenient to establish a state-space model to design a control system for the quadrotor UAV. Then the state-space system for the UAV dynamic model described in (1) can be expressed as follows.
(4)ẋ1ẋ2ẋ3ẋ4ẋ5ẋ6ẋ7ẋ8ẋ9ẋ10ẋ11ẋ12=x2Iy−Izθ̇ψ̇Ix+U2dIxx4Iz−Ixφ̇ψ̇Iy+U3dIyx6Ix−Iyθ̇φ̇Iz+U4Izx8uxU1m−fxẋ8mx10uyU1m−fyẏ10mx12−g+uzU1m−fzż12m.


## 3.3. Attitude Control Law Design

In this section, the attitude control law will be designed. As shown in Figure4, which is part of Figure 3, the quadrotor attitude control loop is composed of the command filter, attitude control module, and sigma-pi neural network module.Figure 4
The quadrotor attitude control loop.As can be seen in Figure4, the attitude angle control instruction φd,θd,ψd will be filtered by the command filter module. Then it combines the states of the quadrotor UAV to get the attitude errors. In addition, the sigma-pi neural network module will combine the states of the quadrotor UAV with Uang which is the current attitude control input Uang=U2,U3,U4T to get the compensation control input US‐P. Then combining US‐P with attitude errors, the attitude control module will calculate the control input for the roll, pitch, and yaw of the quadrotor. Using these attitude control inputs U1,U2,U3,U4, the dynamic model calculates the parameter in each channel to control the attitude and output states of the quadrotor UAV. And the “state” outputted by the dynamic model contains x,y,z,ẋ,ẏ,ż,φ,θ,ψ,φ̇,θ̇,ψ̇.Now, this paper begins designing the attitude control law. Considering the modelling error and external disturbances, equation (4) can be shown in following equation.
(5)Ẋ1=X2,Ẋ2=fX1,X2,U+US‐P−e~,where X1=φθψxyzT; e~=eφeθeψexeyezT denotes the modelling error and external disturbances; US‐P represents the sigma-pi control input.In this paper, the single-layer sigma-pi neural network is used to compensate for the error. So,US‐P can be expressed as follows.
(6)US‐P=WTβ,where WT denotes the weight coefficient matrix; β represents the basis function vector which is defined as follows:
(7)β=kronkronC1,C2,C3,where “kron” represents the Kronecker product and in the attitude control system, C1,C2,C3 are defined as follows:
(8)C1=0.01ẇẇ2T,C2=0.01φdθdψdUS‐PφUS‐PθUS‐PψT,C3=φθψT.To design the adaptive control law, the paper defines thatU∗ is the optimal sigma-pi neural network control input. Then we will get the following equation.
(9)U∗=W∗Tβ,US‐P−U∗=WTβ−W∗Tβ=W~∗Tβ,where W∗T is the optimal weight coefficient matrix; then the error between the optimal control input and the modelling error can be expressed as follows:
(10)US‐P−e~=W~∗Tβ+U∗−e~.Now, this paper takes the roll channel as an example to design the appropriate adaptive control law and give the Lyapunov-type stability analysis. Firstly, we define the roll anglex1φ tracking error as follows:
(11)z1=x1d−x1.Then the Lyapunov-type equationVz1 and the appropriate first-order differential equation V̇z1 can be defined as the following equations:
(12)Vz1=12z12,(13)V̇z1=z1ẋ1d−x2.According to equation (13), x2 can be defined as x2=ẋ1d+α1z1α1>0 to satisfy the stability of the Lyapunov function. Then V̇z1=−α1z12<0.The roll angle rateẋ1φ error can be defined using the same method z2=x2d−x2. Then we can define the Lyapunov function which is rated to z1 and z2.
(14)Vz1,z2=12z12+12z22+12γW~φTW~φ.Then the first order differential equationV̇z1,z2 can be defined as the following equation:
(15)V̇z1,z2=z1ż1+z2ż2+1γφW~φTW~̇φ,z2=x2d−x2.Combining with equations (4), (5), and (11) and defining x2d=ẋ1d+α1z1, ẋ2 in equation (4) can be expressed as follows:
(16)ẋ2=x4x6a1+b1U2+W~φTβφ+US‐P∗φ−eφ,where a1=Iy−Iz/Ix and b1=d/Ix.Then substituting equation (16) into (15) can get the following equation:
(17)V̇z1,z2=z1ż1+z2ż2+1γφW~φTW~̇φ,ż2=x¨1d+α1ż1−ẋ2,ẋ2=x4x6a1+b1U2+W~φTβφ+US‐P∗φ−eφ.According to (17), we can select the control input U2 and the sigma-pi neural network compensation control law as follows:
(18)U2=1b1z1+α1z2−α12z1−x4x6a1+α2z2,α1>0,α2>0,W~̇φ=−γφz2βφ.Substituting equation (18) into (17), the first-order differential Lyapunov function V̇z1,z2 is as follows:
(19)V̇z1,z2=−α1z12−α2z22+z2US_P∗φ−eφ≤−α1z12−α2z22+εz2=−α1z12−z2α2z2−ε.According to (18), if z2 satisfies z2>ε/α2, the Lyapunov function is V̇z1,z2<0. The system is stable. Otherwise, the system is not. If z2 does not satisfy z2>ε/α2, then the paper defines the sigma-pi adaptive control law W~̇φ=0.Using the same method, we can get the adaptive sigma-pi neural network control law of the pitch and the yaw channel.(20)U3=1b2z3+α3z4−α32z3−x2x6a3+α4z4,W~̇θ=−γθz4βθ,U4=1b3z5+α5z6−α52z5−x4x2a5+α6z6,W~̇ψ=−γψz6βψ.Using the same approaches of the roll channel, thenz3,z4,z5,z6 are defined as follows:
(21)z3=x3d−x3,z4=x4d−x4x4d=ẋ3d+α3z3α3>0,z5=x5d−x5,z6=x6d−x6x6d=ẋ6d+α6z6α6>0.


## 3.4. Position Control Law Design

To reduce the trajectory tracking error, this paper also adds the sigma-pi neural network to quadrotor position control loop which is shown in Figure5, which is part of Figure 3. As can be seen in Figure 5, the position control loop is also composed of the command filter module, position control module, and sigma-pi neural network module.Figure 5
The quadrotor position control loop.As can be seen in Figure5, xd,yd,zd represent the desired position instruction, which will be filtered by the command filter module. The “state” outputted by the dynamic model contains x,y,z,ẋ,ẏ,ż,φ,θ,ψ,φ̇,θ̇,ψ̇. It is different from the attitude control loop and the position control loop which defines the basis function vector β as follows:
(22)β=kronkronCp1,Cp2,Cp3,where “kron” represents Kronecker product and in the position control loop, Cp1,Cp2,Cp3 are defined as follows:
(23)Cp1=0.01dd2T,Cp2=0.01xdydzdxyzUS‐PxUS‐PyUS‐PzT,Cp3=xyzT,where d in (23) denotes the distance error between the desired position and the current states.Using the same method, we can get the sigma-pi neural network compensation control law in thex,y,z direction.
(24)W~̇x=−γxzxβx,W~̇y=−γyzyβy,W~̇z=−γzzzβz,where zx,zy,zz represent the position error.After deriving the formula, integrating equations (18), (20), and (24) can get the sigma-pi neural network compensation control law of attitude and position.
(25)W=Wφ,Wθ,WψT,W=Wx,Wy,WzT.Then substituting equations (7), (22), and (25) into equation (6) can get the sigma-pi neural network compensation of the system.


## 4. Simulation and Discussion

Some comparative simulations are carried out to illustrate the trajectory tracking algorithms proposed in this paper, which can decrease the tracking error, improve the tracking precision, reduce the tracking time, and improve the antijamming capability. The first case wants the UAV to track the 3D spiral trajectory by using the backstepping method as a contrast. The second case will add the disturbing items into the dynamic model to illustrate the ability of anti-interference.


## 5. 3D Spiral Trajectory Tracking

In this case, we will use the sigma-pi neural network compensation control method proposed in this paper and backstepping method in [19] to track the 3D spiral trajectory. The desired trajectory and initial position in simulation are shown in Table 1, and the simulation results are shown in Figures 6–9.Table 1
Parameters using in simulation.
Parameter
Definition
Value
xd (m)
Desiredx
t
yd (m)
Desiredy
3cost2
zd (m)
Desiredz
3sint2+3
x0,y0,z0 (m)
Initial position
(0,1,3)Figure 6
Simulation result using backstepping only.Figure 7
Simulation result using adaptive sigma-pi neural network control.Figure 8
Curves of trajectory tracking error.Figure 9
Curves of the trajectory attitude angle.The trajectory tracking result is shown in Figures6 and 7. Figure 6 uses the backstepping method only, and Figure 7 uses the sigma-pi neural network to compensate for the control error. By comparison, it can be seen clearly that the tracking performance of using the adaptive sigma-pi neural network is better than using backstepping only.The curve of the attitude angle and tracking error by using these two methods can be seen in Figure8. By contrast, it is clearly seen that the tracking error curve which has the sigma-pi neural network compensation control approach is obviously small especially in x and z directions. And to be more specific, the tracking error in the x,y,z direction will all converge to 0 at around 10 s.Figure9 gives the attitude angle change of the UAV by using these two methods. To be more specific, it is clear that the change range of the attitude by using the sigma-pi neural network compensation control method is smaller than backstepping. Apart from this, the jitter of the quadrotor UAV is significantly reduced before 5 s, when using the sigma-pi neural network compensation control method. Moreover, the curve of the attitude angle is smoother without mutation by using the sigma-pi neural network compensation control approach.


### 5.1. Disturbance Rejection Simulation

In this section, disturbance rejection properties of the using sigma-pi neural network compensation control method will be analyzed. This paper will regard gust force as one of the disturbance terms added to the quadrotor UAV. Then the equation of translation motion can be expressed as follows:(26)x¨y¨z¨=uxU1m−fxẋm+dx+US‐Px−e~xuyU1m−fyẏm+dy+US‐Py−e~y−g+uzU1m−fzżm+dz+US−Pz−e~z,where dx,dy, and dz represent additional disturbance terms in the x,y,z direction; as can be seen in equation (20), disturbances are added to the dynamics as additional external forces; therefore, they are in the units of (N). The disturbance term equation is shown as follows, and the corresponding disturbance force curve is shown in Figure 10.
(27)Vw=0,t<T,Vgmax21−cos2πt−T1Tg,T1≤t≤T1+Tg,0,t>T1+Tg.Figure 10
Disturbance term curves.As can be seen in Figure10, it is clear that for the motion in the x,y, and z direction, a strong constant disturbance is added to the system at 10, 20, and 30 seconds, respectively. Since constant disturbances are very strong, they last for 1 second; thus, they can be considered as impulse disturbances. All of these different sizes of disturbing external forces are added simultaneously in the whole simulation process.In this simulation, the desired trajectory and initial position are shown in Table2. And the trajectory tracking result, attitude angle, and the tracking error in disturbance circumstance are shown in Figures 11–13.Table 2
Parameters used in this simulation.
Parameter
Definition
Value
xd (m)
Desiredx
t
yd (m)
Desiredy
3cost2
zd (m)
Desiredz
3sint2+3
x0,y0,z0 (m)
Initial position
(0,1,3)Figure 11
The curve of trajectory tracking.Figure 12
The curve of the attitude angle.Figure 13
The curve of tracking error.As can be seen in Figure11, disturbances are successfully rejected. At 10, 20, and 30 seconds, the quadrotor is exposed to strong impulse disturbances and deviates from the desired path. However, as can be seen in Figure 12, the system tries to return to the desired path by changing Euler angles significantly. And the change of Euler angles is very small in each direction.Figure12 gives the curve of the attitude angle. It is clear that when the additional disturbance terms occur in each direction at 10, 20, and 30 seconds, the quadrotor UAV briefly fluctuates and then restores stability soon. This illustrates that the sigma-pi neural network compensation control method has the ability of anti-inference.Figure13 shows the change of tracking error curves. It is clear that at 10, 20, and 30 seconds, despite the appearing error fluctuations, the tracking error is still very small in the whole process and soon converges to 0. Therefore, it also proves that the quadrotor UAV can track the desired trajectory well in disturbance circumstances.


## 5.1. Disturbance Rejection Simulation

In this section, disturbance rejection properties of the using sigma-pi neural network compensation control method will be analyzed. This paper will regard gust force as one of the disturbance terms added to the quadrotor UAV. Then the equation of translation motion can be expressed as follows:(26)x¨y¨z¨=uxU1m−fxẋm+dx+US‐Px−e~xuyU1m−fyẏm+dy+US‐Py−e~y−g+uzU1m−fzżm+dz+US−Pz−e~z,where dx,dy, and dz represent additional disturbance terms in the x,y,z direction; as can be seen in equation (20), disturbances are added to the dynamics as additional external forces; therefore, they are in the units of (N). The disturbance term equation is shown as follows, and the corresponding disturbance force curve is shown in Figure 10.
(27)Vw=0,t<T,Vgmax21−cos2πt−T1Tg,T1≤t≤T1+Tg,0,t>T1+Tg.Figure 10
Disturbance term curves.As can be seen in Figure10, it is clear that for the motion in the x,y, and z direction, a strong constant disturbance is added to the system at 10, 20, and 30 seconds, respectively. Since constant disturbances are very strong, they last for 1 second; thus, they can be considered as impulse disturbances. All of these different sizes of disturbing external forces are added simultaneously in the whole simulation process.In this simulation, the desired trajectory and initial position are shown in Table2. And the trajectory tracking result, attitude angle, and the tracking error in disturbance circumstance are shown in Figures 11–13.Table 2
Parameters used in this simulation.
Parameter
Definition
Value
xd (m)
Desiredx
t
yd (m)
Desiredy
3cost2
zd (m)
Desiredz
3sint2+3
x0,y0,z0 (m)
Initial position
(0,1,3)Figure 11
The curve of trajectory tracking.Figure 12
The curve of the attitude angle.Figure 13
The curve of tracking error.As can be seen in Figure11, disturbances are successfully rejected. At 10, 20, and 30 seconds, the quadrotor is exposed to strong impulse disturbances and deviates from the desired path. However, as can be seen in Figure 12, the system tries to return to the desired path by changing Euler angles significantly. And the change of Euler angles is very small in each direction.Figure12 gives the curve of the attitude angle. It is clear that when the additional disturbance terms occur in each direction at 10, 20, and 30 seconds, the quadrotor UAV briefly fluctuates and then restores stability soon. This illustrates that the sigma-pi neural network compensation control method has the ability of anti-inference.Figure13 shows the change of tracking error curves. It is clear that at 10, 20, and 30 seconds, despite the appearing error fluctuations, the tracking error is still very small in the whole process and soon converges to 0. Therefore, it also proves that the quadrotor UAV can track the desired trajectory well in disturbance circumstances.


## 6. Conclusions

This paper proposes a new trajectory tracking algorithm of a quadrotor UAV by introducing the sigma-pi neural network to backstepping. Firstly, the paper gives the quadrotor UAV dynamics. Then the paper establishes the sigma-pi neural network compensation control law and gives the Lyapunov stability analysis. At last, some contrastive simulations show that the method proposed in this paper is valid. By comparison, using the proposed method in this paper, we can improve the tracking performance, reduce the tracking time, improve the tracking accuracy, and decrease the jitter of the system.



---

*Source: 1510341-2019-03-27.xml*