Keywords

1 Introduction

Unmanned Aerial Vehicle (UAV) are widely applied in military fields such as battlefield reconnaissance and long-range strike due to their advantages such as easy concealment, strong maneuverability, as well as unmanned driving, and have become one of the important attack methods for unmanned and intelligent battlefields in the future [1]. In the face of complicated environmental conditions and diversified uncertain factors, advance trajectory planning is particularly important [2]. The problem of fast trajectory planning is an important subject in UAV control. The main algorithms to solve the problem include Artificial Potential Field method [3], Mixed Integer Linear Programming method [4], A* Algorithm [5], Genetic Algorithm [6], Particle Swarm Optimization [7] and Ant Colony Optimization [8], etc. The intelligent optimization algorithm is widely applied in trajectory planning problems such as Chen [9] et al. converted the UAV path optimization problem into a TSP problem and applied the Ant Colony Optimization to solve it; Literature [10] firstly used the Dubins Algorithm to generate the initial feasible path of the UAV, and then used the Genetic Algorithm to improve the path to the optimality; Peng[11] et al. proposed an effective hybrid algorithm combining genetic algorithm and variable neighborhood search together for the permutation flow shop scheduling problem. Due to the limitation of the system structure, the positioning system of the UAV cannot accurately position itself, and the accuracy is affected by the accumulated error of the built-in inertial navigation system, which may lead to mission failure once the positioning errors have accumulated to a certain level. Therefore, correcting the positioning error during the flight is an important task in the path planning of UAV.

Considering the cumulative error correction and the minimum turning radius limitation of the UAV, we establish the 0–1 integer programming model by appropriately simplifying the fast path planning problem of the UAV in three-dimensional space under the system positioning accuracy constraint and combine Variable neighborhood Search with Genetic Algorithm to solve it.

2 Model

2.1 Description and Analysis

It is assumed that the size and mass of the UAV are ignored during the flight, and it is considered as a mass point without considering the constraints such as fuel consumption, while its positioning error (i.e., horizontal and vertical error) does not have a delayed situation and can be updated synchronously in real-time with the accumulation of flight distance. Its path’s constraints are as follows:

  • The UAV needs real-time positioning during space flight, and its positioning error includes vertical error and horizontal error. For one meter of flight, the vertical and horizontal errors will each increase by \(\delta\). The vertical and horizontal errors should be less than \(\theta\) when reaching the endpoint B. And to simplify the problem, it is assumed that the UAV can still fly according to the planned path when both vertical and horizontal errors are less than \(\theta\).

  • The UAV needs to be corrected for positioning errors during the flight. There are safe locations in the flight area (called correction points) that can be used for error correction, and it will be corrected based on the type of error correction when the UAV reaches. If the vertical and horizontal errors can be corrected in time, the UAV can follow a predetermined path, passing through several correction points to correct the errors and finally reach the endpoint.

  • At the start point A, the vertical and horizontal errors of the UAV are both 0.

  • When the UAV at the vertical error correction point, its vertical error will be corrected 0 and the horizontal error will remain unchanged.

  • When the UAV at the horizontal error correction point, its horizontal error will be corrected 0 and the vertical error will remain unchanged.

  • When the UAV's vertical error is no more than \(\alpha_{1}\) and the horizontal error is no more than \(\alpha_{2}\), the vertical error correction can be performed.

  • When the UAV's vertical error is no more than \(\beta_{1}\) and the horizontal error is no more than \(\beta_{2}\), the horizontal error correction can be performed.

  • The UAV is limited by the structure and control system during the turn and cannot make the instant turn (the forward direction of the UAV cannot be changed suddenly), assuming the minimum turn radius of the UAV \(R = 200\, {\rm{m}}\).

Fig. 1.
figure 1

Diagram of the ideal flight path of the UAV

