Next Article in Journal
Strengthening Thermal Stability in V2O5-ZnO-BaO-B2O3-M(PO3)n Glass System (M = Al, Mg) for Laser Sealing Applications
Next Article in Special Issue
Building Survivable Software Systems by Automatically Adapting to Sensor Changes
Previous Article in Journal
Quantitative Characterization of Geotrichum candidum Growth in Milk
Previous Article in Special Issue
Roto-Translational Control of Spacecraft in Low Earth Orbit Using Environmental Forces and Torques
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Path Following and Obstacle Avoidance for Unmanned Aerial Vehicles Using a Virtual-Force-Based Guidance Law

Northwest Institute of Nuclear Technology, Xi’an 710024, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2021, 11(10), 4618; https://doi.org/10.3390/app11104618
Submission received: 19 April 2021 / Revised: 6 May 2021 / Accepted: 11 May 2021 / Published: 18 May 2021
(This article belongs to the Special Issue Advances in Aerial, Space, and Underwater Robotics)

Abstract

:
This paper presents a virtual-force-based guidance law (VFGL) for path following and obstacle avoidance in unmanned aerial vehicles. First, a virtual spring force and a virtual drag force are designed for straight-line following; then, the dynamic of the cross-track-error is equivalent to a spring mass system, which is easy to tune to acquire stability and non-overshoot convergence. Secondly, an additional virtual centripetal force is designed to counteract the influence of the curvature of the planned path so that the guidance law can accurately track a curve with a time-varying curvature. Thirdly, an extra virtual repulsive force is designed directly according to the sensor inputs; the virtual repulsive force pushes the vehicle away to move around obstacles. The use of artificial physics means the guidance law is founded on solid physical theory and is computationally simple. The physical meanings of the parameters are definite, and the VFGL has a large parameter adaptation. These make the guidance law easy to tune in application. Both the numerical and hardware-in-the-loop simulation results demonstrated the effectiveness of the proposed guidance law for path following and obstacle avoidance in unmanned aerial vehicles.

1. Introduction

