Next Article in Journal
Examining the Optimization of Spray Cleaning Performance for LiDAR Sensor
Next Article in Special Issue
Visual-Inertial Method for Localizing Aerial Vehicles in GNSS-Denied Environments
Previous Article in Journal
Magnetic Levitation: An Academic Prototype
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Online Trajectory Replanning for Avoiding Moving Obstacles Using Fusion Prediction and Gradient-Based Optimization

by
Qianyi Fu
1,2,
Wenjie Zhao
1,2,*,
Shiyu Fang
1,2,
Yiwen Zhu
1,
Jun Li
1,2 and
Qili Chen
3
1
School of Aeronautics and Astronautics, Zhejiang University, Hangzhou 310014, China
2
Center for Unmanned Aerial Vehicles, Huanjiang Laboratory, Zhuji 311800, China
3
School of Automation, Beijing Information Science & Technology University, Beijing 100192, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2024, 14(18), 8339; https://doi.org/10.3390/app14188339
Submission received: 12 August 2024 / Revised: 9 September 2024 / Accepted: 13 September 2024 / Published: 16 September 2024

Abstract

:
In this study, we introduce a novel method for an online trajectory replanning approach for fixed-wing Unmanned Aerial Vehicles (UAVs). Our method integrates moving obstacle predictions within a gradient-based optimization framework. The trajectory is represented by uniformly discretized waypoints, which serve as the optimization variables within the cost function. This cost function incorporates multiple objectives, including obstacle avoidance, kinematic and dynamic feasibility, similarity to the reference trajectory, and trajectory smoothness. To enhance prediction accuracy, we combine physics-based and pattern-based methods for predicting obstacle movements. These predicted movements are then integrated into the online trajectory replanning framework, significantly enhancing the system’s safety. Our approach provides a robust solution for navigating dynamic environments, ensuring both optimal and secure UAV operation.

1. Introduction

Unmanned Aerial Vehicles (UAVs) are extensively applied across various fields, including monitoring missions [1,2], surveillance [3,4,5], and transportation [6,7,8], demonstrating significant value and potential. UAVs typically follow a global reference trajectory to complete their missions. Nevertheless, to guarantee secure and autonomous navigation in unstructured environments, trajectory replanning becomes a critical area of research. This is essential to adapt to dynamic and unpredictable conditions, enabling UAVs to avoid obstacles and respond effectively to changes in their surroundings.
The challenge of trajectory replanning has been a central focus in extensive research efforts. In [9], a structured search space based on state lattice motion primitives was developed for quadrotor micro-UAVs to navigate cluttered and partially known environments. Similarly, ref. [10] introduced two families of motion primitives for fixed-wing UAVs, facilitating online path planning through forests while ensuring the capability for emergency turnaround maneuvers. Furthermore, ref. [11] utilized a motion primitive library to select collision-free maneuvers, enabling high-speed navigation through forests using only onboard vision and planning. Despite their utility, these motion primitive-based methods require discretization of both the workspace and the state space, with their performance being highly dependent on the number of generated motion primitives.
Another strategy involves generating numerous path candidates cost-effectively and selecting the optimal one based on an objective function. In [12], a sampling-based partial motion planning method along a reference path was introduced. Moreover, ref. [13] introduced a method that iteratively generates trajectory samples targeting low-cost areas within the sampling space. However, their reliance on randomly sampled trajectories to identify collision-free paths may be problematic in densely cluttered environments.
Drawing inspiration from CHOMP [14,15], gradient-based optimization has become a widely used approach for replanning. In [16], a local replanning system was constructed by optimizing polynomial trajectories. Similarly, ref. [17] integrated a sampling-based topological path searching approach with path-guided B-splines trajectory optimization for real-time UAV replanning. Optimization-based trajectory replanning has achieved significant success, leading to numerous subsequent methods built upon this foundation (e.g., [18,19,20]). However, these approaches typically involve many parameters (e.g., control points for B-splines and polynomial coefficients) that require careful tuning. More importantly, these methods do not anticipate the motion of surrounding moving obstacles, which is a critical prerequisite for safe and efficient motion planning [21].
In this work, we present an online trajectory replanning approach specifically designed for fixed-wing UAVs, which incorporates predictions for moving obstacles into a gradient-based optimization framework. Our method represents the trajectory using uniformly discretized waypoints, serving as the basis for defining the optimization cost function. This function incorporates multiple objectives, including obstacle avoidance, kinematic and dynamic constraints, similarity to the reference trajectory, and trajectory smoothness. Additionally, moving obstacles are predicted by combining physics-based methods with pattern-based methods, allowing for the predicted obstacle movements to be integrated into the local trajectory replanning framework. This integration enhances the safety of the system.

2. Method