The UAV come from \(i\) to \(j\), the angle between \(i\) point’s initial velocity \(\overrightarrow{\nu }\) and \(\overrightarrow {ij}\) is \(\omega \), at that time the trajectory is the arc \(ip\) plus line segment \(pj\), where \(pj\) is the tangent line of circle \(O\), \(p\) is the tangent point. It is clearly that this trajectory is the optimal flight track for the UAV (see Fig. 1).

From the theorem of the cosine of a triangle, it follows that:

$$ \left| {Oj} \right|^{2} = R^{2} + L_{{ij}} ^{2} - 2RL_{{ij}} \sin \varpi $$
(1)

In addition,

$$ |pj|^{2} = |Oj|^{2} - R^{2} $$
(2)
$$ |ip| = R(\varpi + \varphi ) $$
(3)

Where \(L_{ij}\) denotes the Euclidean distance from point \(i(x_{i},y_{i},z_{i})\) to point \(j(x_{j},y_{j},z_{j})\).

$$ L_{ij} = \sqrt {(x_{i} - x_{j})^{2} + (y_{i} - y_{j})^{2} + (z_{i} - z_{j})^{2} } $$
(4)

Since \(L_{ij} \gg R\), then \(\varphi \to 0\). Thus the distance of the track between any two points \(dis(i,j)\) can be obtained as follows:

$$ \begin{aligned} dis(i,j) & = \left| {ip} \right| + \left| {pj} \right| = R(\varpi + \varphi ) + (\left| {Oj} \right|^{2} - R^{2} )^{1/2} \\ & \, = R\varpi + (R^{2} + L_{ij} ^{2} - 2RL_{ij}\sin \varpi - R^{2})^{1/2} = R\varpi + (L_{ij}^{2} - 2RL_{ij}\sin \varpi )^{1/2} \\ \end{aligned} $$
(5)

Where \(\cos \varpi = \frac{{ < \overrightarrow {ki} ,\overrightarrow {ij} > }}{{|\overrightarrow {ki} ||\overrightarrow {ij} |}}\), then

$$ dis(i,j) = R\arccos \frac{{ < \overrightarrow {ki} ,\overrightarrow {ij} > }}{{|\overrightarrow {ki} ||\overrightarrow {ij} |}} + \left( {L_{ij}^{2} - 2RL_{ij} \sin \arccos \frac{{ < \overrightarrow {ki} ,\overrightarrow {ij} > }}{{|\overrightarrow {ki} ||\overrightarrow {ij} |}}} \right)^{1/2} $$
(6)

2.2 Mathematical Model

We refer the Vehicle Route Problem with Time Window (VRPTW) [12] and establish the following mathematical model by replacing the time window constraint with an error accumulation constraint and removing the constraint that the vehicle must pass through all customer points.

Firstly, a set of points \(N = \{ 1,2,...,n\}\) is created to represent all the correction points except for the start and end of the path; The edge matrix \(X = \{ x_{ij}|i,j \in N\}\), where \(x_{ij}\) is the edge from \(i\) to the \(j\), \(x_{ij} = 1\) indicates the UAV will come from \(i\) to \(j\); The distance matrix \(D = \{ d_{ij}|i,j \in N\}\) where \(d_{ij}\) represents the distance between the correction points \(i,j\); \(\varphi_{i}\), \(\gamma_{i}\) represents the horizontal error and vertical error respectively when the UAV flies to the point \(i\), and \(\sigma_{i}\) denotes the correction type of the correction point \(i\) where \(\sigma_{i} = 0\) indicates that \(i\) is the horizontal correction point (otherwise it is the vertical correction point). It is assumed that a feasible trajectory is represented by \(M_{i} = \left\{ {m_{0} = 0,m_{1} ,m_{2} , \ldots ,m_{s} ,m_{s + 1} = n + 1} \right\}\), where \(0,n + 1\) denote the point A and B respectively in the problem, as well as \(m_{\rm{1}}\sim m_{\rm{s}}\) is a series of the ordered correction points selected from \(N\), then the mathematical model of the problem is as follows:

$$ \min f_{1} = \sum\limits_{i = 0}^{n + 1} {\sum\limits_{j = 0}^{n + 1} {x_{{m_{i} m_{j} }} } } d_{{m_{i} m_{j} }} $$
(7)
$$ x_{ij} = x_{ji} \;,\;\forall i,j \in N $$
(8)
$$ x_{ii} = 0,\;{\kern 1pt} \forall i \in N $$
(9)
$$ x_{ij} \odot x_{jk} = 1,\forall j \in {\text{N}},\exists i,k \in {\text{N }}and \, i \ne k $$
(10)
$$ \sum\limits_{i = 1}^{n} {x_{0i} } = 1,\forall i \in N $$
(11)
$$ \sum\limits_{i = 1}^{n} {x_{i(n + 1)} } = 1,\forall i \in N $$
(12)
$$ \varphi_{{m_{i} }} \le \alpha_{1} ,\sigma_{{m_{i} }} = 1 \, and \, x_{{m_{i} m_{s + 1} }} = 0 $$
(13)
$$ \gamma_{{m_{i} }} \le \alpha_{2} ,{\kern 1pt} \sigma_{{m_{i} }} = 1 \, and \, x_{{m_{i} m_{s + 1} }} = 0 $$
(14)
$$ \varphi_{{m_{i} }} \le \beta_{1} ,\sigma_{{m_{i} }} = 0 \, and \, x_{{m_{i} m_{s + 1} }} = 0 $$
(15)
$$ \gamma_{{m_{i} }} \le \beta_{2} ,\sigma_{{m_{i} }} = 0 \, and \, x_{{m_{i} m_{s + 1} }} = 0 $$
(16)
$$ \varphi_{{m_{s} }} + x_{{m_{s} m_{s + 1} }} d_{{m_{i} m_{s + 1} }} \delta < \theta $$
(17)
$$ \gamma_{{m_{s} }} + x_{{m_{s} m_{s + 1} }} d_{{m_{s} m_{s + 1} }} \delta < \theta $$
(18)
$$ \left| {Oj} \right| \ge R,{\kern 1pt} \forall j \in N $$
(19)
$$ \varphi_{{m_{0} }} = \gamma_{{m_{0} }} = 0 $$
(20)

Equation (7) is the optimization objective of the UAV path planning problem, indicating that the total length of the trajectory path is minimized; Eq. (8) means that the path planning is simplified to an undirected point selection and connection problem, only considering whether two points are connected to each other without the direction of the connection; Eq. (9) means that any correction point cannot be connected with itself to form a loop; Eq. (10) means that for any correction point other than the and the end point, there are only two cases where it is not connected to any point or connects to a different point; Eq. (11), (12) means that the path must contain the start and the end point; Eq. (13), (14) means that if a correction point is a horizontal correction point and not the end in the path, its horizontal and vertical errors must be less than \(\alpha_{1}\) and \(\alpha_{2}\) respectively; Similarly Eq. (15), (16) means that if a correction point is a vertical and not the end in the path, its horizontal and vertical errors must be less than \(\beta_{1}\) and \(\beta_{2}\) respectively; Eq. (17), (18) means that the horizontal and vertical errors of the end point must be less than \(\theta\); Eq. (19) means that the turning radius of the UAV should be greater than or equal to the minimum turning radius \(R\); Eq. (20) means that the initial horizontal and vertical errors of the start point are set 0.

3 Variable Neighborhood Search Genetic Algorithm

In the next, we have improved the Genetic Algorithm by design the specific mutation operator and make the best individual in each generation do variable neighborhood search. It enhances the local search ability of the Genetic Algorithm, avoiding the premature convergence of the Genetic Algorithm which leads to a local optimal solution, the steps as follows.

figure a

3.1 Chromosome Coding

