# Autonomous Trajectory Tracking Control for a Large-Scale Unmanned Helicopter under Airflow Influence

Authors: Zhi Chen; Xiaowei Tu; Qinghua Yang; Daobo Wang; Jian Fu
Journal: Mathematical Problems in Engineering
 (2019)

---

## Abstract

In this paper, a complete nonlinear dynamic unmanned helicopter model considering wind disturbance is proposed to achieve realistic simulations and teasing out the effect of wind on the control system. The wind velocity vector which is horizontal as seen in the inertial frame can be obtained by subtracting the airspeed measured by atmospheric data computer from the inertial speed measured by GPS. The design of the controller fully considers the existence of wind, and the wind disturbance is suppressed by the method of hierarchical control combined with the integral sliding mode control (SMC). The stability proof is given. Hardware in the loop (HIL) tool is employed as a practical engineering solution, and it is an essential step in validating the new algorithm before moving to real flight experiments.


---

## Body

## 1. Introduction

Automatic flight control has been generally studied for unmanned helicopters including Proportional Integral Derivative (PID) [1], Linear Quadratic Regulator (LQR), and Linear Quadratic Gaussian (LQG) [2], H2 [3], H∞ [4], Model Predictive Control (MPC) [5], Backstepping Control [6], robust control [7–9], Fuzzy Control [10], hierarchical control [11], Nonlinear Control [12], sliding mode control (SMC) [13, 14], optimal control [15], Adaptive Control [16], and Disturbance Observer-Based control [17]; few works discussed the trajectory tracking flight of unmanned helicopters in the presences of strong wind. Trajectory tracking control for helicopters at different given speeds faces the following challenges.(1)
The unmanned helicopter’s dynamic model is inherently unstable, strongly nonlinear, and highly coupled.(2)
The dynamics are significantly different from hovering to high-speed forward flight, and the model may be changing from a minimum phase system to a nonminimum phase system that flies at different speeds.Robust control such asH∞ control [18, 19] is well known for handling internal uncertainties and external disturbances. Since the uncertainties and disturbances are usually supposed unknown, the balance between robustness and conservation is hard to achieve. This problem is especially important when the UH is flying at different speed with strong wind. He and Han use a new acceleration feedback control as a robust enhancement for the H∞ algorithm to attenuate uncertainties and external disturbances involved in the tracking control of an unmanned helicopter [20]. Acceleration feedback control does enhance tracking performance significantly compared to the standard H∞ control. However, the H∞ control is conservative as it supposes that the uncertainties are all unknown, which limits the performance of the closed-loop system. If the disturbances are too large, however, the control inputs would become insufficient to alleviate the disturbance fully.The flight speed of small scale helicopters with stabilize bar is relatively low. Generally, the aerodynamics of the rotor can be ignored, and the linearized mathematical model can be directly applied to design the control law in hovering and near hovering flight conditions [21]. But when the UH is flying at high speed and with strong wind interference, a complex model, including blade dynamics, is desired. Blade dynamics must be captured by the helicopter model because of several reasons. Under the conditions of high altitude and high-speed flight, the wind has a tremendous influence on the blade. The flapping motion of the rotor includes a serious nonlinear term, and neglecting the nonlinear term is lack of realism, and it does not have much significance for tuning the gains by using a model that ignores blade dynamics.The presence of time-varying airflow imposes higher requirements on the accuracy, rapidity, and stability of the trajectory tracking control for large-scale unmanned helicopters, especially when it is flying at high altitude and with long flight time. This paper proposes the following innovations to deal with the problem.(i)
Compared with the linearised mathematical model that was previously used to design the control law, this paper applies a complete and nonlinear helicopter model with a stochastic gust model to design the control law that can resist wind disturbance.(ii)
The design of the controller fully considers the existence of airflow, and the wind disturbance is suppressed by the method of hierarchical control combined with the integral sliding mode control.This paper is organized as follows: Section2 describes the UH nonlinear mathematical model disturbed by strong airflow. Then the control structure and algorithm is presented in Section 3. The experimental results and analysis are given in Section 4. Finally, the conclusion is shown in Section 5.


## 2. Complete Nonlinear Model of the Ultrasport 496 Helicopter

The test-bed in this paper is converted from the American Sportscopter Ultrasport 496 (U496) helicopter (Figure1) [22]. The 496 helicopter is equipped with an avionics system, including the onboard computer system, the sensors, and the actuators which generate together the control signals for an automatic flight.Figure 1
Autonomous Ultrasport 496 unmanned helicopter.


### 2.1. Equations of Mathematical Model

The helicopter is a vehicle that is free to rotate and translate simultaneously in all six degrees of freedom (DOF), which are defined as rolling, pitching, yawing, surging, swaying, and heaving. The Newton-Euler equations of motion describe the rigid-body dynamics of such vehicles. There exist two reference frames which are generally used to determine the movement of a helicopter: the body-fixed framework and the inertial framework (NED). The equation of motion for the body-fixed reference frame is(1)mI3×303×303×3J3×3υ˙BΩ˙+Ω×mυBΩ×JΩ=FBMB where υB=[u,v,w]T is the vector of body velocities, Ω=[p,q,r]T is the vector of angular rates, m is the helicopter total mass, J is the inertia moment of the body, and FB=[FX,FY,FZ]T and MB=[MX,MY,MZ]T are the sum of the external forces and moments acting on the airframe and are determined by(2)FX=FX.MR+FX.TR-mgsin⁡θFY=FY.MR+FY.TR-mgcos⁡θsin⁡φFZ=FZ.MR+FZ.TR+mgcos⁡θcos⁡φMX=MX.MR+MX.TRMY=MY.MR+MY.TRMZ=MZ.MR+MZ.TRwhere FX,FY,FZ and MX,MY,MZ are the main rotor and tail rotor forces and moments exerting on the body of the helicopter, and the subscripts MR and TR denote main rotor and tail rotor, respectively. The force and moment generated by the horizontal stabilizer, vertical fin, and fuselage are neglected because their impact is relatively small. The forces distribution of different components is(3)FX.MR=-TMRsin⁡δlon-HMRcos⁡δlonFY.MR=TMRsin⁡δlat+SMRFZ.MR=-TMRcos⁡δloncos⁡δlat-HMRsin⁡δlonFY.TR=TTRMX.MR=FY.MRzmgMY.MR=-FX.MRzmgMZ.MR=MKMX.TR=-TTRztgMY.TR=MK.TRMZ.TR=TTRxtgFX.TR=FZ.TR=0where TMR,TTR are thrust of main and tail rotors, HMR and SMR are backward and lateral forces generated by the main rotor when flying forward, MK and MK.TR are the main rotor torque and tail rotor torque, respectively, δlon and δlat are the pitch and roll cyclic, and xtg,zmg,ztg are the corresponding distances shown in Figure 2.Figure 2
Orthographic views of the Ultrasport 496 helicopter.The differential equations in (1) is the rigid-body equations, the forces and moments acting on the body are contained in these equations. Further, the inertial position (x, y, z) and the Euler angles (φ,θ,ψ) can be calculated using suitable transformations. Solving the following three differential equations provides the inertial position from body velocities:(4)x˙y˙z˙=Ruvw=cθcψsφsθcψ-cφsψcφsθcψ+sφsψcθsψsφsθsψ+cφcψcφsθsψ-sφcψ-sθsφcθcφcθuvw where c∗ and s∗ denote cos∗ and sin∗. Finally, to determine the Euler angles from angular rates, we use the following transformation:(5)φ˙=p+tan⁡θsin⁡φq+tan⁡θcos⁡φrθ˙=cos⁡φq-sin⁡φrψ˙=sin⁡φsec⁡θq+cos⁡φsec⁡θrAccording to [23–27], the force and moment expressions acting on the U496 helicopter are given directly in Appendix A. The results of many times real flight tests prove that the helicopter model uses these expressions to simulate real flight well, and the similarity is more than 60%. This makes sense for studying the impact of wind on flight control systems.


