Learning Control of Fixed-Wing Unmanned Aerial Vehicles Using Fuzzy Neural Networks

,


Introduction
Over the past several decades, unmanned aerial vehicles (UAVs) have proved their potential in several applications by using their several capabilities, inter alia, continuous and persistent surveillance, eliminating the need of aircrew, image processing capabilities by using relatively cheap sensors, and decreasing the size and weight of the aerial vehicle when compared to a conventional aircraft.UAVs have been used in a variety of civilian applications; some of which are disaster rescue [1], agricultural monitoring [2], wildlife protection [3], infrastructure inspection [4], 3D environment reconstruction [5], and person following [6].
UAVs can be classified into two groups: rotary wing and fixed wing.While the former has the capability of having aggressive maneuvers and being able to land and take off in small areas, the latter offers long flight endurance due to its flight characteristics about their gliding capabilities with no power.Among the gigantic number of fixed-wing UAVs applications, surveillance seems to be the most common application while benefitting from advanced computer vision techniques [7].The most common path for a fixed-wing UAV is a combination of straight lines and circular orbits on a constant altitude [8].
For having a full autonomy of the aircraft, model-based controllers require a precise dynamic model of the aircraft.The controller must also be robust to wind and gust disturbances.However, under the time-varying parameters of an aircraft as well as time-varying working conditions and several stochastic disturbances, a learning control strategy is preferred in this paper.The proposed control algorithm does not need an accurate model of the aircraft.Instead, the intelligent structure of the controller learns the system dynamics online throughout the flight and optimizes its 2 International Journal of Aerospace Engineering performance for any arbitrary trajectory including both straight lines and circular orbits.For this purpose, the fusion of fuzzy logic and artificial neural networks, namely, FNNs, is preferred [9][10][11][12].
To eliminate all uncertainties in a control system and design a sophisticated model-based controller based on an accurate model of the system seems to be convincing.The reason is that, in the absence of model uncertainty, nonlinearity, and computational constraints, it is a well-known fact that linear-quadratic regulator (LQR) and linear-quadratic-Gaussian (LQG) control laws give reasonably satisfactory performance.However, eliminating all the uncertainties seems to be neither realistic nor a novel idea.For instance, till the beginning of the 20th century, it had been a big dream to eliminate all the uncertainties and to be able to achieve a fully predictable world.In 1814, P.S. Laplace formulated the predictability of the universe as follows: "Given, for one instant, an intelligence which could comprehend all the forces by which nature is animated and the respective situation of the beings who compose it an intelligence sufficiently vast to submit these data to analysis it would embrace in the same formula the movements of the greatest bodies of the universe and those of the lightest atom.For it, nothing would be uncertain and the future, as the past, would be present to its eyes."[13].P. S. Laplace On the other hand, quantum mechanics and the theory of relativity, which both appeared in the beginning of the 20th century, showed that our universe is quite random, and it is almost impossible to model or predict everything.In other words, our universe, at least on the level of subatomic particles, is not working like a "giant clock" which was claimed by P. S. Laplace.Even in a deterministic system, that is, a chaotic system, inevitable uncertainties in the initial conditions lead to huge differences in the future states of the system.In a similar manner, estimation and prediction of all changes during a fixed-wing UAV flight cannot be foreseen and considered in advance.All the aforementioned facts force us to propose some intelligent control algorithms which have learning capabilities throughout the operation.
Fuzzy logic theory and probability theory are the most widely used approaches to deal with the aforementioned inevitable phenomena: uncertainty.Although the concept of fuzzy logic and the concept of probability seem to be similar, they are quite different.While probability makes guesses about a certain reality, fuzzy logic does not make probability statements but represents membership in vaguely defined sets.For instance, if 0.5 is defined as a probability value for the oldness of a person, it can be said that there is a chance that he/she can be old.It is not known whether he/she is old or young.However in fuzzy logic, if 0.5 is defined as the degree of membership in the set of young and old people, we have some knowledge about his/him and he/she is positioned in the middle of young and old people.Since fuzzy logic contained vagueness, it was not appreciated by researchers when it was proposed for the first time in 1960s.However, since the 1970s, this approach to set theory has been widely applied to control systems.
While the most significant feature of a fuzzy logic controller is its capability to inject expert knowledge into the controller design, the well-known capability of an artificial neural network is to be able to learn from input-output data.The fusion of fuzzy logic controllers and artificial neural networks results in FNNs [14,15].In any FNN architecture, the use of a learning algorithm is a must.In literature, there are three types of learning algorithms: derivative-based ones (backpropagation [16], Levenberg-Marquardt [17,18], and least square), derivative-free ones (genetic algorithm, particle swarm optimization [19], and sliding mode control (SMC) theory-based), and hybrid algorithms (Levenberg-Marquardt-particle swarm optimization [20], backpropagation-Kalman filter, gradient descent-Kalman filter, and genetic algorithm-Kalman filter).The main problem with the derivative-based learning algorithms is that they need the calculation of the partial derivatives of the outputs of the FNN with respect to the antecedent parameters.Another problem worth mentioning is that derivativebased algorithms have always a possibility of getting trapped in local minima.In order to eliminate the aforementioned disadvantages of the derivative-based methods, derivativefree methods are proposed.As a derivative-free method, the disadvantage of the genetic algorithms is that their update formula is entirely random, and there is no mathematical guarantee that the cost function will decrease over time.Moreover, these algorithms are computationally expensive.On the other hand, as a derivative-free method, SMC based algorithms are computationally efficient and they provide robustness to the control of the system [21].A detailed survey on the optimal tuning of FNNs can be found in [22].
Despite the fact that UAVs are being more and more visible in our daily life, their control is still a challenging task as they are open loop unstable, multi-input multi-output, and highly nonlinear systems in which there are significant intercouplings.What is more, they are always subjected to noise and disturbances because of the uncertainties in their navigation systems as well as wind and gust conditions.One way of controlling them is to use model-based control techniques.However, they need an accurate model of both the system and disturbances which is a challenging task in real life.A requirement is the use of sophisticated system identification methods to obtain the model of the aerial vehicle which is time-consuming task.The detailed steps and several methods for system identification and parameter estimation of aerial vehicles are discussed in [23].What is more, the working conditions are always changing resulting in a fact that adaptability is a must.Motivated by the aforementioned drawbacks of the model-based controllers, a model free controller, the combination of a P controller and an FNN, is preferred in this paper.In order to be able to design a practical controller in real time in which computational power is always limited, we prefer one of the fastest learning algorithms in literature which is an SMC theory-based algorithm.
This paper presents a novel SMC theory-based learning algorithm with an adaptive learning rate and the evaluation International Journal of Aerospace Engineering 3 of the algorithm performance for a UAV flying in changing wind conditions.The paper is organized as follows: Section 2 introduces a fully nonlinear aircraft dynamic model in the presence of wind.In Section 3, the overall control scheme is described.In Section 4, a fuzzy neural control approach is introduced.Furthermore, the proposed training method, based on SMC theory, for the parameters of the FNN is proposed for the case of Gaussian membership functions.In Section 5, the proposed method is used to control a fixedwing UAV.Finally, the concluding marks are presented in Section 6.

Mathematical Description of the UAV
This section briefly introduces the translational and rotational equations of motion (EOMs) for a fixed-wing UAV in the presence of wind.

Translational Dynamics.
Let (  ,   , ℎ  ) denote the inertial coordinates of the UAV's center of mass and let (, , , ) be the drag, thrust, lift, and side forces, respectively.Denote by ( 1  ,  2  ,  3  ) the aerodynamic bank, climb, and track angles, respectively, and let ( 1 ,  2 ,  3 ) be the wind perturbation vector (full expressions for these perturbations can be found in [24]).The wind is characterized by the sum of a mean speed    (acting in a horizontal plane along a heading angle   ) and gust components (   , V   ,    ).Then, for a fixed-wing UAV of mass , the translational EOMs are given by where  is the gravitational acceleration,   is the air velocity, and   and   denote the aerodynamic angle of attack and sideslip angle, respectively.A superscript refers to the frame used within the formulations, and the abbreviations (⋅) = sin(⋅), (⋅) = cos(⋅), and (⋅) = tan(⋅) are used throughout the paper.Note that   and   are expressed as where (  , V  ,   ) is the vector of linear velocities which is given, in body frame, as where T  denotes the rotation matrix from the Earth-fixed inertial frame to the UAV-fixed body frame, which is given by where (  ,   ,   ) denote the principal moments of inertia and   is the product of inertia.Let (, , ) denote the roll, pitch, and yaw angles, respectively, and let (  ,   ,   ) be the aerodynamic angular velocity vector.Then, the rotational equations of motion can be expressed as where (L, M, N) is the moment vector (the vector of rolling, pitching, and yawing moments, resp.);(  ,   ,   ) is the wind angular velocity vector;    is the distance between the point of application of the thrust and the UAV's center of mass along the   axis; (ℎ   , ℎ   , ℎ   ) is the angular momentum vector of all rotors about the UAV-fixed   ,   ,   axes; and ( 4 ,  5 ,  6 ) is the wind perturbation vector (see [24]).Throughout the paper, 321 Euler angle sequence is used, so that || < /2.

Forces and Moments Expressions.
The following expressions of forces and moments are used in this paper: where  =  2  /2 is the dynamic pressure; (, , , ) denote the air density, the wing surface, the mean aerodynamic chord, and the wing span, respectively;   is a constant; (  ,   ,   ) denote the aileron, elevator, and rudder deflections, respectively; and  ∈ (0, 1] represents the throttle position.

The Proposed Control Structure
3.1.Kinematic Controller.The kinematic model is given by ( 1)-( 3), from which an inverse kinematic model can be obtained which allows to calculate the reference air velocity, air-path and air-track angles.It is written as follows: Therefore, assuming the existence of a suitable state estimator scheme that estimates the mean wind vector, the kinematic control law to be applied to the UAV for trajectory tracking control is written as where and th is the hyperbolic tangent;   =   −  The following reference value is defined (i.e., coordinated turn conditions): Defining the trim angle of attack as the generated references for the roll, pitch, and yaw angles can be linearly approximated by 3.2.Proportional Controller Design.The proportional (P) controller can be implemented as follows: where

Fuzzy Neural Control Approach
Even if Mamdani-type fuzzy logic controllers were firstly proposed in the literature, a Takagi Sugeno Kang (TSK) fuzzy structure is preferred in this paper benefitting from its capability to be adapted over time.In the proposed method, as shown in Figure 1, P controllers work in parallel with FNNs.The task of the conventional P controllers is to provide some time for the FNN to learn the system dynamics online without going into the unstable working region.On the other hand, there is no need for the conventional P controllers to be tuned precisely.The fuzzy if-then rule   of a zero-order TSK model can be defined as follows in which the consequent parameters consist of only crisp numbers:

The Structure of Fuzzy Neural Network
For the calculation of the firing strength, a product-Tnorm of the MFs is preferred as follows: The Gaussian MFs  1  ( 1 ) and  2  ( 2 ) of the inputs  1 and  2 in (21) are represented by the following equation: where the tunable parameters ,  > 0 are the parameters of the MFs of the TSK FNN model.Hence, ( 21) can be modified as follows: The output of the proposed FNN can be calculated as the weighted average of the output of each rule: where   is the normalized value of the output signal of the neuron  from the hidden layer of the network: The control signal  of the system is calculated as the difference between the conventional P controller and the FNN: In order to ease the notation and make some of the equations vectorial, the following definitions are made.
() = [ 11 ()  12 () ⋅ ⋅ ⋅  21 () ⋅ ⋅ ⋅   () ⋅ ⋅ ⋅   ()]  is vector of the normalized output signals of the neurons from the second hidden layer; are vectors of the tuning parameters  and  of the Gaussian MFs relevant to the fuzzification of the signals supplied to the first and second input of the FNN, respectively; () = [ 11 ()  12 () ⋅ ⋅ ⋅  21 ()  22 () ⋅ ⋅ ⋅   () ⋅ ⋅ ⋅   ()] is vector of the time variable weight coefficients of the connections between the neurons from the second hidden layer and the output neuron of the FNN.
The following assumptions have been used in this paper.The presence of the classical control system in the control scheme which adopted (Figure 1) the global asymptotic stability of the feedback system in compact space is guaranteed and we have where   and  ẋ are known upper bounds of the states of the system and their time derivatives, respectively.
The adaptation laws for the parameters of the MFs are made bounded which guarantees that where   and   are known bounds considered for the parameters of MFs.
It is also assumed that the time-varying parameters of the consequent part of the TSK FNN are bounded; that is, where   is the known positive constant upper bound of the parameters   .From ( 23) and ( 25) it follows that 0 <   < 1.Furthermore, it can be easily seen from ( 25) that ∑  =1 ∑  =1   = 1.Constraints ( 27) to (29) for the state variables of the system and their derivatives and the parameters of the zeroorder TSK FNN make  and τ bounded: where   and  τ are known positive constant upper bounds for  and τ , respectively.