0 and 1 are used to encode the trajectory path, \(x = \{ x_{1},x_{2},...,x_{n}\}\) representing an individual, where \(x_{i} = 1\) means that the correction point \(i\) is selected for position error correction (see Fig. 2). \(x_{1} ,x_{n + 1}\) is constant to 1 means that the UAV must start from the start point A to reach the end point B. The order in which the UAV passes through the correction points is determined by the size of the projection of the correction points on the track onto the spatial vector. The length of the chromosome is determined by the number of all correction points to be selected in space.

Fig. 2.
figure 2

Diagram of chromosome coding

3.2 Generating the Initial Feasible Solution

The quality of the initial feasible solution has a significant impact on the convergence of speed for algorithm. To address the dilemma that the problem’s constraints are too complex to generate difficultly initial feasible solutions, we design a heuristic rule based on space vector projection, which can generate quickly initial feasible solutions with high quality.

From the start point A, the correction points are selected in turn: firstly, the type of the next correction point and the set of candidate correction points are determined, and finally, a specific correction point is selected from the candidate according to the heuristic rule of space vector projection.

$$ \sigma _{{i + 1}} = \left\{ {\begin{array}{*{20}l} {0,\,min(\alpha 1 - \gamma ^{\prime}_{i} ,\beta 1 - \gamma ^{\prime}_{i} ) > min(\alpha 2 - \varphi ^{\prime}_{i} ,\beta 2 - \varphi ^{\prime}_{i} )} \hfill \\ {1,\,otherwise} \hfill \\ \end{array} } \right. $$
(21)
$$ \varphi _{j} = \varphi ^{\prime}_{i} + dis(i,j)\delta $$
(22)
$$ \gamma _{j} = \gamma ^{\prime}_{i} + dis(i,j)\delta $$
(23)

The first step is to determine the next correction point type. Firstly, the remaining horizontal and vertical error margins for the current point are calculated respectively, and the type of the next correction point is determined according to Eq. (21), where \(\sigma_{i + 1} = 1\) indicates that the type of the next is a vertical correction point, \(\varphi_{i} ,\gamma_{i}\) is the horizontal and vertical error of the \(i\) point before correction, \(\varphi_{i} ^{\prime},\gamma_{i} ^{\prime}\) is the horizontal and vertical error after correction. The error update formula is shown in Eq. (22), (23).

Fig. 3.
figure 3

Diagram of infeasible correction points

The second step is to determine the set of candidate correction points \(C_{i}\). According to Eq. (24), a sphere of radius \(r\) is made with the current point as the center of the sphere, then all correction points within the sphere are traversed, and the distance \(Oj\) from the candidate point to the center of the sphere \(O\) is calculated by according to Eq. (1). If \(|Oj| < R\) means that the candidate does not satisfy the minimum turning radius constraint, then it needs to be rejected. The dashed circular area is the candidate point that does not satisfy the minimum turning radius constraint (see Fig. 3), while it is a circular pipe in the three-dimensional space.

$$ r_{i} = \frac{{min(\zeta _{1} - \varphi ^{\prime}_{i} ,\zeta _{2} - \gamma ^{\prime}_{i} )}}{\delta } $$
(24)
$$ K_{{c_{j} }} = \frac{{\overrightarrow {{i_{{curr}} c_{j} }} \times \overrightarrow {{AB}} }}{{\left\| {\overrightarrow {{AB}} } \right\|}} $$
(25)
$$ P\left( {c_{j} } \right) = \frac{{K_{{c_{j} }} }}{{\sum {K_{{c_{j} }} } }} $$
(26)

The third step is to select a specific correction point. In order to identify a point \(c_{j}\) within the candidate point set \(C_{i}\) as the next correction point, we design a heuristic rule based on space vector projection to prioritize the points within the candidate point set. In conjunction with the greedy strategy which the closer to the end the better next point is. The spatial vector from the current point to all candidate \(c_{j}\) and the spatial vector from start point A to end point B are made respectively. By comparing the projections of the vectors on the vectors, if the projection is larger, it indicates that the candidate \(c_{j}\) is more capable of displacement relative to the end point, and the probability of being selected is greater (see Fig. 4). The specific formula is shown in Eq. (25), (26), where \(K_{cj}\) denotes the projection of candidate correction \(c_{j}\) on the vector \(\overrightarrow {AB}\), and \(P(c_{j} )\) denotes the probability of \(c_{j}\) being selected.

Fig. 4.
figure 4

Diagram of space vector projection

The fourth step, assigning the next point to the current point, it is to determine whether current point can directly reach the end point B without violating the end point error constraint Eq. (17), (18), if not, jump to the first step; if yes, current point is the last correction point of the path and then completes the construction of the initial feasible solution by adding the end point B to the path.

3.3 Cross and Mutation Strategy

After initialization of the population, the linear-rank selection is adopted to select individuals to generate a mating pool for crossover and mutation operations.

Crossover Strategy: a number \(rand\) in the interval [0, 1] is randomly generated, if \(rand\) is less than the crossover probability \(Pc\), then individual i and i + 1 are selected as parents to execute single-point crossover operations (see Fig. 5).

Fig. 5.
figure 5

Diagram of chromosome crossover

Reselected Mutation Strategy: mutation increases the diversity of the population, but the multiple constraints make the mutated individuals mostly become infeasible solutions, so we design a specific mutation strategy to increase the probability of mutated individuals satisfying the constraints, with the following steps.

A number \(rand\) in the interval [0, 1] is randomly generated, and if \(rand\) is less than the mutation probability \(Pm\), then individual i is selected for mutation. Randomly select position1 and reselect a correction point from the hemisphere of the candidate point corresponding to position1. If it there is no correction point of the same type as position1 within the hemisphere, the inverse mutation (common mutation) is taken for the position1. If the second is available, the position1 is reversed, meanwhile the position2 corresponding to the second will become what it was before the position1 mutation, as shown in Table 1.

Table 1. Schematic table of reselected mutation strategy

3.4 Individual Evaluation

Penalizing infeasible individuals is a common method applied in genetic algorithm’s constraint processing. If the crossover and mutation produce offspring individuals that do not satisfy the constraint, the evaluation function \(f = f_{1} + M\), where \(M\) is a large positive penalty value that makes the genetic algorithm to find the optimal solution as closely as possible.

3.5 Variable Neighborhood Search Operator

The best individual of each generation is selected for the variable neighborhood search perturbation to improve the local search ability of the genetic algorithm while ensuring the quality of the solution, the process is shown in Algorithm 2.

figure b
  • Neighborhood \(N_{1}\): for the feasible solution obtained in the current iteration step, a new feasible solution is obtained by changing one correction point in its path. For example, a possible neighborhood solution for the path 0 → 2 → 6 → 3 → 8 in \(N_{1}\) is 0 → 2 → 7 → 3 → 8.

  • Neighborhood \(N_{2}\): for the feasible solution obtained at the current iteration step, a new feasible solution is obtained by changing two consecutive correction points in its path. For example, a possible neighborhood solution for the path 0 → 2 → 6 → 3 → 8 in \(N_{2}\) is 0 → 2 → 7 → 4 → 8.

  • Neighborhood \(N_{3}\): for the feasible solution obtained at the current iteration step, a new feasible solution is obtained by changing three consecutive correction points in its path. For example, a possible neighborhood solution for the path 0 → 2 → 6 → 3 → 8 in \(N_{3}\) is 0 → 5 → 7 → 4 → 8.

  • Neighborhood \(N_{4}\): for the feasible solution obtained in the current iteration step, a new feasible solution is obtained by deleting one correction point in its path. For example, a possible neighborhood solution for the path 0 → 2 → 6 → 3 → 8 in \(N_{4}\) is 0 → 2 → 3 → 8.

  • Neighborhood \(N_{5}\): for the feasible solution obtained at the current iteration step, a new feasible solution is obtained by deleting two consecutive correction points in its path. For example, a possible neighborhood solution for the path 0 → 2 → 6 → 3 → 8 in \(N_{5}\) is 0 → 2 → 8.

  • Neighborhood \(N_{6}\): for the feasible solution obtained in the current iteration step, a new feasible solution is obtained by deleting three consecutive correction points in its path. For example, a possible neighborhood solution for the path 0 → 2 → 6 → 3 → 8 in \(N_{6}\) is 0 → 8.

4 Experiment

The effectiveness of the hybrid algorithm proposed in this paper is tested on an i7–9700@3.0 GHz/16G/Win7 PC. According to the 0–1 integer programming model established in the previous, the hybrid model of Variable Neighborhood Search and Genetic Algorithm is implemented based on the jMetal framework [13], where the JDK version is 1.9 and the jMetal framework version is 5.10. The parameters of the hybrid algorithm are set: population size \(N = 100\), mating pool size \(poolSize = 100\), the maximum number of iterations \(mGen = 500\), crossover probability \(Pc = 0.8\), and mutation probability \(Pm = 0.25\). The test dataset has 613 correction points and the parameters for each constraint are set as follows: \(\alpha_{1} = 25\), \(\alpha_{2} = 15\), \(\beta_{1} = 20\), \(\beta_{2} = 25\), \(\theta = 30\), \(\delta = 0.001\).

Fig. 6.
figure 6

Comparison of the population’s average length by every iterated based on test data

Fig. 7.
figure 7

Comparison of the optimal path’s length by every iterated based on test data

The improved Genetic Algorithm with Variable Neighborhood Search (GAVNS) and the traditional genetic algorithm are compared in experiments on the test dataset, and the change curve of the average length for the population of each generation is shown respectively (see Fig. 6), while the length of the optimal path in the population of each generation is shown respectively (see Fig. 7). It can be seen that GAVNS starts to converge at around 100 generations, while GA is still evolving iteratively, which demonstrates that the introduction of variable neighborhood search strategy can strengthen the local search ability of the genetic algorithm.

GAVNS obtains the trajectory path after 500 iterations as 1 → 504 → 70 → 507 → 29 → 184 → 195 → 451 → 595 → 398 → 613, the length is 105059.9m, passing through 9 correction points, the horizontal and vertical error of each correction point is shown in Table 2. GA also obtains the trajectory path after 500 iterations as 1 → 504 → 201 → 81 → 238 → 283 → 599 → 562 → 449 → 486 → 613, the length is 105254.1m, passing through 9 correction points, the horizontal and vertical error of each correction point is shown in Table 3.This experimental comparison shows that the horizontal and vertical errors at each point of the two trajectory paths obtained by GA and GAVNS satisfy the constraint and both can complete the scheduled task, but the length of path obtained by GAVNS is better and has fewer iterations (see Fig. 7).

Table 2. GAVNS’s planning path result
Table 3. GA’s planning path result

5 Conclusion

In this paper, an 0–1 integer programming model is established for the path planning problem under several constraints such as the upper limit of horizontal and vertical error at the correction point as well as the minimum turning radius of the UAV. A genetic algorithm with improved population initialization and variation operator is proposed, and a two-level variable neighborhood search strategy for adding and deleting route points is introduced to strengthen the local search ability of the genetic algorithm. Finally, experiments are conducted on the above trajectory path planning problem and compare with the traditional genetic algorithm to demonstrate the stability and effectiveness of the proposed GAVNS hybrid algorithm.

The handling of unsatisfied constraint solutions is relatively straightforward, whereas the constraints on real-world optimization problems such as the fast path planning of the UAV are usually numerous and complex, improvement of the constraint handling approaches will follow so that GAVNS can be applied to more complex problems.