Multi-unmanned aerial vehicle charging planning method, device, equipment and medium
By constructing the kinematic equation of the drone and combining the heuristic DWA algorithm and reinforcement learning, the drone charging planning is optimized, solving the randomness and local optimal solution problems of the existing algorithm, and achieving faster and more efficient charging. Sequence planning is suitable for practical engineering applications.
Patent Information
- Application Number
- CN202410787765.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-09-06
AI Technical Summary
Existing UAV charging planning algorithms such as simulated annealing algorithms and reinforcement learning have randomness and local optimal solution problems, which affects the accuracy and optimization degree of planning results. Moreover, the training time of reinforcement learning is huge, making it difficult to achieve fast and efficient Charging sequence planning.
By constructing the kinematic equation of the drone, using the heuristic DWA algorithm to integrate into the reinforcement learning training stage, and combining the scoring function and reward function, the charging sequence planning is optimized, the training time is shortened and the model accuracy is improved.
It achieves faster and more efficient multi-UAV charging planning, shortens training time, improves model accuracy, and is suitable for practical engineering applications.
Smart Images

Figure CN118607783A
Abstract
Description
Technical Field
[0001] This document relates to the field of drone charging technology, and in particular to a multi-drone charging planning method, device, equipment and medium. Background Art
[0002] In recent years, drones have been used in all walks of life, and using drones for various inspection tasks has become the norm. With its high inspection efficiency, it has replaced many ground inspections. However, the endurance of drones has always been a major problem, so it is very necessary to deploy charging stations on the ground, but how to reasonably plan the charging order of each drone is the top priority. Currently, the more popular algorithms include simulated annealing algorithms, but the randomness and startup process of the algorithm may lead to falling into the local optimal solution and unable to reach the global optimal solution, affecting the accuracy and optimization of the planning results. Some scholars have also proposed using reinforcement learning for training, but due to the large number of drones and ground stations and the large number of situations, the time cost is huge.
[0003] Therefore, it is immature to use reinforcement learning or simulated annealing algorithms alone to implement charging order planning. The first priority is to shorten the training time of reinforcement learning and find a faster and more efficient training method. Summary of the invention
[0004] The present invention provides a multi-UAV charging planning method, device, equipment and medium, aiming to solve the above-mentioned problems.
[0005] The present invention provides a multi-UAV charging planning method, comprising:
[0006] S1. By presetting the drone, ground charging station and target cruising point, the drone kinematic equation is constructed to obtain the drone state space;
[0007] S2. The drone is assigned a target cruising point so that the drone performs N rounds of tasks. The ground charging station scores each drone that needs to be charged using a preset evaluation function.
[0008] S3, selecting a preset number of drones with the highest scores as a set to be charged, charging the set to be charged, and calculating the reward value of each round of tasks according to a preset reward function;
[0009] S4. Select the round with the highest reward value among N rounds of tasks as the optimal charging plan.
[0010] The present invention provides a multi-UAV charging planning device, comprising:
[0011] The motion model building module is used to build the UAV kinematic equation and obtain the UAV state space by presetting the UAV, ground charging station and target cruising point;
[0012] The drone scoring module is used to enable the drone to perform N rounds of tasks by assigning the drone's target cruising point. The ground charging station scores each drone that needs to be charged using a preset evaluation function.
[0013] A reward value module is used to select a preset number of drones with the highest scores as a set to be charged, and after charging the set to be charged, calculate the reward value of each round of tasks according to a preset reward function;
[0014] The charging planning module is used to select the round with the highest reward value among N rounds of tasks as the optimal charging plan.
[0015] An embodiment of the present invention provides an electronic device, including:
[0016] processor; and,
[0017] A memory arranged to store computer executable instructions, which, when executed, cause the processor to perform the steps of the multi-UAV charging planning method as described in any one of claims 1 to 7.
[0018] An embodiment of the present invention provides a storage medium for storing computer-executable instructions, which, when executed, implement the steps of the multi-UAV charging planning method as described in any one of claims 1 to 7.
[0019] The present invention makes a heuristic extension of the DWA algorithm to adapt to the problem of charging order planning, and integrates the heuristic DWA algorithm into the training phase of reinforcement learning, so that the training phase time of the present invention is greatly shortened, and the accuracy of the model is improved, which is more suitable for actual engineering applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0021] Figure 1 A flowchart of a multi-UAV charging planning method according to an embodiment of the present invention;
[0022] Figure 2A schematic diagram of a multi-UAV charging planning method according to a specific embodiment of the present invention;
[0023] Figure 3 is a schematic diagram of a ground charging station according to an embodiment of the present invention;
[0024] Figure 4 Schematic diagram of a multi-UAV charging planning device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will be combined with the drawings in one or more embodiments of this specification to clearly and completely describe the technical solutions in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0026] The DWA algorithm was originally used to solve the path planning problem of mobile robots. DWA is a path planning method based on model predictive control (MPC), which is commonly used in the fields of mobile robots, autonomous driving, mobile industrial machines, etc. The DWA algorithm generates a set of feasible velocity vectors in each control cycle by formulating a set of control strategies, and evaluates them and selects the optimal control action according to the dynamics and environmental constraints of the robot. The input of the DWA algorithm includes the current state of the robot, the target state, the environmental map, and the dynamic model of the robot. This information will help the algorithm predict and evaluate the candidate behaviors of the robot under different velocity vectors and select the optimal control action. The algorithm then sends the selected velocity vector to the robot controller to make it move along the planned path. Based on the inspiration of the DWA algorithm, the embodiment of the present invention proposes a multi-UAV charging planning system based on the heuristic DWA algorithm to accelerate learning, and uses the heuristic DWA algorithm to integrate into the training phase of reinforcement learning, so that the training phase time of the present invention is greatly reduced, while also improving the accuracy of the model.
[0027] Method Embodiment
[0028] According to an embodiment of the present invention, a multi-UAV charging planning method is provided. Figure 1 This is a flow chart of a multi-UAV charging planning method according to an embodiment of the present invention. Figure 1 As shown, the multi-UAV charging planning method of the embodiment of the present invention specifically includes:
[0029] S1, by presetting the drone, ground charging station and target cruising point, construct the drone kinematic equation and obtain the drone state space; S1 specifically includes:
[0030] According to formula 1, the kinematic equation of the drone is obtained:
[0031]
[0032] Among them, x, y, and z represent the displacement of the drone in three directions, θ, φ, and ψ represent the roll angle, pitch angle, and yaw angle, g represents the acceleration of gravity, m represents the mass of the drone, and f represents the total pulling force of the drone.
[0033] The state space Q of the drone is obtained by formula 2 j :
[0034] Q j ={x, y, z, θ, ψ, φ, E, d, p} Formula 2;
[0035] Where E is the current power of the drone, d is the distance between the current drone and the nearest ground charging station, p refers to the completion percentage of the current flight mission, and j represents the number of drones.
[0036] The cruise point corresponds to the three-dimensional coordinate O i =(x i ,y i ,z i ).
[0037] S2. The drone is assigned a target cruising point so that the drone performs N rounds of tasks. The ground charging station scores each drone that needs to be charged using a preset evaluation function. S2 specifically includes:
[0038] Match the cruise point for the drone based on the principle of the closest distance to the cruise point;
[0039] The evaluation function for the drone is established using formula 3:
[0040] appraise(Q j )=α1energy(Q j )+α2distance(Q j )+α3task(Q j ) Formula 3;
[0041] energy(Q j ) represents the current UAV power consumption evaluation function, distance(Q j ) represents the evaluation function of the current distance between the UAV and the charging station, task(Q j ) represents the evaluation function of the UAV’s mission completion, and α1, α2, and α3 are weight factors.
[0042] energy(Q j) is obtained by formula 4:
[0043]
[0044] distance(Q j ) is obtained by formula 5:
[0045]
[0046] task(Q j ) is obtained by formula 6:
[0047] task(Q j ) = tanh(k3·(p-p0)) Formula 6;
[0048] E represents the current power of the drone. The lower the value, the greater the evaluation value. d represents the distance from the drone to the cruising point. The closer the distance to the charging station, the greater the evaluation value. P0 is the center point of the curve. The hyperbolic tangent function maps the task completion degree to the range of -1 to 1. The higher the completion degree, the greater the evaluation value. k1, k2, and k3 represent energy (Q j )、distance(Q j )、task(Q j )’s slope.
[0049] S3, selecting a preset number of drones with the highest scores as a set to be charged, charging the set to be charged, and calculating the reward value of each round of tasks according to a preset reward function; S3 specifically includes:
[0050] Select A as the set to be charged;
[0051] The Markov space for establishing ground charging stations includes the following specific representations:
[0052] X={s now ,A,R,P} Formula 7;
[0053] Among them, the current ground station state space s now = {Q j ,w},Q j is the selected drone, w is the working state, charging or idle, A is the set of drones to be charged, R is the current reward value, and P is the state space transition probability of the current ground station state space;
[0054] Establish a reward function R for the ground charging station:
[0055] R=R+R get Formula 8;
[0056] Among them, R get The reward value after each round of tasks is completed;
[0057] R get =R goal +R time Formula 9;
[0058]
[0059] where t set = 30 is the preset cruise completion time threshold, t represents the time taken to fly to the cruise point, t charge Indicates the current drone charging completion time;
[0060] After each round of tasks, the reward values of all ground charging stations are accumulated and summed.
[0061] S4. Select the round with the highest reward value among N rounds of tasks as the optimal charging plan.
[0062] After N rounds of tasks, a set of reward values is obtained, and the one with the largest reward value is selected as the actual planning output. At this point, the charging of the entire system is reasonably planned.
[0063] Further, the embodiments of the present invention are described with specific examples. Figure 2 This is a schematic diagram of a multi-UAV charging planning method according to a specific embodiment of the present invention:
[0064] Load 10 UAV motion models, 3 ground charging stations and 20 target cruise points. The ground charging station of the embodiment of the present invention is as follows: Figure 3 shown.
[0065] Construct the kinematic equations for each drone:
[0066]
[0067] Among them, x, y, and z represent the displacement of the drone in three directions, θ, φ, and ψ represent the roll, pitch, and yaw angles, g represents the acceleration due to gravity, m represents the mass of the drone, and f represents the total pulling force of the drone.
[0068] Using Q j ={x, y, z, θ, ψ, φ, E, d, p} represents the state space of the drone, 0 <j≤10。
[0069] Where E is the current battery level of the drone, d is the distance between the current drone and the nearest ground charging station, and p refers to the completion percentage of the current flight mission.
[0070] The cruise point corresponds to the three-dimensional coordinate O i =(x i ,y i ,z i)0 <i≤20。
[0071] According to the principle of the closest distance to the cruise point, the drone is matched with the cruise point and the evaluation function is established:
[0072] appraise(Q j )=α1energy(Q j )+α2distance(Q j )+α3task(Q j );
[0073] Among them, energy (Q i ) represents the current UAV power consumption evaluation function, distance(Q i ) represents the evaluation function of the current distance between the UAV and the charging station, task(Q i ) represents the evaluation function of the UAV’s mission completion, α1, α2, and α3 are weight factors, and α1=10, α2=15, and α3=15 are selected.
[0074] The evaluation of the power share function is as follows:
[0075]
[0076] Where k1=3, controls the slope of the exponential function, and E is the current battery power of the drone. The lower its value, the greater the evaluation value.
[0077] The evaluation function of the distance to the charging station is as follows:
[0078]
[0079] Where k2=2, the slope of the control function, d is the distance from the UAV to the cruising point. The closer it is to the charging station, the greater the evaluation value, and vice versa. Our strategy is to give priority to charging UAVs that are close to the charging station.
[0080] The evaluation function of task completion is as follows:
[0081] task(Q i ) = tanh(k3·(p-p0));
[0082] Where k3 = 5, p is the task completion, and P0 is the center point of the curve. The hyperbolic tangent function maps the task completion to a range of -1 to 1. The higher the completion, the greater the evaluation value. Conversely, the smaller the evaluation value, our strategy is to give priority to charging drones with high task completion.
[0083] The specific steps are as follows: some drones with high scores are selected and included in the charging set of the ground charging station; the ground charging station selects drones in the charging set to charge and records the reward value of the drone afterwards; and after a round of tasks is completed, all reward values are summed up.
[0084] The ground charging station selects the drones with the highest to third highest scores as the set to be charged:
[0085] A={Q1,Q2,Q3};
[0086] The Markov space for establishing a ground charging station includes (the current ground station state space, the set of drones to be charged, the current reward value, and the state space transition probability of the current ground station state space), which is specifically expressed as follows:
[0087] X={s now ,A,R,P}
[0088] Current ground station state space s now = {Q j ,w}, where Q j is the selected drone, w is the working state, charging or idle. The set of charging drones in the selected area is A = {Q1, Q2, Q3}, the current reward value is R, and the state space transition probability of the current ground station state space is P.
[0089] Then, a reward function is established for the ground charging station, which consists of two parts (the time it takes for the drone to fly to the cruising point and the charging time of the drone), as shown below:
[0090] R=R+R get ;
[0091] R get =R goal +R time ;
[0092] The reward function is:
[0093]
[0094]
[0095] where t set = 30 is the preset cruise completion time threshold, t represents the time taken to fly to the cruise point, t charge Indicates the current drone charging completion time.
[0096] After a round of tasks, the reward values of all charging stations are accumulated and summed as follows:
[0097] Where R iRepresents the reward value of each ground charging station. The total reward value of the first round is 130.
[0098] After N rounds of tasks are completed, the model strategy with the highest reward value in the N rounds is selected to proceed to the specific steps of actual planning.
[0099] After 10 rounds of tasks, a reward value set H is obtained:
[0100] H={130, 40, 320, 190, 210, 54, 32, 280, 160, 32};
[0101] Select the third model with the largest reward value as the overall model, R max =R 3m , as the actual planning output, at this point, the charging of the entire system is reasonably planned.
[0102] The embodiments of the present invention have the following beneficial effects:
[0103] The present invention makes a heuristic extension of the DWA algorithm to adapt to the problem of charging order planning, and integrates the heuristic DWA algorithm into the training phase of reinforcement learning, so that the training phase time of the present invention is greatly shortened, and the accuracy of the model is improved, which is more suitable for actual engineering applications.
[0104] Device Example 1
[0105] According to an embodiment of the present invention, a multi-UAV charging planning device is provided. Figure 4 Schematic diagram of a multi-UAV charging planning device according to an embodiment of the present invention. Figure 4 As shown, the multi-UAV charging planning device of the embodiment of the present invention specifically includes:
[0106] The motion model building module 40 is used to build the kinematic equation of the drone by presetting the drone, the ground charging station and the target cruising point, and obtain the state space of the drone; the motion model building module 40 is specifically used to:
[0107] According to formula 1, the kinematic equation of the drone is obtained:
[0108]
[0109] Among them, x, y, z represent the displacement of the drone in three directions, θ, φ, ψ represent the roll angle, pitch angle and yaw angle, g represents the acceleration of gravity, m represents the mass of the drone, and f represents the total pulling force of the drone;
[0110] The state space Q of the drone is obtained by formula 2 j :
[0111] Q j={x, y, z, θ, ψ, φ, E, d, p} Formula 2;
[0112] Where E is the current power of the drone, d is the distance between the current drone and the nearest ground charging station, p refers to the completion percentage of the current flight mission, and j represents the number of drones.
[0113] The training module 42 is used to enable the drone to perform N rounds of tasks by assigning the drone's target cruising point, and the ground charging station scores each drone that needs to be charged using a preset evaluation function; the training module 42 is specifically used to:
[0114] Match the cruise point for the drone based on the principle of the closest distance to the cruise point;
[0115] The evaluation function for the drone is established using formula 3:
[0116] appraise(Q j )=α1energy(Q j )+α2distance(Q j )+α3task(Q j ) Formula 3;
[0117] energy(Q j ) represents the current UAV power consumption evaluation function, distance(Q j ) represents the evaluation function of the current distance between the UAV and the charging station, task(Q j ) represents the evaluation function of the UAV’s mission completion, and α1, α2, and α3 are weight factors.
[0118] energy(Q j ) is obtained by formula 4:
[0119]
[0120] distance(Q j ) is obtained by formula 5:
[0121]
[0122] task(Q j ) is obtained by formula 6:
[0123] task(Q j ) = tanh(k3·(p-p0)) Formula 6;
[0124] E represents the current power of the drone. The lower the value, the greater the evaluation value. d represents the distance from the drone to the cruising point. The closer the distance to the charging station, the greater the evaluation value. P0 is the center point of the curve. The hyperbolic tangent function maps the task completion degree to the range of -1 to 1. The higher the completion degree, the greater the evaluation value. k1, k2, and k3 represent energy (Q j )、distance(Q j )、task(Q j )’s slope.
[0125] The reward value module 44 is used to select a preset number of drones with the highest scores as a set to be charged, and after charging the set to be charged, calculate the reward value of each round of tasks according to a preset reward function; the reward value module 44 is specifically used to:
[0126] Select A as the set to be charged;
[0127] The Markov space for establishing ground charging stations includes the following specific representations:
[0128] X={s now ,A,R,P} Formula 7;
[0129] Among them, the current ground station state space s now = {Q j ,w},Q j is the selected drone, w is the working state, charging or idle, A is the set of drones to be charged, R is the current reward value, and P is the state space transition probability of the current ground station state space;
[0130] Establish a reward function R for the ground charging station:
[0131] R=R+R get Formula 8;
[0132] Among them, R get The reward value after each round of tasks is completed;
[0133] R get =R goal +R time Formula 9;
[0134]
[0135]
[0136] where t set = 30 is the preset cruise completion time threshold, t represents the time taken to fly to the cruise point, t charge Indicates the current drone charging completion time;
[0137] After each round of tasks, the reward values of all ground charging stations are accumulated and summed.
[0138] The charging planning module 46 is used to select the round with the highest reward value among N rounds of tasks as the optimal charging plan. The charging planning module 46 is specifically used to:
[0139] After N rounds of tasks, a reward value set is obtained;
[0140] Select the round of tasks with the largest reward value in the set as the optimal charging plan.
[0141] Device Example 2
[0142] According to an embodiment of the present invention, an electronic device is provided, including:
[0143] processor; and,
[0144] A memory is arranged to store computer executable instructions, which when executed cause the processor to perform the steps of the above method embodiments.
[0145] Device Example 3
[0146] An embodiment of the present invention provides a storage medium for storing computer-executable instructions, wherein the computer-executable instructions implement the steps of the above method embodiment when executed.
[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-UAV charging planning method, characterized in that: include: S1. By presetting the drone, ground charging station and target cruising point, the drone kinematic equation is constructed to obtain the drone state space; S2. The drone is assigned a target cruising point so that the drone performs N rounds of tasks. The ground charging station scores each drone that needs to be charged using a preset evaluation function. S3, selecting a preset number of drones with the highest scores as a set to be charged, charging the set to be charged, and calculating the reward value of each round of tasks according to a preset reward function; S4. Select the round with the highest reward value among N rounds of tasks as the optimal charging plan.
2. The method according to claim 1, characterized in that The construction of the UAV kinematic equation in S1 specifically includes: According to formula 1, the kinematic equation of the drone is obtained: Among them, x, y, and z represent the displacement of the drone in three directions, θ, φ, and ψ represent the roll angle, pitch angle, and yaw angle, g represents the acceleration of gravity, m represents the mass of the drone, and f represents the total pulling force of the drone.
3. The method according to claim 2, characterized in that The acquisition of the drone state space in S1 specifically includes: obtaining the drone state space Q by formula 2 j : Q j = {x, y, z, θ, ψ, φ, E, d, p}; Equation 2 Where E is the current power of the drone, d is the distance between the current drone and the nearest ground charging station, p refers to the completion percentage of the current flight mission, and j represents the number of drones.
4. The method according to claim 1, characterized in that: The S2 specifically includes: Match the cruise point for the drone based on the principle of the closest distance to the cruise point; The evaluation function for the drone is established using formula 3: appraise(Q j ) = α1energy(Q j ) + α2distance(Q j ) + α3task(Q j ) Equation 3; energy(Q j ) represents the current UAV power consumption evaluation function, distance(Q j ) represents the evaluation function of the current distance between the UAV and the charging station, task(Q j ) represents the evaluation function of the UAV’s mission completion, and α1, α2, and α3 are weight factors.
5. The method according to claim 4, characterized in that energy(Q j ) is obtained by formula 4: distance(Q j ) is obtained by formula 5: task(Q j ) is obtained by formula 6: task(Q j ) = tanh(k3·(p-p0)) Formula 6; E represents the current power of the drone. The lower the value, the greater the evaluation value. d represents the distance from the drone to the cruising point. The closer the distance to the charging station, the greater the evaluation value. P0 is the center point of the curve. The hyperbolic tangent function maps the task completion degree to the range of -1 to 1. The higher the completion degree, the greater the evaluation value. k1, k2, and k3 represent energy (Q j )、distance(Q j )、task(Q j )’s slope.
6. The method according to claim 1, characterized in that The S3 specifically includes: Select A as the set to be charged; The Markov space for establishing ground charging stations includes the following specific representations: X={s now ,A,R,P} Formula 7; Among them, the current ground station state space s now = {Q j ,w},Q j is the selected drone, w is the working state, charging or idle, A is the set of drones to be charged, R is the current reward value, and P is the state space transition probability of the current ground station state space; Establish a reward function R for the ground charging station: R=R+R get Formula 8; Among them, R get The reward value after each round of tasks is completed; R get =R goal +R time Formula 9; where t set is the pre-set cruise completion time threshold, t represents the time taken to fly to the cruise point, and t charge Indicates the current drone charging completion time; After each round of tasks, the reward values of all ground charging stations are accumulated and summed.
7. The method according to claim 1, characterized in that The S4 specifically includes: After N rounds of tasks, a reward value set is obtained; Select the round of tasks with the largest reward value in the set as the optimal charging plan.
8. A multi-UAV charging planning device, characterized in that: include: The motion model building module is used to build the UAV kinematic equation and obtain the UAV state space by presetting the UAV, ground charging station and target cruising point; The training module is used to enable the drone to perform N rounds of tasks by assigning the drone's target cruising point. The ground charging station scores each drone that needs to be charged using a preset evaluation function; A reward value module is used to select a preset number of drones with the highest scores as a set to be charged, and after charging the set to be charged, calculate the reward value of each round of tasks according to a preset reward function; The charging planning module is used to select the round with the highest reward value among N rounds of tasks as the optimal charging plan.
9. An electronic device, comprising: processor; as well as, A memory arranged to store computer executable instructions, which, when executed, cause the processor to perform the steps of the multi-UAV charging planning method as described in any one of claims 1 to 7.
10. A storage medium for storing computer executable instructions, wherein the computer executable instructions, when executed, implement the steps of the multi-UAV charging planning method as described in any one of claims 1 to 7.