In the application of unmanned aerial vehicles (UAVs), one of the basic requirements is for the UAVs to autonomously follow a planned path. In most cases, the reference path given by planning algorithms [1] is a curve. This requires that the UAVs can accurately track the reference curve. In addition, obstacle avoidance is another problem that has to be considered during path following. Although preknown static obstacles can be considered in path planning [2,3], unknown obstacles may be detected when the UAVs follow the planned path in a complex dynamic environment [4,5]. It is required that the UAVs are able to avoid the newly discovered obstacles and come back to the planned path. In this paper, we focus on the problems of path following and obstacle avoidance in UAVs.
Path following and obstacle avoidance have been hot topics in the field of UAVs for a few years. The following is a brief overview of the existing methods in the literature.
A. Path following
Various strategies have been proposed in the literature for path following. Two main categories are control-theory-based approaches and geometry-based approaches. Several types of control-theoretic techniques have been developed for path following. Some of the well-known techniques are proportional integral differential (PID) control [6], model predictive control (MPC) [7,8,9], adaptive control [10,11,12], sliding mode control [13,14], and linear quadratic regulator (LQR) [15,16]. Other novel techniques, such as iterative learning control [17], were developed for path following. The main advantage of these control-theory-based approaches is the guarantee of the stability and the convenience for performance analysis in theory. One drawback is the longer man-hours associated with the controller’s implementation when compared with the geometric methods.
Many control-theory-based methods rely on mathematical models of the UAVs, and it is time consuming to obtain an accurate model of a UAV, especially for a low-cost small fixed-wing UAV. If the model is not sufficiently accurate, more time may be required to adjust the parameters of the method in real applications. In addition, in terms of theoretical complexity, it takes more time for many engineers to understand and apply complex control theories than it does for geometric-based approaches.
Many geometric-based guidance laws were proposed for UAV path following, they are the line-of-sight (LOS) [18] method, pure pursuit (PP) [19] method, nonlinear guidance law (NLGL) [20], vector field (VF)-based guidance laws [21,22], and the combination of LOS and pure pursuit [23]. In PP, LOS, and NLGL, a virtual target point is defined on the reference path. The guidance laws direct the UAV to track the virtual target point, so that the UAV eventually converges to the reference path. All of the four kinds of guidance laws are applicable when the reference path is a straight-line or a circle.
Although the NLGL can be used to follow a curved path, the optimal parameters are different when the radius of the reference circle changes [24], so the cross-track error is still considerable when the reference curvature varies [25]. Since all these techniques use the geometric approach, computing the desired heading angle (or rate) is quick, and they are easy to implement. The performance of these techniques was evaluated and compared in [24] using straight-line following and loitering. A reference path with varying curvature was not considered. Accurately tracking a curved trajectory with a time-varying curvature remains a challenge.
B. Obstacle avoidance
Another hot topic in this research area is obstacle avoidance during path following. One of the most popular techniques that combines path following and obstacle avoidance is the MPC-based approach [26], for convenience to tackle the constraints of the obstacles. A limitation of the MPC-based approaches is the problem of computation complexity. The authors in [27] addressed these two problems together using a mixed H 2 / H approach; however, a smooth trajectory was approximated by a set of piece-wise lines.
The potential field (PF) [28,29,30,31] and virtual force field (VFF) [22,32] methods were designed for obstacle avoidance guidance using heading direction vector fields. The PF-based method uses potential flow elements that result in a velocity vector; the velocity vector can be used to guide a vehicle to the desired goal while avoiding obstacles. VFF-based methods use artificial attractive forces to pull a UAV toward its goal, and use artificial repulsive forces to push the UAV away from obstacles. Neither PF and VFF can direct a UAV to converge back to the planned path after avoiding an obstacle [29,30].
In [33], a gradient vector field (GVF) method was proposed for the path following and circular obstacle avoidance of UAVs. The center and size of the newly detected obstacle is required. The user has to evaluate this information from the sensor inputs. A neural network based method is presented in [34]; the control commands were calculated directly from the sensor inputs without the knowledge of the obstacle center and size. The application of the neural-network-based method is limited by the requirement of training samples.
Another idea for obstacle avoidance during path following is replanning when new obstacles are discovered [2,35,36,37]. Compared with the PF and VFF methods, replanning requires more calculation time. It is suitable for ground vehicles or quadrotors that can stop or hover during replanning. It is difficult to meet the real-time requirement of a fixed-wing UAV. In addition, the performance of the two-layer “replanning-following” structure still depends on the accuracy of the path following algorithms.
Otherwise, there may be a large deviation between the actual and the planned path, which means that the generated path cannot be accurately tracked. The idea of replanning is often used in the exploration of an unknown environment. For example, a dynamic path planner was designed in [37] for aerial robots (typically multicopters) to explore underground mines.
In the dynamic path planner, a sector-based obstacle avoidance algorithm was designed to avoid collisions and keep the robot more centered inside the tunnel. A similar obstacle avoidance algorithm based on open sectors [38] was proposed for aerial robot navigation through unstructured urban/suburban environments. These methods are successful in obstacle avoidance in unknown environments; however, they do not take the requirement of accurate path following into account.
For the problem of path following and obstacle avoidance, in addition to cross-track error and the man-hours associated with the controller’s implementation, other considerations, such as stability, computational costs, and execution times are some of the determining factors that a designer has to take into account at the moment of choosing or implementing a controller [39].
Considering these factors in this paper, we propose a novel virtual-force-based guidance law (VFGL) for path following and obstacle avoidance in UAVs inspired by a spring mass system. First, we designed a virtual spring force and a virtual drag force for straight-line following; the dynamic of the closed-loop of the cross-track error is equivalent to a spring mass system, which is easy to tune and to acquire stability and non-overshoot convergence. Then, an additional virtual centripetal force was designed to counteract the influence of the curvature of the planned path so that a general curve with time-varying curvature could be accurately tracked.
To avoid the obstacles detected in the planned path, an extra virtual repulsive force was designed to push the vehicle away from the planned path to move around the obstacles. The virtual repulsive force directly relies on the sensor inputs; there is no need to estimate the central position and size of the newly detected obstacle. The use of artificial physics (virtual forces) makes the guidance law founded on solid physical theory and computationally simple. The physical meanings of the parameters are definite, and the VFGL has a large parameter adaptation. These factors make the guidance law easy to tune in application.
To demonstrate the performance of the proposed guidance law, different parameters were evaluated in the simulation. The results show that the VFGL is easy to tune in application, and has a large parameter adaptation. Several methods were implemented in the simulation as comparison. The obtained simulation results demonstrated the superiority of the proposed guidance law. The VFGL performed over the NLGL, PLOS, and PID in curve following, and performed over GVF and VFF in obstacle avoidance during straight-line following.
To further evaluate the VFGL, a highly realistic hardware-in-the-loop (HIL) simulation system was developed by combining an autopilot with a heavily developed and commercially available flight simulator, X-Plane. Then, the VFGL was applied to the problem of path following and obstacle avoidance for a fixed-wing UAV. The results demonstrated the effectiveness of the VFGL.
This paper is organized as follows. In Section 2, we formulate the problem. In Section 3, the idea and the procedure of the VFGL is presented for path following and obstacle avoidance. In Section 4, both numerical simulation and the HIL experiment are described to demonstrate the effectiveness of the proposed guidance law. Finally, we conclude the paper in Section 5.

2. Problem Formulation

2.1. Vehicle Model

We consider a fixed-wing UAV equipped with a low-level controller. Accordingly, the dynamics of the UAV is approximate to a unicycle model, which is given by
x ˙ = v cos ψ y ˙ = v sin ψ ψ ˙ = ω
where ( x , y ) is the position; ψ is the course; v is the ground velocity; and ω is the course rate. The model is widely used in the guidance of UAVs equipped with a low-level controller [22,24,33,40,41].

2.2. Problem Definition

In this paper, we focus on the problem of path following and obstacle avoidance for a UAV. In path following, we consider the reference path as a continuous curve generated by path planning algorithms. The position and curvature of all the points on the reference path are known. Our first goal is to design a guidance law that directs a UAV to follow the planned path.
In obstacle avoidance, we assume that the UAV is equipped with LIDAR, which can detect obstacles on the reference path. The points on the surface of an obstacle can be detected within a certain range. Our second goal is to guide the UAV to avoid obstacles according to the onboard LIDAR inputs during path following; once the UAV moves around the obstacle, it returns to the original planned path.

3. The Virtual-Force-Based Guidance Law

In this section, we first describe a spring mass system, which is the source of our idea. Then, virtual forces are designed step by step for the path following and obstacle avoidance in UAVs. Finally, the guidance law is derived from the virtual forces.

3.1. Spring Mass System: The Source of the Idea