In this work, we consider for the fixed-wing UAV with low-level control the following nonholonomic model in 2D
x ˙ = v cos φ y ˙ = v sin φ , v m i n v v m a x φ ˙ = ω , | ω | ω m a x
where ( x , y ) R 2 represents the UAV’s position, and φ ( π , π ] denotes its heading angle. v represents the forward velocity, and ω is the turn rate. The constraints v m i n and v m a x define the minimum and maximum airspeeds, respectively, while ω m a x limits the turn rate.
Low-level control systems like the Piccolo autopilot [22] and the MicroPilot autopilot [23] are capable of decoupling the longitudinal and lateral dynamics of small fixed-wing UAVs. This allows us to focus solely on lateral trajectory planning, ensuring compliance with dynamic constraints. The altitude dynamics are omitted, as our primary interest lies in the lateral plane.
Before delving into the topic of trajectory replanning, it is essential to discuss the generation of a global reference trajectory. In known and structured environments, various methods can be employed to create a global reference trajectory from the starting point to the destination. For instance, one could utilize a topologically feasible straight-line path generated by A * [24,25] or R R T [26,27] and then refine it into a dynamically feasible trajectory through trajectory optimization [28]. Alternatively, a global trajectory can be predefined by experts. These predefined trajectories are generally well constructed but are not equipped to handle unexpected situations, particularly the presence of dynamic obstacles.
Given a known global trajectory, we can utilize established trajectory tracking algorithms [29,30] during real-time operations. However, during a fixed-wing UAV mission, moving obstacles may be encountered, such as other non-cooperative aircraft or mobile targets. These obstacles, though not intentionally interfering with our flight path, are unpredictable and their motion trajectories may not be known or easily obtainable in real time. Therefore, our algorithm aims to monitor and predict the motion trajectories of these dynamic obstacles in real time.
By predicting the movement of these obstacles, we can assess the safety of the global reference trajectory. If a segment of the local trajectory is predicted to collide with a moving target, we can select two points from the global reference trajectory as the start and end points for local trajectory replanning. Subsequently, we perform online trajectory replanning to avoid potential collisions.
In this work, we represent the waypoints of a trajectory using ξ = [ x , y , φ ] T . Suppose the fixed starting and ending waypoints of the replanned trajectory are ξ 0 and ξ f , respectively. We employ a uniform discretization method, sampling the replanned trajectory function between ξ 0 and ξ f at equal time steps of length δ t . Consequently, our waypoint trajectory representation can be denoted as T R 3 n :
T = ξ 1 ξ 2 ξ n
where each ξ i represents a waypoint in the trajectory.
Given this trajectory representation, our objective is to find a local replanned trajectory T that can avoid moving obstacles based on the proposed motion prediction algorithm. This replanned trajectory should closely follow the global reference trajectory while maintaining smoothness and dynamic feasibility. In other words, it must satisfy the airspeed and turn rate constraints of the fixed-wing UAV.

2.1. Obstacle Prediction Using Fusion Prediction

To predict obstacle motion, we first present physics-based techniques using the constant velocity model (CVM), followed by pattern-based methods with kernelized movement primitive (KMP). Finally, we describe how these two approaches are combined to improve prediction accuracy.

2.1.1. Physics-Based Prediction: CVM

In this work, we employ the constant velocity model (CVM) as our physics-based approach due to its strong performance and simplicity [31].
The CVM assumes that an obstacle maintains a constant velocity over a short prediction horizon, simplifying the prediction process while providing reasonably accurate forecasts for the near future. Suppose at time step i, we detect a moving target with position coordinates ( x i o , y i o ) , airspeed v i o , and heading angle φ i o . Using these variables, the state of the moving obstacle can be denoted as ξ i o = [ x i o , y i o , φ i o ] T . The state of the moving obstacle at the next time step i + 1 can be expressed as follows:
ξ i + 1 o = ξ i o + v i o cos φ i o sin φ i o 0 Δ t + w i , w i N ( 0 , Q i )
where w i are stochastic processes representing the uncertainty in the model, characterized as Gaussian, zero-mean, white noise, and independent random variables.

2.1.2. Pattern-Based Prediction: KMP

Despite the simplicity and effectiveness of the CVM, pattern-based prediction holds a distinct advantage in its ability to learn from data. Unlike physics-based approaches that rely on predefined, parameterized functions to model motion dynamics, pattern-based methods adhere to a Sense–Learn–Predict framework. This framework enables the model to derive motion dynamics directly from data, thereby potentially enhancing prediction accuracy in complex environments.
In our research, we utilize kernelized movement primitive (KMP) [32,33,34] as our pattern-based model.
Consider K historical trajectories of length J, denoted as { { ξ j , k o , ξ j + 1 , k o } j = 1 J } k = 1 K . Initially, we employ the Gaussian Mixture Model (GMM) [35] and Gaussian Mixture Regression (GMR) [36] to obtain a probabilistic reference trajectory { ξ n o , μ ^ n , Σ ^ n } n = 1 N (for further details, please refer to [32]). Next, KMPs are utilized to capture and generalize the probabilistic reference trajectory. Specifically, the prediction function is expressed as follows:
f p r e d ( ξ n o ) = Θ ( ξ n o ) T w
where Θ ( ξ n o ) is a known matrix composed of basis functions, and w is the weight vector that follows the distribution
w N ( μ w , Σ w )
where the mean μ w and the covariance Σ w are unknown. The optimal solutions for μ w * and Σ w * can be derived using the dual transformation of the kernel ridge regression (KRR) [37], as detailed in [32,37,38]:
μ w * = Φ ( Φ T Φ + λ μ Σ ) 1 μ Σ w * = N ( Φ Σ 1 Φ T + λ Σ I ) 1
where
Φ = [ Θ ( ξ 1 o ) Θ ( ξ 2 o ) Θ ( ξ N o ) ] Σ = b l o c k d i a g ( Σ ^ 1 , Σ ^ 2 , , Σ ^ N ) , μ = [ μ ^ 1 T μ ^ 2 T μ ^ N T ] T .
and λ μ , λ Σ > 0 are regularization parameters to prevent overfitting [39].
The kernel function k ( ξ i o , ξ j o ) allows us to avoid explicitly defining the basis function. Consequently, the kernel matrix can be computed as
k ( ξ i o , ξ j o ) = Θ ( ξ i o ) T Θ ( ξ J o ) = k ( ξ i o , ξ j o ) I
Therefore, for a query ξ * o , the expected value of the prediction f p r e d ( ξ * o ) is given by
E ( f p r e d ( ξ * o ) ) = k * ( K + λ μ Σ ) 1 μ
with
K = k ( ξ 1 o , ξ 1 o ) k ( ξ 1 o , ξ 2 o ) k ( ξ 1 o , ξ N o ) k ( ξ 2 o , ξ 1 o ) k ( ξ 2 o , ξ 2 o ) k ( ξ 2 o , ξ N o ) k ( ξ N o , ξ 1 o ) k ( ξ N o , ξ 2 o ) k ( ξ N o , ξ N o )
and
k * = k ( ξ * o , ξ 1 o ) k ( ξ * o , ξ 2 o ) k ( ξ * o , ξ N o )
The covariance of f p r e d ( ξ * o ) is
D ( f p r e d ( ξ * o ) ) = N λ Σ ( k * * k * ( K + λ Σ Σ ) 1 k * T )
with
k * * = k ( ξ * o , ξ * o )
By leveraging KMP, we can intelligently predict the future positions of moving obstacles. This non-parametric approach is suitable for online learning in complex environments.

