# Planar Smooth Path Guidance Law for a Small Unmanned Aerial Vehicle with Parameter Tuned by Fuzzy Logic

Authors: Yang Chen; Jianhong Liang; Chaolei Wang; Yicheng Zhang; Tianmiao Wang; Chenghao Xue
Journal: Journal of Control Science and Engineering
 (2017)

---

## Abstract

A guidance law has been designed to guide the small unmanned aerial vehicle towards the predefined horizontal smooth path. The guidance law only needs the mathematical expression for the predefined path, the positions, and the velocities of the vehicle in the horizontal inertial frame. The stability of the guidance law has been demonstrated by the Lyapunov stability arguments. In order to improve the path following performance, one of the parameters of the guidance law is tuned by using the fuzzy logic which will still keep its stability. The simulation experiments in the Matlab/Simulink environment to realize the square-, circular-, and the athletics track-style paths following are given to verify the effectiveness of the proposed method. The simulation results show that the path following performance will be improved with smaller overshoot and oscillation amplitude and shorter arrival time with the parameter tuned.


---

## Body

## 1. Introduction

In the past decades, the small unmanned aerial vehicles (UAVs) have been widely applied in the military and civilian domains with their ability of automation, such as fire detection, surveillance, aerial photography over the disaster area, and forbidden area monitoring [1]. To realize these functions, it is required that the UAVs have the capability of tracking or following the predefined path or trajectory accurately.During recent years, the approaches to realize the path following or trajectory tracking control of a small unmanned aerial vehicle appear on the linear and nonlinear control methods. The linear techniques include the PID and linear quadratic regulator (LQR), while the nonlinear methods mostly appear on the backstepping technique, the fuzzy logic based control, the sliding mode control, and the model predictive control (MPC).While applying linear methods, in [2], the outer-loop design for translational motion is based on the PD controller together with the disturbance accommodating control method to estimate the aerodynamic force. Compared to the traditional PID technique, Luo et al. applied the directional fractional order (PI)α method to the lateral control of a small fixed-wing unmanned aerial vehicle with its parameters tuned based on the mathematical model [3]. However, the PID controller has little robustness to the disturbance, and it is mostly used in the lateral/longitudinal maneuvers by reducing the lateral deviation from a desired flight path. The genetic algorithm has also been used to optimize the control parameters of the trajectory tracking control law which will improve the tracking performance [4]. But it needs more calculation which makes it limited to be applied on the low-cost autopilot. In [5], the linear quadratic regulator (LQR) with an adaptive running cost was applied to generate the lateral acceleration command to guide the vehicle towards the path. Lee et al. used the LQR technique to reach the path following by finding the optimal state feedback law where its state is the combination of the lateral attitudes, the cross-track, and heading errors [6]. However, the heading and cross-track errors should be saturated to make the system stable due to the limitation of the linear region.Alternative approaches to realize the path following are based on the nonlinear techniques, which include the intelligent control, the Lyapunov stability based control, and model predictive control. For using the intelligent method, an adaptive neuron-fuzzy inference system based flight controller has been designed to realize the autonomous flight [7]. Cancemi et al. applied the fuzzy logic to generate the heading reference which will guide the UAV towards the predefined waypoint trajectory [8]. The fuzzy based method was implemented in the hardware-in-the-loop simulation. The fuzzy logic method can reach better track performance compared to the traditional PID controller.Based on the Lyapunov stability theory, the sliding mode and backstepping techniques are often applied. In [9, 10], the sliding mode control technique together with the vector field is used to guide the UAV towards the desired path. A spatial sliding mode controller [10] defined as a stable differential operator with respect to a defined spatial variable is presented to track the predefined path. Liang et al. applied the vector field for the vehicle to reach the planar path following by using the sliding mode control [11]. In [12, 13], Ren applied the backstepping techniques to obtain the velocity and roll angle control laws to track the predefined path. Brezoescu obtained the direction control of the UAV with the help of the adaptive backstepping method in the presence of the crosswind, which has been tested in simulation [14]. For real flight tests, the backstepping technique is usually used as the inner loop to stabilize the dynamics of the UAV [15]. Based on the MPC technique, a nonlinear model predictive controller is used to design the high level controller based on the kinematic model of the UAV to follow the line path [16]. In [17], an adaptive NMPC that varies the control horizon is used for design as the tracking layer to follow the predefined path by minimizing the mean and maximum errors between the reference path and the UAV. For normal MPC tracking controller, the error can converge fast with respect to its predictive ability, but there exist some static state error and some wave control due to the computational accuracy, limited predictive horizon, and weight matrixes selection.Motivated by the above discussions, it can be found that the guidance control laws generated by the Lyapunov-stable based methods are usually simple and useful. In our preview works [18], a Lyapunov-stable based nonlinear control law has been designed to guide the UAV towards the predefined line path. In this paper, we have expanded the result to a class of smooth curve-type path in the horizontal plane. The proposed guidance law generated for the smooth path still has one of its parameters tuned by the fuzzy logic, which will make the vehicles fly towards the predefined path more directly and smoothly.In the outer loop, with the altitude held by a simple PI controller, the concept of vector field which has been applied in fixed-wing UAV to generate the heading rate command was adopted [19]. However, the authors only considered the straight line and circular-type path for the fixed-wing UAV. In this study, we have expanded the result to a class of smooth curve-type path in the 2D plane. While applying the vector field to generate the heading rate command, the necessary information including the ground speed, position, and heading angle is measured by a GPS/INS integrated navigation system. Additionally, the asymptotic approximation to the desired path is demonstrated by use of the sliding mode approach and Lyapunov stability arguments.The organization of this paper is as follows. In the next section, the problem description is presented. In Section3, a Lyapunov-stable nonlinear controller is designed to generate desired course rate to guide the UAV towards the planar smooth path together with a key parameter of the controller tuned by the fuzzy logic technique. The simulation results in Matlab/Simulink environment to realize the square-, circular-, and the athletics track-style paths are given in Section 4. Finally, some concluding remarks are summarized in Section 5.