Consider a spring mass system as shown in Figure 1: before the unit mass ( m = 1 ) reaches its equilibrium position, the deviation (d) is controlled by the resultant of the spring force ( F t ) and the frictional resistance ( F r ), where
m d ¨ = F t + F d , F t = k s d , F d = c d d ˙ ,
and k s and c d denote the spring constant and coefficient of resistance.
From (2), we obtain the dynamic of d
d ¨ + c d d ˙ + k s d = 0
Define X = [ d , d ˙ ] , we obtain the state space description of (3)
X ˙ = A X A = 0 1 k s c d
It is easy to find the only equilibrium state X = 0 . Let | λ I A | = 0 , we obtain the eigenvalues of (4)
λ = c d ± c d 2 4 k s 2
When k s > 0 , c d > 0 , r e a l ( λ ) < 0 , the spring mass system (3) is asymptotically stable, which means the deviation globally converges to 0.
If c d 2 k s , d converges to 0 without overshoot or oscillation. From (5), we know that:
  • When 0 < c < 2 k , the spring mass system is a second-order weakly damped control system. Then, there will be oscillation before convergence.
  • When c = 2 k , the system is a second-order critical damped control system. In this case, d converges to 0 without overshoot.
  • When c > 2 k , the system is a second-order over damped system. d converges to 0 without overshoot, and the convergence rate is slower with a larger c.

3.2. The Virtual Forces for Straight-Line Following

Inspired by the spring mass system, a virtual spring force ( F v t ) and a virtual drag force ( F v d ) are designed to govern a UAV to track a reference line. F v t points to the reference point, which is the nearest point on the reference straight line to the UAV. The direction of F v d is opposite to the relative velocity v V P , which is the velocity of the UAV relative to the moving reference point as shown in Figure 2.
The magnitude of the virtual spring force and the virtual drag force are
F v t = k v d
F v d = c v v V P
where k v is the constant of the virtual spring, c v is the coefficient of the virtual drag, and the cross-track error d is the distance between the UAV and P r . In decomposing F v t and F v d along V P r and the normal direction of V P r , the motion of the UAV can be decomposed in the two directions.
In the V P r direction, there are two forces. One is the virtual spring force F v t , and the other is the component of the virtual drag force in the V P r direction, F v d m = c v v m = c d ˙ . Then, the dynamics of the cross-track error d are
d ¨ + c v d ˙ + k v d = 0
This is same as the dynamics of the mass spring system (3). The conclusions of the mass spring system are also valid here: if c v 2 k v , the cross-track error d converges to 0 without overshoot or oscillation.
In the normal direction of V P r , the initial velocity of the UAV relative to the moving reference point is v n ( 0 ) = v n 0 , the resultant force is the component of the virtual drag force in this direction, F v d n = c v v n . The motion of the UAV in this direction is given by
v ˙ n ( t ) = c v v n ( t ) v n ( 0 ) = v n 0
The analytical solution of (9) is
v n ( t ) = v n 0 e c v t
For the drag coefficient c v > 0 , the relative velocity v n exponentially converges to 0.
Using the two virtual forces, both d and v n converge to 0, which means that the UAV converges to the reference point and follows the reference line with the reference velocity v r .

3.3. Virtual Centripetal Force for Curve Following

For curve following, the reference point is not in an equilibrium state. The virtual spring force and the virtual drag force are insufficient to guide a UAV to accurately track a curve. Then, a virtual centripetal force ( F v c ) is designed to enable a UAV to track the maneuver of the reference point. F v c points to the center (O) of the curvature circle at the reference point as shown in Figure 3.
The magnitude of the force F v c is
F v c = v T 2 l
where l is the distance from the UAV to the center O; and v T is the velocity component of the UAV along the tangent direction at the point V.
The virtual centripetal force pulls the UAV to circle the point O at a radius of the current distance l. It counteracts the influence of P r ’s maneuver on d, so that the virtual spring force and the virtual drag force guide the UAV to track a curve like a straight-line. Then, the dynamics of d are same as those of the straight-line case. After the UAV converges to the reference curve, l = r , the virtual centripetal force keeps the UAV moving along the reference curve.

3.4. Virtual Repulsive Force for Obstacle Avoidance

This method is based on the concept of virtual forces. A virtual repulsive force can be designed to avoid the obstacle detected in the reference path. Supposing that the UAV is equipped with LIDAR. The LIDAR can detect a series of points ( P o ) on the obstacle’s surface within a certain range as shown in Figure 4.
P o is a subset of { ( d o , θ o ) | d o ( 0 , R d ] , θ o [ θ r , θ l ] } , where d o is the distance between the point and the UAV. θ o is the angle of sight with counterclockwise as its positive direction. R d is the range of the LIDAR. [ θ r , θ l ] is the angle range of the LIDAR.
The leftmost point p 1 = ( d o 1 , θ o 1 ) and the rightmost point p 2 = ( d o 2 , θ o 2 ) can be found in P o . Then, the virtual repulsive force F v r is designed perpendicular to v, the positive direction of F v r is to the left of v. F v r is given by
F v r = k r e p l o
l o = ( d s + d o 1 θ o 1 ) θ o 2 + θ o 1 < 0 , d s + d o 1 θ o 1 > 0 ( d s d o 2 θ o 2 ) θ o 2 + θ o 1 0 , d s d o 2 θ o 2 > 0 0 e l s e
where k r e p is the coefficient of the virtual repulsive force. d s is a parameter related to the safe clearance between the UAV and the obstacle.
The virtual repulsive force is designed to repel the vehicle to its lateral; this means that the virtual repulsive force only affects the course of the UAV and does not change the speed of the UAV; when | θ o 1 | > | θ o 2 | , F v r repels the UAV to turn to its right; when | θ o 1 | | θ o 2 | , F v r repels the UAV to turn to its left. The UAV is always repelled to turn to the side with a smaller angle of view to move around of the obstacle.

3.5. Driven of the Virtual-Force-Based Guidance Law