2.1.3. Integration of Prediction Methods

We consider integrating the physics-based prediction CVM and pattern-based prediction KMP to provide a comprehensive obstacle prediction system.
Suppose at the i-th time step, the mean and covariance of the moving target are ξ ^ i o and P ^ i o , respectively. The challenge is to compute the mean and covariance at the next time step i + 1 using both the CVM and KMP.
The physics-based prediction CVM updates the mean and covariance as follows:
ξ ^ i o , CVM = ξ ^ i o + u n P ^ i o , CVM = P ^ i o + Q i
where u n and Q i are obtained according to (3).
The pattern-based prediction KMP updates the mean and covariance as follows:
ξ ^ i o , KMP = E ( f p r e d ( ξ ^ i o ) ) P ^ i o , KMP = D ( f p r e d ( ξ ^ i o ) )
To integrate the predictions from both methods, we use a weighted fusion approach. Let W i be the weighting factor for the CVM and I W i be the weighting factor for the KMP. The fused mean ξ ^ i + 1 o and covariance P ^ i + 1 o at time step i + 1 are computed as follows:
ξ ^ i + 1 o = W i ξ ^ i o , CVM + ( I W i ) ξ ^ i o , KMP P ^ i + 1 o = W i P ^ i o , CVM W i T + ( I W i ) P ^ i o , KMP ( I W i ) T
We seek W i that minimizes P ^ i + 1 o by setting P ^ i + 1 o W i to 0 , i.e.,
P ^ i + 1 o W i = P ^ i o , CVM W i + P ^ i o , KMP ( I W i ) = 0
Solving this equation, we derive the optimal W i * as
W i * = P ^ i o , KMP ( P ^ i o , CVM + P ^ i o , KMP ) 1
Using W i * , we can compute the optimal fused mean ξ ^ i + 1 and covariance P ^ i + 1 o :
ξ ^ i + 1 o = W i * ξ ^ i o , CVM + ( I W i * ) ξ ^ i o , KMP P ^ i + 1 o = W i * P ^ i o , CVM W i T + ( I W i * ) P ^ i o , KMP ( I W i * ) T
This integration approach leverages the strengths of both the CVM and KMP to provide a robust prediction system for moving obstacles. It should be noted that to predict a sequence of state transitions, successive one-step predictions are performed to construct an extended long-term trajectory.

2.2. Trajectory Replanning Using Gradient-Based Optimization

Local trajectory replanning can be modeled as an unconstrained optimization problem. The cost function consists of five terms and is computed as follows:
J ( T ) = λ c J c ( T ) + λ d J c ( T ) + λ k J k ( T ) + λ r J r ( T ) + λ s J s ( T )
where J c is a collision cost based on the prediction of moving obstacles; J d is the dynamic feasibility cost, which penalizes an infeasible airspeed and turn rate; J k is the kinematic constraint cost, which penalizes deviations from the nonholonomic motion constraints of the UAV; J r penalizes the distance between the global reference trajectory and the replanned trajectory; and J s represents the trajectory smoothness cost. Each term is weighted by a corresponding coefficient to balance their contributions to the overall cost function.

2.2.1. Collision Cost Function

The collision cost function aims to guide the trajectory away from moving obstacles based on their predicted motion.
At the i-th time step, the state of a moving obstacle is predicted as ξ ^ i o , and the replanned waypoint is denoted as ξ i . The distance between the replanned trajectory and the moving obstacle d i can be computed:
d i = ( ξ i ξ ^ i o Δ φ ) T ( ξ i ξ ^ i o Δ φ )
where Δ φ is used to ensure that the difference in the third component φ is zero, focusing our calculation on the distance between the 2D positions.
Our goal is to maintain a distance between the UAV and obstacles that exceeds d s a f e . Thus, the collision cost function can be designed as follows:
J c = i = 1 n exp ( α c ( d i d s a f e ) )
where α c is a positive scaling factor that determines the sensitivity of the cost to the distance. The exponential function is used to penalize distances that are close to or less than the safe threshold d s a f e , with the cost rapidly increasing as the distance decreases. This formulation ensures that trajectories maintaining a safe distance from obstacles are favored, effectively minimizing the risk of collision.