### 2.2. Wind Model and Its Application in the UH Model

For a specific real flight test, the wind model was established with reference to airflow velocity, inertial velocity, trajectory, heading, and inertial navigation information.


#### 2.2.1. Establishment of the Wind Model

The waypoint position information of a real flight is shown in Figure3. The properties of the helicopter passing through each waypoint are shown in Table 1. The information of each waypoint is set as follows: waypoint number, longitude, latitude, altitude, speed, and heading angle. The UH first took off from the waypoint 0 and climbed to a height of 20 meters, then passed through the waypoints 1 to 13, and finally landed at the waypoint 14. The geodetic coordinate system adopts the North East Down (NED) coordinate system with an initial heading of 220 degrees. The red point in Figure 3 represents both waypoint 0 and waypoint 14.Table 1
Waypoint information.
Way Points 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 longitude(°) 99.800 99.798 99.785 99.807 99.825 99.840 99.859 99.879 99.891 99.841 99.823 99.815 99.813 99.801 99.800 Latitude°) 40.406 40.404 40.392 40.379 40.367 40.381 40.398 40.417 40.427 40.427 40.427 40.419 40.417 40.407 40.406 Height(m) 20 20 120 280 400 500 600 400 400 200 200 200 200 20 20 Heading(°) 220 220 130 130 40 40 40 40 270 270 220 220 220 220 220 Speed(m/s) 20 20 20 20 20 20 20 20 20 20 20 10 10 1 0Figure 3
Settings for the waypoints.The calculation of the wind velocity: the air velocity is calculated from the pressure data measured by the pitot tube through the atmospheric data computer, which is shown in Figure4. The inertial speed Vx is measured by the Differential Global Positioning System (DGPS) which is shown in Figure 5. The air velocity uw is the body’s relative velocity to the wind. Thus the wind velocity Vw is obtained by subtracting the air velocity uw from the inertial speed Vx which is shown in Figure 6. The numbers in these figures represent waypoints. Figure 7 replaces Figure 6 with a representation of the wind velocity at which the helicopter passes through each waypoint.Figure 4
Air velocity measured by the atmospheric data computer.Figure 5
Inertial speed measured by the DGPS.Figure 6
Wind speed.Figure 7
Wind vector at the waypoints.The wind direction setting: on the day of the real flight, the helicopter was disturbed by a 5th-level southwesterly wind. According to the flight results, the wind direction is set as shown in Figure7. The wind direction between the waypoints varies randomly between the set wind direction of the previous waypoint and the next waypoint.In this way, we set up a stochastic gust model, in which the wind velocity and direction are always changing according to the real flight test.Note 1. The airflow direction measured by the pitot tube through the atmospheric data computer is facing the head of the UH, and the direction of the real-time wind is completely unmeasurable, so the magnitude of the wind applied to the helicopter model is modified accordingly based on the real flight data. Adjustments bring the simulation curve closer to the actual flight curve.


#### 2.2.2. External Wind Disturbances Exerted on the UH

Since the aerodynamic forces are functions of the air velocityuw, the helicopter model subjected to wind disturbance requires the body’s relative velocity u and the wind velocity Vw as control inputs. In the near hover situation, the aircraft air velocity can be expressed by adding the effect of a wind velocity vector which is horizontal as seen in the inertial frame in the form(6)uw=u-Vwcos⁡ψw-ψ;vw=v-Vwsin⁡ψw-ψ;where Vw is the velocity of the horizontal wind and ψw is the direction of the horizontal wind. Since there are so many variants such as inflow ratio λm=uw2+vw2+ww2/(ΩmRm) and λt=uw2+vw2+ww2/(Ωtrt) contains uw and vw, the change in Vw and ψw causes a change in uw and vw, and the change in uw and vw causes a change in λm and λt. λm and λt further influence the drag factors such as the flapping angle coefficient a1E and b1E and finally affects the aerodynamic forces and torques. In this way, the external wind disturbance can affect the whole helicopter movement.


## 2.1. Equations of Mathematical Model

The helicopter is a vehicle that is free to rotate and translate simultaneously in all six degrees of freedom (DOF), which are defined as rolling, pitching, yawing, surging, swaying, and heaving. The Newton-Euler equations of motion describe the rigid-body dynamics of such vehicles. There exist two reference frames which are generally used to determine the movement of a helicopter: the body-fixed framework and the inertial framework (NED). The equation of motion for the body-fixed reference frame is(1)mI3×303×303×3J3×3υ˙BΩ˙+Ω×mυBΩ×JΩ=FBMB where υB=[u,v,w]T is the vector of body velocities, Ω=[p,q,r]T is the vector of angular rates, m is the helicopter total mass, J is the inertia moment of the body, and FB=[FX,FY,FZ]T and MB=[MX,MY,MZ]T are the sum of the external forces and moments acting on the airframe and are determined by(2)FX=FX.MR+FX.TR-mgsin⁡θFY=FY.MR+FY.TR-mgcos⁡θsin⁡φFZ=FZ.MR+FZ.TR+mgcos⁡θcos⁡φMX=MX.MR+MX.TRMY=MY.MR+MY.TRMZ=MZ.MR+MZ.TRwhere FX,FY,FZ and MX,MY,MZ are the main rotor and tail rotor forces and moments exerting on the body of the helicopter, and the subscripts MR and TR denote main rotor and tail rotor, respectively. The force and moment generated by the horizontal stabilizer, vertical fin, and fuselage are neglected because their impact is relatively small. The forces distribution of different components is(3)FX.MR=-TMRsin⁡δlon-HMRcos⁡δlonFY.MR=TMRsin⁡δlat+SMRFZ.MR=-TMRcos⁡δloncos⁡δlat-HMRsin⁡δlonFY.TR=TTRMX.MR=FY.MRzmgMY.MR=-FX.MRzmgMZ.MR=MKMX.TR=-TTRztgMY.TR=MK.TRMZ.TR=TTRxtgFX.TR=FZ.TR=0where TMR,TTR are thrust of main and tail rotors, HMR and SMR are backward and lateral forces generated by the main rotor when flying forward, MK and MK.TR are the main rotor torque and tail rotor torque, respectively, δlon and δlat are the pitch and roll cyclic, and xtg,zmg,ztg are the corresponding distances shown in Figure 2.Figure 2
Orthographic views of the Ultrasport 496 helicopter.The differential equations in (1) is the rigid-body equations, the forces and moments acting on the body are contained in these equations. Further, the inertial position (x, y, z) and the Euler angles (φ,θ,ψ) can be calculated using suitable transformations. Solving the following three differential equations provides the inertial position from body velocities:(4)x˙y˙z˙=Ruvw=cθcψsφsθcψ-cφsψcφsθcψ+sφsψcθsψsφsθsψ+cφcψcφsθsψ-sφcψ-sθsφcθcφcθuvw where c∗ and s∗ denote cos∗ and sin∗. Finally, to determine the Euler angles from angular rates, we use the following transformation:(5)φ˙=p+tan⁡θsin⁡φq+tan⁡θcos⁡φrθ˙=cos⁡φq-sin⁡φrψ˙=sin⁡φsec⁡θq+cos⁡φsec⁡θrAccording to [23–27], the force and moment expressions acting on the U496 helicopter are given directly in Appendix A. The results of many times real flight tests prove that the helicopter model uses these expressions to simulate real flight well, and the similarity is more than 60%. This makes sense for studying the impact of wind on flight control systems.


## 2.2. Wind Model and Its Application in the UH Model

For a specific real flight test, the wind model was established with reference to airflow velocity, inertial velocity, trajectory, heading, and inertial navigation information.


### 2.2.1. Establishment of the Wind Model