According to the analysis above, the UAV is governed by four virtual forces: A virtual centripetal force, a virtual spring force, a virtual drag force, and a virtual repulsive force. The guidance law is calculated by the combination of four virtual forces. The procedure is given below:
  • Step 1: Obtain the state ( x , y , ψ ) of the UAV.
  • Step 2: Determine the reference point P r = ( x r , y r , ψ r , ω r ) and calculate the reference center O. The reference center O = ( x o , y o ) is determined by the reference point P r and the reference radius r = | v r / ω r | at point P r .
    x o = x r + r · cos ( ψ r + sign + ( ω r ) · π 2 ) y o = y r + r · sin ( ψ r + sign + ( ω r ) · π 2 )
    where
    sign + ( x ) = 1 , x 0 1 , x < 0
  • Step 3: Calculate the four virtual forces according to (6), (7), (11), and (12).
  • Step 4: Obtain the resultant virtual force in the forward and lateral direction by decomposing the virtual forces in the two directions
    F f = F v t f + F v d f + F v c f
    F l = F v t l + F v d l + F v c l + F v r
    where the subscripts f and l are used to denote the components of forces in the UAV’s forward and lateral direction.
  • Step 5: Obtain the input command of the VFGL by
    v c = v + d t · F f , ω c = F l v
    v c = limit [ v c , v m i n , v m a x ]
    ω c = limit [ ω c , ω m a x , ω m a x ]
    where d t is the control interval in practical application. v m i n and v m a x are the minimum and the maximum velocity of the UAV. ω m a x is the maximum course rate. The expression of x = limit [ x , x m i n , x m a x ] is
    x = x m a x , x ( x m a x , + ) x , x [ x m i n , x m a x ] x m i n , x ( , x m i n )

4. Evaluation

4.1. Numerical Simulation

The UAV model given in (1) is used in the numerical simulation. The saturation constraints of the course rate and the velocity are given in each simulation scenario. A more realistic fixed-wing UAV model will be considered in the hardware-in-the-loop simulation.

4.1.1. Path Following with Different Parameters

In this scenario, the velocity of the UAV is limited to 20 m/s. The heading rate is limited within [ 0.2 , 0.2 ] rad/s. Different k v and c v are considered in the simulation to evaluate the VFGL method. The results are given in Figure 5.
Figure 5a shows the simulation results with constant k v = 0.5 and changing c v . When c v = k v , there are oscillations before the trajectory of the UAV converges to the reference. When c v = 2 k v and c v = 3 k v , the trajectory of the UAV converges to the reference without overshoot or oscillation. This is consistent with the theoretical results that, if the parameters satisfy c v 2 k v , d converges to 0 without any overshoot or oscillation. We also find that the convergence is slower with the increase of c v .
Figure 5b is the simulation results with different k v and c v . It shows that the convergence obtains faster with the increase of k v ( c v = 2 k v ). When k v increases to 2, there is an overshoot of more than 10 m before the UAV converges to the reference. That is because the control input (course rate and the velocity) of UAV is constrained. The overshoot can be reduced by adding c v . The result shows that when c v increases to 3 k v , the overshoot is suppressed to 0.

4.1.2. Comparison of the VFGL with Other Methods

To illustrate the superiority of the VFGL, several methods were implemented in the simulation as comparison. They are the NLGL, PLOS, PID, GVF, and VFF. Guidance laws for path following, such as the NLGL, PLOS, and PID, did not consider obstacle avoidance. For fair comparison, there are no obstacles in the comparison with these methods. In comparison with the GVF and VFF, a circular obstacle is set on the reference path to evaluate the performance of the methods for obstacle avoidance.
A. Curve following using different methods
In this scenario, the velocity of the UAV is limited to 20 m/s. The heading rate is limited within [ 0.2 , 0.2 ] rad/s. The parameters of the VFGL are k v = 0.5 , c v = 2 k v ; the guidance distance of the NLGL is 120; the parameters for the PLOS are k e = 2.5 and k d = 0.05 ; and the parameters for the PID are k P = 0.1 , k I = 0.005 , and k D = 0.64 . The reference path includes a straight-line segment and a part of “8” shaped curve with a variable curvature. Figure 6 shows the simulation results using the four kinds of methods.
Figure 6a shows that all of the four methods can guide the UAV to track the reference curve. The differences lie in the speed of convergence and the tracking accuracy—particularly when the curvature of the reference path changes. The cross-track error using these methods is shown in Figure 6b. This shows that the convergence of the VFGL and PLOS is faster than the NLGL and PID. Using NLGL, PLOS, and PID, there are overshoots before the UAV converges to the reference. The cross-track error of VFGL is the lowest among these methods, especially when the curvature of the reference path changes.
The comparison in this scenario shows that the proposed VFGL method has better performance on path following than NLGL, PLOS, and PID, especially when the curvature of the reference curve changes.
B. Obstacle avoidance using different methods
In this scenario, a UAV is initially following a straight line at a constant speed of 25 m/s. A circular obstacle is set on the reference path. The VFGL, VFF, and GVF guidance were simulated in this scenario. The parameters for the VFGL are k v = 0.5 , c v = 2 k v , k r e p = 10 , R d = 100 m, and d s = 10 m. The parameters of the simulation in [33] were used for VFF and GVF in this scenario. Details on the VFF and GVF guidance can be found in [29,33].
The results of the three guidance methods are shown in Figure 7. Using the VFGL, the UAV is pushed away from the planned path to avoid the obstacle, and after that it converges back to the planned path without any overshoot. Using the VFF method, the UAV moves away from the planned path to avoid the obstacle; after the obstacle avoidance, it can not return to the planned path but takes the shortest distance directly to its goal. GVF leaves the planned path before VFF and VFGL, tracks the outside of the obstacle, and then quickly converges back to the planned path.
The deviation from the planned path of the GVF is larger than the VFGL. There is overshoot before the UAV converges back to the planned path using the GVF. By comparison, we can find that the VFGL method achieved better path following and obstacle avoidance results. Compared with GVF, another advantage of the proposed VFGL is that it can be used for curve following and obstacle avoidance (see the results of the hardware-in-the-loop simulation).