## 2. Problem Description

Small fixed-wing UAVs equipped with low-level flight controller, which can provide altitude- and airspeed-hold functions, are assumed to be used for the path following. The following kinematics of the UAV in inertial horizontal frame can be used for the controller design:(1)x˙=Vacos⁡ψ+Wx,y˙=Vasin⁡ψ+Wy,ψ˙=u0,where (x,y) is the inertial position of the UAV, Wx and Wy are the corresponding components of the wind velocity,Va is the airspeed, ψ is the heading, and u0is the commanded heading rate. By introducing the ground speed Vg and the course χ shown in Figure 1, the kinematics of the UAV (see (1)) can be expressed as(2)x˙=Vgcos⁡χ,y˙=Vgsin⁡χ.Figure 1
Position of the UAV with respect to the desired path and the relationship among the ground speed, airspeed, and the wind speed.Following [9, 10], with another assumption that the autopilot can provide the course-hold function adopted, by introducing the course rate control χ˙=ucmd, the system shown as (2) becomes as follows:(3)x˙=Vgcos⁡χ,y˙=Vgsin⁡χ,χ˙=ucmd.The relation between the heading rate and course rate is given by [11](4)ucmd=Lψu0=Va2+VaWxcos⁡ψ+Wysin⁡ψVa2+Wx2+Wy2+2VaWxcos⁡ψ+Wysin⁡ψu0.For flying a UAV, it has the fact that the airspeedVa is larger than the wind speed W. When there is no wind, Lψ = 1, which means that the course of the UAV equals its heading angle. So it can be easily derived that Lψ∈(1/2,1]. In the following, we control the UAV’s course instead of its heading. The command design is based on model (3). Therefore, the motions of the UAV can be expressed in terms of the ground speed and the course angle. Since the ground speed contains the information of wind velocity, the wind disturbance rejection will be naturally considered by using the inertial measurements [9, 18].


## 3. Planar Smooth Path Following

### 3.1. Normal Planar Smooth Path Following Controller