The waypoint position information of a real flight is shown in Figure3. The properties of the helicopter passing through each waypoint are shown in Table 1. The information of each waypoint is set as follows: waypoint number, longitude, latitude, altitude, speed, and heading angle. The UH first took off from the waypoint 0 and climbed to a height of 20 meters, then passed through the waypoints 1 to 13, and finally landed at the waypoint 14. The geodetic coordinate system adopts the North East Down (NED) coordinate system with an initial heading of 220 degrees. The red point in Figure 3 represents both waypoint 0 and waypoint 14.Table 1
Waypoint information.
Way Points 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 longitude(°) 99.800 99.798 99.785 99.807 99.825 99.840 99.859 99.879 99.891 99.841 99.823 99.815 99.813 99.801 99.800 Latitude°) 40.406 40.404 40.392 40.379 40.367 40.381 40.398 40.417 40.427 40.427 40.427 40.419 40.417 40.407 40.406 Height(m) 20 20 120 280 400 500 600 400 400 200 200 200 200 20 20 Heading(°) 220 220 130 130 40 40 40 40 270 270 220 220 220 220 220 Speed(m/s) 20 20 20 20 20 20 20 20 20 20 20 10 10 1 0Figure 3
Settings for the waypoints.The calculation of the wind velocity: the air velocity is calculated from the pressure data measured by the pitot tube through the atmospheric data computer, which is shown in Figure4. The inertial speed Vx is measured by the Differential Global Positioning System (DGPS) which is shown in Figure 5. The air velocity uw is the body’s relative velocity to the wind. Thus the wind velocity Vw is obtained by subtracting the air velocity uw from the inertial speed Vx which is shown in Figure 6. The numbers in these figures represent waypoints. Figure 7 replaces Figure 6 with a representation of the wind velocity at which the helicopter passes through each waypoint.Figure 4
Air velocity measured by the atmospheric data computer.Figure 5
Inertial speed measured by the DGPS.Figure 6
Wind speed.Figure 7
Wind vector at the waypoints.The wind direction setting: on the day of the real flight, the helicopter was disturbed by a 5th-level southwesterly wind. According to the flight results, the wind direction is set as shown in Figure7. The wind direction between the waypoints varies randomly between the set wind direction of the previous waypoint and the next waypoint.In this way, we set up a stochastic gust model, in which the wind velocity and direction are always changing according to the real flight test.Note 1. The airflow direction measured by the pitot tube through the atmospheric data computer is facing the head of the UH, and the direction of the real-time wind is completely unmeasurable, so the magnitude of the wind applied to the helicopter model is modified accordingly based on the real flight data. Adjustments bring the simulation curve closer to the actual flight curve.


### 2.2.2. External Wind Disturbances Exerted on the UH

Since the aerodynamic forces are functions of the air velocityuw, the helicopter model subjected to wind disturbance requires the body’s relative velocity u and the wind velocity Vw as control inputs. In the near hover situation, the aircraft air velocity can be expressed by adding the effect of a wind velocity vector which is horizontal as seen in the inertial frame in the form(6)uw=u-Vwcos⁡ψw-ψ;vw=v-Vwsin⁡ψw-ψ;where Vw is the velocity of the horizontal wind and ψw is the direction of the horizontal wind. Since there are so many variants such as inflow ratio λm=uw2+vw2+ww2/(ΩmRm) and λt=uw2+vw2+ww2/(Ωtrt) contains uw and vw, the change in Vw and ψw causes a change in uw and vw, and the change in uw and vw causes a change in λm and λt. λm and λt further influence the drag factors such as the flapping angle coefficient a1E and b1E and finally affects the aerodynamic forces and torques. In this way, the external wind disturbance can affect the whole helicopter movement.


## 2.2.1. Establishment of the Wind Model

The waypoint position information of a real flight is shown in Figure3. The properties of the helicopter passing through each waypoint are shown in Table 1. The information of each waypoint is set as follows: waypoint number, longitude, latitude, altitude, speed, and heading angle. The UH first took off from the waypoint 0 and climbed to a height of 20 meters, then passed through the waypoints 1 to 13, and finally landed at the waypoint 14. The geodetic coordinate system adopts the North East Down (NED) coordinate system with an initial heading of 220 degrees. The red point in Figure 3 represents both waypoint 0 and waypoint 14.Table 1
Waypoint information.
Way Points 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 longitude(°) 99.800 99.798 99.785 99.807 99.825 99.840 99.859 99.879 99.891 99.841 99.823 99.815 99.813 99.801 99.800 Latitude°) 40.406 40.404 40.392 40.379 40.367 40.381 40.398 40.417 40.427 40.427 40.427 40.419 40.417 40.407 40.406 Height(m) 20 20 120 280 400 500 600 400 400 200 200 200 200 20 20 Heading(°) 220 220 130 130 40 40 40 40 270 270 220 220 220 220 220 Speed(m/s) 20 20 20 20 20 20 20 20 20 20 20 10 10 1 0Figure 3
Settings for the waypoints.The calculation of the wind velocity: the air velocity is calculated from the pressure data measured by the pitot tube through the atmospheric data computer, which is shown in Figure4. The inertial speed Vx is measured by the Differential Global Positioning System (DGPS) which is shown in Figure 5. The air velocity uw is the body’s relative velocity to the wind. Thus the wind velocity Vw is obtained by subtracting the air velocity uw from the inertial speed Vx which is shown in Figure 6. The numbers in these figures represent waypoints. Figure 7 replaces Figure 6 with a representation of the wind velocity at which the helicopter passes through each waypoint.Figure 4
Air velocity measured by the atmospheric data computer.Figure 5
Inertial speed measured by the DGPS.Figure 6
Wind speed.Figure 7
Wind vector at the waypoints.The wind direction setting: on the day of the real flight, the helicopter was disturbed by a 5th-level southwesterly wind. According to the flight results, the wind direction is set as shown in Figure7. The wind direction between the waypoints varies randomly between the set wind direction of the previous waypoint and the next waypoint.In this way, we set up a stochastic gust model, in which the wind velocity and direction are always changing according to the real flight test.Note 1. The airflow direction measured by the pitot tube through the atmospheric data computer is facing the head of the UH, and the direction of the real-time wind is completely unmeasurable, so the magnitude of the wind applied to the helicopter model is modified accordingly based on the real flight data. Adjustments bring the simulation curve closer to the actual flight curve.


## 2.2.2. External Wind Disturbances Exerted on the UH

Since the aerodynamic forces are functions of the air velocityuw, the helicopter model subjected to wind disturbance requires the body’s relative velocity u and the wind velocity Vw as control inputs. In the near hover situation, the aircraft air velocity can be expressed by adding the effect of a wind velocity vector which is horizontal as seen in the inertial frame in the form(6)uw=u-Vwcos⁡ψw-ψ;vw=v-Vwsin⁡ψw-ψ;where Vw is the velocity of the horizontal wind and ψw is the direction of the horizontal wind. Since there are so many variants such as inflow ratio λm=uw2+vw2+ww2/(ΩmRm) and λt=uw2+vw2+ww2/(Ωtrt) contains uw and vw, the change in Vw and ψw causes a change in uw and vw, and the change in uw and vw causes a change in λm and λt. λm and λt further influence the drag factors such as the flapping angle coefficient a1E and b1E and finally affects the aerodynamic forces and torques. In this way, the external wind disturbance can affect the whole helicopter movement.


## 3. Control Structure and Algorithm

The flight control system is designed as two parts: (1) path planning layer and (2) kernel control layer; the overall hierarchical structure is shown in Figure8.Figure 8
Structure of the overall autonomous flight control system.


### 3.1. Path Planning Layer

The UH requires a series of waypoints to fly according to the preset flight route. However, in long-haul flights, a path that uses a large number of discrete points is not suitable for autonomous flight systems because it requires a large amount of memory to save all the waypoints. Thus B-Spline describing the route using a finite set of control points and knots is applied to the route generation process. By adding and deleting the spline curves in a stepwise manner, the memory space can be effectively utilized to achieve real-time control effects.


#### 3.1.1. B-Spline Curve

A spline curve represents the sequential curve segments that are connected to create a single continuous curve. A B-Spline is a type of representation of a spline curve constructed by control points, knot vectors, and basic functions. n+1 control points are selected in the inertial coordinate system, and a spline curve C(u) generated by the n+1 control points is used as a preset route of the UH. The B-Spline curve C(u) is described using the parametric spline equations, as shown in(7)Cu=∑j=0nNj,pubj,Tp-1≤u≤Tn+1where p is the order of the spline, bj(j=0,…,n) are the control points, and u is the parameter of the spline. The control points define the convex hull of the spline curve. Therefore, the spline curve begins from the first control point and ends at the last point, within the convex hull. The knot vector T is described as T=[T0,T1,…,Tn+p-1,Tn+p], where the elements set of T are a nondecreasing sequence of real value. To fix both the endpoints of the spline curve to the start and end of control points, b0 and bn, the first and last set of knots are repeated p times with the same value as follows:(8)T0=⋯=Tp-1=ustart,Tn+1=⋯=Tn+p=uendwhere ustart and uend are the parameter values of the start and endpoint of the spline, respectively. Nj,p(u) is the basic function of the curve with order p and can be described with the following equation:(9)Ni,0u=1ifTi≤u≤Ti+10otherwiseNi,ju=u-TjTi+j-TiNj,pu+Ti+j-1-uTi+j-1-Ti+1Ni+1,j-1uwhere j=1,2,…,p. Using the spline parameter u we divide the spline into equal intervals, and the spacing is approximately equal to 30 meters. These equally spaced points on the spline will be used as the trajectory reference point T(xref,yref) for the UH.In the next subsection, we will explain how to obtain the projection pointP on the B-Spline curve which is closest to the UH real-time position C(x,y) and how the reference point is given.


#### 3.1.2. Position Reference Generation

According to the UH real-time positionC(x,y) measured by GPS during flight, the iterative method is used to find the closest point O(Xo,Yo) on the B-Spline curve. Project the current real-time position C to the preset trajectory to obtain the projection point P(Xp,Yp). Then, a certain buffer distance is added along the direction of the B-Spline curve with reference to the point O, and the virtual future point thus obtained is regarded as the position tracking reference point T. As T moves continuously forward on the B-Spline curve, the UH gradually flies toward the B-Spline curve under its guidance. As shown in Figure 9, the specific implementation steps are as follows.Figure 9
Schematic diagram of projection pointP and reference point T.(1) Calculate the distanced between the equidistant point on the spline curve and the point C(x,y) from the initial point C(ustart) one by one. The iterative calculation ends until the point O1 that makes d1=(Xo-X)2+(Yo-Y)2<40 meters found. Find the next point O2 along the direction of the B-Spline from point O1. The distance between O2 and C is d2. If d2<d1, select O2 as the closest point O(Xo,Yo); otherwise select O1. The spline parameter corresponding to the closest point O(Xo,Yo) is uo.(2) SupposeO1 is the closest point O(Xo,Yo); thus d=d1. According to the spline parameter uo of point O(Xo,Yo) and combining the UH heading ψ and the heading ψo of point O(Xo,Yo), the increment of u of the projection point P relative to uo is obtained by trigonometric transformation(10)Δu1=dcos⁡ψ-ψ0dx/du2+dy/du2(3) Thus the spline parameterup of point P(Xp,Yp) is up=uo+Δu1. Then adding a certain buffer distance from point P to point T, the spline parameter of the point T is uT=up+Δu2, where Δu2 is determined by the speed of the UH.(4) Based on the spline parameteruT of point T, the corresponding position coordinates are calculated as the position tracking reference point T(xref,yref) according to (7).


### 3.2. Kernel Control Layer

The helicopter’s kernel control layer uses a cascade control structure combined with the PID method and sliding mode control strategy. The attitude and angular rate loops are considered as the inner loops, while the speed and position loops are considered as the outer loops.In the cascade control method, the control output of the upper subcontroller is the control reference of the lower subcontroller. By looking for a strong correlation state between the upper and lower layers, that state is taken as the virtual output of the upper subcontroller, that is, the virtual reference of the next subcontroller. According to this idea, the strong correlation statesu,v,w are chosen as the virtual output of the position controller, while the strong correlation states ϕ, θ, δcol are selected as the virtual output of the velocity controller.The roll, pitch, and heading channels in the inner loops adopt feedback control, while feedforward control is also used between the heading and altitude channels and between the roll and pitch channels to suppress the state coupling. Through multiple flight tests, it has achieved an excellent decoupling control effect for the inner loops. Thus the traditional PID controller is used for the inner loops here.The focus of this paper is to resist the disturbance of the wind and complete the trajectory tracking flight mission at a constant speed. To accomplish this task, the SMC algorithm is used for the multiple inputs and multiple outputs system of the outer loops.


#### 3.2.1. Error Tracking System of the Outer Loop

Based on (1) and (4), the position error tracking subsystem and the speed error tracking subsystem in the outer loop are rewritten as follows.(1) Position (pos) error tracking subsystem:(11)x˙pos=fposxpos+gposxposupos where xpos=[xe,ye,ze]T, fpos(xpos)=0, gpos(xpos)=R, upos=[uref,vref,wref]T. During the constant speed flight of the helicopter, since the heading is controlled by the inner loop, the output uref is the given speed. The role of the position controller output vref is to eliminate the lateral deviation.(2) Velocity (vel) error tracking subsystem:(12)x˙vel=fvelxvel+gvelxveluvel where xvel=[ue,ve,we]T, uvel=[sin⁡φref,sin⁡θref,δcol]T, fvel(xvel)=[fvel1,fvel2,fvel3]T, fvel1=(FX.MR+FX.TR)/m+vr-wq, fvel2=(FY.MR+FY.TR)/m+wp-ur, fvel3=(-K2TMRcos⁡δloncos⁡δlat-K2HMRsin⁡δlon+mgcos⁡φrefcos⁡θref)/m+uq-vp, and gvel(Xvel)=[g,gcos⁡θref,-(K1TMRcos⁡δloncos⁡(δlat)+K1HMRsin⁡(δlon))/m]T.Because the gravity is much larger than the forward and lateral components of the rotor lift, we considermgsin⁡θ as the dominant term of the forward component force FX and mgcos⁡θsin⁡φ as the dominant item of the lateral component force FY. And FX.MR+FX.TR and FY.MR+FY.TR are treated as the minor items. According to the observation, ϕ, θ, δcol are selected as the states strongly correlated with the upper and lower layers. Thus, φ and θ in mgsin⁡θ and mgcos⁡θsin⁡φ can be regarded as virtual reference to the next layer.


#### 3.2.2. Decoupling Control Method Considering Wind Disturbance

To maintain constant speed flight in the longitudinal channel, the use of integral sliding mode control is a very good solution. According to the above error tracking system, we design the sliding mode controller as follows. Step 1. Forxvel or xpos, the switching surfaces S are designed as(13)SX=X+ξ∫X where X=xpos, ξ=diagξx,ξy,ξz, SX=Sx,Sy,SzT in the position subcontroller, while X=xvel, ξ=diagξu,ξv,ξw, SX=Su,Sv,SwT in the velocity subcontroller.Step 2. The approaching law of the sliding mode control method is(14)S˙X=-ktanh⁡SX=-N where k=diagkx,ky,kz in the position subcontroller, while k=diagku,kv,kw in the velocity subcontroller.Step 3. The subcontroller lawu can be designed as(15)u=gX-1-fX-ξX-N where u=upos, g(X)=gpos(Xpos), f(X)=fpos(Xpos) in the position subcontroller, while u=uvel, g(X)=gvel(Xvel), f(X)=fvel(Xvel) in the velocity subcontroller.It should be noted here that in the velocity subcontroller, the roll angleϕ and the pitch angle θ have a coupling effect on the speed of the UH. From the perspective of decoupling, it is necessary to set the calculation order of the three control outputs in uvel. First, we solve the differential equation of forwarding velocity to get θref. Then φref is solved in the lateral velocity differential equation by θref. Finally, θref and φref are substituted into the vertical velocity differential equation to obtain δcol. In this way, it is possible to reduce the coupling between the longitudinal and the lateral directions while maintaining the speed constant. At the same time, because the wind disturbance is introduced in the calculation of aerodynamic force, the controller has a good effect of suppressing wind disturbance.