4.2. Hardware-in-the-Loop Simulation

A hardware-in-the-loop (HIL) simulation is a bridge between numerical simulation and a field experiment. A HIL simulation is more realistic compared with numerical simulation for the participation of hardware and a more realistic flight simulator. Compared with field experiment, HIL simulation is more efficient, safe, and cost effective. HIL simulation was conducted to validate the proposed method.

4.2.1. System Setup

The HIL testbed was developed by combining an autopilot with a heavily developed and commercially available flight simulator, X-Plane. The diagram of the HIL testbed is shown in Figure 8. The flight simulator X-Plane was used to simulate the UAV platform, the sensors, and the external environment in a real system. The switch was used to substitute the real digital radio. Both the autopilot and the ground control station in the HIL testbed were the same as with the actual system.
The developed HIL testbed is shown in Figure 9. Using the HIL testbed, new approaches and algorithms can be fully tested and evaluated. The HIL testbed has been used in previous work [41,42,43,44,45]. The approaches that passed the X-Plane-based HIL evaluation can be easily applied in real flight experiments. In this paper, we use the fixed-wing aircraft model PT60 in the X-Plane simulator to validate the effectiveness of the proposed guidance law for the problem of path following and obstacle avoidance. The plane and its main parameters are shown in Figure 10.
The altitude of the reference path was assumed to be constant. The ADRC-based low-level controller we designed in [46] was used to obtain the desired attitude and velocity. The effectiveness of the low-level controller was validated in simulation and field experiments [41,42,43,44,45,46].

4.2.2. Results of the HIL Simulation

A. Straight-line following
The reference line pointed to the east. The reference velocity and altitude were 25 m/s and 100 m. The desired roll and velocity were limited within [ 45 ° , 45 ° ] and [18 m/s, 30 m/s], respectively. Three groups of parameters as shown in Table 1 were evaluated.
Figure 11 shows the cross-track errors in the HIL simulation. As shown with the red dashed line, there is an overshoot of 10 m when k v = 0.1 , c v = k v . The blue solid line is the cross-track error when k v = 0.1 , c v = 2 k v . It shows that the UAV converges to the reference line without overshoot. The green dotted line shows that the UAV converges to the reference line without overshoot when k v = 1 , c v = 2 k v , and the convergence is faster than k v = 0.1 , c v = 2 k v . The result coincides with the numerical simulation (Figure 5). This shows that the proposed VFGL is easy to tune and has a large parameter adaption.
B. Curve following
We evaluated the VFGL using a figure-eight shape path following. The reference path was generated by two tangent circles. The radii of the two circles were 250 m. The reference velocity and altitude were 25 m/s and 100 m. The desired roll angle and velocity were limited within [ 45 ° , 45 ° ] and [18 m/s, 30 m/s], respectively. The parameters of the guidance law in the HIL simulation were k v = 0.1 and c v = 2 k v .
The trajectory of the UAV in this scenario is shown in Figure 12. The reference heading rate switches between 0.1 rad/s and −0.1 rad/s at the tangent point of the reference “8” path. The result shows that the UAV followed the reference path well; however, the reference curvature varies. The cross-track error in the HIL simulation of curve following is shown in Figure 13. The maximum of the cross-track error after t = 20 s is 3.97 m, which emerges shortly after the first switch. The cross-track error at the second switch is within 1.95 m. These errors were mainly produced by the model error between a real fixed-wing UAV PT60 and the simplified UAV model expressed by (1).
C. Path following with obstacle avoidance
The VFGL was used to avoid the obstacles during path following. The reference curve is the “8” shape path in the previous scenario. Considering a circle obstacle located at the tangent point, the radius of the obstacle is 50 m. The desired roll angle and velocity are limited within [ 30 ° , 30 ° ] and [18 m/s, 30 m/s], respectively. The parameters of the guidance law are given by
k v = 0.1 , c v = 2 k v , k r e p = 1 , R d = 100 , d s = 10
The result is shown in Figure 14. First, the UAV converges to the reference curve and begins to fly along the reference path. Once the obstacle is detected, the UAV is repelled by the virtual repulsive force to move around the obstacle. After that, the UAV is pulled back to the reference path by the virtual spring force and the virtual centripetal force. During the process, there is no overshoot or oscillation; the UAV avoids the obstacle smoothly. Using the VFGL, a fixed-wing UAV can avoid obstacles on the reference curve during path following.
The HIL simulation results demonstrate that the VFGL was effective in path following and obstacle avoidance with a fixed-wing UAV. The UAV could accurately follow a predefined line or curve. When an obstacle was detected in the reference path, the UAV could smoothly avoid the obstacle; after that, it converged back to the reference.

5. Conclusions

In this paper, a virtual-force-based guidance law was proposed for path following and obstacle avoidance in UAVs. The guidance law was inspired by a spring mass system. In order to follow a planned path and avoid the newly detected obstacles in the planned path, four virtual forces were designed to guide the UAV. The virtual repulsive force pushed the UAV away from the planned path to move around the obstacles. The virtual centripetal force counteracted the influence of the curvature of the planned curve. Then, the virtual spring force and the virtual drag force guided the UAV to accurately track a curve in the same way as tracking a straight-line.
The use of artificial physics means the guidance law is founded in solid physical theory and is computationally simple. The proposed guidance law was evaluated by both numerical and HIL simulations. The numerical simulation results show that the VFGL has a large parameter adaptation. It performed over the NLGL, PLOS, and PID in path following and performed over GVF and VFF in obstacle avoidance during path following.
In the HIL simulation, the VFGL was applied to the problem of path following and obstacle avoidance for a fixed-wing UAV. The results show that the VFGL was easy to tune in application. The UAV accurately followed the predefined “8” shape path and successfully avoid the obstacle in the path. Although the VFGL was evaluated using a fixed-wing UAV in the HIL simulation, we considered that this is also applicable for other unmanned vehicles that can be modeled as unicycles.