Consider a generic desired smooth path in the horizontal plane which can be described as a continuously differentiable implicit functionf:R2→R with(5)fx,y=0.In this paper, the desired path shown as (5) is a generic curve. Since it is not trivial to express the distance from a generic curve in closed form, the curve function fx,y instead of the Euclidean distance from the curve is used as the distance function [20]; that is, dx,y=fx,y. The partial derivatives of dx,y with respect to x and y are(6)fx=∂dx,y∂x=∂fx,y∂x,fy=∂dx,y∂y=∂fx,y∂y.The magnitude of corresponding gradient is denoted asf=fx2+fy2. With the distance function defined above, dx,y is a scalar filed, and it can indicate whether or not the point x,y lies on the curve fx,y=0. In order to avoid the vehicle being trapped in the center point of the closed curve (such as the center of a circle), an interesting domain is defined as Dint=(x,y)∣x,y∈R,∇f≥λ, where λ is a positive constant. When the vehicle’s initial position is withinDint, the following control law shown as (7) will guide the UAV towards the desired path in finite time.(7)ucmd=-k1∇fVgfsat⁡dx,y-k2Vgddtdx,y+ddttan-1⁡-fxfy, where k1 is a positive constant. k2≥k2p; k2p is an arbitrary chosen positive value, and the saturation function fsat⁡ is defined as (8)fsatx=Vg,x>Vgx,-Vg≤x≤Vg-Vg,x<-Vg. Here, the saturation function is used to limit distance, just because if the initial distance from the path is sufficiently high and without the saturation function, the UAV will perform unnecessary endless loops away from the desired path. It should be noted that the term (d/dt)tan-1(-fx/fy) in (7) can guarantee that the vehicle will fly along the given path when the distance to the curve is zero.For analyzing the stability of the path tracking control law shown as (7), two other following variables x1 and χ1 are introduced as(9)x1=dx,y,χ1=χ-tan-1-fxfy,fy≠0χ-π2,fy=0,fx<0χ+π2,fy=0,fx>0.Equations (9) show that x1 tends to zero as the distance from the curve tends to zero, and χ1 tends to zero as χ tends to the direction of the desired line. So we have(10)sin⁡χ1=fxcos⁡χ+fysin⁡χ∇f,cos⁡χ1=fycos⁡χ-fxsin⁡χ∇f.The derivatives of the introduced variables are shown as follows:(11)x˙1=ddtdx,y=fxx˙+fyy˙=fxVgcos⁡χ+fyVgsin⁡χ=Vg∇fsin⁡χ1,χ˙1=-k1∇fVgfsatdx,y-k2Vgddtdx,y=-k1∇fVgfsat⁡x1-k2Vg2∇fsin⁡χ1.Theorem 1.
Ifk1 is a positive constant, Vg≥Vgp, and k2≥k2p, where Vgp and k2p are positive constants, then the stable equilibrium points of system (11) equal the set {x1,χ1∣x1=0,χ1=2kπ,k∈Z}. Furthermore, they are all uniformly asymptotically stable.Proof.
Rewrite system (11) as x˙=g(x,t) with x=[x1,χ1]Tand g(x) defined as(12)gx,t=Vg∇fsin⁡χ1-k1∇fVgfsatx1-k2Vg2∇fsin⁡χ1.
Letx˙=gx,t=0. Since Vg≥Vgp>0, ∇f≥λ>0, the solutions to gx=0 are the set {x1,χ1∣x1=0,χ1=kπ,k∈Z}. Firstly, the stable equilibrium points are {x1,χ1∣x1=0,χ1=2kπ,k∈Z}. Without loss of generality, we consider the equilibrium point 0,0. Define the domain D={(x1,χ1)∣x1∈R,-π<χ1<π}.
The Lyapunov candidate function is chosen as(13)Vt,x=k1∫0x1fsatydy+∫0χ1sin⁡ydy.
Since∫0x1fsatydy>0 and ∫0χ1sin⁡ydy=1-cos⁡χ1>0for all x∈D-{0}, if k1>0, then Vt,x>0 on D-{0}. Furthermore,(14)Vt,x=k1∫0x1fsatydy+1-cos⁡χ1≤k12x12+1-cos⁡χ1≤k12x12+χ122=W1x1,χ1,Vt,x≥1-cos⁡χ1=2sin2⁡χ12=W2x1,χ1,where W1x1,χ1 and W2(x1,χ1) are continuous positive definite functions on D. Additionally, we have the fact that(15)V˙t,x=∂V∂t+∂V∂xgx,t=2k1x˙1fsatx1+χ˙1sin⁡χ1=-2k2Vg2∇fsin2⁡χ1≤-2k2Vgp2λsin2⁡χ1=-W3x1,χ1.
It can be derived thatW3(x1,χ1) is a continuous positive definite function on the domain D. Then, the equilibrium point (0,0) is uniformly asymptotically stable [21]. Similarly, the equilibrium points in the set {x1,χ1∣x1=0,χ1=2kπ,k∈Z} are all uniformly asymptotically stable.
The following text indicates that the points in the set{x1,χ1∣x1=0,χ1=(2k+1)π,k∈Z} are unstable when k1,k2, and Vg are all positive constants. Without loss of generality, we focus on the point x0=[0,π]T and define the domain D1 as(16)D1=x∈R2∣x-x0≤VgpifVgp≤π2x∈R2∣x-x0≤π2ifVgp>π2.
Then, on the domainD1, the function gx,t can be expressed as(17)gx,t=∇fVgsin⁡χ1-k1Vgx1-k2Vg2sin⁡χ1.
It can be found thatgx,t is continuously differentiable on D1. The following Jacobian matrix can be derived as [21](18)A=∂g∂xxx=x0=∇f0-Vg-k1Vgk2Vg2.
By solving the eigenvalues of matrixA, it gets that one of them equals ∇fVgk2Vg+k22Vg2+4k1/2, which is positive. Hence, the point x0=[0,π]T is unstable [21]. Similarly, the equilibrium points in the set {x1,χ1∣x1=0,χ1=(2k+1)π,k∈Z} are all unstable.


