Multi-machine collaborative inspection path planning method, terminal and readable storage medium
By combining particle swarm optimization, artificial bee colony optimization, and simulated annealing optimization to optimize UAV swarm path planning, the problem of low UAV inspection efficiency in complex terrain was solved. Furthermore, blockchain technology was used to ensure data security, achieving efficient and secure UAV swarm inspection.
Patent Information
- Application Number
- CN202410302238.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-15
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-03-15
AI Technical Summary
In complex terrain environments, traditional manual power line inspection is inefficient, making it difficult to achieve efficient drone swarm path planning, and the security of drone inspection data is difficult to guarantee.
A novel algorithm model is constructed by combining particle swarm optimization, artificial bee colony optimization, and simulated annealing algorithms to plan multi-machine collaborative inspection paths, and the inspection data is encrypted and stored using blockchain technology.
This improved the safety and efficiency of drone inspections, prevented multiple drone collisions, and ensured the safety and authenticity of inspection data.
Smart Images

Figure CN118331290B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unmanned aerial vehicle control technology, and in particular to a multi-machine collaborative inspection path planning method, a terminal and a readable storage medium. Background Art
[0002] With the rapid development of modern science and technology, power system inspections have also changed from traditional manual inspections to drone inspections and have been widely used.
[0003] In order to solve the problems existing in power inspection under complex terrain environment, such as the remote geographical location of high-voltage towers, which leads to low efficiency of traditional manual inspection, the present invention proposes a multi-machine collaborative inspection path planning method, terminal and readable storage medium. Summary of the invention
[0004] The technical problem solved by the present invention is to provide a multi-machine collaborative inspection path planning method, terminal and readable storage medium, which have better global search capability and convergence in complex terrain inspection path planning, can generate a better drone cluster path planning solution, and ensure the security of drones and inspection data.
[0005] The present invention solves the technical problem by adopting the following technical solutions:
[0006] A multi-machine collaborative inspection path planning method, characterized in that it includes: establishing a basic model of an unmanned aerial vehicle; obtaining inspection target information, the inspection target information including the inspection target location, the inspection space map, the inspection starting point and end point, and the number of inspection paths; performing multi-machine collaborative inspection modeling of the unmanned aerial vehicle, the multi-machine collaborative inspection modeling including the inspection model, multi-machine collaborative obstacle avoidance, flight constraints, multi-machine spatial coordination and time coordination, and multi-machine collaborative path planning benefit function; optimizing and improving based on the combination of a particle swarm algorithm, an artificial bee colony algorithm, and a simulated annealing algorithm to construct a new algorithm model; performing multi-machine inspection path planning according to the new algorithm model, the basic model, the multi-machine collaborative inspection model, and the inspection target information; controlling the unmanned aerial vehicle to perform inspection based on the multi-machine inspection path planning, and encrypting and saving the acquired inspection data through blockchain technology.
[0007] In a preferred embodiment of the present invention, the above-mentioned step of optimizing and improving the combination of particle swarm algorithm, artificial bee colony algorithm and simulated annealing algorithm to construct a new algorithm model includes: combining the particle swarm algorithm with the artificial bee colony algorithm, updating the iteration of the particle swarm through the update method of the artificial bee colony algorithm, and dividing it into leading bees, scout bees and follower bees in the artificial bee colony algorithm based on the fitness of the particles; adjusting the role of the particles in the inspection path according to the real-time changes in the fitness of the particles; adding the simulated annealing algorithm, and updating the local search capability of the algorithm according to the Metropolis criterion in the simulated annealing algorithm.
[0008] In a preferred embodiment of the present invention, the above-mentioned inspection model is constructed: the inspection distance and total inspection time of the drone from the inspection starting point to the inspection end point are set, and the total inspection time is less than the drone's flight time; the time interval between the inspection target not being inspected and the last cluster inspection is obtained, and the weight and priority of the inspection target are confirmed according to the time interval, and the sum of the weights of the inspection targets is maximized as the objective function: According to the inspection target location, obtain the Euclidean distance between the inspection starting point, inspection target and inspection end point: The flight time between the inspection starting point, inspection target and inspection end point is obtained according to the Euclidean distance and the flight speed of the drone: Get the time taken by the drone cluster route: and
[0009] In a preferred embodiment of the present invention, the objective function for constructing multi-machine collaborative obstacle avoidance is: Among them, d ic is the distance between drones, d io1 is the distance between the drone and the tree, d io2 is the distance between the drone and the magnetic field, ω 1 ,ω 2 ,ω 3 is the weight coefficient.
[0010] In a preferred embodiment of the present invention, the flight constraints are constructed as follows: the maximum flight altitude and the minimum flight altitude of the UAV and the turning radius constraints are set. min <H i <H max , r i ≥r min , where the maximum flight altitude is H max , the minimum flight altitude is H min , the minimum turning radius is r min ; Set the pitch angle constraint between the two inspection points of the drone: Among them, z i ≠z i +1; Set the steering angle constraint between the two inspection points of the drone: Among them, Z i =Z i +1.
[0011] In a preferred embodiment of the present invention, the above-mentioned construction of multi-machine spatial coordination and temporal coordination: setting a minimum safe distance between drones; setting a maximum flight speed and a minimum flight speed of the drones.
[0012] In a preferred embodiment of the present invention, the above-mentioned multi-machine collaborative path planning benefit function is: f = ω 1 f voyage +ω 2 f height +ω 3 f inspection ; Among them, ω 1 ,ω 2 and ω 3 The flight cost, flight altitude cost and inspection cost are respectively used as weight coefficients in the benefit function.
[0013] In a preferred embodiment of the present invention, the above-mentioned step of controlling the drone to perform inspection based on the multi-machine inspection path planning, and encrypting and saving the acquired inspection data through blockchain technology, includes: obtaining the inspection data of the drone during the inspection process; uploading the inspection data to the blockchain for encrypted storage based on the security model, smart contract and consensus mechanism of the blockchain.
[0014] A smart terminal comprises: a memory and a processor, wherein the memory stores a multi-machine collaborative inspection path planning program, and when the multi-machine collaborative inspection path planning program is executed by the processor, the steps of the multi-machine collaborative inspection path planning method as described in any one of the above are implemented.
[0015] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the multi-machine collaborative inspection path planning method as described in any one of the above are implemented.
[0016] The technical effect achieved by the present invention using the above technical solution is: combining the particle swarm algorithm (PSO), the artificial bee colony algorithm (ABC), and the simulated annealing algorithm (SA) to construct a new algorithm model to optimize the inspection path planning of the drone cluster, so that the planned drone cluster inspection path avoids multi-machine collisions and improves the safety and efficiency of drone inspections.
[0017] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following specifically cites a preferred embodiment and describes it in detail with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flowchart of the steps of a multi-machine collaborative inspection path planning method shown in the present invention.
[0019] Figure 2 A 3D planning diagram of an optimal path for targeted inspection shown in the present invention.
[0020] Figure 3 A schematic diagram of a path in an optimal path for targeted inspection shown in the present invention.
[0021] Figure 4 The figure is a schematic diagram of a second path in an optimal path for targeted inspection shown in the present invention.
[0022] Figure 5 The third schematic diagram of a path in an optimal path for targeted inspection shown in the present invention.
[0023] Figure 6 This is a diagram showing the pitch angle changes of the three paths of the present invention.
[0024] Figure 7 The figure shows the energy consumption variation diagram of three paths according to the present invention. DETAILED DESCRIPTION
[0025] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present invention. Through the description of the specific implementation methods, the technical means and effects adopted by the present invention to achieve the predetermined purpose can be more deeply and specifically understood, and the attached drawings are only for reference and explanation purposes, and are not used to limit the present invention.
[0026] See also Figure 1 , Figure 1 A flowchart of the steps of a multi-machine collaborative inspection path planning method shown in the present invention.
[0027] like Figure 1 As shown, a multi-machine collaborative inspection path planning method provided by one embodiment of the present invention includes the following steps:
[0028] S11: Build the basic model of the drone;
[0029] In this embodiment, a model is built and simulated based on a quad-wing UAV commonly used in complex terrain.
[0030] The basic models of the quad-wing UAV include: quad-wing UAV dynamics model, quad-wing UAV power position model, quad-wing UAV attitude dynamics model, quad-wing UAV motion model and flight control rigid body model.
[0031] Dynamic model of quad-wing drone:
[0032] Model the four-wing UAV model. e X e Y e is the ground coordinate system of the UAV, O b X b Y b is the body coordinate system of the UAV. Among them, the roll angle is ξ, the pitch angle is θ, and the yaw angle is ψ. Formula (1) is the rotation matrix of the quadcopter UAV dynamics model, e represents the ground coordinate system, b represents the body coordinate system, and the rotation matrix can transform the vector represented in the body coordinate system into the ground coordinate system.
[0033]
[0034] According to Newton's second law, the translation F of the center of mass can be obtained:
[0035] Four-wing UAV dynamic position model:
[0036] According to Newton's second law, we can get: mv e =G e +T e (3);
[0037] Among them, m is the mass of the quadcopter, v e With G e The e in T is a vector in the ground coordinate system. b Where b is the vector in the body coordinate system, G is the gravitational acceleration, and T is the sum of the forces generated by the four propellers. After dividing both sides of formula (3) by m, we get Multiply We get formula (4) After further arrangement, we can get formula (5). Among them, formula (5) is the final model of the position dynamics of the quad-wing UAV.
[0038]
[0039] Quad-wing UAV attitude dynamics model:
[0040] Formula (6) can be obtained through the Euler equation. b represents the angular velocity in the body coordinates, τ b It represents the torque generated by the propeller on the fuselage in the fuselage coordinate system, and J is the inertia matrix. represents the gyroscopic torque in the body coordinate system. As shown in formula (7), where J RP is the total moment of inertia of the motor rotor and propeller of the quadcopter around the body axis, They respectively represent the rotation speeds of the four propellers of the quadcopter.
[0041]
[0042] Replace ω in formula (6) b Decomposed into components in three directions, we can get [ω xb ,ω yb ,ω zb Here, for the convenience of representation and explanation, the above three components [ω xb ,ω yb ,ω zb ] is denoted as [p, q, r]. Substituting formula (7) and formula (8) into formula (6), formula (9) can be obtained after rearrangement. I in formula (9) is the three moments of inertia on x, y, and z, and the value of Ω is shown in formula (10).
[0043]
[0044] Quadcopter UAV motion model and flight control rigid body model:
[0045] The quadcopter UAV motion model takes velocity and angular velocity as input and outputs position and attitude, as shown in formula (9). In formula (11), P e =[x,y,z] T It is used to represent the position of the quadcopter in the ground coordinate system. Formula (11) and formula (5) can be combined to get formula (12). After adding a certain disturbance, the three attitude angles in the Euler angle are divided into Combining formula (9) with the attitude angle yields formula (13). Combining formula (12) with formula (13) and substituting [U 1 U 2 U 3 U 4 ] T =[fτ x τ y τz ] T After substituting in, we get a nonlinear six-degree-of-freedom model, as shown in formula (14).
[0046] P e =v e (11);
[0047]
[0048]
[0049] S12: Obtain inspection target information, which includes the inspection target location, inspection space map, inspection starting point and end point, and the number of inspection paths.
[0050] Inspection target information is obtained when performing multi-machine inspection path planning or multi-machine inspection path planning simulation. It changes according to the different tasks performed. Inspection target information includes: the take-off point of the drone (i.e. the inspection starting point), the landing point of the drone (i.e. the inspection end point), the inspection target location and the inspection space map (in this embodiment, the task performed is mountain power inspection, and its inspection target is the high-voltage tower. The inspection space map is a three-dimensional simulation map of the terrain of the task area).
[0051] S13: Modeling of multi-drone collaborative inspection of UAVs, which includes inspection model constraints, multi-drone collaborative obstacle avoidance constraints, complex terrain flight constraints, multi-drone spatial and temporal coordination constraints, and multi-drone collaborative path planning benefit function constraints.
[0052] Optionally, construct the inspection model constraints: set the inspection distance and total inspection time of the drone from the inspection starting point to the inspection end point, and the total inspection time is less than the drone's flight time; obtain the time interval between the inspection target not being inspected and the last cluster inspection, and confirm the weight and priority of the inspection target according to the time interval, and maximize the sum of the weights of the inspection targets as the objective function: According to the inspection target location, obtain the Euclidean distance between the inspection starting point, inspection target and inspection end point: The flight time between the inspection starting point, inspection target and inspection end point is obtained according to the Euclidean distance and the flight speed of the drone: Get the time taken by the drone cluster route: and
[0053] For example, a quadcopter drone is used to inspect a high-voltage tower starting from 0 o'clock (i.e., the inspection starting point). The distance to return to the end point (i.e., the inspection end point) after completing the task is set to N+1. The total time from the drone taking off from 0 o'clock to N+1 is defined as T maxAmong them, T max The value of is less than the overall flight time of the drone hardware (i.e., the inspection time is less than the flight time), while ignoring the impact of unexpected factors such as wind and the loss of direction of the quadcopter. Set the set of high-voltage towers that have not been inspected between the inspection start point and the inspection end point to T = {1,…,i,…,N}, then the set of total high-voltage towers is A = {0,1,…,i,…,N,N+1} (i.e., including the inspection start point and the inspection end point). By using the weight method to set the high-voltage tower that has not been inspected to i, then W i (i∈T) is the time interval between the last cluster inspection and the last time the high-voltage tower was not inspected, W i The larger the value, the higher the priority of the high-voltage tower that has not been inspected. P = {0, i, ..., j, N + 1}, i represents the inspection path of the drone. The four-wing drone starts from point 0 and returns to point N + 1 after the inspection is completed. The flight time of the drone between high-voltage tower i and high-voltage tower j is set to t ij , d ij is the Euclidean distance between high-voltage tower i and high-voltage tower j, v is the flight speed of the quadcopter, and dx, dy, and dz are the components of the Euclidean distance. Then:
[0054]
[0055] Let each inspection path be P, and the time taken for one of the drone cluster routes be t p ,but:
[0056]
[0057] The objective function is to maximize the sum of the weights of the high-voltage towers inspected by the drone cluster:
[0058]
[0059] Among them, the constraints of the inspection model are:
[0060] (1) Each high-voltage tower is inspected at least once (once a day, once a week, or once a month, which can be customized according to needs), that is, Where any j∈T.
[0061] (2) Constraints on the endurance of drone swarms, E c ≤E max .
[0062] Optionally, construct the objective function constraints for multi-machine collaborative obstacle avoidance: Among them, d ic is the distance between drones, d io1 is the distance between the drone and the tree, d io2is the distance between the drone and the magnetic field, ω 1 ,ω 2 ,ω 3 is the weight coefficient.
[0063] For example, suppose there are N quadcopter drones in a drone cluster, and the position of each quadcopter drone is represented by a two-dimensional vector, which can be x i =[x i1 ,x i2 ]. Where i={1,…,i,…,N}. Then the objective function is:
[0064] Among them, d ic is the distance between the four-wing UAVs, d io1 is the distance between the quadcopter and the bushes / trees, d io2 is the distance between the quadcopter and the magnetic field / ground. 1 ,ω 2 ,ω 3 is the weight coefficient used to balance the distance between drones and the distance between obstacles.
[0065] If D min is the minimum distance between the quadcopter and the obstacle, then the constraint condition is: icmin ≤D min ;d iomin ≤D min (20).
[0066] Optionally, construct complex terrain flight constraints: set the maximum and minimum flight altitudes and turning radius constraints of the UAV, H min <H i <H max , r i ≥r min , where the maximum flight altitude is H max , the minimum flight altitude is H min , the minimum turning radius is r min ; Set the pitch angle constraint between the two inspection points of the drone: Among them, z i ≠z i +1; Set the steering angle constraint between the two inspection points of the drone: Where Z i =Z i +1.
[0067] Exemplarily, this embodiment is used for inspection route planning in complex mountainous areas, so the maximum flight altitude and minimum flight altitude as well as turning radius constraints of the quadcopter drone are set to avoid possible safety problems that may occur in the quadcopter drone.
[0068] Set the maximum flight altitude, minimum flight altitude and minimum turning radius of the quadcopter drone to H max , H min and r min , and then constrain the flight altitude and turning radius of the quadcopter drone, as shown in formula (21) and formula (22). During the inspection process of the quadcopter drone, the coverage area of its patrol area will be limited, so it is necessary to constrain the inspection area of the quadcopter drone, as shown in formula (23), where S min is the minimum inspection area. At the same time, the pitch angle between the two inspection points of the quadcopter is constrained, as shown in formula (24), where z i ≠z i +1. Then constrain the steering angle between the inspection points of the quadcopter drone, as shown in formula (25), the steering angle must satisfy the condition Z i =Z i +1. By utilizing the constraints set above, it is ensured that the quadcopter drone can smoothly conduct inspections in complex terrain.
[0069] H min <H i <H max (twenty one);
[0070] r i ≥r min (twenty two);
[0071] S min ≥S c (twenty three);
[0072]
[0073] Optionally, construct multi-machine spatial coordination and temporal coordination constraints: set the minimum safe distance between drones; set the maximum and minimum flight speeds of drones.
[0074] For example, in terms of spatial coordination, in order to prevent collision accidents between four-wing drones, it is necessary to consider the safe distance d between the four-wing drones. min , constraining the distance between the four-wing UAVs, as shown in formula (26). In terms of time coordination, the flight speed v of the four-wing UAV is set to [V min ,V max ], the route length is L, and the time taken to reach the target location is shown in formula (27). is a non-empty set, in which case any t in the set can be used as a collaborative time.
[0075] di,j ≥d min (26); t i =[L / V max ,L / V min ](27).
[0076] Optionally, construct a multi-machine collaborative path planning benefit function constraint: f = ω 1 f voyage +ω 2 f height +ω 3 f inspection ; Among them, ω 1 ,ω 2 and ω 3 The flight cost, flight altitude cost and inspection cost are respectively used as weight coefficients in the benefit function.
[0077] For example, in order to control the energy consumed by the quadcopter drone when performing a mission, the range cost, flight altitude cost and inspection cost of the quadcopter drone are used as weights in the benefit function. Different costs have different impacts on this voyage. Let the weight coefficients be ω 1 ,ω 2 ,ω 3 , then the benefit cost is: f = ω 1 f voyage +ω 2 f height +ω 3 f inspection (28).
[0078] S14: Optimize and improve the combination of particle swarm algorithm, artificial bee colony algorithm and simulated annealing algorithm to build a new algorithm model.
[0079] In this embodiment, the particle swarm algorithm is used as the main algorithm to enhance the global search capability and real-time optimization capability of the drone cluster during the inspection process.
[0080] Particle Swarm Optimization (PSO) is an optimization algorithm based on social behavior, inspired by collective behaviors such as bird flocks or fish schools. The algorithm iteratively searches for the optimal solution in the solution space by simulating cooperation and competition between individuals. Particles adjust their speed and position based on their own experience and the global best solution in order to search in the direction of the target. In the process of using the particle swarm algorithm, it is first initialized, including setting the number of particles N and the dimension of each particle; randomly initializing the position and speed of each particle; initializing the individual best solution P of each particle. best and the global optimal solution G bestThen the velocity and position of the particle are updated as shown in formulas (29) and (30):
[0081] v i (t+1)=w*v i (t)+c 1 *r 1 (P besti -x i (t))+c 2 *r 2 (G besti -x i (t)) (29);
[0082] X i (t+1)=X i (t)+V i (t+1) (30);
[0083] In formulas (29) and (30), v i (t) is the velocity of particle i at time t, x i (t) is the position of particle i at time t. w is the inertia weight, which is used to adjust the inertia term in the particle velocity, controls the degree to which the particle maintains its previous velocity during the search process, and balances the trade-off between global search and local search. 1 and c 2 They are learning factor, c 1 represents the individual optimal solution P best The degree of movement in the direction of 2 Controls the particles to move towards the global optimal solution G best The degree of movement in the direction of
[0084] The Artificial Bee Colony Algorithm is a heuristic optimization algorithm based on the foraging behavior of bees. It simulates the strategy of a bee colony in searching for the best food source and finds the optimal solution to the problem by exploring the solution space in parallel. The design of this algorithm is inspired by the three roles of a bee colony: leader bees, scout bees, and follower bees. These roles play different roles in the search and optimization process and cooperate with each other to achieve the discovery of the optimal solution. Among them, the leader bee stores information about the food source, including the distance, direction, and abundance of the food source relative to the hive. The scout bee is responsible for actively exploring the surrounding environment and looking for new potential food sources. The follower bees stay in the hive. They receive information from the leader bees and decide their next move based on the information.
[0085] Assume that the population size is PopSize, the number of nectar sources is SN, and the maximum number of iterations is MCN. Then in the initialization phase: X ij =Xminj +rand[0,1](X maxj —X minj )(31);
[0086] Among them, X ij Indicates honey source X i The j-th dimension value of , the value range of i is {1, 2, ..., SN}, and the value range of j is {1, 2, ..., D}.
[0087] In the search phase, the leader bee searches for new nectar sources near the initial nectar source, which can be expressed as:
[0088] V ij =X ij +φ ij (X ij —X kj ) (32);
[0089] Where k is in {1, 2, ..., SN}, j is in {1, 2, ..., D}, and k and j are not equal, φ ij is a random number between [-1, 1], X ij is the location of the random nectar source in the initialization phase. In this implementation, the artificial bee colony algorithm is used to optimize the particles in the particle swarm algorithm group, and the particles in the group are divided into three types: leading bees, employed bees, and follower bees. The algorithm is used to obtain particles with higher fitness, thereby improving the algorithm's search ability and robustness.
[0090] The simulated annealing algorithm (Simulated Annealing Algorithm) is a global optimization algorithm that simulates the annealing principle in the metal smelting process. The algorithm searches for the optimal solution to the problem in the solution space by accepting a poor solution with a certain probability and gradually reducing the acceptance probability. The annealing algorithm is usually used to solve problems such as combinatorial optimization and parameter solving. The algorithm first needs to be initialized, and the initial solution is used as the current optimal solution, and the initial temperature, termination temperature, and number of outer loops are initialized. Then set the main loop, execute the inner loop (iteration) at the current temperature until the stop condition is met, update the temperature and the new counter, and return the optimal solution. The stop conditions are:
[0091] (1) Generate a new solution (neighborhood solution).
[0092] (2) Calculate the objective function difference ΔE between the current solution and the new solution.
[0093] (3) If ΔE is less than or equal to 0, accept the new solution as the current solution.
[0094] (4) Otherwise, accept the new solution with a certain probability p = exp(-ΔE / T), where T is the current temperature.
[0095] Specifically, PSO and ABC are both bionic algorithms, and both will select individuals with higher fitness as new standards and will also be affected by previous experience. Both are also prone to fall into local optimal solutions, but there are differences between the two in individual division. During the search process, PSO is more likely to fall into local optimal solutions, thereby affecting the performance of the algorithm. This implementation combines the advantages of the above two algorithms, combines the PSO algorithm with the ABC algorithm, and uses the update method of the artificial bee colony algorithm to update the iteration of the particle swarm to avoid the algorithm from falling into a local optimal cycle, thereby enhancing the global search capability of the algorithm.
[0096] Specifically, during the initialization process, according to the grouping strategy of the artificial bee colony algorithm, the corresponding particles are selected according to the fitness level to set the leading bees and scout bees; the high-voltage towers for inspection are set as the nectar source, and according to the number of lines set, all particles are divided into n groups (that is, one route corresponds to one group), and then the particles in the group are set as follower bees. The leading bees in the group follow the scout bees, and the follower bees mainly perform the optimal search in the local area under the influence of the scout bees. The level changes in the group are adjusted in real time through the real-time changes in fitness. At this time, the update method from the internal group of the particle swarm will gradually decrease with the increase of the number of iterations, resulting in a stagnant state, causing the algorithm to fall into the problem of local optimal solution. In order to solve this problem, it is also necessary to introduce the SA algorithm to increase the local search capability. The improved algorithm involves the optimal particles with better fitness, and the optimal particle update operation is as follows:
[0097]
[0098] X i,j (t+1)=X mini,j (t+1)+rand[0,1](X maxi,j (t+1)—X mini,j (t+1)) (34);
[0099]
[0100] C 1 =exp{1 / (1+f i,j )}; C 2 =exp{1+abs(f i.j —f k,j )}(36);
[0101] Among them, X ij represents the i-th particle of the j-th group. 1 and C 2is the improved learning factor, which can reduce the learning factor as the number of iterations increases, thereby reducing the algorithm's exploration power and enhancing its convergence. i,j is the fitness of the current particle, Pbest i,j Is X in group j ij The optimal solution, Gbest i,j For the jth group except Pbest i,j The optimal solution. k,j It can be the fitness of any particle in the jth group. Each particle in the group is updated according to the following criteria:
[0102] v i (t+1)=w*v i (t)+c 1 *r 1 *(P besti -x i (t))+c 2 *r 2 *(G besti -x i (t)) (37);
[0103] X i (t+1)=X i (t)+V i (t+1) (38);
[0104] Then, by modifying the simulated annealing algorithm, the local search capability of the algorithm is updated according to the Metropolis criterion in the simulated annealing algorithm:
[0105]
[0106] exp(—Δf / T(t))>rand(40);
[0107] Δf represents the change in variable f, that is, the difference between the new value and the old value of f.
[0108] When Δf<0, it means that the fitness of the particle is poor, and it can be adjusted using formula (40). After the adjustment, the algorithm can avoid falling into the local optimal solution problem again, and other particles do not change their states.
[0109] In order to verify the feasibility of the application of the newly constructed PSO-ABC-SA algorithm in real scenes, an experimental simulation of its UAV cluster path planning was carried out. The experimental environment uses Matlab. The map uses the terrain of a certain area and the location of high-voltage towers. The map size is set to 300m*100m*3000m, including four mountains up to 3km high and evenly distributed mountains of 2.4km-1.8km. The take-off point coordinates are (10,50,2800) and the end coordinates are (10,250,10). Among them, 8 high-voltage towers with a radius of 5m are set as inspection points, and the coordinates are (10,50,2800), (40,28,2200), (80,45,1218), (100,50,815), (125,50,2200), (180,50,3000), (230,20,120).
[0110] Specifically, three inspection paths are set, the particle grouping of the bee swarm algorithm is set to 3, the number of iterations of the particle swarm algorithm is set to 400, the population size is 60, the weight is set to 0.8, the degradation rate is 0.99, and the learning factor C is 1 is 1.5, the learning factor C 2 is 1.5, the internal iteration of the local annealing algorithm is 10, the initial temperature is 10000, and the temperature attenuation coefficient is 0.99.
[0111] like Figures 2 to 5 As shown in the figure, the new algorithm PSO-ABC-SA algorithm is used to plan the path, which can effectively avoid complex mountainous terrain and prevent the problem of drone collisions in drone clusters. The path planned by the new algorithm may be a straight line or a curve with a small turning range.
[0112] Among them, the four-wing drone on the first path inspected 5 high-voltage towers in the area, and during the inspection process of the four-wing drone along the way, the pitch angle of the four-wing drone changed little and the turning amplitude was also extremely small, ensuring the safety of the drone. The drone on the second path inspected 2 new high-voltage towers. However, when inspecting near one of the high-voltage towers, although the turning amplitude of this path was small, the pitch angle of the four-wing drone increased due to passing through a mountainous area. The four-wing drone on the third path inspected the high-voltage towers that were not inspected by the first two paths, but in order to find the shortest path and bypass the mountains, the turning angle of this path was larger, but this enabled the four-wing drone to inspect the high-voltage towers that had not been inspected before and save energy consumption.
[0113] After dividing the inspection path, the coordinates and angles of each drone cluster are obtained. From the average optimal path planning ( Figures 2 to 5 The pitch angle transformation of the quad-wing UAV corresponding to the inspection path can be obtained as shown in Figure 6The angle is controlled by formula (24) and formula (25), so as to achieve the effect of saving energy loss, as shown in Figure 7 shown.
[0114] The above experimental results show that the inspection path planned by the improved new algorithm PSO-ABC-SA algorithm in this implementation can fully consider the mountainous terrain and the problem of multi-machine collision in the drone cluster, and maintain a small turning range during the inspection process, thereby improving the safety and work efficiency of the drone mission.
[0115] S15: Perform multi-machine inspection path planning based on the new algorithm model, basic model, multi-machine collaborative inspection modeling and inspection target information.
[0116] S16: Control the drones to perform inspections based on multi-machine inspection path planning, and encrypt and save the acquired inspection data through blockchain technology.
[0117] Optionally, the step of controlling the drone to perform inspection based on the multi-machine inspection path planning, and encrypting and saving the acquired inspection data through blockchain technology includes: acquiring the inspection data of the drone during the inspection process; uploading the inspection data to the blockchain for encrypted storage based on the security model, smart contract and consensus mechanism of the blockchain.
[0118] The blockchain is a chain of blocks. Each block stores certain information, and they are connected into a chain in the order of their generation. This chain is stored in all servers. As long as there is a server in the entire system that can work, the security of the entire blockchain can be guaranteed. The server is called a node in the blockchain system, which provides storage space and computing power support for the entire blockchain system. If the information stored in the blockchain needs to be modified, the consent of more than half of the nodes must be obtained, and the information in all nodes must be modified. Nodes are usually in the hands of different entities, which can avoid tampering with the information in the blockchain. Compared with traditional networks, blockchain has two core characteristics: one is that data is difficult to tamper with, and the other is decentralization; this makes the information recorded in the blockchain more authentic and reliable, and can help solve the problem of people not trusting each other. The blockchain used in the key points is a private chain.
[0119] Security model of blockchain: In order to ensure the traceability, authenticity and security of drone flight data stored in the blockchain, the inspection system of the power company selects two cyclic groups G with prime order q as the private key generation center. 1 and G 2 , g as the group G 1 Generator, and then define a bilinear pairing: G 1 ×G 1 →G2 , and select two hash functions H 2 :{0,1} 256 Then, the power company's inspection system randomly selects a, b, c∈Z p , where Z p ∈(1,2.....,p-1), generate the system's public key MPK={h=g,f=g 1 / b ,e(g,g) a} and system master key MSK={c,b,g a}. Finally, the inspection system public key MPK of each drone is broadcast to the entire blockchain system to complete the system initialization.
[0120] Smart contract: Establish an edge layer, use the database and blockchain to encrypt the collected data (including storage points and data, etc.) through ring signatures and CryptoNote protocol, and store and share them in a distributed manner.
[0121] In order to avoid the possible emergence of data islands by establishing a data lake through angle data, flight time data, and flight mileage data, data sharing access between the data lake and smart contracts is required to control the model.
[0122] Establish an off-chain storage method, only store user name, user address, and storage record information in the block body of the blockchain, and the original data is encrypted and stored in the data aggregator for identity authentication between nodes.
[0123] The CryptoNote protocol is used to encrypt the data storage interaction of edge layer devices to ensure the security of drone flight data and perform identity authentication for both parties. Establish a random function r to obtain a signature value P: P = H S (rA)G+B(where H S is the cryptographic hash function, G is the base point).
[0124] When viewing the drone flight data, the sender asks the receiver through a secure channel whether to obtain the private key (a, b) used by the receiver, and checks the data storage interaction data. Generate an authentication value P': P'=H S (Ra)G+b (where R is the authentication weight and the receiver replies with a one-time key x).
[0125] Using the stealth address protocol with CryptoNote provides stronger privacy for users in the blockchain network:
[0126] (1)P Sign (m,P S ,P 1 ,P 2.........,P n ), the signature is composed of the public key (P S ,P 1 ,P 2 .........,P n ) and the signer's private key P n Correlate to generate signature δ sign .
[0127] (2)f verify (m,δ sign )To verify the signature, the signer uses the public key and message m to output true or false.
[0128] The signer generates a ring signature and calculates the symmetric key S as the hash value of the message m to be signed, S = h(m). The public key of each party is required to create a ring signature group. The signer can hang the number of signatures in storage to provide ambiguous signers and store data w = l i n+r i Composition, signature f i (w) can be expressed as:
[0129] f i (w) = l i n+d i q i (n≤2 b );
[0130] f i (w) = w(l i +1)(n>2 b );
[0131] d i Signature for the sender, q i A random number generated by the sender; i is the random number generated by the receiver; n is the number of signers; r i Is the verification code.
[0132] f i (w) is a permutation function from 0 to 1, a one-way threshold function, and the encryption of the public key constitutes a ring signature of n signers: R n =f 1 ⊕f 2 ⊕.........⊕f n .
[0133] Node data sharing is implemented through smart contracts on the blockchain, which are divided into locking and unlocking. Locking uses scripts to limit shared data output constraints, while unlocking uses scripts to limit operating standards. The specific process is: (1) shared access request; (2) execution of smart contracts; (3) sending shared data; (4) specifying access data.
[0134] Consensus mechanism: The blockchain uses the DPoS mechanism (Delegated Proof of Stake) process. The basic workflow is:
[0135] Election stage: During the voting and election stage, the holding nodes will use the shares in their hands as votes to vote for the supported nodes by approval voting. Each share is allowed to cast one vote for each node. When the voting is over, the system counts all the votes and calculates the valid votes of all nodes, and selects the top 2TN nodes in the chain with the valid votes as candidate witness nodes (where TN is the number of witness nodes in the blockchain that are deemed qualified by the holding nodes with at least a general number of votes). Then they are ranked according to the number of votes, and the top TN nodes are used as the witness node set for this round, and the remaining TN nodes are used as the candidate witness node set. Here, the present invention has N drone flight data in the entire blockchain network, and some nodes are selected as witness nodes. In order to ensure that malicious elections do not occur, the remaining nodes are standby nodes.
[0136] Block generation phase: A small number of nodes are selected from the voted witness nodes through the DPoS algorithm. These nodes will serve as block verification and block packaging workers in the blockchain system. Each witness node will produce blocks in sequence within the specified time interval after being sorted. Whenever a block is successfully packaged, it must be confirmed and verified by no less than (2 / 3+1)TN witness nodes before the block can be put on the chain. Among them, if the witness node of the work fails to successfully generate a block, then this witness node will be skipped, and the next round of witness nodes will continue to generate blocks.
[0137] For example, assume that there are N drone flight data in the entire blockchain network, and select some nodes as witness nodes. In order to ensure that malicious elections do not occur, the remaining nodes are candidate nodes. In order to ensure the fairness of the vote, so that no one votes for false data, a weight is added. The weight is the total number of votes divided by (threshold + penalty intensity). According to the DPoS consensus mechanism, when a newly generated block is successfully verified by (2 / 3+1)TN number of witness nodes, the block can be successfully added to the blockchain, and all nodes in the blockchain will accept this new block. Whenever the verification is successful, the working node will receive a reward of 1 at the threshold, and the remaining observation nodes will receive a reward of 0.2. If the verification fails, the penalty intensity will increase by 1.
[0138] The multi-machine collaborative inspection path planning method of this embodiment combines the particle swarm algorithm (PSO), the artificial bee colony algorithm (ABC), and the simulated annealing algorithm (SA) to construct a new algorithm model to optimize the inspection path planning of the drone cluster, so that the planned drone cluster inspection path can effectively avoid complex mountainous terrain, avoid multi-machine collisions, and save drone energy consumption; and the inspection data collected during the drone inspection process is encrypted and stored through blockchain, smart contracts and consensus mechanisms, which ensures the security of the drone inspection data and avoids the falsification of inspection data.
[0139] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a portion of the steps in the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0140] Through the description of the above implementation methods, those skilled in the art can clearly understand that the embodiments of the present invention can be implemented by hardware, or by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the embodiments of the present invention.
[0141] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the specific details in the above embodiments. The above embodiments and drawings are exemplary. The modules or processes in the drawings are not necessarily required to implement the embodiments of the present invention and cannot be understood as limitations on the present invention. Within the technical concept of the present invention, the technical scheme of the present invention can be subjected to a variety of simple modifications and combinations, and these simple modifications and combinations all belong to the protection scope of the present invention.
Claims
1. A multi-machine collaborative inspection path planning method, characterized in that: include: Establishing a basic model of the UAV, the basic model includes: a dynamic model, a dynamic position model, an attitude dynamics model, a motion model and a flight control rigid body model; Obtaining inspection target information, including inspection target location, inspection space map, inspection starting point and end point, and number of inspection paths; Carry out multi-machine collaborative inspection modeling of UAVs, which includes inspection model constraints, multi-machine collaborative obstacle avoidance constraints, complex terrain flight constraints, multi-machine spatial and temporal coordination constraints, and multi-machine collaborative path planning benefit function constraints; The fitness of the particle swarm algorithm is divided into the grouping strategy of the artificial bee colony algorithm. The particles in the particle swarm algorithm are divided into roles. The fitness is divided into leading bees, scout bees, and follower bees from high to low. The internal level change of the particle swarm is adjusted by fitness. For particles with poor fitness, the simulated annealing algorithm is used to generate cracking to expand the range of solutions and update the local search ability of the new algorithm model to build a new algorithm model. Perform multi-machine inspection path planning based on the new algorithm model, basic model, multi-machine collaborative inspection modeling and inspection target information; Controlling the drone to perform inspection based on the multi-drone inspection path planning, and encrypting and saving the acquired inspection data through blockchain technology; Among them, the inspection model constraints are constructed: the inspection distance and total inspection time of the drone from the inspection starting point to the inspection end point are set, and the total inspection time is less than the drone's endurance time; the time interval between the inspection target not being inspected and the last cluster inspection is obtained, and the weight and priority of the inspection target are confirmed according to the time interval, and the sum of the weights of the inspection targets is maximized as the objective function; the Euclidean distance between the inspection starting point, the inspection target and the inspection end point is obtained according to the inspection target position; the flight time between the inspection starting point, the inspection target and the inspection end point is obtained according to the Euclidean distance and the flight speed of the drone; the time used for the drone cluster route is obtained; Construct the objective function constraints for multi-machine collaborative obstacle avoidance: Constructing complex terrain flight constraints: setting the maximum and minimum flight altitudes and turning radius constraints of the UAV; setting the pitch angle constraint between the two inspection points of the UAV; setting the steering angle constraint between the two inspection points of the UAV; Construct the multi-machine collaborative path planning benefit function constraint: f = ω1f voyage +ω2f height +ω3f inspection ; Among them, d ic is the distance between UAVs, d io1 is the distance between the drone and the tree, d io2 is the distance between the drone and the magnetic field, N is the total number of high-voltage towers, i is the i-th high-voltage tower currently inspected, ω1, ω2, ω3 are weight coefficients; f voyage is the voyage cost, f height is the flight altitude cost, f inspection is the inspection cost, ω1, ω2 and ω3 are the flight cost, flight altitude cost and inspection cost respectively, which are used as the weight coefficients in the benefit function.
2. The multi-machine collaborative inspection path planning method according to claim 1, characterized in that: Based on the combination of particle swarm algorithm, artificial bee colony algorithm and simulated annealing algorithm, the optimization and improvement are carried out. The steps of building a new algorithm model include: The particle swarm algorithm is combined with the artificial bee colony algorithm, the iteration of the particle swarm is updated by the update method of the artificial bee colony algorithm, and the particles are divided into leading bees, scout bees and follower bees in the artificial bee colony algorithm based on their fitness; Adjusting the role of particles in the inspection path according to the real-time changes in the fitness of the particles; The simulated annealing algorithm is added, and the local search capability of the algorithm is updated according to the Metropolis criterion in the simulated annealing algorithm.
3. The multi-machine collaborative inspection path planning method according to claim 1, characterized in that: Construct the inspection model constraints: Set the inspection distance and total inspection time of the drone from the inspection starting point to the inspection end point, and the total inspection time is less than the drone's flight time; Obtain the time interval between when the inspection target was not inspected and the last cluster inspection, and determine the weight and priority of the inspection target based on the time interval, and maximize the sum of the weights of the inspection targets as the objective function: N is the distance from the inspection starting point to the inspection end point, N+1 is the distance from the inspection starting point to the inspection end point, W i (i) is the time interval between the inspection target not being inspected and the last cluster inspection. The total inspection target set is A = {0, 1, ..., i, ..., N, N + 1}, the uninspected inspection target set is T = {1, ..., i, ..., N}, X ij The number of inspections of the inspection target; According to the inspection target location, obtain the Euclidean distance between the inspection starting point, inspection target and inspection end point: d ij The Euclidean distance between adjacent inspection targets, dx, dy, and dz are the components of the Euclidean distance respectively; The flight time between the inspection starting point, inspection target and inspection end point is obtained according to the Euclidean distance and the flight speed of the drone: v is the flight speed of the drone; Get the time taken by the drone cluster route: and 4. The multi-machine collaborative inspection path planning method according to claim 3, characterized in that: Construct the objective function constraints of the multi-machine collaborative obstacle avoidance: Among them, d ic is the distance between UAVs, d io1 is the distance between the drone and the tree, d io2 is the distance between the UAV and the magnetic field, ω1, ω2, ω3 are weight coefficients.
5. The multi-machine collaborative inspection path planning method according to claim 4, characterized in that: Construct the complex terrain flight constraints: Set the maximum and minimum flight altitudes of the drone and the turning radius constraints, H min <H i <H max , r i ≥r min , where the maximum flight altitude is H max , the minimum flight altitude is H min , the minimum turning radius is r min ; Set the pitch angle constraint between the two inspection points of the drone: Where Z i ≠Z i +1, γ is the pitch angle constraint angle, X, Y and Z are the coordinate values of the UAV in the spatial coordinate system of the inspection target position; Set the steering angle constraint between the two inspection points of the drone: Z i =Z i +1,θ max is the maximum constraint value of the steering angle of the UAV between adjacent inspection points, x and y are the coordinate values of the UAV in the plane coordinate system when it is at the inspection target position, x i With y i is the current Euclidean coordinate, x i+1 With x i—1 is the coordinate of the previous position and the next position on the x-axis, y i+1 With y i—1 are the coordinates of the previous and next positions on the y-axis.
6. The multi-machine collaborative inspection path planning method according to claim 5, characterized in that: Construct the multi-machine spatial coordination and temporal coordination constraints: Set the minimum safe distance between drones; Set the maximum and minimum flight speed of the drone.
7. The multi-machine collaborative inspection path planning method according to claim 6, characterized in that: Construct the multi-machine collaborative path planning benefit function constraint: f=ω1f voyage +ω2f height +ω3f inspection ; Among them, f voyage is the voyage cost, f height is the flight altitude cost, f inspection is the inspection cost, ω1, ω2 and ω3 are the flight cost, flight altitude cost and inspection cost respectively, which are used as the weight coefficients in the benefit function.
8. The multi-machine collaborative inspection path planning method according to claim 1, characterized in that: The steps of controlling the drone to perform inspection based on the multi-machine inspection path planning, and encrypting and saving the acquired inspection data through blockchain technology include: Obtaining inspection data of the drone during the inspection process; Based on the security model, smart contract and consensus mechanism of the blockchain, the inspection data is uploaded to the blockchain for encrypted storage.
9. An intelligent terminal, characterized in that: The intelligent terminal includes: a memory and a processor, wherein the memory stores a multi-machine collaborative inspection path planning program, and when the multi-machine collaborative inspection path planning program is executed by the processor, the steps of the multi-machine collaborative inspection path planning method as described in any one of claims 1 to 8 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the multi-machine collaborative inspection path planning method according to any one of claims 1 to 8 are implemented.