Author Contributions

Methodology: X.W. and L.C.; software: L.K. and B.W.; resources: L.C.; validation: X.W., S.H. and C.L.; writing—original draft preparation: X.W.; writing—review and editing: X.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Simulation data are available from the corresponding author, Xun Wang, upon request.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Wang, X.; Yao, X.; Zhang, L. Path planning under constraints and path following control of autonomous underwater vehicle with dynamical uncertainties and wave disturbances. J. Intell. Robot. Syst. 2020, 99, 891–908. [Google Scholar] [CrossRef]
  2. Massimiliano, I.; Antonio, S. Path following and obstacle avoidance for an autonomous UAV using a depth camera. Robot. Auton. Syst. 2018, 106, 38–46. [Google Scholar]
  3. Radmanesh, M.; Kumar, M.; Guentert, P.H.; Sarim, M. Overview of path planning and obstacle avoidance algorithms for UAVs: A comparative study. Unmanned Syst. 2018, 6, 2301–3850. [Google Scholar] [CrossRef]
  4. Carrio, A.; Lin, Y.; Saripalli, S.; Campoy, P. Obstacle detection system for small UAVs using ADS-B and thermal imaging. J. Intell. Robot. Syst. 2017, 88, 583–595. [Google Scholar] [CrossRef]
  5. Rodríguez-Seda, E.J.; Tang, C.; Spong, M.W.; Stipanović, D.M. Trajectory tracking with collision avoidance for nonholonomic vehicles with acceleration constraints and limited sensing. Int. J. Robot. Res. 2014, 33, 1569–1592. [Google Scholar] [CrossRef]
  6. Kumon, M.; Nagata, M.; Kohzawa, R.; Mizumoto, I.; Iwai, Z. Flight Path Control of Small Unmanned Air Vehicle. J. Field Robot. 2006, 23, 223–244. [Google Scholar] [CrossRef]
  7. Alessandretti, A.; Aguiar, A.P.; Jones, C. Trajectory-tracking and path-following controllers for constrained underactuated vehicles using Model Predictive Control. In Proceedings of the 2013 European Control Conference, Zurich, Switzerland, 17–19 July 2013; pp. 1371–1376. [Google Scholar]
  8. Castillo, C.; Moreno, W.; Valavanis, K. Unmanned helicopter waypoint trajectory tracking using model predictive control. In Proceedings of the Mediterranean Conference on Control & Automation, Athens, Greece, 27–29 June 2007; pp. 1–8. [Google Scholar]
  9. Künhe, F.; Gomes, J.; Fetter, W. Mobile robot trajectory tracking using model predictive control. In II IEEE Latin-American Robotics Symposium; IEEE: Washington, DC, USA, 2005. [Google Scholar]
  10. Brezoescu, A.; Espinoza, T.; Castillo, P.; Lozano, R. Adaptive trajectory following for a fixed-wing UAV in presence of crosswind. J. Intell. Robot. Syst. 2013, 69, 257–271. [Google Scholar] [CrossRef] [Green Version]
  11. Fossen, T.I.; Pettersen, K.Y.; Galeazzi, R. Line-of-sight path following for dubins paths with adaptive sideslip compensation of drift forces. IEEE Trans. Control. Syst. Technol. 2015, 23, 820–827. [Google Scholar] [CrossRef] [Green Version]
  12. Poznyak, A.S.; Yu, W.; Sanchez, E.N.; Perez, J.P. Nonlinear adaptive trajectory tracking using dynamic neural networks. IEEE Trans. Neural Netw. 1999, 10, 1402–1411. [Google Scholar] [CrossRef]
  13. Chwa, D. Sliding-mode tracking control of nonholonomic wheeled mobile robots in polar coordinates. IEEE Trans. Control. Syst. Technol. 2004, 12, 637–644. [Google Scholar] [CrossRef]
  14. Yang, J.M.; Kim, J.H. Sliding mode control for trajectory tracking of nonholonomic wheeled mobile robots. IEEE Trans. Robot. Autom. 1999, 15, 578–587. [Google Scholar] [CrossRef] [Green Version]
  15. Divelbiss, A.W.; Wen, J.T. Trajectory tracking control of a car-trailer system. IEEE Trans. Control. Syst. Technol. 1997, 5, 269–278. [Google Scholar] [CrossRef]
  16. Ratnoo, A.; Sujit, P.; Kothari, M. Adaptive optimal path following for high wind flights. In Proceedings of the 18th IFAC World Congress, Milano, Italy, 28 August–2 September 2011. Volume 2. [Google Scholar]
  17. Schoellig, A.P.; Mueller, F.L.; D’Andrea, R. Optimization-based iterative learning for precise quadrocopter trajectory tracking. Auton. Robot. 2012, 33, 103–127. [Google Scholar] [CrossRef] [Green Version]
  18. Fossen, T.I.; Breivik, M.; Skjetne, R. Line-of-sight path following of underactuated marine craft. In Proceedings of the 6th IFAC MCMC, Girona, Spain, 17–19 September 2003; pp. 244–249. [Google Scholar]
  19. Conte, G.; Duranti, S.; Merz, T. Dynamic 3D path following for an autonomous helicopter. IFAC Proc. Vol. 2004, 37, 472–477. [Google Scholar] [CrossRef]
  20. Park, S.; Deyst, J.; How, J.P. A new nonlinear guidance logic for trajectory tracking. In Proceedings of the AIAA Guidance, Navigation and Control Conference, Providence, RI, USA, 16–19 August 2004; pp. 1–16. [Google Scholar]
  21. Jung, W.; Lim, S.; Lee, D.; Bang, H. Unmanned Aircraft Vector Field Path Following with Arrival Angle Control. J. Intell. Robot. Syst. 2016, 1–15. [Google Scholar] [CrossRef]
  22. Nelson, D.R.; Barber, D.B.; McLain, T.W.; Beard, R.W. Vector field path following for miniature air vehicles. IEEE Trans. Robot. 2007, 23, 519–529. [Google Scholar] [CrossRef] [Green Version]
  23. Kothari, M.; Postlethwaite, I.; Gu, D.W. UAV path following in windy urban environments. J. Intell. Robot. Syst. 2014, 74, 1013–1028. [Google Scholar] [CrossRef]
  24. Sujit, P.B.; Saripalli, S.; Sousa, J.B. Unmanned aerial vehicle path following: A survey and analysis of algorithms for fixed-wing unmanned aerial vehicles. IEEE Control Syst. 2014, 34, 42–59. [Google Scholar]
  25. Park, S.; Deyst, J.; How, J.P. Performance and Lyapunov stability of a nonlinear path following guidance method. J. Guid. Control Dyn. 2007, 30, 1718–1728. [Google Scholar] [CrossRef]
  26. Howard, T.M.; Green, C.J.; Kelly, A. Receding horizon model-predictive control for mobile robot navigation of intricate paths. In Field and Service Robotics; Springer: Berlin/Heidelberg, Germany, 2010; pp. 69–78. [Google Scholar]
  27. Hwang, C.L.; Chang, L.J. Trajectory tracking and obstacle avoidance of car-like mobile robots in an intelligent space using mixed H2/H decentralized control. IEEE/ASME Trans. Mechatron. 2007, 12, 345–352. [Google Scholar] [CrossRef]
  28. Khatib, O. Real-Time Obstacle Avoidance for Manipulators and Mobile Robots. Int. J. Robot. Res. 1986, 5, 396–404. [Google Scholar] [CrossRef]
  29. Borenstein, J.; Koren, Y. Real-Time Obstacle Avoidance for Fast Mobile Robots in Cluttered Environments. In Proceedings of the IEEE International Conference on Robotics and Automation, Cincinnati, OH, USA, 13–18 May 1990; pp. 572–577. [Google Scholar]
  30. Borenstein, J.; Koren, Y. The Vector Field Histogram-Fast Obstacle Avoidance for Mobile Robots. IEEE Trans. Robot. Autom. 1991, 7, 278–288. [Google Scholar] [CrossRef] [Green Version]
  31. Nakai, K.; Uchiyama, K. Vector Fields for UAV Guidance Using Potential Function Method for Formation Flight. In Proceedings of the AIAA Guidance, Navigation, and Control Conference and Exhibit, Boston, MA, USA, 19–22 August 2013; pp. 278–288. [Google Scholar]
  32. Goncalves, V.; Pimenta, L.C.; Maia, C.A.; Dutra, B.C.; Pereira, G.A. Vector Fields for Robot Navigation Along Time-Varying Curves in n-Dimensions. IEEE Trans. Robot. 2010, 26, 647–659. [Google Scholar] [CrossRef]
  33. Wilhelm, J.; Clem, G. Vector field uav guidance for path following and obstacle avoidance with minimal deviation. J. Guid. Dyn. 2019, 42, 1848–1856. [Google Scholar] [CrossRef]
  34. Stefan, S.; Tobias, N.; Javier, A.M.; Otmar, H. Sample Efficient Learning of Path Following and Obstacle Avoidance Behavior for Quadrotors. IEEE Robot. Autom. Lett. 2018, 3, 3852–3859. [Google Scholar]
  35. Nguyen, P.D.H.; Recchiuto, C.T.; Sgorbissa, A. Real-Time Path Generation and Obstacle Avoidance for Multirotors: A Novel Approach. J. Intell. Robot. Syst. 2018, 89, 27–49. [Google Scholar] [CrossRef]
  36. Sgorbissa, A. Integrated robot planning, path following, and obstacle avoidance in two and three dimensions: Wheeled robots, underwater vehicles, and multicopters. Int. J. Robot. Res. 2019, 38, 853–876. [Google Scholar] [CrossRef]
  37. Carlos, R.S.; Dominguez, D.; Gonzalo, J.; Escapa, A. Path planner for autonomous exploration of underground mines by aerial vehicles. Sensors 2020, 20, 4259. [Google Scholar]
  38. Steiner, J.A.; He, X.; Bourne, J.R.; Leang, K.K. Open sector rapid reactive collision avoidance: Application in aerial robot navigation through outdoor unstructured environments. Robot. Auton. Syst. 2019, 112, 211–220. [Google Scholar] [CrossRef]
  39. Cheein, F.A.; Scaglia, G. Trajectory tracking controller design for unmanned vehicles: A new methodology. J. Field Robot. 2014, 31, 861–887. [Google Scholar] [CrossRef]
  40. Beard, R.; Ferrin, J.; Humpherys, J. Fixed wing UAV path following in wind with input constraints. IEEE Trans. Control. Syst. Technol. 2014, 22, 2103–2117. [Google Scholar] [CrossRef]
  41. Zhao, S.; Wang, X.; Lin, Z.; Zhang, D.; Shen, L. Integrating Vector Field Approach and Input-to-State Stability Curved Path Following for Unmanned Aerial Vehicles. IEEE Trans. Syst. Man Cybern. 2020, 50, 2897–2904. [Google Scholar] [CrossRef]
  42. Wang, X.; Zhang, J.; Zhang, D.; Shen, L. UAV formation: From numerical simulation to actual flight. In Proceedings of the 2015 IEEE International Conference on Information and Automation, Lijiang, China, 8–10 August 2015; pp. 475–480. [Google Scholar]
  43. Wang, X.; Zhang, J.; Zhang, D.; Shen, L. Development of an Experiment System for UAV Formation Flight. Robot 2017, 39, 160–166. [Google Scholar]
  44. Zhang, D.; Wang, X. Autonomous Landing Control of Fixed-wing UAVs: From Theory to Field Experiment. J. Intell. Robot. Syst. 2017, 88, 619–634. [Google Scholar] [CrossRef]
  45. Zhao, S.; Wang, X.; Zhang, D.; Shen, L. Curved path following control for fixed-wing unmanned aerial vehicles with control constraint. J. Intell. Robot. Syst. 2017, 89, 107–119. [Google Scholar] [CrossRef]
  46. Wang, X.; Kong, W.; Zhang, D.; Shen, L. Active disturbance rejection controller for small fixed-wing UAVs with model uncertainty. In Proceedings of the 2015 IEEE International Conference on Information and Automation, Lijiang, China, 8–10 August 2015; pp. 2299–2304. [Google Scholar]