### 3.2. The Phase Plot of System (11) with Different Parameters k2

In order to analyze the dynamic performance of the nonlinear system (11), the line style and the circle style paths are chosen as the case study. For the line style path, the function fx,y is chosen as fx,y=ax+by+c with ∇f=a2+b2=1, while for the circle style path following, the function fx,y is chosen as fx,y=(x-x0)2+(y-y0)2-r, where (x0,y0) and r represent the center and the radius of the circle, respectively. It can be found that with the circle style path function fx,y chosen as above, the magnitude of corresponding gradient ∇f=1. Thus Figure 2 which presents the phase plot of system (11) with ∇f=1 can display the dynamics of the line- or the circle-style path following.Figure 2
The phase plot of system (10) with ∇f=1 and Vg=20 m/s. (a) Under four kinds of different initial values with k1=0.0006 and k2=0.0008; (b) under four kinds of different parameter k2.
(a)
(b)Figure2(a) shows the dynamics of the nonlinear system (11) under different initial values. It displays the fact that if the vehicle is far away from the desired path, the vehicle will firstly adjust the course to an approximate invariant value and then flies towards the path until the absolute value of the distance dx,y is smaller than Vg. Finally, some oscillations appear while the vehicle is approaching the desired path.During the proof process of Theorem1, the positive parameter k2 is variable if it is larger than a given positive constant, while the parameter k1 is chosen as a positive constant to get (15) which is used to be one of the conditions to guarantee the stability. Thus, the following study only considers how the variable parameter k2 will influence the performance of the proposed guidance law.Figure2(b) shows the different trajectories of system (11) with the control parameters couple as (0.0006,0.0006), (0.0006,0.0008), (0.0006,0.001), and (0.0006,0.0012) but under the same initial conditions, respectively. The system is convergent for the given parameters couple. However, the convergence speeds are quite different due to the different control parameters. With larger parameter k2, the trajectories in the plane of phases tend to equilibrium more directly. Nevertheless, while implementing the control law on a real vehicle, if the vehicle flies near the predefined path, the control law is similar to the traditional PD controller. The larger parameter k2 will lead to high-frequency oscillations and weaken the disturbance rejection. The following subsection shows how to adjust the parameter k2 to improve the path following performance.


### 3.3. Path Following Controller with Gain Tuned by Fuzzy Logic (FL_PFC)

As stated in the last subsection, the control gaink2 should be adjusted to improve the path following performance. In [8], the authors have applied the fuzzy logic to generate the guidance law. Due to its simple structure and comprehensible concept, we adopted the advantages of the fuzzy logic and applied it to tune the control gain k2. Figure 3 presents the general structure of the proposed controller. The control parameter k2 is adjusted around a given nominal value k20 dynamically by the fuzzy logic unit as(19)k2=k20+Δk2, where Δk2 is the output of the fuzzy logic unit for adjusting the parameter k2. As (13) and (15) show, while taking the procedure of (19), the adjusting parameter k2 should be larger than a given positive constant; then system (11) has the asymptotically stable equilibrium points {x1,χ1∣x1=0,χ1=2kπ,k∈Z}.Figure 3
The structure of the proposed controller.Figure4 shows the triangular, Z-shaped, and S-shaped membership functions used for the fuzzification of the inputs and output, that is, the distance dx,y, the derivative of the distance d˙x,y, and the adjusting parameter Δk2. Here, NB, NM, NS, Z, PS, PM, and PB stand for negative big, negative medium, negative small, zero, positive small, positive medium, and positive big, respectively.Figure 4
The membership functions used for the fuzzification of the inputsdx,y and d˙x,y and the output Δk2, respectively.
(a)
(b)
(c)Table1 presents the rule base used for adjusting the parameter Δk2. The fuzzy rule base contains 49 rules which will generate Δk2 based distance dx,y and its derivative with respect to the time d˙x,y. For example, the rule (IF dx,y is PS AND d˙x,y is PS THEN Δk2 is NS) is based on the consideration that if the UAV is flying near the predefined path, the total control command ucmd should not be large. With the negative small parameter Δk2, the parameter k2 and the corresponding ucmd are reduced. The well-known min-max inference method and the center-of-area defuzzification procedure are used to execute the fuzzy unit.Table 1
Rule base for the fuzzy logic unit.
Δ
k
2
d
x
,
y
NB
NM
NS
Z
PS
PM
PB
d
˙
x
,
y
NB
PB
PB
Z
Z
Z
NM
Z
NM
Z
PS
NS
PS
PS
NS
Z
NS
Z
PS
NS
PS
PS
NS
Z
Z
Z
PM
Z
PS
Z
NS
Z
PS
Z
PM
PS
PS
NS
NS
Z
PM
Z
PS
PS
Z
NS
NS
Z
PB
Z
Z
Z
Z
Z
NB
NBFigure5 shows the input-output characteristics of the fuzzy logic unit. The minimum of the output is −0.0007302. In this paper, the control parameters k1 and k20 are chosen as 0.0006 and 0.0008, respectively. Then one has the fact that k2 is always positive with k2>0.00006.Figure 5
Input-output surface for the fuzzy logic unit.