2.2.2. Dynamic Feasibility Cost Function

The dynamic feasibility cost function ensures the trajectory adheres to physical constraints, such as a feasible airspeed and turn rate.
Let S v = I 2 0 2 × 1 and S φ = 0 0 1 be the selection matrices for the airspeed and turn rate, respectively. Then, we can design the dynamic feasibility cost function for the airspeed as
J d , v = i = 0 n exp ( α v ( S v ξ i + 1 ξ i Δ t v m a x ) ) + exp ( α v ( S v ξ i + 1 ξ i Δ t v m i n ) )
Similarly, we can design the dynamic feasibility cost function for the turn rate as follows:
J d , ω = i = 0 n exp ( α ω ( S φ ξ i + 1 ξ i Δ t 2 ω m a x 2 ) )
where α v , α ω are positive scaling factors. Thus, the dynamic feasibility cost function is represented as follows:
J d = λ v J d , v + λ ω J d , ω
where λ v , λ ω are the weighting coefficients.

2.2.3. Kinematic Constraint Cost Function

The kinematic constraint cost function ensures that the replanned trajectory adheres to the nonholonomic motion constraints specific to fixed-wing UAVs.
It is crucial to recognize that the movement of fixed-wing UAVs is intrinsically coupled in the xy-coordinate plane. Consequently, when planning the trajectory, it is crucial to verify that each waypoint satisfies the kinematic requirements of the UAV. Specifically, the subsequent waypoint should align with the UAV’s current heading direction. Failure to do so could result in a trajectory that is incompatible with the UAV’s motion capabilities. This consideration is a key innovation in addressing the unique challenges posed by fixed-wing UAVs.
Therefore, we design the kinematic constraint cost function as follows:
J k = i = 0 n c i 2
with
c i = tan ( ξ i [ 3 ] ) ξ i + 1 [ 2 ] ξ i [ 2 ] ξ i + 1 [ 1 ] ξ i [ 1 ] i f ξ i + 1 [ 1 ] ξ i [ 1 ] , tan ( ξ i [ 3 ] ) sign ( ξ i + 1 [ 2 ] ξ i [ 2 ] ) π 2 i f ξ i + 1 [ 1 ] = ξ i [ 1 ] .
Here, ξ i [ 1 ] , ξ i [ 2 ] , ξ i [ 3 ] represent the first, second, and third elements of ξ i , respectively. The term c i quantifies the deviation between the UAV’s heading direction and the direction of the trajectory segment connecting waypoints ξ i and ξ i + 1 . Minimizing this cost function ensures that the trajectory maintains compatibility with the UAV’s kinematic constraints, thereby enhancing overall navigation performance.
By carefully designing and minimizing this kinematic constraint cost function, we address the core challenge of maintaining a feasible and efficient trajectory for fixed-wing UAVs in complex environments.

2.2.4. Reference Trajectory Cost Function

The reference trajectory cost function is designed to align the replanned trajectory with the pre-optimized reference trajectory. This cost term is defined as follows:
J r = 1 2 i = 1 n ξ i ξ i r e f M r 2
where ξ i r e f is the expected waypoint along the reference trajectory, and M r is a weight metric that penalizes deviations from the reference trajectory.

2.2.5. Smoothness Cost Function

Using the aforementioned waypoint parameterization, the smoothness cost function can be expressed as a series of finite differences:
J s = 1 2 i = 0 n ξ i + 1 ξ i Δ t M s 2
where ξ n + 1 = ξ f represents the ending waypoint and ξ i + 1 ξ i Δ t M s 2 = ( ξ i + 1 ξ i Δ t ) T M s ( ξ i + 1 ξ i Δ t ) is the squared norm of the differences between two adjacent waypoints, weighted by the metric tensor M s .

3. Simulation Results