Figure 1. A spring mass system with a unit mass.
Figure 1. A spring mass system with a unit mass.
Applsci 11 04618 g001
Figure 2. Diagram of the virtual spring force and the virtual drag force for straight-line following.
Figure 2. Diagram of the virtual spring force and the virtual drag force for straight-line following.
Applsci 11 04618 g002
Figure 3. Diagram of the virtual centripetal force for curve tracking.
Figure 3. Diagram of the virtual centripetal force for curve tracking.
Applsci 11 04618 g003
Figure 4. Local obstacle detected in the reference path.
Figure 4. Local obstacle detected in the reference path.
Applsci 11 04618 g004
Figure 5. Simulation results of the UAV path following using the VFGL: (a) results with different c v ; (b) results with different k v and c v .
Figure 5. Simulation results of the UAV path following using the VFGL: (a) results with different c v ; (b) results with different k v and c v .
Applsci 11 04618 g005
Figure 6. Simulation results of the UAV path following using different methods: (a) comparison of the UAV trajectories using different methods; (b) comparison of the cross track error using different methods.
Figure 6. Simulation results of the UAV path following using different methods: (a) comparison of the UAV trajectories using different methods; (b) comparison of the cross track error using different methods.
Applsci 11 04618 g006
Figure 7. Simulation results of the UAV path following and obstacle avoidance using different methods.
Figure 7. Simulation results of the UAV path following and obstacle avoidance using different methods.
Applsci 11 04618 g007
Figure 8. Diagram of the developed HIL testbed.
Figure 8. Diagram of the developed HIL testbed.
Applsci 11 04618 g008
Figure 9. The developed HIL testbed.
Figure 9. The developed HIL testbed.
Applsci 11 04618 g009
Figure 10. The PT-60 plane and the main parameters in the X-plane flight simulator.
Figure 10. The PT-60 plane and the main parameters in the X-plane flight simulator.
Applsci 11 04618 g010
Figure 11. The cross-track error in the HIL simulation of straight-line following.
Figure 11. The cross-track error in the HIL simulation of straight-line following.
Applsci 11 04618 g011
Figure 12. UAV trajectory in the HIL simulation of curve following.
Figure 12. UAV trajectory in the HIL simulation of curve following.
Applsci 11 04618 g012
Figure 13. The cross-track error in the HIL simulation of curve following.
Figure 13. The cross-track error in the HIL simulation of curve following.
Applsci 11 04618 g013
Figure 14. The HIL simulation result of path following with obstacle avoidance: (a) the screenshot of the X-Plane; (b) the trajectory of the UAV.
Figure 14. The HIL simulation result of path following with obstacle avoidance: (a) the screenshot of the X-Plane; (b) the trajectory of the UAV.
Applsci 11 04618 g014
Table 1. Parameters for straight-line following.
Table 1. Parameters for straight-line following.
LabelParameters
1 k v = 0.1 , c v = k v
2 k v = 0.1 , c v = 2 k v
3 k v = 1 , c v = 2 k v
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Wang, X.; Cai, L.; Kong, L.; Wang, B.; Huang, S.; Lin, C. Path Following and Obstacle Avoidance for Unmanned Aerial Vehicles Using a Virtual-Force-Based Guidance Law. Appl. Sci. 2021, 11, 4618. https://doi.org/10.3390/app11104618

AMA Style

Wang X, Cai L, Kong L, Wang B, Huang S, Lin C. Path Following and Obstacle Avoidance for Unmanned Aerial Vehicles Using a Virtual-Force-Based Guidance Law. Applied Sciences. 2021; 11(10):4618. https://doi.org/10.3390/app11104618

Chicago/Turabian Style

Wang, Xun, Libing Cai, Longxing Kong, Binfeng Wang, Shaohua Huang, and Chengdi Lin. 2021. "Path Following and Obstacle Avoidance for Unmanned Aerial Vehicles Using a Virtual-Force-Based Guidance Law" Applied Sciences 11, no. 10: 4618. https://doi.org/10.3390/app11104618

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop