Controller for UAV to Oppose Different Kinds of Wind in the Environment

Small UAVs are susceptible to the external disturbance, especially the wind field disturbance in the atmosphere environment. As a result, UAV’s states including attitude, speed, and position are usually unable to track the desired control commands. In this paper, different types of wind fields which easily affect the UAV are summarized; furthermore, the mechanism of their wind fields affecting the UAV is first strictly analyzed. Next, a novel “reject external disturbance” flight mode for UAV is put forward to offset the trajectory deviation caused by side wind, which makes use of the wind speed information obtained by airspeed and ground speed of UAV. In order to implement the “reject external disturbance” flight mode, the Lyapunov stability theory-based variable model reference adaptive control (VMRAC) system is proposed, and it could also deal with the adverse effects of wind shear and turbulence on UAV flight. Finally, simulation results show that the proposed strategy can significantly improve the trajectory following quality of the UAV under wind disturbance.


Introduction
Unmanned aerial vehicles (UAVs) are extensively used in the recent years. e civilian UAVs are commonly used for insecticide spraying, atmospheric observation, etc, whereas the military UAVs are used for targeting, communication, etc. [1]. e extensive attention towards small UAVs has been increased due to small size, low cost, and flexibility. e takeoff weight of small UAV weight is under 200 kg, speed is generally less than 100 km/h, and the wingspan is no more than 5 m [1]. e control of UAV is difficult due to the disturbance of atmospheric environment. It also affects the safety of flight as well. All types of wind disturbances could affect the UAV in different degrees. rough the process of energy transfer, the effects of airstream on UAV can be easily seen. e state of flight changes when gust transfers its dynamism to UAV [2]. Small UAVs are more easily disturbed by wind because of their light weight and low flying speed. More unfortunately, these disturbances are inevitable because UAV are always work in complex environments with different altitudes, temperatures, and territory.
Due to poor atmospheric conditions, many airplane accidents occur. In the 19th century, people began to study the impact of wind on UAV. Numerous scientists have studied the characteristics and types of the wind in the environment [3][4][5]. Tian qi establishes the atmospheric interference simulation and aerodynamic database for flight simulation tests [6]. In [7][8][9], the potential risks caused by the atmospheric environment during the takeoff and landing phase of flight are studied, and the corresponding control methods are put forward. However, these research results focus on the aircrafts with high-speed and big-size, and the external disturbances on small low-speed UAV need further research.
When a UAV is flying along the route, there often exists average wind and wind shear. Vertical wind and forward wind will affect the UAV's flight height and forward speed, respectively. Side wind will cause the UAV to deviate from its desired course. In [10], Escamilla et al. designs a trajectory tracker based on dynamic inverse control theory by analyzing wind properties and UAV control response efficiency. e data of wind speed is attained by the atmospheric prediction system. e system is capable of avoiding trajectory deviation by path planning [11]. e trajectory tracking problem in the environment is solved by a trajectory tracker based on backstepping control designed in [12], and the optimal control parameters are selected by the genetic algorithm. In [13], the wind speed observer is designed, using the observed wind speed and the backstepping control theory, and the trajectory tracker is designed to achieve trajectory keeping under wind disturbance.
All in all, the general ideas of the above methods are to use a certain control strategy to reject or attenuate the adverse influences of the external wind fields on UAV. However, there are many types of wind in the atmosphere, and the influences of different types of wind on the UAV are considerable extremely different, so there is no optimal control parameter to deal with all types of wind. Besides, in current researches, the relationship between airspeed, ground speed, and wind speed is represented by velocity triangle, which is actually unreasonable. e velocity triangle is used to calculate the UAV airspeed. is method assumes average ground speed, which is contrary to the problem of trajectory deviation.
As a result, a simple external disturbance compensation mechanism is not enough to counter these negative effects; one should design effective control strategy from the view of new flight mode. In real flight tasks, the method to overcome UAV trajectory deviation caused by side wind is mainly to send the aileron deflection command to the UAV by the ground control station, which can help the UAV to correct the trajectory. e principle of this measure is to give UAV a lateral speed, which is offset with the lateral speed caused by side wind. e purpose of the "reject external disturbance" flight mode is to enable the UAV control system to achieve this operation in place of the ground control station. In this strategy, UAV is continuously controlled to turn and go straight referring a given heading angle command simultaneously. It is because turning can generate lateral speed while keeping the heading angle could keep lateral speed, so finally, the lateral speed caused by side wind will be offset. Besides, it needs to indicate that this control strategy has open-loop position control. e occurrence of wind shear will change the force of side wind. erefore, the "model varying strategy" is proposed to deal with the change of side wind. is paper focuses on the effects of external disturbance on UAV, assuming that the internal disturbances like system uncertainty, parameter variation, and sensor noise have been rejected by relative controller. Contributions of the paper are as follows: (1) Summarizes the characteristics, types, and mathematical model of the environmental wind which is met by UAV in low-altitude environments. Based on these information, the paper first rigorously analyzes the mechanism of various types of wind that affects UAV's speed, attitude, and position and clarifies the relationship between wind speed, airspeed, and ground speed; it will also provide reference to other researches in the relative areas.
(2) According to the contribution (1), a novel "reject external disturbance" flight mode is proposed to solve the problem of trajectory deviation caused by side wind. (3) e variable adaptive control system is designed to implement "reject external disturbance" flight mode and deal with input disturbance caused by turbulence.