## 3.1. Normal Planar Smooth Path Following Controller

Consider a generic desired smooth path in the horizontal plane which can be described as a continuously differentiable implicit functionf:R2→R with(5)fx,y=0.In this paper, the desired path shown as (5) is a generic curve. Since it is not trivial to express the distance from a generic curve in closed form, the curve function fx,y instead of the Euclidean distance from the curve is used as the distance function [20]; that is, dx,y=fx,y. The partial derivatives of dx,y with respect to x and y are(6)fx=∂dx,y∂x=∂fx,y∂x,fy=∂dx,y∂y=∂fx,y∂y.The magnitude of corresponding gradient is denoted asf=fx2+fy2. With the distance function defined above, dx,y is a scalar filed, and it can indicate whether or not the point x,y lies on the curve fx,y=0. In order to avoid the vehicle being trapped in the center point of the closed curve (such as the center of a circle), an interesting domain is defined as Dint=(x,y)∣x,y∈R,∇f≥λ, where λ is a positive constant. When the vehicle’s initial position is withinDint, the following control law shown as (7) will guide the UAV towards the desired path in finite time.(7)ucmd=-k1∇fVgfsat⁡dx,y-k2Vgddtdx,y+ddttan-1⁡-fxfy, where k1 is a positive constant. k2≥k2p; k2p is an arbitrary chosen positive value, and the saturation function fsat⁡ is defined as (8)fsatx=Vg,x>Vgx,-Vg≤x≤Vg-Vg,x<-Vg. Here, the saturation function is used to limit distance, just because if the initial distance from the path is sufficiently high and without the saturation function, the UAV will perform unnecessary endless loops away from the desired path. It should be noted that the term (d/dt)tan-1(-fx/fy) in (7) can guarantee that the vehicle will fly along the given path when the distance to the curve is zero.For analyzing the stability of the path tracking control law shown as (7), two other following variables x1 and χ1 are introduced as(9)x1=dx,y,χ1=χ-tan-1-fxfy,fy≠0χ-π2,fy=0,fx<0χ+π2,fy=0,fx>0.Equations (9) show that x1 tends to zero as the distance from the curve tends to zero, and χ1 tends to zero as χ tends to the direction of the desired line. So we have(10)sin⁡χ1=fxcos⁡χ+fysin⁡χ∇f,cos⁡χ1=fycos⁡χ-fxsin⁡χ∇f.The derivatives of the introduced variables are shown as follows:(11)x˙1=ddtdx,y=fxx˙+fyy˙=fxVgcos⁡χ+fyVgsin⁡χ=Vg∇fsin⁡χ1,χ˙1=-k1∇fVgfsatdx,y-k2Vgddtdx,y=-k1∇fVgfsat⁡x1-k2Vg2∇fsin⁡χ1.Theorem 1.
Ifk1 is a positive constant, Vg≥Vgp, and k2≥k2p, where Vgp and k2p are positive constants, then the stable equilibrium points of system (11) equal the set {x1,χ1∣x1=0,χ1=2kπ,k∈Z}. Furthermore, they are all uniformly asymptotically stable.Proof.
Rewrite system (11) as x˙=g(x,t) with x=[x1,χ1]Tand g(x) defined as(12)gx,t=Vg∇fsin⁡χ1-k1∇fVgfsatx1-k2Vg2∇fsin⁡χ1.
Letx˙=gx,t=0. Since Vg≥Vgp>0, ∇f≥λ>0, the solutions to gx=0 are the set {x1,χ1∣x1=0,χ1=kπ,k∈Z}. Firstly, the stable equilibrium points are {x1,χ1∣x1=0,χ1=2kπ,k∈Z}. Without loss of generality, we consider the equilibrium point 0,0. Define the domain D={(x1,χ1)∣x1∈R,-π<χ1<π}.
The Lyapunov candidate function is chosen as(13)Vt,x=k1∫0x1fsatydy+∫0χ1sin⁡ydy.
Since∫0x1fsatydy>0 and ∫0χ1sin⁡ydy=1-cos⁡χ1>0for all x∈D-{0}, if k1>0, then Vt,x>0 on D-{0}. Furthermore,(14)Vt,x=k1∫0x1fsatydy+1-cos⁡χ1≤k12x12+1-cos⁡χ1≤k12x12+χ122=W1x1,χ1,Vt,x≥1-cos⁡χ1=2sin2⁡χ12=W2x1,χ1,where W1x1,χ1 and W2(x1,χ1) are continuous positive definite functions on D. Additionally, we have the fact that(15)V˙t,x=∂V∂t+∂V∂xgx,t=2k1x˙1fsatx1+χ˙1sin⁡χ1=-2k2Vg2∇fsin2⁡χ1≤-2k2Vgp2λsin2⁡χ1=-W3x1,χ1.
It can be derived thatW3(x1,χ1) is a continuous positive definite function on the domain D. Then, the equilibrium point (0,0) is uniformly asymptotically stable [21]. Similarly, the equilibrium points in the set {x1,χ1∣x1=0,χ1=2kπ,k∈Z} are all uniformly asymptotically stable.
The following text indicates that the points in the set{x1,χ1∣x1=0,χ1=(2k+1)π,k∈Z} are unstable when k1,k2, and Vg are all positive constants. Without loss of generality, we focus on the point x0=[0,π]T and define the domain D1 as(16)D1=x∈R2∣x-x0≤VgpifVgp≤π2x∈R2∣x-x0≤π2ifVgp>π2.
Then, on the domainD1, the function gx,t can be expressed as(17)gx,t=∇fVgsin⁡χ1-k1Vgx1-k2Vg2sin⁡χ1.
It can be found thatgx,t is continuously differentiable on D1. The following Jacobian matrix can be derived as [21](18)A=∂g∂xxx=x0=∇f0-Vg-k1Vgk2Vg2.
By solving the eigenvalues of matrixA, it gets that one of them equals ∇fVgk2Vg+k22Vg2+4k1/2, which is positive. Hence, the point x0=[0,π]T is unstable [21]. Similarly, the equilibrium points in the set {x1,χ1∣x1=0,χ1=(2k+1)π,k∈Z} are all unstable.