The Sliding Mode Learning Algorithm.
Using the SMC theory principles [26] the zero value of the learning error coordinate   () can be defined as time-varying sliding surface; that is, which is the required condition for the training of the FNN.If this condition is satisfied, the FNN becomes a nonlinear regulator to learn the inverse dynamic of the system and obtains the desired performance of the system.This in turn guarantees the tracking of the reference signal.

Theorem 1. If the adaptation law for the parameters of the considered FNN is chosen, respectively, as
where  is the adaptive learning rate and has a positive value.
Then, given an arbitrary initial condition   (0), the learning error   () will converge to a small neighborhood of zero during a finite time  ℎ .
Proof.See Appendix.32)-(37), then the negative definiteness of the time derivative of the Lyapunov function in (A.15) is ensured.

Theorem 2. If the adaptation strategy for the adjustable parameters of the FNN is chosen as in (
Proof.See Appendix. Remark 1.The obtained result means that, assuming the SMC task is achievable, using   as a learning error for the FNN together with the adaptation laws (32)-(37) enforces the desired reaching mode followed by a sliding regime for the system under control.
Remark 2. The reason behind using continuous time instead of using discrete time is that the stability proof in discrete time is very challenging.That is why we have decided to use the continuous time.This selection does not play a very critical role as we keep the sampling frequency of the system very high.Therefore, the system behaves like a continuous time system in its implementation.The explained framework is preferred by many researchers in literature.

Simulation Studies
The physical parameters used in the simulations can be found in Table 1, which correspond to the actual values of  It can be seen in Figure 3 that the P controller (first 200 s) results in tracking errors for the variables of interest.This is due to the inherent difficulties which arise from the tuning of this kind of controllers.As the FNN is switched on, these errors are significantly reduced and the actual trajectory (blue line) clearly tracks the reference trajectory (red line) as shown in Figures 3-5.As can be seen from these figures, the tracking is still accurate in the presence of time-varying wind conditions.These results show that the control scheme consisting of an FNN working in parallel with a P controller gives a better trajectory following accuracy than the one where only a P controller acts alone.Although the performance of the P controller could be improved by better tuning, this is a challenging task in real life.Thus, the proposed control structure, consisting of an intelligent controller and a conventional controller, is preferable.
The control action (i.e., deflection of the different control surfaces) is shown as the corresponding contribution of the P controller (blue line) and the FNN (red line) in Figure 6.It can be seen that after the 200th second, the FNN takes over control, whereas the output of the P controller comes to approximately zero as is expected in this kind of intelligent controllers.
Figure 7 shows the Euclidean error between the actual and desired trajectory.It can be seen that, as the FNN is turned on after the 200th second, the accuracy improves.It can also be seen that even when the wind conditions change (i.e., 100th second and 300th second for the P controller acting along and the FNN working in parallel with the P controller, resp.), the FNN improves the system response.
It is to be noted that although there exist four independent subsystem controllers in the UAV control system, the FNN works in parallel with a P controller only for the control of the thrust, pitch, and yaw, given the good performance of the roll channel being actuated only by the P controller.

Conclusion
In this paper, an SMC theory-based learning algorithm has been introduced for the control of a fixed-wing UAV in the presence of wind.The adaptation laws for the parameters of the FNN are proposed and their learning stability conditions are investigated for a structure with two inputs, each being modeled by Gaussian MFs.The proposed control structure consists of a P controller and an FNN which can learn the inverse dynamics of the plant model online rather than a need for an accurate predefined dynamic model of the system.The obtained simulation results illustrate that using the proposed learning laws for the parameters of the FNN makes it possible to reach and maintain the predefined sliding manifold.It is further observed that not only is the proposed method robust but also another prominent feature of it is its ease of implementation.The effectiveness of the proposed algorithm has been demonstrated through computer simulations, which include the tracking of a three-dimensional trajectory by the UAV in the presence of time-varying wind conditions.As a future extension to this paper, authors would like to implement state estimation methods for the available on board information.

Figure 1 :
Figure 1: Block diagram of the proposed adaptive FNN control structure.

Figure 2 :
Figure 2: Structure of the proposed FNN.

Figure 4 :Figure 5 :
Figure 4: Three-dimensional representation of the UAV trajectory (blue line) compared with its reference (red line) trajectory.

Figure 7 :
Figure 7: Time response of the Euclidean error between the actual and reference trajectory for the P controller acting alone (dashed line) and the FNN in parallel with the P controller (solid line).