Average
Wind. e average wind speed is also called normal wind speed in an atmospheric environment. It changes with the spatial and temporal variation. Due to just the reference value of wind speed, this type of wind does not exist in the real world. By the help of statistic, the value of average wind in various conditions can be obtained.

Turbulence.
e turbulence is also called a continuous fluctuation. It is fly accomplished by the average wind. e turbulence has a direct relation with many factors such as heat exchange and wind shear. In engineering applications, the turbulence can be described by the stochastic theory and method. e two common models of turbulence are Dryden model (DM) and Von Karman model (VKM). ese both models are depending upon the statistics and measurements. e VKM first establishes the turbulence spectral function and then gathers the correlation function and vice versa in DM. e simplest dissimilarity between these two models is only its slope having greater frequency of its spectral function. For solving engineering issues, both of them are used.
e spectral Dryden function defined as e Von Karman spectral function is defined as whereas (i) σ u , σ v , and σ w are three directions' wind speed (ii) L u , L v , and L w are three directions' wavelength of turbulent flow (iii) Φ u , Φ v , and Φ w are spectral function whose directions are alongside the axis of body coordinate system of UAV In VK spectral function, the value of a � 1.339.

Wind Shear.
e wind shear is also referring to the continual wind. e average wind variations in the space over time to time. According to the National American Research Council, the wind shear is the difference between the two vectors of wind at two points distributed by the space between two points. For example, in Figure 1 the vectors at each position represent the wind directions and wind speeds by the directions of vectors and the lengths of vectors separately. e different color in Figure 1 represent the different wind field, when a UAV flies from the green area to the blue area or red area, it suffers a wind shear situation. e main causes of wind shear during the UAV flight are frontal, nocturnal, and micro-downburst. e difference between the wind shear and turbulence is frequency. e wind shear is of low frequency, and it changes every few seconds. In the simulation results, the occurrence of wind shear is indicated by the sudden variation of average wind speed.

Analysis of Factors and Mechanism of Disturbance to Small UAV Flying in Atmospheric Wind Field
is section mainly analyzes the mechanism of effects of average wind, wind shear, and turbulence on the UAV airspeed, ground speed, resultant force, and resultant torque, which terminally result in UAV flight trajectory deviation and the UAV's attitude and velocity being unstable.