## 3.2. The Phase Plot of System (11) with Different Parameters k2

In order to analyze the dynamic performance of the nonlinear system (11), the line style and the circle style paths are chosen as the case study. For the line style path, the function fx,y is chosen as fx,y=ax+by+c with ∇f=a2+b2=1, while for the circle style path following, the function fx,y is chosen as fx,y=(x-x0)2+(y-y0)2-r, where (x0,y0) and r represent the center and the radius of the circle, respectively. It can be found that with the circle style path function fx,y chosen as above, the magnitude of corresponding gradient ∇f=1. Thus Figure 2 which presents the phase plot of system (11) with ∇f=1 can display the dynamics of the line- or the circle-style path following.Figure 2
The phase plot of system (10) with ∇f=1 and Vg=20 m/s. (a) Under four kinds of different initial values with k1=0.0006 and k2=0.0008; (b) under four kinds of different parameter k2.
(a)
(b)Figure2(a) shows the dynamics of the nonlinear system (11) under different initial values. It displays the fact that if the vehicle is far away from the desired path, the vehicle will firstly adjust the course to an approximate invariant value and then flies towards the path until the absolute value of the distance dx,y is smaller than Vg. Finally, some oscillations appear while the vehicle is approaching the desired path.During the proof process of Theorem1, the positive parameter k2 is variable if it is larger than a given positive constant, while the parameter k1 is chosen as a positive constant to get (15) which is used to be one of the conditions to guarantee the stability. Thus, the following study only considers how the variable parameter k2 will influence the performance of the proposed guidance law.Figure2(b) shows the different trajectories of system (11) with the control parameters couple as (0.0006,0.0006), (0.0006,0.0008), (0.0006,0.001), and (0.0006,0.0012) but under the same initial conditions, respectively. The system is convergent for the given parameters couple. However, the convergence speeds are quite different due to the different control parameters. With larger parameter k2, the trajectories in the plane of phases tend to equilibrium more directly. Nevertheless, while implementing the control law on a real vehicle, if the vehicle flies near the predefined path, the control law is similar to the traditional PD controller. The larger parameter k2 will lead to high-frequency oscillations and weaken the disturbance rejection. The following subsection shows how to adjust the parameter k2 to improve the path following performance.


## 3.3. Path Following Controller with Gain Tuned by Fuzzy Logic (FL_PFC)

As stated in the last subsection, the control gaink2 should be adjusted to improve the path following performance. In [8], the authors have applied the fuzzy logic to generate the guidance law. Due to its simple structure and comprehensible concept, we adopted the advantages of the fuzzy logic and applied it to tune the control gain k2. Figure 3 presents the general structure of the proposed controller. The control parameter k2 is adjusted around a given nominal value k20 dynamically by the fuzzy logic unit as(19)k2=k20+Δk2, where Δk2 is the output of the fuzzy logic unit for adjusting the parameter k2. As (13) and (15) show, while taking the procedure of (19), the adjusting parameter k2 should be larger than a given positive constant; then system (11) has the asymptotically stable equilibrium points {x1,χ1∣x1=0,χ1=2kπ,k∈Z}.Figure 3
The structure of the proposed controller.Figure4 shows the triangular, Z-shaped, and S-shaped membership functions used for the fuzzification of the inputs and output, that is, the distance dx,y, the derivative of the distance d˙x,y, and the adjusting parameter Δk2. Here, NB, NM, NS, Z, PS, PM, and PB stand for negative big, negative medium, negative small, zero, positive small, positive medium, and positive big, respectively.Figure 4
The membership functions used for the fuzzification of the inputsdx,y and d˙x,y and the output Δk2, respectively.
(a)
(b)
(c)Table1 presents the rule base used for adjusting the parameter Δk2. The fuzzy rule base contains 49 rules which will generate Δk2 based distance dx,y and its derivative with respect to the time d˙x,y. For example, the rule (IF dx,y is PS AND d˙x,y is PS THEN Δk2 is NS) is based on the consideration that if the UAV is flying near the predefined path, the total control command ucmd should not be large. With the negative small parameter Δk2, the parameter k2 and the corresponding ucmd are reduced. The well-known min-max inference method and the center-of-area defuzzification procedure are used to execute the fuzzy unit.Table 1
Rule base for the fuzzy logic unit.
Δ
k
2
d
x
,
y
NB
NM
NS
Z
PS
PM
PB
d
˙
x
,
y
NB
PB
PB
Z
Z
Z
NM
Z
NM
Z
PS
NS
PS
PS
NS
Z
NS
Z
PS
NS
PS
PS
NS
Z
Z
Z
PM
Z
PS
Z
NS
Z
PS
Z
PM
PS
PS
NS
NS
Z
PM
Z
PS
PS
Z
NS
NS
Z
PB
Z
Z
Z
Z
Z
NB
NBFigure5 shows the input-output characteristics of the fuzzy logic unit. The minimum of the output is −0.0007302. In this paper, the control parameters k1 and k20 are chosen as 0.0006 and 0.0008, respectively. Then one has the fact that k2 is always positive with k2>0.00006.Figure 5
Input-output surface for the fuzzy logic unit.


## 4. Simulations