This section presents the simulation results of our approach in a typical mission scenario involving a fixed-wing UAV. We assess the algorithm’s ability to predict and avoid collisions with moving obstacles.
In this scenario, the UAV operates with a minimum speed of v m i n = 15 m / s and a maximum speed of v m a x = 25 m / s , with a maximum turn rate of ω m a x = 1 rad / s . The moving obstacles, assumed to be other UAVs not actively pursuing the vehicle, must maintain a safe distance of d s a f e = 10 m to avoid collisions.
First, we conducted a series of four cases to evaluate the effectiveness of our trajectory prediction method. In these cases, a moving obstacle is simulated, starting from the position ( 0   m , 0   m ) with an initial airspeed of 20 m / s . The obstacle’s initial heading angle and turn rate vary across the four cases. To replicate real-world conditions, random noise is introduced to both the obstacle’s velocity and turn rate throughout its trajectory.
Initially, we employ the KMP to learn the motion pattern, utilizing a Gaussian kernel with hyperparameters λ ξ = 0.1 and λ Σ = 0.1 . Subsequently, we integrate the KMP with the CVM, where the covariance matrix is defined as Q i = 0.01 I 3 . Using this combined approach, we predict a sequence of state transitions.
The results, presented in Figure 1, compare the trajectory predictions with a 5 s prediction horizon. Our method demonstrates superior accuracy, with predictions closely aligning with the actual trajectory, thereby outperforming both the KMP and CVM individually.
To provide more intuitive comparisons, we use the root mean square error (RMSE) as the metric. The RMSE is computed by the following equation:
R M S E = 1 N o i = 1 N o ξ i o ξ ^ i o 2
where N o is the length of the predicted trajectory, and ξ i o and ξ ^ i o are the i-th true and predicted trajectory waypoints, respectively. The comparison results across the four cases are shown in Figure 2, demonstrating that the proposed method significantly outperforms both the KMP and CVM.
Next, we evaluate the effectiveness of our gradient-based trajectory replanning optimization. In the simulation, the moving obstacle starts from the state [ 0 , 0 , 0 ] T with a velocity of 20 m / s and a turn rate of 0.2 rad / s . As in previous cases, random noise is introduced to both the obstacle’s velocity and turn rate throughout its motion. The reference trajectory begins from the state [ 140 , 45 , 2.24 ] T , with a velocity of 20 m / s and a turn rate of 0.1 rad / s . In this scenario, a collision with the moving obstacle is imminent if the UAV does not replan its trajectory. We set the parameters λ s = λ c = λ d = λ k = 1 , λ r = 0.01 , α c = α v = α ω = 0.1 , and M s = M r = I 3 . Using our fusion prediction method, we predict the moving obstacle’s future position over the next 5 s and optimize our local trajectory based on these predictions.
Trajectory replanning optimization is performed at the 5 s mark. The current waypoint serves as the starting point of the replanned trajectory, while the waypoint 5 s ahead serves as the end point. The results, illustrated in Figure 3, show that our approach yields the most accurate results. The red path represents the reference trajectory, and the orange path represents the replanned trajectory, which successfully avoids the moving obstacle based on the current predictions. Additionally, we present the distance between the moving obstacle and the UAV in Figure 4, along with the UAV’s speed and turn rate in Figure 5 and Figure 6, respectively. As shown in these figures, our replanned trajectory consistently maintains a safe distance from the moving obstacle, while the airspeed and turn rate remain within the UAV’s physical limits.
To further validate the safety and dynamic feasibility of our algorithm, and to understand the contribution of its different components, we performed an ablation study by individually removing the collision term and dynamic term from the optimization process. The results of this study are also shown in Figure 3, Figure 4, Figure 5 and Figure 6. It is evident that, without the collision term, the distance between the UAV and the obstacle falls below the safe threshold. In contrast, without the dynamic term, the trajectory maintains a safe distance but fails to keep the speed and turn rate within the UAV’s physical limits, leading to a dynamically infeasible trajectory. This ablation study highlights the importance of each component of our algorithm, demonstrating its overall efficiency and effectiveness.
Furthermore, we evaluated whether the proposed algorithm can ensure UAV safety in the presence of multiple moving obstacles. During the process of avoiding the first obstacle, a second obstacle was detected. This prompted a second round of online trajectory optimization, where the avoidance of both moving obstacles was considered. The optimized trajectory is shown in Figure 7, where the black trajectory represents the result after the second replanning. As seen, the UAV successfully avoided both the first and second obstacles. The distance between the two moving obstacles and the UAV is illustrated in Figure 8, further demonstrating the effectiveness and safety of our algorithm.

4. Discussion

In the previous sections, we introduced the integration of the CVM and KMP to provide a comprehensive obstacle prediction system. The fusion prediction results are then used as a reference for trajectory replanning, where we design an appropriate cost function for online trajectory optimization to avoid moving obstacles.
We believe that motion prediction plays a critical role in motion planning. Therefore, we explored the integration of prediction and planning to ensure both the safety and intelligence of the system. In [31], the CVM is evaluated as a simple yet effective baseline method, while in [32], the KMP is introduced as a powerful imitation learning approach. Based on these insights, we combined the strengths of both methods to offer a fusion prediction approach. However, it is important to recognize that motion prediction is a complex task, and accurate prediction under all conditions remains challenging. Improving prediction accuracy requires incorporating more environmental clues, which is a direction we intend to explore further.
Regarding gradient-based trajectory optimization, this method has demonstrated high effectiveness [17,18,19]. In this study, we focus specifically on online trajectory replanning for fixed-wing UAVs. We designed a cost function that integrates the motion prediction results into a collision cost function. After experimenting with various forms of cost functions, we selected the current exponential function due to its smoothness characteristics. Additionally, we developed a dynamic feasibility cost function and a kinematic constraint cost function tailored to fixed-wing UAVs. To our knowledge, the kinematic constraint cost function we proposed has not been addressed in the previous literature, though the reference trajectory cost function and smoothness cost function are widely used.
The UAV parameters presented in this paper include minimum and maximum speeds of 15 m/s and 25 m/s, respectively, and a maximum turn rate of 1 rad/s. These parameters correspond to a small fixed-wing UAV with a wing area of 0.5 m2 and a mass of 2 kg, powered by an electric motor with approximately 500 W, which provides no less than 6 N of thrust. This configuration is designed for light payloads and short-range missions, ensuring stable flight performance as well as reliable takeoff and landing capabilities.
In terms of safety distance, we believe that 10 m is a reasonable setting, especially in open areas or when supported by adequate perception and control systems. The safety distance is intended to maintain a minimum buffer between the UAV and other objects (such as the ground, obstacles, or other aircraft) to avoid collisions, turbulence, or other potential risks. For a fixed-wing UAV flying at the specified speeds, both its flight path and reaction time require some buffer space. And the 10-meter safety distance serves as a buffer against sudden obstacle appearances and aids in trajectory planning, rather than being relied upon solely for a full stop.

5. Conclusions

We have proposed an efficient online trajectory replanning algorithm for fixed-wing UAVs that integrates predictions of moving obstacles into a gradient-based trajectory optimization framework. Our simulations demonstrate that this method performs well in dynamic environments, effectively helping UAVs avoid moving obstacles.
Our motion prediction method demonstrated promising results in the experiments; however, it should be noted that its performance is not consistently good across all scenarios. In future research, we will focus on enhancing the accuracy of long-term trajectory predictions by integrating additional contextual information, such as the interactions between the UAV and other dynamic agents in the environment. This will enable more robust and reliable decision-making in complex scenarios. Moreover, we plan to incorporate Model Predictive Control (MPC) into our optimization framework. This integration aims to address the challenges of effective UAV navigation in highly dynamic environments, where rapid adaptation to changing conditions is critical for maintaining safety and efficiency.

Author Contributions

Conceptualization, Q.F., Q.C. and W.Z.; validation, Q.F., Y.Z. and S.F.; writing, Q.F., Q.C., W.Z. and J.L.; supervision, W.Z. and J.L. All authors have read and agreed to the published version of the manuscript.

Funding

The research was funded by the National Natural Science Foundation of China under Grant 61703366 and Grant 62103056, the Fundamental Research Funds for the Central Universities under grant agreement No. 2021QNA4030, the Shanghai Aerospace Science and Technology Innovation Fund (grant SAST2019-10), and the Qin Xin Talents Cultivation Program through Beijing Information Science & Technology University.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data available on request from the authors.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Ren, H.; Zhao, Y.; Xiao, W.; Hu, Z. A review of UAV monitoring in mining areas: Current status and future perspectives. Int. J. Coal Sci. Technol. 2019, 6, 320–333. [Google Scholar] [CrossRef]
  2. Kouadio, L.; El Jarroudi, M.; Belabess, Z.; Laasli, S.E.; Roni, M.Z.K.; Amine, I.D.I.; Mokhtari, N.; Mokrini, F.; Junk, J.; Lahlali, R. A review on UAV-based applications for plant disease detection and monitoring. Remote Sens. 2023, 15, 4273. [Google Scholar] [CrossRef]
  3. Fang, Z.; Savkin, A.V. Strategies for Optimized UAV Surveillance in Various Tasks and Scenarios: A Review. Drones 2024, 8, 193. [Google Scholar] [CrossRef]
  4. Fang, H.; Liao, Z.; Wang, X.; Chang, Y.; Yan, L. Differentiated attention guided network over hierarchical and aggregated features for intelligent uav surveillance. IEEE Trans. Ind. Inform. 2023, 19, 9909–9920. [Google Scholar] [CrossRef]
  5. Scherer, J.; Rinner, B. Multi-UAV surveillance with minimum information idleness and latency constraints. IEEE Robot. Autom. Lett. 2020, 5, 4812–4819. [Google Scholar] [CrossRef]
  6. Gupta, A.; Afrin, T.; Scully, E.; Yodo, N. Advances of UAVs toward future transportation: The state-of-the-art, challenges, and opportunities. Future Transp. 2021, 1, 326–350. [Google Scholar] [CrossRef]
  7. Wu, P.X.; Yang, C.C.; Cheng, T.H. Cooperative transportation of UAVs without inter-UAV communication. IEEE/ASME Trans. Mechatron. 2023, 28, 2340–2351. [Google Scholar] [CrossRef]
  8. Wang, Z.; Hu, T.; Long, L. Multi-UAV safe collaborative transportation based on adaptive control barrier function. IEEE Trans. Syst. Man, Cybern. Syst. 2023, 53, 6975–6983. [Google Scholar] [CrossRef]
  9. Pivtoraiko, M.; Mellinger, D.; Kumar, V. Incremental micro-UAV motion replanning for exploring unknown environments. In Proceedings of the 2013 IEEE International Conference on Robotics and Automation, Karlsruhe, Germany, 6–10 May 2013; pp. 2452–2458. [Google Scholar]
  10. Paranjape, A.A.; Meier, K.C.; Shi, X.; Chung, S.J.; Hutchinson, S. Motion primitives and 3D path planning for fast flight through a forest. Int. J. Robot. Res. 2015, 34, 357–377. [Google Scholar] [CrossRef]
  11. Barry, A.J.; Florence, P.R.; Tedrake, R. High-speed autonomous obstacle avoidance with pushbroom stereo. J. Field Robot. 2018, 35, 52–68. [Google Scholar] [CrossRef]
  12. Schwesinger, U.; Rufli, M.; Furgale, P.; Siegwart, R. A sampling-based partial motion planning framework for system-compliant navigation along a reference path. In Proceedings of the 2013 IEEE Intelligent Vehicles Symposium (IV), Gold Coast, Australia, 23–26 June 2013; pp. 391–396. [Google Scholar]
  13. Sun, S.; Chen, J.; Sun, J.; Yuan, C.; Li, Y.; Zhang, T.; Ang, M.H. FISS+: Efficient and focused trajectory generation and refinement using fast iterative search and sampling strategy. In Proceedings of the 2023 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Detroit, MI, USA, 1–5 October 2023; pp. 10527–10534. [Google Scholar]
  14. Ratliff, N.; Zucker, M.; Bagnell, J.A.; Srinivasa, S. CHOMP: Gradient optimization techniques for efficient motion planning. In Proceedings of the 2009 IEEE International Conference on Robotics and Automation, Kobe, Japan, 12–17 May 2009; pp. 489–494. [Google Scholar]
  15. Zucker, M.; Ratliff, N.; Dragan, A.D.; Pivtoraiko, M.; Klingensmith, M.; Dellin, C.M.; Bagnell, J.A.; Srinivasa, S.S. Chomp: Covariant hamiltonian optimization for motion planning. Int. J. Robot. Res. 2013, 32, 1164–1193. [Google Scholar] [CrossRef]
  16. Oleynikova, H.; Burri, M.; Taylor, Z.; Nieto, J.; Siegwart, R.; Galceran, E. Continuous-time trajectory optimization for online uav replanning. In Proceedings of the 2016 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Daejeon, Republic of Korea, 9–14 October 2016; pp. 5332–5339. [Google Scholar]
  17. Zhou, B.; Gao, F.; Wang, L.; Liu, C.; Shen, S. Robust and efficient quadrotor trajectory generation for fast autonomous flight. IEEE Robot. Autom. Lett. 2019, 4, 3529–3536. [Google Scholar] [CrossRef]
  18. Zhou, X.; Wang, Z.; Ye, H.; Xu, C.; Gao, F. Ego-planner: An esdf-free gradient-based local planner for quadrotors. IEEE Robot. Autom. Lett. 2020, 6, 478–485. [Google Scholar] [CrossRef]
  19. Zhou, B.; Pan, J.; Gao, F.; Shen, S. Raptor: Robust and perception-aware trajectory replanning for quadrotor fast flight. IEEE Trans. Robot. 2021, 37, 1992–2009. [Google Scholar] [CrossRef]
  20. Yu, J.; Li, J.; Zhang, T.; Yan, B.; Li, S.; Meng, Z. Speed-First: An Aggressive Gradient-Based Local Planner for Quadrotor Faster Flight. Drones 2023, 7, 192. [Google Scholar] [CrossRef]
  21. Rudenko, A.; Palmieri, L.; Herman, M.; Kitani, K.M.; Gavrila, D.M.; Arras, K.O. Human motion trajectory prediction: A survey. Int. J. Robot. Res. 2020, 39, 895–935. [Google Scholar] [CrossRef]
  22. Kang, Y.; Hedrick, J.K. Linear tracking for a fixed-wing UAV using nonlinear model predictive control. IEEE Trans. Control. Syst. Technol. 2009, 17, 1202–1210. [Google Scholar] [CrossRef]
  23. Chao, H.; Cao, Y.; Chen, Y. Autopilots for small fixed-wing unmanned air vehicles: A survey. In Proceedings of the 2007 International Conference on Mechatronics and Automation, Harbin, China, 5–8 August 2007; pp. 3144–3149. [Google Scholar]
  24. Tang, G.; Tang, C.; Claramunt, C.; Hu, X.; Zhou, P. Geometric A-star algorithm: An improved A-star algorithm for AGV path planning in a port environment. IEEE Access 2021, 9, 59196–59210. [Google Scholar] [CrossRef]
  25. Erke, S.; Bin, D.; Yiming, N.; Qi, Z.; Liang, X.; Dawei, Z. An improved A-Star based path planning algorithm for autonomous land vehicles. Int. J. Adv. Robot. Syst. 2020, 17, 1729881420962263. [Google Scholar] [CrossRef]
  26. Karaman, S.; Walter, M.R.; Perez, A.; Frazzoli, E.; Teller, S. Anytime motion planning using the RRT. In Proceedings of the 2011 IEEE International Conference on Robotics and Automation, Shanghai, China, 9–13 May 2011; pp. 1478–1483. [Google Scholar]
  27. Pepy, R.; Lambert, A. Safe path planning in an uncertain-configuration space using RRT. In Proceedings of the 2006 IEEE/RSJ International Conference on Intelligent Robots and Systems, Beijing, China, 9–15 October 2006; pp. 5376–5381. [Google Scholar]
  28. Visintini, A.; Perera, T.D.P.; Jayakody, D.N.K. 3-D trajectory optimization for fixed-wing UAV-enabled wireless network. IEEE Access 2021, 9, 35045–35056. [Google Scholar] [CrossRef]
  29. Sujit, P.; Saripalli, S.; Sousa, J.B. Unmanned aerial vehicle path following: A survey and analysis of algorithms for fixed-wing unmanned aerial vehicless. IEEE Control. Syst. Mag. 2014, 34, 42–59. [Google Scholar]
  30. Low, C.B. A trajectory tracking control design for fixed-wing unmanned aerial vehicles. In Proceedings of the 2010 IEEE International Conference on Control Applications, Yokohama, Japan, 8–10 September 2010; pp. 2118–2123. [Google Scholar]
  31. Schöller, C.; Aravantinos, V.; Lay, F.; Knoll, A. What the constant velocity model can teach us about pedestrian motion prediction. IEEE Robot. Autom. Lett. 2020, 5, 1696–1703. [Google Scholar] [CrossRef]
  32. Huang, Y.; Rozo, L.; Silvério, J.; Caldwell, D.G. Kernelized movement primitives. Int. J. Robot. Res. 2019, 38, 833–852. [Google Scholar] [CrossRef]
  33. Huang, Y.; Rozo, L.; Silvério, J.; Caldwell, D.G. Non-parametric imitation learning of robot motor skills. In Proceedings of the 2019 International Conference on Robotics and Automation (ICRA), Montreal, QC, Canada, 20–24 May 2019; pp. 5266–5272. [Google Scholar]
  34. Silvério, J.; Huang, Y.; Abu-Dakka, F.J.; Rozo, L.; Caldwell, D.G. Uncertainty-aware imitation learning using kernelized movement primitives. In Proceedings of the 2019 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Macau, China, 3–8 November 2019; pp. 90–97. [Google Scholar]
  35. Calinon, S.; Guenter, F.; Billard, A. On learning, representing, and generalizing a task in a humanoid robot. IEEE Trans. Syst. Man Cybern. Part B 2007, 37, 286–298. [Google Scholar] [CrossRef] [PubMed]
  36. Calinon, S. A tutorial on task-parameterized movement learning and retrieval. Intell. Serv. Robot. 2016, 9, 1–29. [Google Scholar] [CrossRef]
  37. Murphy, K.P. Machine Learning: A Probabilistic Perspective; MIT Press: Cambridge, MA, USA, 2012. [Google Scholar]
  38. Kober, J.; Oztop, E.; Peters, J. Reinforcement Learning to Adjust Robot Movements to New Situations; MIT Press: Cambridge, MA, USA, 2011. [Google Scholar]
  39. Ying, X. An overview of overfitting and its solutions. J. Phys. Conf. Ser. 2019, 1168, 022022. [Google Scholar] [CrossRef]