Mechanism of the Effects of Average Wind and Wind Shear on Aircraft.
When a UAV is flying in the air, the speed relative to the air is called airspeed V a , if wind is absent, the airspeed V a * is equivalent to the ground speed V g * , when wind exists, the constant component of wind speed (average wind) V w remains uniform and constant, and the relationship between airspeed V a , ground speed V g and average wind speed V w can be expressed as where P is the coefficient associated with the effective area and the mass UAV, and ‖P‖ 2 < 1 shows the degree in which the UAV's ground speed is susceptible to be disturbed by the average wind. For example, if the UAV is made of paper, it can be easily blown away by the wind because of its light weight and large effective area, in this case, the value of P is close to 1. On the contrary, for the wind, it is hard to blow away an iron ball due to its heavy weight and small effective area, so P is close to 0. e increment expression of airspeed V a , ground speed V g and average wind speed V w can be obtained as given in In the ground coordinate system F g , ground speed V g can be decomposed into northward velocity u g , eastward velocity v g , and downward velocity w g , as shown in Changes in the northward velocity u g and eastward velocity v g caused by the wind speed will lead the UAV to deviate from its trajectory.
One part of the wind speed affects the ground speed of UAV denoted by V g , while the other part is superposed to the airspeed V a . In the body co-ordinate system of UAV F b , airspeed V a is defined as According to the definition of the angle of attack α and the sideslip angle β, ese two angles α and β can affect some aerodynamic derivative value in the mathematical model.
In summary, the speed of the aircraft is changed by the average wind and wind shear. e angle of attack and sideslip angle also change which affects the aerodynamic values. Lastly, it can cause the disturbance to the aircraft during the flight.

Mechanism of the Turbulence Affecting the Aircraft.
e properties of the wind turbulent flow are quite different from that of the average wind, which varies with the time and space and contains random components. e effects of Journal of Control Science and Engineering 3 the turbulence on all parts of an aircraft are uneven. e effect of these winds on the aircraft cannot be analyzed by the change of the aircraft angle of attack and the sideslip angle, but the forces they exert on the aircraft can be calculated by the air resistance equation: where F D is the force of the airflow on the aircraft, ρ is the air density, v is the airflow speed, S is the windward area, and C D is the airflow force coefficient. e coefficient is determined by the Reynolds number Re of the airflow. e turbulence spectral function in the body co-ordinate system is stated by equations (1) and (2). e forces produced by the turbulence can be stated as where W u , W v , and W w are the Gaussian white noise (GWN) values. Although frequency features of turbulence satisfy spectral function, the size and the direction of the turbulence in specific space and time are uncertain, so the torque on the aircraft due to the turbulence cannot be calculated. e turbulence intensity is small, so it can be observed as a random disturbance (resultant force and resultant torque) of the UAV.

"Reject External Disturbance" Flight
Mode. e blue dashed line in Figure 2 is the desired trajectory of the UAV. If there is an average wind or wind shear during the flight, as shown in position ①, it has been analyzed in Section 3.1 that the ground speed of the UAV will change. Side wind will cause the UAV to generate additional lateral velocity and will lead it to deviate from its desired trajectory, as shown in the leftmost trajectory.
From equation (4), incremental side wind speed Δv w side can be calculated as As of the red vector in Figure 3, |•| n j n represents the projection of • onto the axis j n in the navigation coordinate system F n , which will make the lateral ground speed Δv g side change: Δv g side � P · Δv w_side .
As of the blue vector in Figure 3, P is the coefficient mentioned in Section 3.1.
At present, the method to deal with the UAV trajectory deviation caused by side wind is mainly by the intervention of the ground control station, by receiving the aileron deflection command; the UAV can correct its trajectory. e "reject external disturbance" flight mode proposed in this paper replaces the ground control station to achieve this operation. e flight mode mainly consists of two parts: (1) As shown in position ②, the UAV changes from forward flight to turning state. e turning radius is where R min is the UAVs' min turning radius and n v w side is the level of side wind which is subject to n v w side ∈ Ν and n v w side ≥ 1. e stronger the side wind, the smaller the value of n v w side . e main purpose of classifying side wind speed is detailed in Section 4.3.
(2) When the UAV starts to turn, it receives the heading keeping command. According to the relationship between the ground speed and its components, the heading keeping command is where |V g | n i n j n is the projection of the UAV ground speed on the i n o n j n plane in the navigation coordinate system F n . In Step (1), the UAV changes from forward flight to turning state, so that it can obtain lateral speed caused by the turning. In Step (2), constant-heading command is used to provide the suitable magnitude of the lateral speed when UAV is turning. If the lateral speed obtained from turning has the same magnitude as that caused by the side wind, then these two speeds will counteract each other and finally the trajectory deviation is avoided.
In position ②, the UAV starts to turning at a preset turning radius. As it reaches position ③, it begins to correct the heading angle. After finishing the heading angle correction, the UAV continues to turn at the preset turning radius, and the cycle goes on, shown as alternating red and blue arcs in Figure 2. By this method, the course deviation caused by side wind can be overcome. e signal transmission between "reject external disturbance" flight mode controller and the UAV system is shown in Figure 4.

Design of Adaptive Controller Based on Lyapunov eory.
In earlier section, a problem of trajectory deviation caused due to the change of UAV's ground speed is solved. In this section, the model reference adaptive theory is employed to the design controller which is based on the Lyapunov theory. It is used to deal with the adverse effects of the turbulence on the airspeed, resultant force, and resultant change of the UAV.
According to Section 2, the turbulence is characterized by high frequency, low intensity, and high randomness. It is already known from Section 3, for small low-speed UAVs, airspeed change is not sensitive. So the adverse effects of variation of the airspeed, resultant force, and resultant torque on the UAV can be regarded as disturbance Δu added on the UAV input. e heading angle command ψ c which will be input into the flight controller is derived from equation (13).
Design adaptive algorithm to obtain appropriate u 0 can compensate the disturbance of Δu to the system. e UAVs nonlinear dynamic model in Figure 5 can be stated as e UAV reference model can be written in the following form: Define the error between the UAV and the reference model:

Its state equation is
Define a scalar function, en, the derivative of this function is where M � e ′ P(u 0 − f(x)), P 0 � − (A m ′ P + PA m ). In order to make the system asymptotically stable, _ V must be negative definite. Obviously, P 0 < 0. So, the above equation needs to satisfy the following inequality: where the subscript [·] i represents the ith element of vector ·. e boundaries of elements in f(x) can be represented as follows:

Journal of Control Science and Engineering
e adaptive control law is where B + is the generalized inverse matrix of B.

Model
Varying Strategy. Figure 6 shows how model varying strategy works in the UAV trajectory control system, whose input is UAV turning radius R and output is coefficient matrices of the reference model. "Reject external disturbance" flight mode can counteract the trajectory deviation caused by the side wind. e turning radius R depends on the UAV lateral speed (it can be calculated from equation (12)). Keep the UAV tracking the state of the reference model, which results in the actual turning radius R is in accordance with that of the reference model.
It is not anticipated that the turning radius varies with the changing of the lateral speed, so the side wind speed should be ranked. In a certain interval, wind speeds are supposed to be of the same scale. n v w side represents the scale of the side wind speed. n v w side � 1 indicates that the side wind speed is within the maximum wind speed range that the UAV is able to withstand. If the wind speed is greater than this range, the UAV will be out of control. e larger the value of n v w side is, the smaller will be the side wind speed, and larger turning radius of the UAV.
e lateral nonlinear mathematical model of the UAV can be expressed as where x � (β, p, r, ϕ, ψ) T and u � (δ a , δ r ). When the UAV is turning at the radius of R, the nonlinear mathematical model can be trimmed: where e values of x * and u * at the equilibrium point can be calculated by the gradient descent method.
By calculating the Taylor expansion of the trimmed nonlinear state equations, the linear equations of the UAV at the trimmed point can be obtained: Equation (27) is the reference model, which can be remarked as _ N δ a , and N δ r are the large aerodynamic derivatives of UAV and A m and B m are the parameters of the reference model. e structure of "reject external disturbance" flight mode control system is shown in Figure 7:

Experiment Method. MATLAB R2016a
Simulink is used as the simulation platform for the simulation test. e model of "Aerosonde" UAV is employed as the reference model in the simulation test, and its parameters and aerodynamic coefficients are given in Tables 1 and 2 [14]. e flight direction is from south to north. e simulation duration is 30 seconds, the average wind speed in the first 10 seconds is 0, and the wind shear occurs in the 10th second, then the side wind speed changes to 4 m/s, at the 20th second, the wind shear occurs again, and the wind speed changes to 0. e experiment is carried out four times in different conditions. e first and second tests do not use the "reject external disturbance" flight mode, while the third and fourth tests use it. Besides, in the second and fourth tests, turbulence is added into the entire simulation process.

Experiment
Process. During the experiment process, different reference models were used when side wind speed is 0 m/s and 4 m/s. e data in the calculation process of the reference model are as follows: (1) When the side wind speed is 0 m/s, the turning radius, heading angle command, trimmed point, and model parameters of the UAV are as follows: (2) When the side wind speed is 4 m/s, the turning radius, heading angle command, trimmed point, and model parameters of the UAV are as follows:   Name

Experimental
Results. e simulation-based results are shown in Figures 8-14. Figure 8 presents the flying trajectories of the four tests in the ground coordinate system, the desired trajectory is the green solid line, the left two lines (red dot dash line and black short dash line) show the deviation increasing continually as a result of the side wind, compared with the left two lines; the right two lines (purple solid line and blue dash line) using the "reject external disturbance" flight mode, except for the model transition period, basically overcome the trajectory deviation caused by side wind.
It can also be seen from Figure 8 that the purple solid line and the red dot dash line which are yielded in the condition with turbulence have a little deviation against the blue dash line and the black short dash line which are yielded in the condition without turbulence, the deviation increases with time, so the turbulence can also result in the position deviation, it is small, but increasing with the time; this implies that a close-loop position control is necessary here to ensure the real flight trajectory accurately tracking the desired trajectory.
e following six figures from Figure 9-14 show the two groups of flight simulation test data using "reject external disturbance" flight mode, the distinction is whether turbulence is attendant, blue dash line is yielded in the condition without turbulence, and the brown solid line is yielded in the condition with the turbulence. e contents of the six figures are due to the difference of the sideslip angle with the time, the difference of heading angle with time, the difference of the rolling angle with time, the difference of heading angle rate with time, the difference of rolling angle rate with time, and a difference of aileron deflection with the time. Another system input known as rudder deflection is not shown here because it is set at an average number 0 in the whole experiment.    Between the 10th and 20th second, it can be seen that the UAV is turning as well as adjusting the heading angle. In short, turbulence will affect the UAV state and the effect in the "reject external disturbance" flight mode period is more obvious than that in the forward flight period.
Some previous relative research achievements considered the external disturbance as a lumped disturbance and proposed advance-control-theory-based controllers to reject or attenuate this lumped disturbance [15,16]. However, these external disturbances have different magnitude and frequency, so it is unreasonable to synthetically regard them as lumped disturbance. On the other hand, during the "reject external disturbance" flight mode period, the aileron of UAV frequently changes which have some potential disadvantages like input saturation and reduce the robust of the system in actual engineering application, while one of the reasons is that "Aerosonde" UAV model do not have a rudder actuator.
All in all, the simulation results in this section show that the first proposed "reject external disturbance" flight mode could effectively deal with different kinds of wind field separately, which is the most advanced innovation in the paper.

Conclusion
Wind field could cause negative effects on the UAV, but majority of researches do not deal with them well.
Various types of effects on the UAV by wind are clearly analyzed and presented. "Reject external disturbance" flight mode was proposed, and modeling variable reference adaptive controller was designed to oppose the effects on the UAV' position, velocities, and attitude. e methods proposed in this paper could prevent the UAV from path derivation without using the path controller. Moreover, the adaptiveness of the UAV control system to the input disturbance will also be increased.

Data Availability
e data used in the paper are available from the corresponding author upon request (e-mail: bhwang@nuaa.edu.cn).

Conflicts of Interest
e authors declare that they have no conflicts of interest.     Journal of Control Science and Engineering 9