#### 3.2.3. Stability Proof

The candidate Lyapunov function for the subsystem (11) and (12) is(16)VX=S2X2From (16), it is easy to know that V(X)≥0. If and only if S(X)=0, V(X)=0.Differentiating (16), we obtain(17)V˙X=SXS˙XSubstituting (14), (11), or (12) into (17), we obtain(18)V˙X=SXX˙+ξX=SxfX+gXu+ξXSubstituting (14) and (15) into (18), we obtain(19)V˙X=-kSXtanh⁡SXWhenS(X)>0, tanh(S(X))>0. Since k>0, V˙X<0. When S(X)<0, tanh(S(X))<0. Since k>0, V˙X<0. When S(X)=0, V˙X=0.In conclusion,V⩾0 (if and only if X=0, then V=0), and V˙<0 (if X≠0); thus the system state X is asymptotically stable.


## 3.1. Path Planning Layer

The UH requires a series of waypoints to fly according to the preset flight route. However, in long-haul flights, a path that uses a large number of discrete points is not suitable for autonomous flight systems because it requires a large amount of memory to save all the waypoints. Thus B-Spline describing the route using a finite set of control points and knots is applied to the route generation process. By adding and deleting the spline curves in a stepwise manner, the memory space can be effectively utilized to achieve real-time control effects.


### 3.1.1. B-Spline Curve

A spline curve represents the sequential curve segments that are connected to create a single continuous curve. A B-Spline is a type of representation of a spline curve constructed by control points, knot vectors, and basic functions. n+1 control points are selected in the inertial coordinate system, and a spline curve C(u) generated by the n+1 control points is used as a preset route of the UH. The B-Spline curve C(u) is described using the parametric spline equations, as shown in(7)Cu=∑j=0nNj,pubj,Tp-1≤u≤Tn+1where p is the order of the spline, bj(j=0,…,n) are the control points, and u is the parameter of the spline. The control points define the convex hull of the spline curve. Therefore, the spline curve begins from the first control point and ends at the last point, within the convex hull. The knot vector T is described as T=[T0,T1,…,Tn+p-1,Tn+p], where the elements set of T are a nondecreasing sequence of real value. To fix both the endpoints of the spline curve to the start and end of control points, b0 and bn, the first and last set of knots are repeated p times with the same value as follows:(8)T0=⋯=Tp-1=ustart,Tn+1=⋯=Tn+p=uendwhere ustart and uend are the parameter values of the start and endpoint of the spline, respectively. Nj,p(u) is the basic function of the curve with order p and can be described with the following equation:(9)Ni,0u=1ifTi≤u≤Ti+10otherwiseNi,ju=u-TjTi+j-TiNj,pu+Ti+j-1-uTi+j-1-Ti+1Ni+1,j-1uwhere j=1,2,…,p. Using the spline parameter u we divide the spline into equal intervals, and the spacing is approximately equal to 30 meters. These equally spaced points on the spline will be used as the trajectory reference point T(xref,yref) for the UH.In the next subsection, we will explain how to obtain the projection pointP on the B-Spline curve which is closest to the UH real-time position C(x,y) and how the reference point is given.


### 3.1.2. Position Reference Generation

According to the UH real-time positionC(x,y) measured by GPS during flight, the iterative method is used to find the closest point O(Xo,Yo) on the B-Spline curve. Project the current real-time position C to the preset trajectory to obtain the projection point P(Xp,Yp). Then, a certain buffer distance is added along the direction of the B-Spline curve with reference to the point O, and the virtual future point thus obtained is regarded as the position tracking reference point T. As T moves continuously forward on the B-Spline curve, the UH gradually flies toward the B-Spline curve under its guidance. As shown in Figure 9, the specific implementation steps are as follows.Figure 9
Schematic diagram of projection pointP and reference point T.(1) Calculate the distanced between the equidistant point on the spline curve and the point C(x,y) from the initial point C(ustart) one by one. The iterative calculation ends until the point O1 that makes d1=(Xo-X)2+(Yo-Y)2<40 meters found. Find the next point O2 along the direction of the B-Spline from point O1. The distance between O2 and C is d2. If d2<d1, select O2 as the closest point O(Xo,Yo); otherwise select O1. The spline parameter corresponding to the closest point O(Xo,Yo) is uo.(2) SupposeO1 is the closest point O(Xo,Yo); thus d=d1. According to the spline parameter uo of point O(Xo,Yo) and combining the UH heading ψ and the heading ψo of point O(Xo,Yo), the increment of u of the projection point P relative to uo is obtained by trigonometric transformation(10)Δu1=dcos⁡ψ-ψ0dx/du2+dy/du2(3) Thus the spline parameterup of point P(Xp,Yp) is up=uo+Δu1. Then adding a certain buffer distance from point P to point T, the spline parameter of the point T is uT=up+Δu2, where Δu2 is determined by the speed of the UH.(4) Based on the spline parameteruT of point T, the corresponding position coordinates are calculated as the position tracking reference point T(xref,yref) according to (7).


## 3.1.1. B-Spline Curve

A spline curve represents the sequential curve segments that are connected to create a single continuous curve. A B-Spline is a type of representation of a spline curve constructed by control points, knot vectors, and basic functions. n+1 control points are selected in the inertial coordinate system, and a spline curve C(u) generated by the n+1 control points is used as a preset route of the UH. The B-Spline curve C(u) is described using the parametric spline equations, as shown in(7)Cu=∑j=0nNj,pubj,Tp-1≤u≤Tn+1where p is the order of the spline, bj(j=0,…,n) are the control points, and u is the parameter of the spline. The control points define the convex hull of the spline curve. Therefore, the spline curve begins from the first control point and ends at the last point, within the convex hull. The knot vector T is described as T=[T0,T1,…,Tn+p-1,Tn+p], where the elements set of T are a nondecreasing sequence of real value. To fix both the endpoints of the spline curve to the start and end of control points, b0 and bn, the first and last set of knots are repeated p times with the same value as follows:(8)T0=⋯=Tp-1=ustart,Tn+1=⋯=Tn+p=uendwhere ustart and uend are the parameter values of the start and endpoint of the spline, respectively. Nj,p(u) is the basic function of the curve with order p and can be described with the following equation:(9)Ni,0u=1ifTi≤u≤Ti+10otherwiseNi,ju=u-TjTi+j-TiNj,pu+Ti+j-1-uTi+j-1-Ti+1Ni+1,j-1uwhere j=1,2,…,p. Using the spline parameter u we divide the spline into equal intervals, and the spacing is approximately equal to 30 meters. These equally spaced points on the spline will be used as the trajectory reference point T(xref,yref) for the UH.In the next subsection, we will explain how to obtain the projection pointP on the B-Spline curve which is closest to the UH real-time position C(x,y) and how the reference point is given.


## 3.1.2. Position Reference Generation

