Mixed firework particle swarm cooperation method for solving unmanned aerial vehicle constrained route planning

文档序号:1476334 发布日期:2020-02-25 浏览:9次 中文

阅读说明:本技术 一种求解无人机约束航路规划的混合烟花粒子群协同方法 (Mixed firework particle swarm cooperation method for solving unmanned aerial vehicle constrained route planning ) 是由 张祥银 夏爽 李秀智 于 2019-11-14 设计创作,主要内容包括:本发明涉及一种求解无人机约束航路规划的混合烟花粒子群协同算法,用于解决无人机航路规划问题。本方法采用两个种群并行独立搜索最优路径的方式,一个种群采用改进的烟花算法进行搜索,另一个种群采用粒子群优化算法。烟花通过爆炸在整个搜索空间中寻找最优解的大致区域并提供给粒子,为粒子之后的搜索指引方向。粒子则在接下来的迭代过程中向该区域进行细致的局部搜索。如此,两个种群结合进行搜索进而得到规划问题的最优解。在整个搜索过程中,通过设置安全等级来划分安全路径和不安全路径,然后在一次次的迭代过程中,逐步提高安全等级,进而将最优路径的搜索范围限制在安全的路径中,以保证规划出的路径的安全性。(The invention relates to a hybrid firework particle swarm cooperative algorithm for solving unmanned aerial vehicle constrained route planning, which is used for solving the problem of unmanned aerial vehicle route planning. The method adopts a mode that two groups search for the optimal path independently in parallel, wherein one group searches by adopting an improved firework algorithm, and the other group searches by adopting a particle swarm optimization algorithm. Fireworks find the approximate area of the optimal solution in the whole search space through explosion and provide the particle with the approximate area, and the direction is guided for the search after the particle. The particle then performs a detailed local search of the region in the following iteration. Thus, the two populations are combined to search to obtain the optimal solution of the planning problem. In the whole searching process, a safe path and an unsafe path are divided by setting a safety level, then the safety level is gradually improved in the iteration process of one time, and the searching range of the optimal path is limited in the safe path so as to ensure the safety of the planned path.)

1. A hybrid firework particle swarm cooperative method for solving unmanned aerial vehicle constrained route planning is characterized by comprising the following stages:

preparation and initialization phase

(1) Preparation of interestThe method comprises the steps of initializing a firework population and initializing a particle swarm, wherein the firework population is represented as a vector set X (t) { X ═ X1(t),X2(t),...,XN(t) }, in which, Xi(t)={Xi1(t),Xi2(t),...,XiD(t) } denotes the ith firework, i.e. corresponding to the ith complete path, i ═ 1,2 …, N, Xij(t) represents the jth path point of the ith firework, j being 1, 2.. and D;

(2) calculating the path length f of the path P of the initialized firework population and the particle swarmL(P), threat cost fT(P) and a satisfaction grade mu (P), and searching the individual with the shortest path from the initialized firework population and the particle swarm as a global optimal solution xgbest(t) initial value;

two groups independently search the optimal path stage in parallel, wherein the firework searching stage is as follows:

(3) through fireworks Xi(t) generating an explosion spark Xj(t)=[Xj1(t),Xj2(t),...,XjD(t)],j=1,2,...,SiI.e. corresponding to a new complete path, X, of the dronejk(t) denotes the kth path point for the jth explosion spark, k ═ 1, 2.., D;

(4) selecting the optimal N individuals in the fireworks and the explosion sparks by a grade comparison method to form a new fireworks group V (t) { V }1(t),V2(t),...,VN(t), wherein the optimal individual is an optimal path obtained by a grade comparison method;

(5) to fireworks Vi(t) performing a mutation operation to generate a mutated spark Vi' (t), i.e. corresponding to a new complete path for the drone;

(6) firework V is selected through grade comparison methodi(t) and variant spark Vi' (t) the better individual, i ═ 1, …, N, constitutes a new firework population U (t) ═ U1(t),U2(t),...,UN(t) }, where the optimal fireworks are Ubest(t) worst fireworks are Uworst(t);

Two groups independently search the optimal path stage in parallel, wherein the particle swarm search stage is as follows:

(7) updating the positions and the speeds of all the particles in the particle swarm to obtain the position of the next generation of particles

Figure FDA0002272311670000011

updating global optimal solution phase

(8) The worst fireworks U obtained in the fireworks searching stageworst(t) and all the particles x (t +1) in the next generation obtained in the particle swarm search stage, and selecting the optimal individual U 'by a grade comparison method'best(t) and is made of individual U'best(t) replacing U in Firework population U (t)worst(t) forming a next-generation firework population X (t +1), namely

X(t+1)={X1(t+1),X2(t+1),...,XN(t+1)};

(9) Selection of U by rank comparison methodbest(t)、U′best(t)、xgbest(t) the optimal individual is updated to obtain the next generation global optimal solution xgbest(t+1);

(10) If the iteration times are reached, the operation is ended, and a global optimal solution x is outputgbest(t) solving the global optimum xgbest(t) converting into an X-O-Y coordinate system, and outputting a planned optimal path of the unmanned aerial vehicle; otherwise, continuing to search the path.

2. The hybrid firework particle swarm collaborative method for solving the unmanned aerial vehicle constrained route planning as claimed in claim 1, wherein: the preparation and initialization specifically comprises:

the preparation work is as follows: the starting point S, the target point T, the number H of the threat sources, the threat level of each threat source, the position in the flying environment and the threat radius of the unmanned aerial vehicle are known; the maximum number of iterations of the algorithm is NCmax

The fireworks population is initialized as follows:

the method comprises the following steps: establishing a rotating coordinate system X ' -S-Y ' with ST as an X ' axis, converting the position coordinates of the starting point, the target point and the obstacle into the rotating coordinate system, and calculating the upper and lower boundaries S of a planned spacemax、SminThe path planned by the robot is P ═ { P ═ P0,P1,P2,…,PD,PD+1In which P is0、PD+1Respectively representing a starting point S and a target point T, PiRepresenting the ith waypoint;

step two: using D parallel linear clusters L1,L2,…,LDDividing ST into D +1 segments in a perpendicular manner, wherein the distance between each segment is delta l | | | ST |/(D +1), the length of ST | | | | is the length of ST, and a path point P1,P2,…,PDI.e. corresponding to a straight line L1,L2,…,LDThe above step (1);

step three: and (3) initializing fireworks by setting the iteration number t as 1, wherein the number of the fireworks is N, the firework dimension is D, namely randomly generating N unmanned aerial vehicle paths, wherein each path has D path points, and the firework population is represented as a vector group X (t) as { X ═ X-1(t),X2(t),...,XN(t) }, in which, Xi(t)={Xi1(t),Xi2(t),...,XiD(t) } denotes the ith firework, i.e. corresponding to the ith complete path, i ═ 1,2 …, N, Xij(t) represents the jth path point of the ith firework, j being 1, 2.. and D;

particle swarm initialization is as follows: setting the number of particles to NpEach particle corresponds to a complete path, the dimension of each particle is D, namely, D path points exist in each path, the parameter search range and the speed limit are set, the initial position and the speed of each particle are randomly determined, namely, N is randomly generatedpAn unmanned aerial vehicle path and corresponding path point variable quantity, and storing the position of the particle in

Figure FDA0002272311670000021

3. According toThe hybrid firework particle swarm cooperative method for solving the unmanned aerial vehicle constrained route planning of claim 1, wherein: the path length f of the path PL(P), threat cost fT(P), satisfaction level μ (P), formula as follows:

Figure FDA0002272311670000022

in the above formula, | | Pi+1-PiI represents a path point Pi+1And PiThe euclidean distance between;

Figure FDA0002272311670000023

in the above formula tjThreat level for jth threat source, P0.1,j,kPath segment P for jth threat sourcekPk+1Probability of threat at point upper 1/10, P0.3,j,kPath segment P for jth threat sourcekPk+1Probability of threat at point 3/10, and so on;

Figure FDA0002272311670000031

in the above equation, b is a rank calculation constant.

4. The hybrid firework particle swarm collaborative method for solving the unmanned aerial vehicle constrained route planning as claimed in claim 3, wherein:

the threat probability of the threat source is calculated as follows:

(1) probability of threat from mountain peak threat source PP

Figure FDA0002272311670000032

In the above formula, d is the distance from the unmanned aerial vehicle to the threat source, RPA peak threat radius;

(2) threat probability P of radar threat sourceR

Figure FDA0002272311670000033

In the above formula, d is the distance from the unmanned aerial vehicle to the threat source, RRmaxIs the radar threat radius;

(3) threat probability P of missile threat sourceM

Figure FDA0002272311670000034

In the above formula, d is the distance from the unmanned aerial vehicle to the threat source, RMmaxThreat radius for the missile;

(4) probability of threat of antiaircraft gun threat source PG

Figure FDA0002272311670000035

In the above formula, d is the distance from the unmanned aerial vehicle to the threat source, RGmaxIs the threat radius of the antiaircraft gun.

5. The hybrid firework particle swarm collaborative method for solving the unmanned aerial vehicle constrained route planning as claimed in claim 1, wherein: the fireworks generate explosion sparks, wherein the number of the explosion sparks and the calculation formula of the kth path point in the jth explosion spark are respectively as follows:

number of exploding sparks Si

Figure FDA0002272311670000041

Figure FDA0002272311670000042

Wherein N is1The number of fireworks corresponding to the safe path is fireworks XiSatisfaction grade of mu (X)i) Path no less than α, N2The number of fireworks corresponding to unsafe paths is fireworks XiSatisfaction grade of mu (X)i)<α path, β ∈ [0,1 ]]As a scaling parameter, M ∈ [10,100 ]]Is a constant for adjusting the number of explosion sparks generated, fLmax=max(fL(Xi) ) is the maximum path length value in the firework population with safe corresponding paths, i is 1,2, …, N1,μmin=min(μ(Xi) For the minimum satisfactory level value in the fireworks population with unsafe corresponding paths, i is 1,2, …, N2ε is the minimum number of machines and α is the safety rating, the formula is as follows:

Figure FDA0002272311670000043

in the above formula, ξ ∈ [0, 100] is the growth rate parameter, and t is the current iteration number

Kth path point X in jth explosion sparkjk

Xjk=Xik+rand(-1,1)×Ai(19)

In the above formula, the first and second carbon atoms are,

Xikthe kth path point representing the ith firework, k 1,2, D, rand () is a function that takes a random value within the interval,

Aifor fireworks Xi(t) the corresponding explosion radius, the calculation formula is as follows:

Figure FDA0002272311670000044

Figure FDA0002272311670000045

N1number of fireworks for safety of corresponding path, N2The number of fireworks which correspond to the unsafe paths,is a constant for adjusting the size of the explosion radius,fLmin=min(fL(Xi) ) is the minimum path length value in the firework population with safe corresponding paths, i is 1,2, …, N1,μmax=max(μ(Xi) For the maximum satisfactory level value in the fireworks population with unsafe corresponding paths, i is 1,2, …, N2And ε is the minimum machine amount.

6. The hybrid firework particle swarm collaborative method for solving the unmanned aerial vehicle constrained route planning as claimed in claim 1, wherein: the grade comparison method specifically comprises the following steps:

in the iterative process, if two individuals R to be compared1、R2Corresponding to the path length f1、f2Degree of path satisfaction mu1、μ2The number of times the security level is α,

(1) mu.s of1≥α、μ2Not less than α, and f1≤f2Selecting R1Is a better individual;

(2) when (1) is not satisfied, if μ1=μ2And f is1≤f2Selecting R1Is a better individual;

(3) when (1) and (2) are not satisfied, if μ12Selecting R1Is a better individual.

7. The hybrid firework particle swarm collaborative method for solving the unmanned aerial vehicle constrained route planning as claimed in claim 1, wherein: the variant spark generation formula is as follows:

Vi′=Vi+rand(-1,1)×(Vb-Vr) (21)

in the above formula, i is 1,2bThe optimal fireworks in the fireworks group V (t), namely the optimal individuals selected by the grade comparison method, VrFor the generated variant fireworks and removing ViAnd (d) randomly selecting one firework from the unchanged fireworks in the outer V (t).

8. The hybrid firework particle swarm collaborative method for solving the unmanned aerial vehicle constrained route planning as claimed in claim 1, wherein: the particle velocity and position update formula is as follows:

vi(t+1)=ω·vi(t)+c1·rand(0,1)·(xpbest,i(t)-xi(t))+c2·rand(0,1)·(xgbest(t)-xi(t)) (22)

xi(t+1)=xi(t)+vi(t+1) (23)

in formula (22), i ═ 1,21∈[0,2]、c2∈[0,2]As an acceleration constant, ω ∈ [0,1 ]]For inertial weights, rand () is a function that takes random values within the interval.

9. The hybrid firework particle swarm collaborative method for solving the unmanned aerial vehicle constrained route planning as claimed in claim 1, wherein: the spark mapping rule in the firework searching stage is as follows:

Xjk=Smin+|Xjk|%(Smax-Smin) (20)

in the above equation,% is a modulo operation.

10. The hybrid firework particle swarm collaborative method for solving the unmanned aerial vehicle constrained route planning as claimed in claim 1, wherein: the particle mapping rule in the particle search stage is as follows:

Figure FDA0002272311670000061

Figure FDA0002272311670000062

in the above formula, i is 1,2 …, Np,j=1,2,...,D。

Technical Field

The invention discloses a hybrid firework particle swarm cooperative algorithm for solving unmanned aerial vehicle constrained route planning, and belongs to the technical field of intelligent robot navigation and control and intelligent optimization.

Background

Path planning is an important research direction of robot navigation technology. The unmanned aerial vehicle route planning is to calculate the optimal or sub-optimal flight track of the unmanned aerial vehicle from a starting point to a target point in proper time under the comprehensive condition of considering the constraints of the voyage, the flight environment and the like, so that the unmanned aerial vehicle can avoid the threat of an enemy and the environmental obstacle and safely complete the preset task. With the rapid development and wide application of the unmanned aerial vehicle technology, under the condition that the modern air defense technology is improved day by day, the route planning is carried out by simply manually operating the unmanned aerial vehicle, the actual application requirements of modern complex tasks cannot be effectively met, and therefore a series of intelligent optimization algorithms taking the optimization problem as the core are obtained, and become important methods for solving the route planning of the unmanned aerial vehicle under the constraint condition.

The firework algorithm is firstly proposed in 2010 by professor of great northern pit mining at the intelligent society of international groups, the inspiration of the firework algorithm is derived from the explosion process of fireworks in actual life, the firework algorithm belongs to an intelligent optimization method of non-biological groups, the firework algorithm has excellent optimizing performance, is favored by researchers, and is widely applied to solving problems in the fields of clustering, network planning, image recognition, function optimization and the like. The basic idea of the firework algorithm is as follows: the population is composed of a plurality of individuals (sparks), and the adaptability of the individuals to the environment is better and better through the mutual cooperation of the individuals, so that the optimal solution is approached. In the whole solution space, sparks generated by fireworks explosion can appear in a neighborhood centered on the sparks, and the process is a search for a local area. In the firework algorithm, in order to balance the local search capability and the global exploration capability, better fireworks can generate more sparks in a smaller explosion range, poorer fireworks can generate a small amount of sparks in a larger explosion range, so that the better fireworks are responsible for better local search in a better area, the poorer fireworks are responsible for global search in a larger explosion range, and the collaborative search of the two is the group intelligence represented by the algorithm.

The particle swarm optimization algorithm is a swarm intelligence optimization technology and was proposed by doctor Eberhart and doctor Kennedy in 1995. The algorithm is derived from research on foraging behaviors of bird groups, and is an intelligent random optimization algorithm provided by simulating migration and cooperative behaviors in the foraging process of the bird groups. The basic idea is as follows: starting from a random position, each particle continuously adjusts the searching direction and speed according to the self historical optimal position and the optimal particle position, and then finds the optimal solution of the problem. The particle swarm optimization algorithm draws attention from the academic world with the advantages of easy realization, high precision, fast convergence and the like, and is widely applied to various fields such as engineering optimization, image processing and the like. However, the particle swarm optimization algorithm is apt to fall into a local optimal solution and stop moving when processing a complex problem, i.e. a phenomenon of premature convergence.

Disclosure of Invention

The invention provides a hybrid firework particle swarm cooperative Algorithm (FWPS Cooperation Algorihm, FWPSALC) for solving the constrained route planning of an unmanned aerial vehicle. The method aims to provide an effective unmanned aerial vehicle route planning method, an optimal flight path which is far away from threats and has the shortest path can be planned for the unmanned aerial vehicle quickly and well, and the unmanned aerial vehicle can be guaranteed to fly to a target place in the shortest time and the safest mode. The method solves the path planning problem of a single object, and does not relate to the collaborative path planning problem among multiple objects.

In the hybrid algorithm, a mode of independently searching the optimal path in parallel by two populations is adopted. One population is searched by adopting an improved firework algorithm, and the other population is searched by adopting a particle swarm optimization algorithm. When two populations are searched for each time, information is shared. The fireworks provide the particles with an approximate area of the optimal solution found throughout the search space by the explosion, directing the search behind the particles. And the particle performs a detailed local search of the region in the following iteration. Thus, the two populations are combined to search to obtain the optimal solution of the planning problem. In the whole searching process, a safe path and an unsafe path are divided by setting a safety level, then the safety level is gradually improved in the iteration process of one time, and the searching range of the optimal path is limited in the safe path so as to ensure the safety of the planned path.

The specific technical scheme is as follows:

the mixed firework particle swarm cooperative algorithm provided by the invention gives consideration to the global search capability and the local search capability, has the characteristics of high convergence speed, strong robustness, strong optimization capability and the like, and can effectively solve the problem of unmanned aerial vehicle constrained route planning, and the specific application steps of the method are as follows:

preparation work: the starting point S of the unmanned aerial vehicle, the target point T, the number H of the threat sources, the threat level of each threat source, and the position and the threat radius in the flight environment are all known. The maximum number of iterations of the algorithm is NCmax

The method comprises the following steps: establishing a rotating coordinate system X ' -S-Y ' with ST as an X ' axis, converting the position coordinates of the starting point, the target point and the obstacle into the rotating coordinate system, and calculating the upper and lower boundaries S of a planned spacemax、SminThe path planned by the robot is P ═ { P ═ P0,P1,P2,…,PD,PD+1In which P is0、PD+1Respectively representing a starting point S and a target point T, PiRepresenting the ith waypoint;

step two: using D parallel linear clusters L1,L2,…,LDDividing ST into D +1 segments in a perpendicular manner, wherein the distance between each segment is delta l | | | ST |/(D +1), the length of ST | | | | is the length of ST, and a path point P1,P2,…,PDI.e. corresponding to a straight line L1,L2,…,LDThe above step (1);

step three: and (3) initializing fireworks by setting the iteration number t as 1, wherein the number of the fireworks is N, the firework dimension is D, namely randomly generating N unmanned aerial vehicle paths, wherein each path has D path points, and the firework population is represented as a vector group X (t) as { X ═ X-1(t),X2(t),...,XN(t) }, in which, Xi(t)={Xi1(t),Xi2(t),...,XiD(t) } denotes the ith firework, i.e. corresponding to the ith complete path, i ═ 1,2 …, N, Xij(t) represents the jth path point of the ith firework, j being 1, 2.. and D;

step four: calculating the path length f of the path P corresponding to the fireworks in the fireworks groupL(P), threat cost fT(P), satisfaction level μ (P), formula as follows:

in the above formula, | | Pi+1-PiI represents a path point Pi+1And PiThe euclidean distance between;

Figure BDA0002272311680000032

in the above formula tjThreat level for jth threat source, P0.1,j,kPath segment P for jth threat sourcekPk+1Probability of threat at point upper 1/10, P0.3,j,kPath segment P for jth threat sourcekPk+1Probability of threat at point 3/10, and so on.

Figure BDA0002272311680000033

In the above equation, b is a rank calculation constant, and the value of the rank calculation constant is the median of the threat costs of the paths corresponding to all fireworks in step four.

Step five: initializing the particle group to set the number of particles to NpEach particle corresponds to a complete path, the dimension of each particle is D, namely, D path points exist in each path, the parameter search range and the speed limit are set, the initial position and the speed of each particle are randomly determined, namely, N is randomly generatedpAn unmanned aerial vehicle path and corresponding path point variable quantity, and storing the position of the particle in

Figure BDA0002272311680000034

Performing the following steps;

step six: calculating the path length f of the path P corresponding to each particle in the particle group by the formulas (1), (2) and (3)L(P), threat cost fT(P), satisfaction grade μ (P);

step seven: saving the individual with the shortest corresponding path in all the fireworks and the particles in the fourth step and the sixth step in the global optimal solution xgbest(t), namely the currently searched optimal path of the unmanned aerial vehicle, and the global optimal solution xgbestThe initial value of (t) is calculated by the initialized firework population and the initialized particle swarm;

step eight, updating the security level α according to the following formula:

in the above formula, ξ belongs to [0, 100] as a growth rate parameter, and t is the current iteration number;

step nine: calculating fireworks Xi(t) number of explosion sparks SiAnd a detonation radius AiAnd generating an explosion spark Xj(t)=[Xj1(t),Xj2(t),...,XjD(t)],j=1,2,...,SiI.e. corresponding to a new complete path, X, of the dronejk(t) denotes the kth path point for the jth explosion spark, k ═ 1, 2.., D;

step ten: mapping the explosion sparks exceeding the boundary to a new position, and calculating the path length f of the path P corresponding to each spark in the explosion sparks by the formulas (1), (2) and (3)L(P), threat cost fT(P), a satisfaction level μ (P), said out-of-bounds meaning that waypoints on the spark exceed the upper and lower bounds of the planned space;

step eleven: selecting the optimal N individuals in the fireworks and the explosion sparks by a grade comparison method to form a new fireworks group V (t) { V }1(t),V2(t),...,VN(t), wherein the optimal individual is an optimal path obtained by a grade comparison method;

step twelve: to fireworks Vi(t) performing a mutation operation to generate a mutated spark Vi' (t), i.e. corresponding to a new complete path for the drone;

step thirteen: mapping the variant sparks exceeding the boundary to new positions, and calculating the path length f of the path P corresponding to each spark in the variant sparks according to the formulas (1), (2) and (3)L(P), threat cost fT(P), satisfaction grade μ (P);

fourteen steps: firework V is selected through grade comparison methodi(t) and variant spark Vi' (t) inExcellent individuals, i ═ 1, …, N, constitute a new firework population U (t ═ U)1(t),U2(t),...,UN(t) }, where the optimal fireworks are Ubest(t) worst fireworks are Uworst(t);

Step fifteen: updating the positions and the speeds of all the particles in the particle swarm to obtain the position of the next generation of particles

Figure BDA0002272311680000041

And velocity

Figure BDA0002272311680000042

Sixthly, the steps are as follows: mapping the particles beyond the boundary to a new position, and calculating the path length f of the path P corresponding to each particle by the formulas (1), (2) and (3)L(P), threat cost fT(P), a satisfaction grade mu (P), wherein the path points on the particles beyond the boundary exceed the upper and lower boundaries of the planning space, or the variation of the path points on the particles exceeds the set speed range;

seventeen steps: the updated ith particle is stored in xpbest(t) comparing grades of ith particles, selecting the better particles to store in xpbestIn (t +1), i is 1,2p

Eighteen steps: all the particles x (t +1) in the next generation and the worst fireworks U in step 14 are selected by a grade comparison methodworst(t) most preferred individual U'best(t) and the step 14 of removing U from the firework group U (t)worst(t) the fireworks except for (t) form the next-generation firework group X (t +1) ═ X1(t+1),X2(t+1),...,XN(t+1)};

Nineteen steps: selection of U by rank comparison methodbest(t)、U′best(t)、xgbest(t) the optimal individual is updated to obtain the next generation global optimal solution xgbest(t+1);

Twenty steps: let t be t +1, judge whether t satisfies>NCmax. If not, returning to the step eight for iteration; if yes, the operation is considered to be finished, and outputGlobal optimal solution xgbest(t)。

Twenty one: solving the global optimum xgbestAnd (t) converting into an X-O-Y coordinate system, and outputting the planned optimal path of the unmanned aerial vehicle.

Supplementary explanation:

the coordinate conversion formula in the first step is as follows:

Figure BDA0002272311680000051

in the above formula (x)s,ys) The initial position of the robot is (X, Y), (X ', Y ') are respectively the coordinate position of any one same point in a coordinate system X-O-Y and X ' -S-Y ', and theta is the included angle between the X ' axis and the X axis.

The upper and lower boundaries of the planning space in the first step are points in the threat region of the threat source, which are farthest from the ST axis, and then extend outwards for a certain safety distance, and the calculation formula is as follows:

Figure BDA0002272311680000052

in the above formula ythreatjIs the Y' axis coordinate of the jth threat source after coordinate transformation, j is 1,2jFor the threat radius of the jth threat source, max { } is a function of taking the maximum value, min { } is a function of taking the minimum value, and Δ d belongs to [5, 50 ∈ [ ]]Is a safe distance.

When calculating the path threat level, the threat probabilities of different threat sources are calculated as follows:

(1) probability of threat from mountain peak threat source PP

Figure BDA0002272311680000053

In the above formula, d is the distance from the unmanned aerial vehicle to the threat source, RPIs the peak threat radius.

(2) Threat probability P of radar threat sourceR

Figure BDA0002272311680000054

In the above formula, d is the distance from the unmanned aerial vehicle to the threat source, RRmaxIs the radar threat radius.

(3) Threat probability P of missile threat sourceM

Figure BDA0002272311680000055

In the above formula, d is the distance from the unmanned aerial vehicle to the threat source, RMmaxThe threat radius for the missile.

(4) Probability of threat of antiaircraft gun threat source PG

Figure BDA0002272311680000061

In the above formula, d is the distance from the unmanned aerial vehicle to the threat source, RGmaxIs the threat radius of the antiaircraft gun.

In the fifth step, the particle swarm positions are expressed as vector setsWherein x isi(t)=[xi1(t),xi2(t),...,xiD(t)]Indicating the position of the ith particle, i.e. the position corresponding to the ith complete path, i-1, 2 …, Np,xij(t) represents the position of the jth path point of the ith particle, j is 1,2

Figure BDA0002272311680000063

Wherein v isi(t)=[vi1(t),vi2(t),...,viD(t)]Representing the speed of the ith particle, i.e. the amount of change, v, of the ith pathij(t) represents the variation of the jth path point of the ith particle, j is 1,2min,Smax]The maximum and minimum particle velocity values are calculated as follows:

vmax=0.01×(Smax-Smin) (11)

vmin=-0.01×(Smax-Smin) (12)

in step nine, the number of explosion sparks SiThe calculation formula is as follows:

Figure BDA0002272311680000064

in the formulae (13) and (14), N1The number of fireworks corresponding to the safe path is fireworks XiSatisfaction grade of mu (X)i) Path no less than α, N2The number of fireworks corresponding to unsafe paths is fireworks XiSatisfaction grade of mu (X)i)<α path, β ∈ [0,1 ]]As a scaling parameter, M ∈ [10,100 ]]Is a constant for adjusting the number of explosion sparks generated, fLmax=max(fL(Xi) ) is the maximum path length value in the firework population with safe corresponding paths, i is 1,2, …, N1,μmin=min(μ(Xi) For the minimum satisfactory level value in the fireworks population with unsafe corresponding paths, i is 1,2, …, N2ε is the minimum number of machines and is 2-52For avoiding zero operation.

When fireworks XiSatisfaction grade of mu (X)i) When the path is not less than α, the number of explosion sparks is calculated by formula (13) when the corresponding path is safe, and when the fireworks X are displayediSatisfaction grade of mu (X)i)<α, when the corresponding path is not safe, the number of explosion sparks is calculated by the formula (14) to prevent fireworks XiToo many or too few explosion sparks are generated, and the number S of explosion sparks calculated by the formula (13) or (14)iThe following formula is used for limitation:

in the above equation, round () is a function rounded according to the rounding principle; a-0.6 and b-0.05 are two constants.

In the ninth step, the explosion radius A of the explosion sparkiThe calculation formula is as follows:

Figure BDA0002272311680000072

in the formulae (16) and (17), N1Number of fireworks for safety of corresponding path, N2The number of fireworks which correspond to the unsafe paths,is a constant for adjusting the size of the explosion radius, fLmin=min(fL(Xi) ) is the minimum path length value in the firework population with safe corresponding paths, i is 1,2, …, N1,μmax=max(μ(Xi) For the maximum satisfactory level value in the fireworks population with unsafe corresponding paths, i is 1,2, …, N2ε is the minimum number of machines and is 2-52For avoiding zero operation.

When fireworks XiSatisfaction grade of mu (X)i) When the path is not less than α, the explosion radius is calculated by formula (16) when the corresponding path is safe, and when the fireworks X are displayediSatisfaction grade of mu (X)i)<α, when the corresponding path is not safe, the explosion radius is calculated by formula (17) to prevent fireworks XiIf the explosion radius is too small, the calculated explosion radius A is compared with the explosion radius A calculated by the formula (16) or (17)iThe following formula is used for limitation:

Figure BDA0002272311680000074

in the above formula, Amin∈[0,40]The minimum explosion radius of the fireworks.

The fireworks generate an explosion spark, wherein the calculation formula of the kth path point in the explosion spark is as follows:

Xjk=Xik+rand(-1,1)×Ai(19)

in the above equation, rand () is a function that takes a random value within an interval.

The spark mapping rule is as follows:

Xjk=Smin+|Xjk|%(Smax-Smin) (20)

in the above equation,% is a modulo operation.

The grade comparison method specifically comprises the following steps:

in the iterative process, if two individuals R to be compared1、R2Corresponding to the path length f1、f2Degree of path satisfaction mu1、μ2And the safety level α, the quality of the individual is judged by adopting a level comparison method, and the specific method is as follows:

(1) mu.s of1≥α、μ2Not less than α, and f1≤f2Selecting R1Is a better individual;

(2) when (1) is not satisfied, if μ1=μ2And f is1≤f2Selecting R1Is a better individual;

(3) when (1) and (2) are not satisfied, if μ12Selecting R1Is a better individual;

in step twelve, the variant spark generation formula is as follows:

Vi′=Vi+rand(-1,1)×(Vb-Vr) (21)

in the above formula, i is 1,2bThe optimal fireworks in the fireworks group V (t), wherein the optimal fireworks are the optimal path, VrFor the generated variant fireworks and removing ViA random one of the non-mutated fireworks in the outer v (t);

in step fifteen, the particle velocity and position update formula is as follows:

vi(t+1)=ω·vi(t)+c1·rand(0,1)·(xpbest,i(t)-xi(t))+c2·rand(0,1)·(xgbest(t)-xi(t)) (22)

xi(t+1)=xi(t)+vi(t+1)(23)

in formula (22), i is 1,2p,c1∈[0,2]、c2∈[0,2]As an acceleration constant, ω ∈ [0,1 ]]For inertial weights, rand () is a function that takes random values within the interval.

In step sixteen, the particle mapping rule is as follows:

Figure BDA0002272311680000081

Figure BDA0002272311680000082

in the above formula, i is 1,2 …, Np,j=1,2,...,D。

Has the advantages that:

the invention provides a hybrid firework particle swarm cooperative algorithm for solving unmanned aerial vehicle constrained route planning. The method adopts a mode of searching an optimal solution in parallel by two groups, one group adopts an improved firework algorithm, the other group adopts a particle swarm algorithm, and finally the optimal route of the unmanned aerial vehicle is found in an information sharing mode. The particle swarm algorithm has good local search capability, overcomes the defect of local development capability of the firework algorithm, and is easy to fall into a local optimal solution. The improved firework algorithm obtains individuals with higher diversity through a new variation mode, improves the diversity of firework groups, enables the algorithm to have better global search capability, further effectively avoids trapping in a local optimal solution, and makes up for the defects of a particle swarm algorithm. The algorithm has better global search capability and local search capability through the cooperative cooperation of the two groups, and meanwhile, the constraint conditions are better processed by adopting a grade comparison method, so that a better unmanned aerial vehicle flight path is planned. The hybrid firework particle swarm cooperative algorithm has good optimization performance, high convergence precision and strong robustness, and can plan a shorter safe path, thereby being an effective unmanned aerial vehicle route planning method.

Drawings

Fig. 1 is a schematic diagram of coordinate transformation.

FIG. 2 is a flow chart of a mixed firework particle swarm cooperative algorithm.

FIG. 3 is a path planning diagram of a particle swarm collaborative algorithm of mixed fireworks.

FIG. 4 is a statistical data table obtained from the path planning result of the particle swarm collaborative algorithm for mixed fireworks.

Fig. 5 is a graph of average path length evolution.

Detailed Description

The present invention will be further described with reference to specific implementation processes, which are illustrated in the environment of fig. 3 as an example:

preparation work: let the flying speed v of the unmanned aerial vehicle be 1 m/s. The parameters take the following values: maximum number of iterations NC max500, 20 safety distance delta d, 15 growth rate parameter ξ, 30 constant M of explosion spark particles, 0.8 parameter β, minimum explosion radius A of fireworks min20; constant of acceleration c1=0.8、c20.8; the inertial weight ω is 0.9. Let the coordinate of the starting point be S ═ 50,50]The coordinate of the target point is T ═ 950,550]The firework and particle dimension D is 25.

The method comprises the following steps: establishing a rotating coordinate system X ' -S-Y ' taking ST as an axis X ', and converting the position coordinates of the starting point, the target point and the obstacle into the rotating coordinate system, wherein the coordinate conversion formula is as follows:

Figure BDA0002272311680000091

in the above formula (x)s,ys) The initial position of the robot is (X, Y), (X ', Y ') are respectively the coordinate position of any one same point in a coordinate system X-O-Y and X ' -S-Y ', and theta is the included angle between the X ' axis and the X axis.

Calculating the upper and lower boundaries S of the planning spacemax、SminThe formula is as follows:

Figure BDA0002272311680000101

in the above formula ythreatjFor coordinate transformationAnd changing the Y' axis coordinate of the jth threat source, wherein j is 1,2jAnd for the threat radius of the jth threat source, max { } is a function of taking the maximum value, and min { } is a function of taking the minimum value.

Step two: using 25 parallel linear tufts L1,L2,…,L25Dividing ST into 26 segments vertically, wherein the distance delta l of each segment is 39.6;

step three: initializing fireworks by the iteration number t being 1, wherein the number of the fireworks is 8, the dimension of the fireworks is 25, and the fireworks are represented as a vector set X (t) being X1(t),X2(t),…,X8(t) }, in which, Xi(t)=[Xi1(t),Xi2(t),…,Xi25(t)]Denotes the ith firework, i is 1,2 …,8, Xij(t) represents the jth path point of the ith firework, j being 1, 2.. 25;

step four: calculating the path length, the threat cost and the satisfaction grade of the path corresponding to the fireworks in the fireworks group, wherein the formula is as follows:

path length f of path PL(P) the calculation formula is as follows:

Figure BDA0002272311680000102

in the above formula, | | Pi+1-PiAnd | | represents the euclidean distance between the path points Pi +1 and Pi.

Threat cost f of path PT(P) the calculation formula is as follows:

Figure BDA0002272311680000103

in the above formula tjThreat level for jth threat source, P0.1,j,kPath segment P for jth threat sourcekPk+1On the upper part

Figure BDA0002272311680000104

Probability of threat at a point.

The threat probabilities of different threat sources are calculated as follows:

(1) probability of threat from mountain peak threat source PP

Figure BDA0002272311680000105

In the above formula, d is the distance from the unmanned aerial vehicle to the threat source, RPIs the peak threat radius.

(2) Threat probability P of radar threat sourceR

In the above formula, d is the distance from the unmanned aerial vehicle to the threat source, RRmaxIs the radar threat radius.

(3) Threat probability P of missile threat sourceM

Figure BDA0002272311680000112

In the above formula, d is the distance from the unmanned aerial vehicle to the threat source, RMmaxThe threat radius for the missile.

(4) Probability of threat of antiaircraft gun threat source PG

In the above formula, d is the distance from the unmanned aerial vehicle to the threat source, RGmaxIs the threat radius of the antiaircraft gun.

The satisfaction level μ (P) of the path P is calculated as follows:

Figure BDA0002272311680000114

in the above equation, b is a rank calculation constant, and the value of the rank calculation constant is the median of the threat costs of the paths corresponding to all fireworks in step four.

Step five: initializing a particle group, setting the number of particles to be 15, each particle corresponding to a complete path, the dimension of each particle to be 25, and the position of the particle group to be a vector group x (t) ([ x ])1(t),x2(t),...,x15(t)]Wherein x isi(t)=[xi1(t),xi2(t),...,xi25(t)]Position of the ith particle, i is 1,2 …,15, xij(t) denotes the position of the jth path point of the ith particle, j 1, 2.., 25, and the velocity is expressed as a vector set v (t) [ v ] v ═ v1(t),v2(t),...,v15(t)]Wherein v isi(t)=[vi1(t),vi2(t),...,vi25(t)]Indicates the velocity, v, of the ith particleij(t) represents the variation of the jth path point of the ith particle, j is 1,2min,Smax]Speed limit vmin、vmaxThe calculation formula is as follows:

vmax=0.01×(Smax-Smin) (35)

vmin=-0.01×(Smax-Smin) (36)

randomly determining the initial position and velocity of each particle and storing the position of the particle in

Figure BDA0002272311680000115

Performing the following steps;

step six: calculating the path length, threat cost and satisfaction grade of the path corresponding to each particle in the particle swarm according to formulas (28) to (34);

step seven: saving the individual with the shortest corresponding path in all the fireworks and the particles in the fourth step and the sixth step in the global optimal solution xgbestIn (t), the optimal path of the unmanned aerial vehicle is searched at present;

step eight, updating the security level α, wherein the updating formula is as follows:

Figure BDA0002272311680000121

step nine: calculating fireworks Xi(t) number of explosion sparks SiThe calculation formula is as follows:

Figure BDA0002272311680000122

Figure BDA0002272311680000123

Figure BDA0002272311680000124

in the formulae (38) and (39), N1Number of fireworks for safety of corresponding path, N2Number of fireworks unsafe for corresponding path, fLmax=max(fL(Xi) ) is the maximum path length value in the firework population with safe corresponding paths, i is 1,2, …, N1,μmin=min(μ(Xi) For the minimum satisfactory level value in the fireworks population with unsafe corresponding paths, i is 1,2, …, N2ε is the minimum number of machines and is 2-52For avoiding zero operation. When fireworks XiSatisfaction grade of mu (X)i) When the path is not less than α, the number of explosion sparks is calculated by the formula (38) when the corresponding path is safe, and when the fireworks XiSatisfaction grade of mu (X)i)<α, i.e. when the corresponding path is not safe, the number of explosion sparks is calculated by formula (39) to prevent fireworks XiToo many or too few explosion sparks are generated, and the number S of explosion sparks calculated by the formula (38) or (39) is calculatediThe restriction is performed by equation (40).

Calculating fireworks Xi(t) corresponding explosion radius AiThe calculation formula is as follows:

Figure BDA0002272311680000125

Figure BDA0002272311680000131

Figure BDA0002272311680000132

in the equations (41) and (42),

Figure BDA0002272311680000133

is a constant for adjusting the size of the explosion radius, N1Number of fireworks for safety of corresponding path, N2Number of fireworks unsafe for corresponding path, fLmin=min(fL(Xi) ) is the minimum path length value in the firework population with safe corresponding paths, i is 1,2, …, N1,μmax=max(μ(Xi) For the maximum satisfactory level value in the fireworks population with unsafe corresponding paths, i is 1,2, …, N2ε is the minimum number of machines and is 2-52For avoiding zero operation. When fireworks XiSatisfaction grade of mu (X)i) When the path is not less than α, the explosion radius is calculated by formula (41) when the corresponding path is safe, and when the fireworks X are displayediSatisfaction grade of mu (X)i)<α, when the corresponding path is not safe, the explosion radius is calculated by formula (42) to prevent fireworks XiIf the explosion radius is too small, the calculated explosion radius A is compared with the explosion radius A calculated by the formula (41) or (42)iThe restriction is performed by equation (43).

Generating an explosion spark Xj(t)=[Xj1(t),Xj2(t),...,XjD(t)],j=1,2,...,Si,Xjk(t) denotes the kth path point for the jth explosion spark, k ═ 1, 2.

Xjk=Xik+rand(-1,1)×Ai(44)

Step ten: mapping the explosion sparks beyond the boundary to a new position, wherein the mapping formula is as follows:

Xjk=Smin+|Xjk|%(Smax-Smin) (45)

calculating the path length, threat cost and satisfaction grade of the path corresponding to each spark in the explosion sparks according to formulas (28) to (34);

step eleven: selecting the optimal 8 individuals from the fireworks and the explosion sparks by a grade comparison method to form a new fireworks group V (t) { V }1(t),V2(t),...,V8(t) judging whether the individual is good or bad by adopting a grade comparison method, such asThe following:

if two individuals to be compared R1、R2Corresponding to the path length f1、f2Degree of path satisfaction mu1、μ2The number of times the security level is α,

(1) mu.s of1≥α、μ2Not less than α, and f1≤f2Selecting R1Is a better individual;

(2) when (1) is not satisfied, if μ1=μ2And f is1≤f2Selecting R1Is a better individual;

(3) when (1) and (2) are not satisfied, if μ12Selecting R1Is a better individual;

step twelve: to fireworks Vi(t) performing a mutation operation to generate a mutated spark Vi' (t), the variation formula is as follows:

Vi′=Vi+rand(-1,1)×(Vb-Vr) (46)

in the above formula, i is 1,2bIs the optimal firework in the firework group V (t), VrFor the generated variant fireworks and removing ViAnd (d) randomly selecting one firework from the unchanged fireworks in the outer V (t).

Step thirteen: mapping the variant sparks exceeding the boundary to a new position by a formula (45), and calculating the path length, the threat cost and the satisfaction grade of the path corresponding to each spark in the variant sparks by formulas (28) to (34);

fourteen steps: firework V is selected through grade comparison methodi(t) and variant spark Vi' (t) the superior individuals, constitute a new firework population U (t) ═ U1(t),U2(t),…,U8(t) }, where the optimal fireworks are Ubest(t) worst fireworks are Uworst(t);

Step fifteen: updating the positions and the speeds of all the particles in the particle swarm to obtain the position of the next generation of particles

Figure BDA0002272311680000141

And velocity

Figure BDA0002272311680000142

The update formula is as follows:

vi(t+1)=0.9·vi(t)+0.8·rand(0,1)·(xpbest,i(t)-xi(t))+0.8·rand(0,1)·(xgbest(t)-xi(t)) (22)

xi(t+1)=xi(t)+vi(t+1) (23)

in the formula (22), i ═ 1, 2.., 15, rand () is a function that takes random values within an interval.

Sixthly, the steps are as follows: mapping the particles beyond the boundary to a new position, wherein the mapping formula is as follows:

Figure BDA0002272311680000143

Figure BDA0002272311680000144

in the above formula, i is 1,2 …,15, j is 1, 2.

Calculating the path length, threat cost and satisfaction grade of the path corresponding to each particle by formulas (28) to (34);

seventeen steps: the updated ith particle is stored in xpbest(t) comparing grades of ith particles, selecting the better particles to store in xpbestIn (t +1), i is 1,2p

Eighteen steps: all particles x (t +1) and U in the next generation were selected by rank comparison methodworst(t) most preferred individual U'best(t) and the difference of U in the firework group U (t)worst(t) the fireworks except for (t) form the next-generation firework group X (t +1) ═ X1(t+1),X2(t+1),…,XN(t+1)};

Nineteen steps: selection of U by rank comparison methodbest(t)、U′best(t)、xgbest(t) the optimal individual is updated to obtain the next generation global optimal solution xgbest(t+1);

Twenty steps: let t be t +1, judge whether t satisfies>NCmax. If not, returning to the step eight for iteration; if yes, the operation is considered to be finished, and a global optimal solution x is outputgbest(t)。

Twenty one: solving the global optimum xgbestAnd (t) converting into an X-O-Y coordinate system, and outputting the planned optimal path of the unmanned aerial vehicle.

Fig. 3 shows the unmanned aerial vehicle route planning result obtained through the calculation steps, fig. 4 shows the numerical result of 50 times of independent route planning by the mixed firework particle swarm cooperative algorithm, and fig. 5 is an average path length evolution curve of 50 times of independent route planning by the mixed firework particle swarm cooperative algorithm. As can be seen from FIG. 3, the unmanned aerial vehicle route drawn by the mixed firework particle swarm collaborative calculation method is safe and smooth, and is a good unmanned aerial vehicle flight path. In fig. 4, the second column is the length of the shortest path planned in the 50-time planning, the third column is the average value of all path lengths in the 50-time planning, the fourth column is the median of all path lengths in the 50-time planning, the fifth column is the standard deviation of the path lengths in the 50-time planning, the sixth column is the length of the longest path planned in the 50-time planning, the seventh column is the success rate of the 50-time planning, namely, the average time of one-time algorithm planning in the 50-time planning is listed as the success rate of the planning, namely, the unmanned aerial vehicle can safely move from the starting point to the target point. From the data in fig. 4, it can be derived: the hybrid firework particle swarm cooperative algorithm is adopted to plan the unmanned aerial vehicle route, a better unmanned aerial vehicle flight path can be planned in the allowed planning time, the algorithm has the strongest robustness, and the success rate is high. Therefore, the mixed firework particle swarm cooperative algorithm provided by the invention is an effective unmanned aerial vehicle route planning method, can stably plan a better unmanned aerial vehicle flight path, and ensures that the unmanned aerial vehicle can safely run to a target point.

21页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:轨迹规划方法、轨迹规划装置、存储介质与电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!