The simulations about the proposed controller were studied in the Matlab/Simulink environment [19]. The Aerosonde UAV model [22] was applied as a test vehicle while doing the simulation, where the UAV model was designed by using the Aerosim Aeronautical Simulation Block Set [23] which provides a complete set of tools for development of detailed 6-degree-of-freedom nonlinear models. Figure 6 presents the Simulink model which contains the proposed smooth path following controller, static inner loop controller, and the UAV model used for the simulation studies. The inputs of the smooth path following controller from the states are the inertial position (x,y) and velocity (Vx,Vy) which will be used to generate the vehicle’s current course.Figure 6
The Simulink block diagram for the simulation studies.The initial position of the UAV was at the origin of the local coordinate system, and its initial heading was set as 360 deg north, respectively. For simulation, the initial inertial speed of the UAV was set as 25 m/s. In order to test the performance of the proposed controller, the wind with 8 m/s from 270 deg west was added to the model of the UAV as shown in Figure6. The simulation sample time was set as 50 ms. While conducting the simulations, we applied the proposed method to follow three types of planar path, that is, the square-, circular-, and athletics track-style paths in Matlab environment, respectively.Case 1 (square path following).
The desired horizontal square path was defined with four waypoints,(100,100), (2100,2100), (100,4100), and (2100,-1900), as shown in Figure 7(a). The comparison of the path following with the methods PFC and FL_PFC can also be seen in Figure 7(a). Figure 7(b) is the comparison of the distance while following the predefined square path with the controllers PFC and FL_PFC. While executing the square line path following, the predefined behavior that the UAV will switch course in advance with 200 meters was adopted, which results in the sharp changes of about 200 meters. The elliptic marks A, B, C, D, E, and F in Figure 7(b) indicate that the overshoot of the path following and the oscillation amplitude by using the method FL_PFC are both smaller than those by using the method PFC. And the maximum overshoots and time difference of arrival (TDOA, defined as the time difference (tPFC-tFL_PFC) between the two methods for the vehicle to do the switching maneuver near the waypoint) displayed in the areas A, B, C, D, E, and F are listed in Table 2.
Figure7(c) shows the parameterused for the methods FL_PFC and PFC, respectively. With k2 adjusted, the course rate command was derived to drive the UAV to follow the path with better performance as shown in Figure 7(b). Figure 7(d) presents the comparison of the inertial velocity Vg while following the predefined path with the two proposed methods. The inertial velocity Vg is changing due to the influence of the constant wind speed. However, the inertial velocity Vg with the method FL_PFC is smoother than that with the method PFC. It indicates that the following performance is modified by the fuzzy logic rule. By adjusting the parameter k2, the overshoots and oscillation will be reduced, and the quickness of the path following will be maintained. It can also be seen from the TDOA listed in Table 2 that, by using the method FL_PFC, the vehicle can reach the set waypoints more quickly. So if a predefined flight path is long, the vehicle can finish it with shorter time by using the method FL_PFC.Table 2
Comparison of the maximum overshoot with the two proposed methods.
Maximum overshoot (m)
TDOA (s)
FL_PFC
PFC
t
PFC
-
t
FL_PFC
Area A
0.3404
13.54
1.5
Area B
1.981
13.54
3.7
Area C
4.576
29.26
10.2
Area D
0.606
14.76
15.1
Area E
0.3444
5.575
19.2
Area F
0.5554
10.38
22Figure 7
Comparison of the square path following with the methods FL_PFC and PFC. (a) The position compassion, (b) the distanced(x,y) compassion, (c) the parameter k2 compassion, and (d) the inertial velocity Vg.
(a)
(b)
(c)
(d)As Figure7(d) and Table 2 show, while turning near the point (2100, −1900), the maximum overshoot in the area C presents the fact that, with the two orthogonal components of the added wind acting on the fuselage axis and the lateral axis of the UAV, the wind from 270 deg west influences the turning of the UAV dramatically. With the method PLC, the maximum overshoot in area C is 29.26 m; in contrast, that with the method FL_PFC is only 4.576 m. This result demonstrates the effectiveness of the path following controller FL_PFC.Case 2 (circular path following).
The desired horizontal circular path was defined asx2+(y-330)2-250=0. Figure 8(a) shows that the vehicle will follow the predefined circular path after the approximation of transition with an approximate invariant course value. The zoom in detail in Figure 8(b) indicates that the vehicle can reach the predefined path with smaller overshoot by using the method FL_PFC. The oscillations that appear from time of 80 s to 110 s were caused by the wind disturbance.Figure 8
Comparison of the circular path following with the methods FL_PFC and PFC. (a) The position compassion, (b) the distanced(x,y) compassion, (c) the parameter k2 compassion, and (d) the inertial velocity Vg.
(a)
(b)
(c)
(d)Case 3 (athletics track-style path following).
In this case, the athletics track-style path was adopted by combining the line-style and circular-style paths together. The simulation results are shown in Figure9. Figure 9(b) indicates that, compared with the method PFC, the method FL_PFC will guide the UAV towards the predefined path faster together with smaller oscillation amplitude.Figure 9
Comparison of the Athletics track-style path following with the methods FL_PFC and PFC. (a) The position compassion and (b) the distanced(x,y) compassion.
(a)
(b)


## 5. Conclusions

A horizontal smooth path following guidance law for a small unmanned air vehicle is presented in this paper. With the combination of the Lyapunov stability and the inference ability of fuzzy logic, the proposed path following controller FL_PFC still has its stability guaranteed by the mechanism of the Lyapunov stability arguments and adopts the simple structure of the method PFC. With a key parameter of the guidance law adjusted based on fuzzy logic technique, the path following performance was improved with smaller overshoot and oscillation amplitude and shorter reaching time even in the presence of wind with 8 m/s. The proposed methods were successfully implemented in following three types of planar path, that is, the square-, circular-, and athletics track-style paths via simulations in the Matlab/Simulink environment.Our future work will focus on developing a 3D smooth path following controller; the control parameters will also be adjusted with the help of the fuzzy logic or optimization techniques to improve the path following performance.



---

*Source: 6712602-2017-03-26.xml*