According to the UH real-time positionC(x,y) measured by GPS during flight, the iterative method is used to find the closest point O(Xo,Yo) on the B-Spline curve. Project the current real-time position C to the preset trajectory to obtain the projection point P(Xp,Yp). Then, a certain buffer distance is added along the direction of the B-Spline curve with reference to the point O, and the virtual future point thus obtained is regarded as the position tracking reference point T. As T moves continuously forward on the B-Spline curve, the UH gradually flies toward the B-Spline curve under its guidance. As shown in Figure 9, the specific implementation steps are as follows.Figure 9
Schematic diagram of projection pointP and reference point T.(1) Calculate the distanced between the equidistant point on the spline curve and the point C(x,y) from the initial point C(ustart) one by one. The iterative calculation ends until the point O1 that makes d1=(Xo-X)2+(Yo-Y)2<40 meters found. Find the next point O2 along the direction of the B-Spline from point O1. The distance between O2 and C is d2. If d2<d1, select O2 as the closest point O(Xo,Yo); otherwise select O1. The spline parameter corresponding to the closest point O(Xo,Yo) is uo.(2) SupposeO1 is the closest point O(Xo,Yo); thus d=d1. According to the spline parameter uo of point O(Xo,Yo) and combining the UH heading ψ and the heading ψo of point O(Xo,Yo), the increment of u of the projection point P relative to uo is obtained by trigonometric transformation(10)Δu1=dcos⁡ψ-ψ0dx/du2+dy/du2(3) Thus the spline parameterup of point P(Xp,Yp) is up=uo+Δu1. Then adding a certain buffer distance from point P to point T, the spline parameter of the point T is uT=up+Δu2, where Δu2 is determined by the speed of the UH.(4) Based on the spline parameteruT of point T, the corresponding position coordinates are calculated as the position tracking reference point T(xref,yref) according to (7).


## 3.2. Kernel Control Layer

The helicopter’s kernel control layer uses a cascade control structure combined with the PID method and sliding mode control strategy. The attitude and angular rate loops are considered as the inner loops, while the speed and position loops are considered as the outer loops.In the cascade control method, the control output of the upper subcontroller is the control reference of the lower subcontroller. By looking for a strong correlation state between the upper and lower layers, that state is taken as the virtual output of the upper subcontroller, that is, the virtual reference of the next subcontroller. According to this idea, the strong correlation statesu,v,w are chosen as the virtual output of the position controller, while the strong correlation states ϕ, θ, δcol are selected as the virtual output of the velocity controller.The roll, pitch, and heading channels in the inner loops adopt feedback control, while feedforward control is also used between the heading and altitude channels and between the roll and pitch channels to suppress the state coupling. Through multiple flight tests, it has achieved an excellent decoupling control effect for the inner loops. Thus the traditional PID controller is used for the inner loops here.The focus of this paper is to resist the disturbance of the wind and complete the trajectory tracking flight mission at a constant speed. To accomplish this task, the SMC algorithm is used for the multiple inputs and multiple outputs system of the outer loops.


### 3.2.1. Error Tracking System of the Outer Loop

Based on (1) and (4), the position error tracking subsystem and the speed error tracking subsystem in the outer loop are rewritten as follows.(1) Position (pos) error tracking subsystem:(11)x˙pos=fposxpos+gposxposupos where xpos=[xe,ye,ze]T, fpos(xpos)=0, gpos(xpos)=R, upos=[uref,vref,wref]T. During the constant speed flight of the helicopter, since the heading is controlled by the inner loop, the output uref is the given speed. The role of the position controller output vref is to eliminate the lateral deviation.(2) Velocity (vel) error tracking subsystem:(12)x˙vel=fvelxvel+gvelxveluvel where xvel=[ue,ve,we]T, uvel=[sin⁡φref,sin⁡θref,δcol]T, fvel(xvel)=[fvel1,fvel2,fvel3]T, fvel1=(FX.MR+FX.TR)/m+vr-wq, fvel2=(FY.MR+FY.TR)/m+wp-ur, fvel3=(-K2TMRcos⁡δloncos⁡δlat-K2HMRsin⁡δlon+mgcos⁡φrefcos⁡θref)/m+uq-vp, and gvel(Xvel)=[g,gcos⁡θref,-(K1TMRcos⁡δloncos⁡(δlat)+K1HMRsin⁡(δlon))/m]T.Because the gravity is much larger than the forward and lateral components of the rotor lift, we considermgsin⁡θ as the dominant term of the forward component force FX and mgcos⁡θsin⁡φ as the dominant item of the lateral component force FY. And FX.MR+FX.TR and FY.MR+FY.TR are treated as the minor items. According to the observation, ϕ, θ, δcol are selected as the states strongly correlated with the upper and lower layers. Thus, φ and θ in mgsin⁡θ and mgcos⁡θsin⁡φ can be regarded as virtual reference to the next layer.


### 3.2.2. Decoupling Control Method Considering Wind Disturbance

To maintain constant speed flight in the longitudinal channel, the use of integral sliding mode control is a very good solution. According to the above error tracking system, we design the sliding mode controller as follows. Step 1. Forxvel or xpos, the switching surfaces S are designed as(13)SX=X+ξ∫X where X=xpos, ξ=diagξx,ξy,ξz, SX=Sx,Sy,SzT in the position subcontroller, while X=xvel, ξ=diagξu,ξv,ξw, SX=Su,Sv,SwT in the velocity subcontroller.Step 2. The approaching law of the sliding mode control method is(14)S˙X=-ktanh⁡SX=-N where k=diagkx,ky,kz in the position subcontroller, while k=diagku,kv,kw in the velocity subcontroller.Step 3. The subcontroller lawu can be designed as(15)u=gX-1-fX-ξX-N where u=upos, g(X)=gpos(Xpos), f(X)=fpos(Xpos) in the position subcontroller, while u=uvel, g(X)=gvel(Xvel), f(X)=fvel(Xvel) in the velocity subcontroller.It should be noted here that in the velocity subcontroller, the roll angleϕ and the pitch angle θ have a coupling effect on the speed of the UH. From the perspective of decoupling, it is necessary to set the calculation order of the three control outputs in uvel. First, we solve the differential equation of forwarding velocity to get θref. Then φref is solved in the lateral velocity differential equation by θref. Finally, θref and φref are substituted into the vertical velocity differential equation to obtain δcol. In this way, it is possible to reduce the coupling between the longitudinal and the lateral directions while maintaining the speed constant. At the same time, because the wind disturbance is introduced in the calculation of aerodynamic force, the controller has a good effect of suppressing wind disturbance.


### 3.2.3. Stability Proof

The candidate Lyapunov function for the subsystem (11) and (12) is(16)VX=S2X2From (16), it is easy to know that V(X)≥0. If and only if S(X)=0, V(X)=0.Differentiating (16), we obtain(17)V˙X=SXS˙XSubstituting (14), (11), or (12) into (17), we obtain(18)V˙X=SXX˙+ξX=SxfX+gXu+ξXSubstituting (14) and (15) into (18), we obtain(19)V˙X=-kSXtanh⁡SXWhenS(X)>0, tanh(S(X))>0. Since k>0, V˙X<0. When S(X)<0, tanh(S(X))<0. Since k>0, V˙X<0. When S(X)=0, V˙X=0.In conclusion,V⩾0 (if and only if X=0, then V=0), and V˙<0 (if X≠0); thus the system state X is asymptotically stable.


## 3.2.1. Error Tracking System of the Outer Loop

