Attitude Tracking Control of Small-Scale Unmanned Helicopters Using Quaternion-Based Adaptive Dynamic Surface Control

In this paper, a quaternion-based adaptive dynamic surface control method is proposed for attitude tracking control for small-scale unmanned helicopters with external disturbance and uncertain dynamics. The quaternion formalism is introduced and a quaternion-based multi-input-multi-output nonlinear model is derived from the attitude dynamics of a small-scale helicopter. The low-complexity controllers are designed by the dynamic surface control method as it eliminates the problem of the explosion of items. The singularity problem is avoided by substituting Euler kinematic equations in the nonlinear model with quaternion expressions and integrating the quaternion expressions into the design process of the dynamic surface control. For improving the robustness of the control system, the radial basis function networks are applied to approximate the uncertain dynamics. The external disturbance is also compensated in the controllers’ design. This paper proves that the proposed method can guarantee the uniformly ultimate boundness of this attitude system. Simulation results are presented finally and show the effectiveness of this control approach.


I. INTRODUCTION
Unmanned aerial vehicles (UAVs) are developing very fast these years as they can carry out dangerous flight missions or scientific research without human intervention. Among various kinds of UAVs, unmanned helicopters have been gained more attention due to their unique flight capabilities. However, guaranteeing the stability and robustness of an unmanned helicopter is always a challenging problem in the academic field. Unmanned helicopter systems are intrinsically unstable without close loop control, and helicopter dynamics are highly nonlinear and strongly coupled and hence hard to analyze. Besides, helicopter systems are underactuated, which means the numbers of actuators are lower than the degrees of freedom in such systems. This unusual The associate editor coordinating the review of this manuscript and approving it for publication was Jinquan Xu . mechanical characteristic makes it complicated to utilize conventional ways to design control laws [1].
For unmanned helicopters, linear control methods have achieved much success in the application, such as Proportional Integral Derivative (PID) control [2]- [4], H∞ control [5]- [8], and Linear Quadratic Regulator (LQR) control [9]- [11]. However, these methods only perform validly in moderate maneuvers. To design an unmanned helicopter system with high-performance and large flight envelope, researchers have paid more attention to nonlinear controllers. Some nonlinear control methods have been proposed in the literature, such as sliding mode control [12]- [16], backstepping control [17]- [20], neural network (NN) control [21]- [23], fuzzy control [24]- [26]. Though these methods contribute much to the theoretical design, their industrial applicability is a difficult problem because of the increasing complexity of nonlinear controllers. The dynamic surface control (DSC) method was VOLUME 9, 2021 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ proposed by D. Swaroop et al. in [27], where the explosion of complexity is settled by introducing low-pass filters, enabling this method to implement in practice. Furthermore, this method has been integrated with radial basis function (RBF) networks in [28] and the neural-based adaptive controller can track the reference signal with model uncertainties. In [29], the DSC method has been extended to a nonlinear MIMO system with model uncertainties, external disturbance, and input saturation and deadzone. The singularity problem is also avoided by utilizing the spectral radius in the controller's design.
In practical, quaternion representations are normally applied to deal with the singularity problem as it enables aerial vehicles to be capable of full-attitude flight. In [30], a quaternion-based robust control has been proposed for quadrotors with uncertain parameters and nonlinear dynamics. In [31], the controller has been designed by the backstepping approach with quaternion expressions and applied in the small-scale helicopter Lepton-Ex. In [11], the bounded attitude control of a quadrotor mini-helicopter has been accomplished by the DSC approach in a quaternion expression. More about quaternion-based control may be found in [32]- [37]. Notably, the quaternion-based control has been widely applied to the quadrotors. They have a simpler mechanical structure, which makes it possible to neglect the aerodynamic forces and moments. Thus, the mathematic model derived from the quadrotors is simple and the controllers' design efforts are relaxed. On the contrary, helicopters have complex mechanical characteristics and the strong coupling effects and model uncertainties must be considered when designing controllers. In [38], adaptive DSC using a neural network is applied to an unmanned small-scale helicopter. The external disturbance is approximated by the RBF networks. However, the singularity problem is not solved in the paper. Besides, the helicopter MIMO nonlinear model is built by a mathematic method to make it conform to the strict feedback form, which may harm the model accuracy.
In this paper, we propose a quaternion-based adaptive DSC (QBADSC) method for the attitude control of unmanned small-scale helicopters with model uncertainties and external disturbance. To build a MIMO nonlinear attitude model in the strict feedback form, we introduce dynamics of both the main rotor and the tail rotor into our model. They will be approximated by RBF networks because of the model uncertainties caused by the coupling effects. The singularity problem in the Euler kinematic equation is solved by introducing quaternion expressions. Finally, this paper proves that the control law can guarantee the uniform ultimate boundedness of the closed-loop system, and the simulation is presented to demonstrate this conclusion.
The main contributions of this paper list below. 1) We build a multi-input-multi-output (MIMO) helicopter attitude model in the strict-feedback form, which enables us to apply the DSC method to synthesize controllers in low complexity.
2) The singularity problem is solved by constructing an attitude model with quaternion representation and combining the DSC method with quaternions in the process of synthesizing controllers.
3) RBF networks are used to approximate the uncertain dynamics, which improves the robustness and performance of the control system.
The rest of this paper is organized as follows. Section II presents an ideal unmanned helicopter attitude model in the strict-feedback form and gives a problem statement. In Section III, the controller is designed by the DSC using RBF networks. Section IV proves that the control law presented in the Section III can guarantee the convergence of the whole closed-loop system. Section V shows the simulation results and Section VI concludes the paper.
Notation: In this paper, · stands for the Euclidean norm or the Frobenius norm. Let ξ = (ξ 1 , ξ 2 , . . . , ξ i ) T and the Euclidean norm of ξ is given by ξ 2 = i ξ i 2 . Also, let a matrix B ∈ R m×n and the matrix Frobenius norm of B is given by B 2 = tr(B T B). Besides, the smallest eigenvalue of a square matrix A is given by λ min (A).

II. QUATERNION-BASED ATTITUDE MODEL AND PROBLEM STATEMENT A. QUATERNION FORMALISM
Quaternion representations are widely used to describe the rotation of a rigid body due to the advantages of no singularity and a simple computational process. A quaternion q ∈ H can be defined by a hypercomplex number as where q 0 is the scalar part and q 1:3 is the vector part. The conjugate, norm, and inverse of q arē q = q 0 −q 1:3 In this paper, we apply unit quaternions to describe the rotation of an unmanned helicopter. Considering (4), we obtain The multiplication between two quaternions, such as q and p, can be defined as q · p = q 0 p 0 − q T 1:3 p 1:3 q 0 p 1:3 + p 0 q 1:3 − q 1:3 × p 1:3 where the function C : R 3 → R 3×3 is defined as follows: To get a compact expression, we define a function D : H → R 4×4 as and (6) can be written as Using a quaternion q b that expresses the attitude of an unmanned helicopter, according to [39], the derivative of q b can be described asq where ω b = [ω bx , ω by , ω bz ] T represents the angular velocity in a body coordinate system. In this paper, we replace the Euler kinematic equations with (10) for eliminating the singularity problem.

B. QUATERNION-BASED ATTITUDE MODEL
We first introduce the rigid-body attitude dynamics of a small-scale helicopter aṡ where J = diag(J x , J y , J z ) is the moment of the inertial matrix and is the external disturbance. The helicopter body coordinate system and the local north-east-down coordinate system are given in Fig. 1. For a small-scale helicopter, the forces and moments generated by the fuselage, horizontal fin and vertical fin are generally small. Thus, we lump these effects together and combine them with external disturbance. The aerodynamic moment vectors are given by where L mr , M mr , and N mr stand for the moments generated by the main rotor along x−, y−, and z−axis respectively, and L tr and N tr represent the moments generated by the tail rotor.
Based on the work in [40], L mr and M mr can be written as follows: where K β is the main rotor spring constant, T mr and T tr are the thrust of the main and tail rotor, H mr is the distance between the main rotor hub and the central of gravity(CG) in the vertical direction, H tr is the tail rotor hub location over the CG, and a and b represent flapping angles in longitudinal and lateral directions. According to [41], T tr can be computed approximately as where K col is the effective gain. L tr and N tr are given by where Dtr is the horizontal distance between the CG of the helicopter and the tail rotor hub. Using Q mr to represent the anti-torque associated with the main rotor, we can get N mr by the simple equation N mr = −Q mr . However, getting an accurate value of Q mr needs to solve complicated equations, increasing the complexity of our attitude model. To simplify the attitude model, we apply a concise expression described in [42] that approximates Q mr as follows: Invoking (13)- (16), can be written as According to [41], The main rotor flapping dynamics of a small-scale helicopter have been analyzed in [40], where both the stabilizer bar and the bare main rotor dynamics are taken into consideration for getting an accurate model. In terms of this model, we introduce a different expression including unknown dynamics as follows: are unknown parts, u m = [β lon , β lat ] T , and β lon and β lat are the longitudinal and lateral control input, respectively. Using β ped to represent the rudder input, VOLUME 9, 2021 we introduce a first-order differential equation with unknown parts asθ col =f (y) +ḡ (y) β ped (19) where y = [y 1 , y 2 , . . . , y m ] T . In this paper,F m (x),Ḡ m (x), f (y), andḡ (y) are approximated by RBF networks, which will be detailed in Section III. Remark 1: The thrust generated by the main rotor is seen as a constant in this paper. According to the research in [43], the control system of a small-scale unmanned helicopter is reasonably divided into two loops: an inner loop that controls the attitude and an outer loop that regulates the position. The collective angle servo input is determined by the outer loop and transmitted into the inner loop. In this paper, we focus on the inner loop, ie, the attitude control. It is natural to treat the collective angle servo input as a constant. Assuming that the relation between the thrust of the main rotor and the collective angle servo input is linear, the thrust is constant as well.

C. PROBLEM STATEMENT
To build a MIMO nonlinear attitude model, we first define the state variables and control variables as follows: The attitude dynamics can be described by multivariate differential equations in a compact form as follows: wherẽ In addition,F 3 (x 3 ) andḠ 3 (x 3 ) are unknown dynamics of the helicopter and they can be written as .
The control objective is to make the output y track the desired attitude x d responsively with external disturbance and model uncertainties.
Remark 2: Notably, nonlinear systems (21) are different from those systems that have been analyzed in [10], [29], [44], [45], because the dimension of x 1 is different from that of x 2 and x 3 .

III. CONTROLLER DESIGN
We will apply the DSC method to the control law design of the MIMO system described by (21) with external disturbance and model uncertainties. The control input vector u can be obtained in 3 steps.
Step 1: Defining x e as the error between x 1 and x d , x e , x 1 , and x d satisfy the equation as follows: We know that x 1 , x d , and x e are all unit quaternions. Considering (5), we have where x e → e 1 = [1, 0, 0, 0] T as x 1 → x d . Thus, the first dynamic surface error s 1 is defined as Differentiating s 1 respect to time yieldṡ Considering (9), (10), and (24), we havė Define Invoking (27) and (28), (26) can be rewritten aṡ Define a virtual controlx 2 to bē To avoid the problem of explosion of complexity in the backstepping approach due to the calculation ofẋ 2 , we introduce a low pass filter as follows: where τ 2 is the time constant.
Step 2: Define a second dynamic surface error s 2 as Considering (21), the time derivative of s 2 iṡ Apparently, G 2 (x 2 ) is nonsingular. Therefore we choose a virtual controlx 3 as Design x 3d as where τ 3 is the time constant.
Step 3: We first approximate the uncertain nonlinear functions in this step. Considering (22), we writē wheref 3i (x), i = 1, 2, 3, are approximated by RBF networks. Employing L i nodes for each term and Gaussian function as the basis function, we obtain where where |δ i (x 3 )| < |δ i |. Considering (36) and (37), we havē Define a third dynamic surface error Invoke (21) and (41) Defining that (u) = (Ḡ 3 − I)u, we havė Choose the final control u as where T i = i > 0 and σ i > 0.

IV. STABILITY ANALYSIS
We have designed the overall control laws and the update laws. In this section, the whole closed-loop system is proved to be uniformly ultimately bounded. Considering the first order filters that have been applied in (31) and (35), we first define that Considering (31) and (35), we obtaiṅ Note that where B 2 and B 3 are continuous functions. Then we have Define
Proof: Consider the Lyapunov function candidate Given any k 0 > 0 and p > 0,we first define two sets as follows: Clearly, A and F are compact in R 12 and R 24 , respectively. A×F is compact in R 36 as well. Thus, we give that where M 2 > 0, M 3 > 0, and * M > 0. According to (45), we know that u is bounded. Besides, we have assumed that G 3 is bounded in Assumption 3, therefore we can conclude that (u) ≤u M , where u M > 0. Considering (51), (60), (66), and (67), we havė k 1 , k 2 , k 3 , τ 2 , and τ 3 satisfy the restrict conditions as follows: Integrating this equation over [0, t], we have It is apparent that V → C λ as t → ∞, therefore all signals in (67) are ultimately uniformly bounded. Moreover, by increasing the value of k i and λ min ( i ) or decreasing the value of τ i , the tracking error can be made arbitrarily small, which concludes the proof.

V. SIMULATION RESULTS
We first define the main rotor flapping dynamics aṡ where τ f is the time constant, K lon is the effective longitudinal gain, K lat is the effective lateral gain and 1 , 2 , 3 , and 4 are unexpected dynamics caused by the complex mechanical characteristics and external disturbance such as gusts. The tail rotor operates in a non-uniform flowfield because of the effects of the disturbed air generated by the main rotor and the vertical stabilizer and therefore we defineθ col aṡ θ col = − θ col τ t + 5 + (K col + 6 )β ped 5 = 4sign(sin(2πt))θ col 6 = 4sign(sin(2πt))K col where τ t is the time constant, K col is the effective gain factor, and 5 and 6 are unexpected dynamics.
To prove the effectiveness of our control law, we will make a comparison between the QBADSC and the traditional DSC. The controllers of the latter are synthesized based on VOLUME 9, 2021   the Euler angles, so we give the Euler kinematic equations as followsẋ  Let The design process of the traditional DSC is given as followsx The parameters of the unmanned small-scale helicopter are listed in Table. 1 = sin(x 2 ) + cos(x 2 ). We will give three cases to illustrate the advantages of the QBADSC. In addition, we convert the quaternions to Euler angles to represent the simulation results clearly.

A. STEADY SIGNALS
In this case, the roll and yaw angle increase from 0 • to 100 • during 0-1 s and maintain 100 • in the last 2 s. The yaw angle reaches 80 • at 1 s and remains the same during 2-3s. The response of the Euler angles is given in Fig. 2-4, which shows that the QBADSC method performs better than the traditional DSC method overall. In Fig. 2, it can be seen clearly that the traditional DSC method is unable to deal with the disturbance and model uncertainty. From Fig. 5-7, we can observe that the tracking errors decrease to zero by the QBADSC whereas the traditional DSC is incapable to eliminate the errors. Besides, in the whole process of the simulation,   the tracking errors of the QBADSC are smaller than that of the DSC.

B. SINUSOIDAL SIGNALS
The roll, pitch, and yaw channel are required to track sinusoidal signals with a period of 2s and an amplitude of 60 • . The serious degradation of the traditional DSC method can be seen in Fig. 8, in which the roll angle diverges entirely from VOLUME 9, 2021   the reference signal at 1 s. From Fig. 11, we know that the tracking error is larger than 100 • at 1 s. From Fig. 9 and 10, the response of the QBADSC has a smoother curve compared with the DSC, which means that our control law is still able to resist the disturbance and model uncertainties in an agile flight. In Fig. 11-13, the tracking errors of the QBADSC decrease with the increase of the Euler angle, because the slope of the reference signal is a cosine function. In contrast, the tracking errors of the DSC in three channels are all irregular curves, reflecting the effects of the disturbance and model uncertainties.

C. SQUARE SIGNALS
In this case, the attitude references are square signals with a period of 1s and an amplitude of 30 • , which means that   the helicopter has to switch the attitude with a large angle in a short time. From Fig. 14-16, the degradation of the DSC can be found in three channels, especially the roll channel in which the maximum error is even larger than 300 • . Thus, the traditional DSC is invalid in this case. By contrast, the QBADSC works normally on the condition that the system performs aggressive maneuvers. We can observe that when the reference attitude angle jumps from −30 • to 30 • or   from 30 • to −30 • , the system tracks the angle with a small settling time and little overshoot.

VI. CONCLUSION
A quaternion-based adaptive dynamic surface control for small-scale helicopters has been developed. This method has eliminated the problem of explosion of terms due to the derivation calculation and avoided the singularity problem by introducing quaternion expressions. RBF networks have been applied to approximate model uncertainties, which improves the robustness of the system. The external disturbance has been compensated when synthesizing the controllers. The whole control system has been proved to be asymptotic stability. In the end, simulation results show that our system can track the steady, sinusoidal, and square reference signals with fast response and good performance.
For future work, to decrease the tracking error magnitude, we increase the adaption rate. But it will lead to high-frequency oscillations in control inputs, which harms the stability of the control system. Thus, we need to improve the transient performance of the QBADSC.
HUIYING LIU received the B.E., M.E., and Ph.D. degrees from Northwestern Polytechnical University, Xi'an, China, in 1981, 2000, and 2007, respectively. She was a Senior Visiting Scholar with Clyde University from 2003 to 2004. Since 1996, she has been a Professor with the Department of Automation, Northwestern Polytechnical University. She is currently the Deputy Director of the Department of Automation. She has published over 60 papers in international journals and conference. Her research interests include a wide range of topics from computer science to computer vision, which include system modeling and simulation, image processing and image recognition, pedestrian detection, single-target tracking, and multi-target tracking. She has completed more than 20 important research projects and funds, including the National Natural Science Foundation, the ''863'' Project, the General Armament Department Project, and the Aviation Science Fund. She received the Third Prize of Scientific and Technological Progress of the National Defense Science and Technology Commission, the Second Prize of Shaanxi Province Teaching Achievement, the Northwestern Polytechnic University Teaching Achievement Award, and other awards more than 20 items.
HUIJUAN GUO received the M.S. degree in control science and engineering from Northwestern Polytechnical University, Xi'an, China, in 2014, where she is currently pursuing the Ph.D. degree with the School of Automation. Her current research areas include integrated navigation, nonlinear filtering, multi-sensor data fusion, and fault-tolerant control.
FANG ZHANG received the B.E. degree from the Department of Electronics and Control Engineering, Chang'an University, Xi'an, China, in 2018. He is currently pursuing the Ph.D. degree with the Department of Automation, Northwestern Polytechnical University, Xi'an, China. His research interests include flight control simulation, computer vision, and machine learning.