Figure 1. Trajectory predictions using the CVM (light green), the KMP (yellow), and our method (magenta). The obstacle’s trajectory is shown in blue, with the solid and dashed lines indicating the historical and ground-truth trajectories, respectively.
Figure 1. Trajectory predictions using the CVM (light green), the KMP (yellow), and our method (magenta). The obstacle’s trajectory is shown in blue, with the solid and dashed lines indicating the historical and ground-truth trajectories, respectively.
Applsci 14 08339 g001
Figure 2. The quantitative comparison results between the proposed method, KMP, and CVM for the four cases using the metric RMSE.
Figure 2. The quantitative comparison results between the proposed method, KMP, and CVM for the four cases using the metric RMSE.
Applsci 14 08339 g002
Figure 3. The trajectory replanning results at 5 s. The orange line represents the replanned trajectory using our method, while the purple and green lines show the ablation results using the gradient optimization method without the collision term and dynamic term, respectively. The figure also displays the reference trajectory (red), obstacle trajectory (blue), and predicted obstacle trajectories using the CVM, the KMP, and our fusion prediction method.
Figure 3. The trajectory replanning results at 5 s. The orange line represents the replanned trajectory using our method, while the purple and green lines show the ablation results using the gradient optimization method without the collision term and dynamic term, respectively. The figure also displays the reference trajectory (red), obstacle trajectory (blue), and predicted obstacle trajectories using the CVM, the KMP, and our fusion prediction method.
Applsci 14 08339 g003
Figure 4. The distance between the obstacle and the UAV for the reference trajectory (blue dashed line) and the replanned trajectories using our method and the two other optimization methods (without the collision term and dynamic term) over time.
Figure 4. The distance between the obstacle and the UAV for the reference trajectory (blue dashed line) and the replanned trajectories using our method and the two other optimization methods (without the collision term and dynamic term) over time.
Applsci 14 08339 g004
Figure 5. The speed of the reference trajectory and the replanned trajectories using our method and the two other optimization methods (without the collision term and dynamic term) over time.
Figure 5. The speed of the reference trajectory and the replanned trajectories using our method and the two other optimization methods (without the collision term and dynamic term) over time.
Applsci 14 08339 g005
Figure 6. The turn rate of the reference trajectory and the replanned trajectories using our method and the two other optimization methods (without the collision term and dynamic term) over time.
Figure 6. The turn rate of the reference trajectory and the replanned trajectories using our method and the two other optimization methods (without the collision term and dynamic term) over time.
Applsci 14 08339 g006
Figure 7. The trajectory replanning results at 8 s in the presence of two moving obstacles. The black line represents the optimized trajectory using our method.
Figure 7. The trajectory replanning results at 8 s in the presence of two moving obstacles. The black line represents the optimized trajectory using our method.
Applsci 14 08339 g007
Figure 8. The distance between the two obstacles and the UAV for the reference trajectory and the second replanned trajectory using our method and original replanned trajectory over time.
Figure 8. The distance between the two obstacles and the UAV for the reference trajectory and the second replanned trajectory using our method and original replanned trajectory over time.
Applsci 14 08339 g008
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Fu, Q.; Zhao, W.; Fang, S.; Zhu, Y.; Li, J.; Chen, Q. Online Trajectory Replanning for Avoiding Moving Obstacles Using Fusion Prediction and Gradient-Based Optimization. Appl. Sci. 2024, 14, 8339. https://doi.org/10.3390/app14188339

AMA Style

Fu Q, Zhao W, Fang S, Zhu Y, Li J, Chen Q. Online Trajectory Replanning for Avoiding Moving Obstacles Using Fusion Prediction and Gradient-Based Optimization. Applied Sciences. 2024; 14(18):8339. https://doi.org/10.3390/app14188339

Chicago/Turabian Style

Fu, Qianyi, Wenjie Zhao, Shiyu Fang, Yiwen Zhu, Jun Li, and Qili Chen. 2024. "Online Trajectory Replanning for Avoiding Moving Obstacles Using Fusion Prediction and Gradient-Based Optimization" Applied Sciences 14, no. 18: 8339. https://doi.org/10.3390/app14188339

APA Style

Fu, Q., Zhao, W., Fang, S., Zhu, Y., Li, J., & Chen, Q. (2024). Online Trajectory Replanning for Avoiding Moving Obstacles Using Fusion Prediction and Gradient-Based Optimization. Applied Sciences, 14(18), 8339. https://doi.org/10.3390/app14188339

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