Based on (1) and (4), the position error tracking subsystem and the speed error tracking subsystem in the outer loop are rewritten as follows.(1) Position (pos) error tracking subsystem:(11)x˙pos=fposxpos+gposxposupos where xpos=[xe,ye,ze]T, fpos(xpos)=0, gpos(xpos)=R, upos=[uref,vref,wref]T. During the constant speed flight of the helicopter, since the heading is controlled by the inner loop, the output uref is the given speed. The role of the position controller output vref is to eliminate the lateral deviation.(2) Velocity (vel) error tracking subsystem:(12)x˙vel=fvelxvel+gvelxveluvel where xvel=[ue,ve,we]T, uvel=[sin⁡φref,sin⁡θref,δcol]T, fvel(xvel)=[fvel1,fvel2,fvel3]T, fvel1=(FX.MR+FX.TR)/m+vr-wq, fvel2=(FY.MR+FY.TR)/m+wp-ur, fvel3=(-K2TMRcos⁡δloncos⁡δlat-K2HMRsin⁡δlon+mgcos⁡φrefcos⁡θref)/m+uq-vp, and gvel(Xvel)=[g,gcos⁡θref,-(K1TMRcos⁡δloncos⁡(δlat)+K1HMRsin⁡(δlon))/m]T.Because the gravity is much larger than the forward and lateral components of the rotor lift, we considermgsin⁡θ as the dominant term of the forward component force FX and mgcos⁡θsin⁡φ as the dominant item of the lateral component force FY. And FX.MR+FX.TR and FY.MR+FY.TR are treated as the minor items. According to the observation, ϕ, θ, δcol are selected as the states strongly correlated with the upper and lower layers. Thus, φ and θ in mgsin⁡θ and mgcos⁡θsin⁡φ can be regarded as virtual reference to the next layer.


## 3.2.2. Decoupling Control Method Considering Wind Disturbance

To maintain constant speed flight in the longitudinal channel, the use of integral sliding mode control is a very good solution. According to the above error tracking system, we design the sliding mode controller as follows. Step 1. Forxvel or xpos, the switching surfaces S are designed as(13)SX=X+ξ∫X where X=xpos, ξ=diagξx,ξy,ξz, SX=Sx,Sy,SzT in the position subcontroller, while X=xvel, ξ=diagξu,ξv,ξw, SX=Su,Sv,SwT in the velocity subcontroller.Step 2. The approaching law of the sliding mode control method is(14)S˙X=-ktanh⁡SX=-N where k=diagkx,ky,kz in the position subcontroller, while k=diagku,kv,kw in the velocity subcontroller.Step 3. The subcontroller lawu can be designed as(15)u=gX-1-fX-ξX-N where u=upos, g(X)=gpos(Xpos), f(X)=fpos(Xpos) in the position subcontroller, while u=uvel, g(X)=gvel(Xvel), f(X)=fvel(Xvel) in the velocity subcontroller.It should be noted here that in the velocity subcontroller, the roll angleϕ and the pitch angle θ have a coupling effect on the speed of the UH. From the perspective of decoupling, it is necessary to set the calculation order of the three control outputs in uvel. First, we solve the differential equation of forwarding velocity to get θref. Then φref is solved in the lateral velocity differential equation by θref. Finally, θref and φref are substituted into the vertical velocity differential equation to obtain δcol. In this way, it is possible to reduce the coupling between the longitudinal and the lateral directions while maintaining the speed constant. At the same time, because the wind disturbance is introduced in the calculation of aerodynamic force, the controller has a good effect of suppressing wind disturbance.


## 3.2.3. Stability Proof

The candidate Lyapunov function for the subsystem (11) and (12) is(16)VX=S2X2From (16), it is easy to know that V(X)≥0. If and only if S(X)=0, V(X)=0.Differentiating (16), we obtain(17)V˙X=SXS˙XSubstituting (14), (11), or (12) into (17), we obtain(18)V˙X=SXX˙+ξX=SxfX+gXu+ξXSubstituting (14) and (15) into (18), we obtain(19)V˙X=-kSXtanh⁡SXWhenS(X)>0, tanh(S(X))>0. Since k>0, V˙X<0. When S(X)<0, tanh(S(X))<0. Since k>0, V˙X<0. When S(X)=0, V˙X=0.In conclusion,V⩾0 (if and only if X=0, then V=0), and V˙<0 (if X≠0); thus the system state X is asymptotically stable.


## 4. Experimental Results

In this section, two sets of experiments are performed on the HIL simulation platform of the U496 unmanned helicopter, which is the experimental verification of the PID control strategy and the new flight control strategy on the mathematical model. The purpose of Scenario 1 is to tease out the effect of wind on the control system by the comparison with and without wind in a simulation compared to real flight test results. The purpose of Scenario 2 is to verify the new flight control law is better able to improve disturbance rejection compared to the PID control strategy. The HIL simulation platform is shown in Figure10.Figure 10
Hardware in the loop simulation platform.


### 4.1. Scenario A: HIL Flight Test with and without Wind by Using PID Control

According to the test data after a real test flight, we adopt the newly developed nonlinear mathematical model and reshow the entire flight process by applying a wind disturbance to the model. In the process of HIL simulation, the three-dimensional flight trajectory of unmanned helicopters flying following the planned flight path is shown in Figure11. The maximum given speed is 20m/s, the maximum flying height is 600m, and the turning angle of the route is 45°, 90°, and 135°. The waypoint number information is shown in Figure 3. Since the size of the XY coordinate is much larger than the size of the Z coordinate (height), to enhance the three-dimensional effect, we enlarge the Z coordinate by a factor of 2, and the actual flying height is shown by the blue curve in Figure 11. To fully reproduce the real flight test, we set the size and direction of the wind during flight simulation following Table 1 and Figure 7.Figure 11
The three-dimensional flight trajectory of unmanned helicopters.To show the effect of wind disturbance on the model, we conducted simulation tests in both windless and windy conditions and compared them with real flight data. The PID control gains for the three tests are all shown in Table2. The simulation results are shown in Figures 12–20.Table 2
PID gains and Trim values used in the real flight and HIL simulation test.
Channels and Trim Gains Values Gains Values Roll Channel K γ 0.6 K p 0.27 Yaw Channel K ψ 0.7 K r 0.6 Pitch Channel K θ 1.0 K q 0.42 Height Channel K h 0.2 K h ˙ 0.2 Longitudinal Channel K x 0.43 K x ˙ 2.0 Latitude Channel K y 0.3 K y ˙ 2.0 Trim(°) Pitch 0.8 Roll -2.0Figure 12
Roll response.Figure 13
Pitch response.Figure 14
Lateral distance error.Figure 15
Speed offset.Figure 16
Wind speed.Figure 17
Air speed.Figure 18
Position response.Figure 19
Height response.Figure 20
Heading responses.By putting the nonlinear mathematical model into the simulation computer and according to the predefined simulation content, we conducted a large-range flight simulation of the Ultrasport 496 UH. In the simulation process of up to 2200 seconds, there was no case where the model was stuck, or the model was out of control under the disturbance of wind, indicating the reliability of the newly developed nonlinear model and the control strategy. The test data of the U496 unmanned helicopter for large-scale flight simulation is similar to that of the real test flight. The net result is the ability to tease out the effect of wind on the control system, which is a crucial contribution of this work to bring out and make as useful as possible.From the simulation results, due to the presence of wind disturbances, the forward flight speed has a significant deviation, and it has not been able to maintain constant flight speed. The yaw distance is usually within 10 meters, and the maximum is 22 meters. The PID control strategy used in this section can resist the disturbance of the wind in the case of different turning angles and speeds and achieves the fit of the flight path and the set route. However, there is still a specific gap between the simulation results and performance index.


### 4.2. Scenario B: Flight Test by Using Combining Control

Based on the above work, we used the new control law to perform the same test under the conditions of Scenario A. The control gains are shown in Table3. We compare them with the control strategy that uses a set of PID control gains and test whether the control law meets the following performance index: speed error 0.5m/s, lateral position error 20m. The results are shown as follows.Table 3
PID and SMC gains used in the HIL simulation test.
Channels and Trim Gains Values Gains Values Inner loop Roll Channel K ϕ 0.6 K p 0.27 Yaw Channel K ψ 0.7 K r 0.6 Pitch Channel K θ 1.0 K q 0.42 Outer loop Position controller ξ x 0.4 ξ y 0.4 ξ z 0.3 k x 1 k y 1 k z 1 Velocity controller ξ u 1 ξ v 1 ξ w 1.5 k u 0.1 k v 0.1 k w 0.1In the two-dimensional plan of the yaw distance shown in Figure21, we have selected three typical points for local amplification, such as the -22.6m, 14.4m, and -20.1m points that have more considerable side-offset distances in actual flight. As can be seen from these figures, the new control law corrects the lateral offset at these typical positions and obtains an accurate tracking effect. Figure 22 is a speed variation curve during autonomous flight. By comparison, we have found that using the new control law improves the helicopter’s constant speed flying effect significantly at different speeds of 20m/s and 10m/s and 1m/s. As shown in Figure 23, the yaw distance was improved significantly with almost the same wind disturbance. It should be noted that (1) because of changes in flight speed, resulting in differences in the total flight time of the different tests, there is an inevitable phase shift in the curve. (2) To ensure the safety of the helicopter, the pitch angle is limited during the forward flight. This is why the helicopter’s speed still has an error of about 0.5m/s when flying in the top wind of 1400 to 1800 seconds.Figure 21
Lateral distance error.Figure 22
Velocity error.Figure 23
Lateral distance error and its partial enlargement.Compared with the ordinary sliding mode control methods which uses the symbol function as the switching term [27], this method can eliminate the chattering phenomenon by using Tangent function. Thus the servos will not be damaged due to the chattering problem during the execution.As shown in Figure7, this paper establishes a static wind model based on the static data after a real flight. Here we can classify the wind model into a static wind model and a dynamic wind model based on whether the wind model can be established in real time. Although the wind model is called static, it is also time-varying. Therefore, this paper has proved that our SMC method has the ability of effectively suppressing time-varying wind disturbance through HIL simulation experiments. How to build a test platform to build a dynamic wind model becomes the work we will focus on in the next step.


## 4.1. Scenario A: HIL Flight Test with and without Wind by Using PID Control

According to the test data after a real test flight, we adopt the newly developed nonlinear mathematical model and reshow the entire flight process by applying a wind disturbance to the model. In the process of HIL simulation, the three-dimensional flight trajectory of unmanned helicopters flying following the planned flight path is shown in Figure11. The maximum given speed is 20m/s, the maximum flying height is 600m, and the turning angle of the route is 45°, 90°, and 135°. The waypoint number information is shown in Figure 3. Since the size of the XY coordinate is much larger than the size of the Z coordinate (height), to enhance the three-dimensional effect, we enlarge the Z coordinate by a factor of 2, and the actual flying height is shown by the blue curve in Figure 11. To fully reproduce the real flight test, we set the size and direction of the wind during flight simulation following Table 1 and Figure 7.Figure 11
The three-dimensional flight trajectory of unmanned helicopters.To show the effect of wind disturbance on the model, we conducted simulation tests in both windless and windy conditions and compared them with real flight data. The PID control gains for the three tests are all shown in Table2. The simulation results are shown in Figures 12–20.Table 2
PID gains and Trim values used in the real flight and HIL simulation test.
Channels and Trim Gains Values Gains Values Roll Channel K γ 0.6 K p 0.27 Yaw Channel K ψ 0.7 K r 0.6 Pitch Channel K θ 1.0 K q 0.42 Height Channel K h 0.2 K h ˙ 0.2 Longitudinal Channel K x 0.43 K x ˙ 2.0 Latitude Channel K y 0.3 K y ˙ 2.0 Trim(°) Pitch 0.8 Roll -2.0Figure 12
Roll response.Figure 13
Pitch response.Figure 14
Lateral distance error.Figure 15
Speed offset.Figure 16
Wind speed.Figure 17
Air speed.Figure 18
Position response.Figure 19
Height response.Figure 20
Heading responses.By putting the nonlinear mathematical model into the simulation computer and according to the predefined simulation content, we conducted a large-range flight simulation of the Ultrasport 496 UH. In the simulation process of up to 2200 seconds, there was no case where the model was stuck, or the model was out of control under the disturbance of wind, indicating the reliability of the newly developed nonlinear model and the control strategy. The test data of the U496 unmanned helicopter for large-scale flight simulation is similar to that of the real test flight. The net result is the ability to tease out the effect of wind on the control system, which is a crucial contribution of this work to bring out and make as useful as possible.From the simulation results, due to the presence of wind disturbances, the forward flight speed has a significant deviation, and it has not been able to maintain constant flight speed. The yaw distance is usually within 10 meters, and the maximum is 22 meters. The PID control strategy used in this section can resist the disturbance of the wind in the case of different turning angles and speeds and achieves the fit of the flight path and the set route. However, there is still a specific gap between the simulation results and performance index.


## 4.2. Scenario B: Flight Test by Using Combining Control

Based on the above work, we used the new control law to perform the same test under the conditions of Scenario A. The control gains are shown in Table3. We compare them with the control strategy that uses a set of PID control gains and test whether the control law meets the following performance index: speed error 0.5m/s, lateral position error 20m. The results are shown as follows.Table 3
PID and SMC gains used in the HIL simulation test.
Channels and Trim Gains Values Gains Values Inner loop Roll Channel K ϕ 0.6 K p 0.27 Yaw Channel K ψ 0.7 K r 0.6 Pitch Channel K θ 1.0 K q 0.42 Outer loop Position controller ξ x 0.4 ξ y 0.4 ξ z 0.3 k x 1 k y 1 k z 1 Velocity controller ξ u 1 ξ v 1 ξ w 1.5 k u 0.1 k v 0.1 k w 0.1In the two-dimensional plan of the yaw distance shown in Figure21, we have selected three typical points for local amplification, such as the -22.6m, 14.4m, and -20.1m points that have more considerable side-offset distances in actual flight. As can be seen from these figures, the new control law corrects the lateral offset at these typical positions and obtains an accurate tracking effect. Figure 22 is a speed variation curve during autonomous flight. By comparison, we have found that using the new control law improves the helicopter’s constant speed flying effect significantly at different speeds of 20m/s and 10m/s and 1m/s. As shown in Figure 23, the yaw distance was improved significantly with almost the same wind disturbance. It should be noted that (1) because of changes in flight speed, resulting in differences in the total flight time of the different tests, there is an inevitable phase shift in the curve. (2) To ensure the safety of the helicopter, the pitch angle is limited during the forward flight. This is why the helicopter’s speed still has an error of about 0.5m/s when flying in the top wind of 1400 to 1800 seconds.Figure 21
Lateral distance error.Figure 22
Velocity error.Figure 23
Lateral distance error and its partial enlargement.Compared with the ordinary sliding mode control methods which uses the symbol function as the switching term [27], this method can eliminate the chattering phenomenon by using Tangent function. Thus the servos will not be damaged due to the chattering problem during the execution.As shown in Figure7, this paper establishes a static wind model based on the static data after a real flight. Here we can classify the wind model into a static wind model and a dynamic wind model based on whether the wind model can be established in real time. Although the wind model is called static, it is also time-varying. Therefore, this paper has proved that our SMC method has the ability of effectively suppressing time-varying wind disturbance through HIL simulation experiments. How to build a test platform to build a dynamic wind model becomes the work we will focus on in the next step.


## 5. Conclusions

In this paper, a trajectory tracking flight controller is proposed for unmanned helicopters in longtime flight. Wind disturbances are captured by the helicopter nonlinear mathematical model to reproduce the effects of disturbance during a real flight. According to the real flight data and measured airflow, the proposed control strategy can consider the wind disturbance as a known state to study the optimal control effect against the wind disturbance for different given speeds. The hierarchical control law combined with the integral sliding mode is expected to provide the reference for the new trial flights of unmanned helicopters at a fixed speed.



---

*Source: 7320567-2019-04-15.xml*