A path planning method, device, electronic device and storage medium
By calculating the risk coefficient, remaining energy value and ground base station demand in the UAV path, machine learning algorithms are used to optimize the UAV path, which solves the problem of ground base stations not being considered in the existing technology and achieves more stable data. Uninstall the service.
Patent Information
- Application Number
- CN202210705246.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-21
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-06-21
AI Technical Summary
Existing UAV path planning methods do not take ground base stations as influencing factors, resulting in poor path planning rationality and inability to provide stable data offloading services.
By obtaining the preset obstacle information, the mission requirements of the ground base station, the start and end position coordinates of the drone, energy consumption information and channel information, the risk coefficient, remaining energy value and remaining demand are calculated, and a machine learning algorithm is used to establish Reward function to optimize the drone flight path to maximize data offloading and remaining energy value.
When the environment is unknown, the UAV flight path is optimized to ensure that data requests from ground base stations are effectively processed, improving the rationality of path planning and flight safety.
Smart Images

Figure CN115032996B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a path planning method, device, electronic device and storage medium. Background Art
[0002] In recent years, drones have been widely used in many different work scenarios due to their small size, high maneuverability and low cost. Autonomous flight of drones has also become an increasingly important research field. At present, most drone path planning is based on known environmental information. When the environmental conditions are partially unknown or completely unknown, dynamic programming methods need to be used.
[0003] Specifically, the dynamic programming method mainly focuses on safe obstacle avoidance during the flight of the UAV. By improving the gravity and repulsion functions in the artificial potential field method, the obstacle avoidance safety factor can be made higher, or by improving the selection operator, crossover operator and mutation operator in the genetic algorithm, the flight path of the UAV can be planned.
[0004] However, in some scenarios, the UAV needs to fly at a fixed altitude to provide data offloading services for the ground base station. In the above method, the ground base station is not used as an influencing factor for path planning, resulting in poor rationality of path planning. The UAV cannot provide relatively stable data offloading services for the ground data base station. Summary of the invention
[0005] The present disclosure provides a path planning method, device, electronic device and storage medium to at least solve the problem that the ground base station is not used as an influencing factor in path planning in the related art, resulting in poor rationality of path planning and the inability of the drone to provide a relatively stable data offloading service for the ground data base station. The technical solution of the present disclosure is as follows:
[0006] According to a first aspect of an embodiment of the present disclosure, a path planning method is provided, including:
[0007] Obtaining preset obstacle information, the task demand of the ground base station, the starting position coordinates of the UAV, the end position coordinates, energy consumption information, and the channel information between the UAV and the ground base station;
[0008] Based on the preset obstacle information, determining a risk coefficient corresponding to the position coordinates of the drone, wherein the risk coefficient is proportional to the collision risk caused by the preset obstacle to the drone;
[0009] Based on the energy consumption information and the channel information, determining a remaining energy value corresponding to the state information of the drone, wherein the state information includes the position coordinates and the flight time of the drone;
[0010] Determining a remaining demand of the ground base station corresponding to the state information based on the task demand and the channel information;
[0011] Determine a reward value corresponding to the state information according to the risk coefficient, the remaining energy value and the remaining demand, and obtain a reward function, wherein the reward value is positively correlated with the remaining energy value and negatively correlated with the risk coefficient and the remaining demand;
[0012] Using a machine learning algorithm, according to the reward function, the starting position coordinates and the end position coordinates, the flight path of the UAV from the starting position coordinates to the end position coordinates is determined, wherein the flight path includes multiple state information and the average of the reward values corresponding to the multiple state information reaches the maximum.
[0013] Optionally, when the preset obstacle information indicates that the position coordinates of the preset obstacle conform to a Gaussian distribution, determining the risk coefficient corresponding to the position coordinates of the drone based on the preset obstacle information includes:
[0014] The risk coefficient corresponding to the position coordinates of the drone is determined using the following formula:
[0015]
[0016] Wherein, P(t) represents the risk factor of the UAV at the flight time t, and q u (t) represents the position coordinate of the UAV at the flight time t, σ represents the variance of the Gaussian distribution, and o n Indicates the position coordinates of the preset obstacle.
[0017] Optionally, the channel information includes a reference channel power gain, a communication bandwidth, and a transmission power of the ground base station between the UAV and the ground base station at a reference distance, and the energy consumption information includes a calculation parameter, a preset speed, a preset acceleration, a motion parameter, and a total energy;
[0018] The determining, based on the energy consumption information and the channel information, a remaining energy value corresponding to the state information of the drone includes:
[0019] Determining the amount of received data corresponding to the state information of the drone according to the reference channel power gain, the communication bandwidth, and the transmit power;
[0020] Determine the data calculation energy consumption corresponding to the state information of the drone according to the received data volume and the calculation parameters;
[0021] Determining the flight energy consumption corresponding to the state information of the drone according to the preset speed, the preset acceleration and the motion parameter;
[0022] Determine the accumulated data calculated energy consumption and the accumulated flight energy consumption of the UAV before the current flight time, and use the difference between the total energy and the accumulated data calculated energy consumption and the accumulated flight energy consumption as the remaining energy value corresponding to the state information of the UAV.
[0023] Optionally, determining the data calculation energy consumption corresponding to the state information of the drone according to the received data volume and the energy consumption information includes:
[0024] E ucom (t) = η u C u f u 2 L u (t)
[0025] Among them, the E ucom (t) represents the energy consumption of the drone at the flight time t, and η u represents the effective capacitance coefficient of the UAV, the C u represents the number of computing cycles required by the CPU to process 1 bit of data. u Indicates the CPU calculation frequency of the drone, the L u (t) represents the amount of received data corresponding to the UAV at the flight time t;
[0026] The determining, according to the preset speed, preset acceleration and motion parameters of the drone, the flight energy consumption corresponding to the state information of the drone comprises:
[0027]
[0028] Among them, the E f (t) represents the flight energy consumption of the UAV at the flight time t, s1 and s2 represent constant coefficients, G represents the gravitational acceleration, and v u (t) represents the preset speed, and a u (t) represents the preset acceleration.
[0029] Optionally, the channel information includes a reference channel power gain, a communication bandwidth, and a transmission power of the ground base station between the UAV and the ground base station at a reference distance;
[0030] The determining, based on the task demand and the channel information, a remaining demand of the ground base station corresponding to the state information, comprises:
[0031] Determining the amount of received data corresponding to the state information of the drone according to the reference channel power gain, the communication bandwidth, and the transmit power;
[0032] The accumulated data transmission volume of the UAV is calculated based on the received data volume, and the difference between the task demand volume and the accumulated data transmission volume is used as the remaining demand volume of the ground base station corresponding to the status information.
[0033] Optionally, determining the amount of received data corresponding to the status information of the drone according to the reference channel power gain, the communication bandwidth, and the transmit power includes:
[0034] Obtaining the flight altitude of the UAV and the position coordinates of the ground base station;
[0035] Determine the channel gain corresponding to the position coordinates of the UAV according to the reference channel power gain, the flight altitude and the position coordinates of the ground base station;
[0036] Determine a data transmission rate corresponding to the position coordinates of the UAV according to the channel gain, the communication bandwidth and the transmission power;
[0037] The amount of received data corresponding to the status information of the drone is determined according to the data transmission rate and the flight time of the drone.
[0038] Optionally, determining the channel gain corresponding to the position coordinates of the UAV according to the reference channel power gain, the flight altitude, and the position coordinates of the ground base station includes:
[0039]
[0040] Wherein, β0 represents the reference channel power gain, H represents the flight altitude of the UAV, and s k represents the position coordinates of the ground base station, and the h k (t) represents the reference channel power gain of the UAV at flight time t;
[0041] The determining, according to the reference channel power gain, the communication bandwidth and the transmit power, a data transmission rate corresponding to the position coordinates of the drone includes:
[0042]
[0043] Wherein, B represents the communication bandwidth, and p k represents the transmission power, σ represents the variance of Gaussian distribution, and R k(t) represents the data receiving rate of the UAV at the flight time t;
[0044] The step of determining the amount of received data corresponding to the status information of the drone according to the data transmission rate and the flight time of the drone includes:
[0045] L u (t) = tR k (t)
[0046] Among them, the L u (t) represents the amount of received data corresponding to the UAV at the flight time t.
[0047] Optionally, determining the reward value corresponding to the state information according to the risk coefficient, the remaining energy value and the remaining demand to obtain a reward function includes:
[0048] Determining the data offloading amount corresponding to the status information according to the remaining demand amount;
[0049] The normalized results of the risk coefficient and the remaining energy value are determined respectively, and the difference between the data unloading amount and the normalized result of the risk coefficient and the normalized result of the remaining energy value is used as the reward value corresponding to the state information.
[0050] Optionally, determining the data offloading amount corresponding to the status information according to the remaining demand amount includes:
[0051]
[0052] Wherein, U(μ(t)) represents the data unloading amount corresponding to the state information, μ(t) represents the remaining demand of the ground base station at the flight time t, η and β both represent control variables, and η∈(1,∞), β∈(0,∞);
[0053] The step of respectively determining the normalized results of the risk coefficient and the remaining energy value, and taking the difference between the data offloading amount and the normalized result of the risk coefficient and the normalized result of the remaining energy value as the reward value corresponding to the state information includes:
[0054]
[0055] Among them, the R t represents the reward value of the state information corresponding to the flight time t, the E u (0) represents the total energy of the drone, and the E u(t) represents the remaining energy value of the UAV at the flight time t, P represents the cumulative value of the risk coefficient of the UAV during the total flight time, and P(t) represents the risk coefficient of the UAV at the flight time t.
[0056] Optionally, the using a machine learning algorithm to determine the flight path of the drone from the starting position coordinates to the end position coordinates according to the reward function, the starting position coordinates and the end position coordinates includes:
[0057] Constructing a mean expression of reward values corresponding to a plurality of state information included in the flight path according to the reward function, the starting position coordinates and the end position coordinates;
[0058] The ε-greedy strategy is used to determine the flight path of the UAV from the starting position coordinates to the ending position coordinates based on the mean expression.
[0059] Optionally, constructing a mean expression of reward values corresponding to a plurality of state information included in the flight path according to the reward function, the starting position coordinates and the end position coordinates includes:
[0060]
[0061] Wherein, ξ represents the mean of the reward values corresponding to the multiple state information included in the flight path, T represents the total flight time of the UAV, and R t represents the reward value of the state information corresponding to the flight time t, is the constraint condition on ξ, the E u (0) represents the total energy of the drone, and the E f (t) represents the flight energy consumption of the UAV at the flight time t, and the E ucom (t) represents the energy consumption of the drone at the flight time t;
[0062] The parameter ε of the ε-greedy strategy is set to be related to the number of iterations episode:
[0063]
[0064] Wherein, c represents a constant used to control the convergence speed of the algorithm.
[0065] According to a second aspect of an embodiment of the present disclosure, a path planning device is provided, including:
[0066] An acquisition unit is configured to acquire preset obstacle information, a task requirement of the ground base station, a starting position coordinate of the UAV, an end position coordinate, energy consumption information, and channel information between the UAV and the ground base station;
[0067] A risk calculation unit is configured to determine a risk coefficient corresponding to the position coordinates of the drone based on the preset obstacle information, wherein the risk coefficient is proportional to a collision risk caused by the preset obstacle to the drone;
[0068] a remaining energy calculation unit, configured to determine a remaining energy value corresponding to the state information of the drone based on the energy consumption information and the channel information, wherein the state information includes the position coordinates and flight time of the drone;
[0069] A demand calculation unit is configured to determine the remaining demand of the ground base station corresponding to the state information based on the task demand and the channel information;
[0070] a reward calculation unit, configured to determine a reward value corresponding to the state information according to the risk coefficient, the remaining energy value, and the remaining demand, to obtain a reward function, wherein the reward value is positively correlated with the remaining energy value and negatively correlated with the risk coefficient and the remaining demand;
[0071] The planning unit is configured to execute a machine learning algorithm to determine a flight path of the UAV from the starting position coordinates to the end position coordinates according to the reward function, the starting position coordinates and the end position coordinates, wherein the flight path includes a plurality of state information and the average of the reward values corresponding to the plurality of state information reaches a maximum.
[0072] Optionally, the risk calculation unit is configured to execute:
[0073] The risk coefficient corresponding to the position coordinates of the drone is determined using the following formula:
[0074]
[0075] Wherein, P(t) represents the risk factor of the UAV at the flight time t, and q u (t) represents the position coordinate of the UAV at the flight time t, σ represents the variance of the Gaussian distribution, and o n Indicates the position coordinates of the preset obstacle
[0076] Optionally, the channel information includes a reference channel power gain, a communication bandwidth, and a transmission power of the ground base station between the UAV and the ground base station at a reference distance, and the energy consumption information includes a calculation parameter, a preset speed, a preset acceleration, a motion parameter, and a total energy;
[0077] The remaining energy calculation unit is configured to execute:
[0078] Determining the amount of received data corresponding to the state information of the drone according to the reference channel power gain, the communication bandwidth, and the transmit power;
[0079] Determine the data calculation energy consumption corresponding to the state information of the drone according to the received data volume and the calculation parameters;
[0080] Determining the flight energy consumption corresponding to the state information of the drone according to the preset speed, the preset acceleration and the motion parameter;
[0081] Determine the accumulated data calculated energy consumption and the accumulated flight energy consumption of the UAV before the current flight time, and use the difference between the total energy and the accumulated data calculated energy consumption and the accumulated flight energy consumption as the remaining energy value corresponding to the state information of the UAV.
[0082] Optionally, the remaining energy calculation unit is configured to execute:
[0083] E ucom (t) = η u C u f u 2 L u (t)
[0084] Among them, the E ucom (t) represents the energy consumption of the drone at the flight time t, and η u represents the effective capacitance coefficient of the UAV, the C u represents the number of computing cycles required by the CPU to process 1 bit of data. u Indicates the CPU calculation frequency of the drone, the L u (t) represents the amount of received data corresponding to the UAV at the flight time t;
[0085]
[0086] Among them, the E f (t) represents the flight energy consumption of the UAV at the flight time t, s1 and s2 represent constant coefficients, G represents the gravitational acceleration, and v u(t) represents the preset speed, and a u (t) represents the preset acceleration.
[0087] Optionally, the channel information includes a reference channel power gain, a communication bandwidth, and a transmission power of the ground base station between the UAV and the ground base station at a reference distance;
[0088] The demand calculation unit is configured to execute:
[0089] Determining the amount of received data corresponding to the state information of the drone according to the reference channel power gain, the communication bandwidth, and the transmit power;
[0090] The accumulated data transmission volume of the UAV is calculated based on the received data volume, and the difference between the task demand volume and the accumulated data transmission volume is used as the remaining demand volume of the ground base station corresponding to the status information.
[0091] Optionally, the device further includes a received data amount calculation unit configured to execute:
[0092] Obtaining the flight altitude of the UAV and the position coordinates of the ground base station;
[0093] Determine the channel gain corresponding to the position coordinates of the UAV according to the reference channel power gain, the flight altitude and the position coordinates of the ground base station;
[0094] Determine a data transmission rate corresponding to the position coordinates of the UAV according to the channel gain, the communication bandwidth and the transmission power;
[0095] The amount of received data corresponding to the status information of the drone is determined according to the data transmission rate and the flight time of the drone.
[0096] Optionally, the received data amount calculation unit is configured to execute:
[0097]
[0098] Wherein, β0 represents the reference channel power gain, H represents the flight altitude of the UAV, and s k represents the position coordinates of the ground base station, and the h k (t) represents the reference channel power gain of the UAV at flight time t;
[0099]
[0100] Wherein, B represents the communication bandwidth, and p krepresents the transmission power, σ represents the variance of Gaussian distribution, and R k (t) represents the data receiving rate of the UAV at the flight time t;
[0101] L u (t) = tR k (t)
[0102] Among them, the L u (t) represents the amount of received data corresponding to the UAV at the flight time t.
[0103] Optionally, the reward calculation unit is configured to execute:
[0104] Determining the data offloading amount corresponding to the status information according to the remaining demand amount;
[0105] The normalized results of the risk coefficient and the remaining energy value are determined respectively, and the difference between the data unloading amount and the normalized result of the risk coefficient and the normalized result of the remaining energy value is used as the reward value corresponding to the state information.
[0106] Optionally, the reward calculation unit is configured to execute:
[0107]
[0108] Wherein, U(μ(t)) represents the data unloading amount corresponding to the state information, μ(t) represents the remaining demand of the ground base station at the flight time t, η and β both represent control variables, and η∈(1,∞), β∈(0,∞);
[0109]
[0110] Among them, the R t represents the reward value of the state information corresponding to the flight time t, the E u (0) represents the total energy of the drone, and the E u (t) represents the remaining energy value of the UAV at the flight time t, P represents the cumulative value of the risk coefficient of the UAV during the total flight time, and P(t) represents the risk coefficient of the UAV at the flight time t.
[0111] Optionally, the planning unit is configured to execute:
[0112] Constructing a mean expression of reward values corresponding to a plurality of state information included in the flight path according to the reward function, the starting position coordinates and the end position coordinates;
[0113] The ε-greedy strategy is used to determine the flight path of the UAV from the starting position coordinates to the ending position coordinates based on the mean expression.
[0114] Optionally, the planning unit is configured to execute:
[0115]
[0116] Wherein, ξ represents the mean of the reward values corresponding to the multiple state information included in the flight path, T represents the total flight time of the UAV, and R t represents the reward value of the state information corresponding to the flight time t, is the constraint condition on ξ, the E u (0) represents the total energy of the drone, and the E f (t) represents the flight energy consumption of the UAV at the flight time t, and the E ucom (t) represents the energy consumption of the drone at the flight time t;
[0117] The parameter ε of the ε-greedy strategy is set to be related to the number of iterations episode:
[0118]
[0119] Wherein, c represents a constant used to control the convergence speed of the algorithm.
[0120] According to a third aspect of an embodiment of the present disclosure, there is provided a path planning electronic device, including:
[0121] processor;
[0122] a memory for storing instructions executable by the processor;
[0123] The processor is configured to execute the instructions to implement any of the path planning methods described above.
[0124] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of a path planning electronic device, the path planning electronic device is enabled to execute any of the above-mentioned path planning methods.
[0125] According to a fifth aspect of an embodiment of the present disclosure, there is provided a computer program product, comprising a computer program / instruction, wherein when the computer program / instruction is executed by a processor, the path planning method described in any one of the above items is implemented.
[0126] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0127] Obtain preset obstacle information, task demand of ground base station, starting position coordinates of UAV, end position coordinates, energy consumption information and channel information between UAV and ground base station; determine the risk coefficient corresponding to the position coordinates of UAV based on preset obstacle information, the risk coefficient is proportional to the collision risk caused by preset obstacle to UAV; determine the remaining energy value corresponding to the state information of UAV based on energy consumption information and channel information, the state information includes the position coordinates and flight time of UAV; determine the remaining demand of ground base station corresponding to the state information based on task demand and channel information; determine the reward value corresponding to the state information according to the risk coefficient, remaining energy value and remaining demand, and obtain the reward function, the reward value is positively correlated with the remaining energy value and negatively correlated with the risk coefficient and remaining demand; use machine learning algorithm to determine the flight path of UAV from starting position coordinates to end position coordinates according to reward function, starting position coordinates and end position coordinates, the flight path includes multiple state information and the average of reward values corresponding to multiple state information reaches the maximum.
[0128] In this way, a reward function is established based on the risk coefficient of collision between the drone and the preset obstacle, the remaining energy value of the drone and the remaining demand of the ground base station, and the flight path of the drone from the starting position coordinates to the end position coordinates is planned, so that the drone can give priority to serving the ground base stations with large data demands during the flight, effectively process the data requests of the ground base stations, and plan a reasonable flight trajectory in an unknown environment.
[0129] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0130] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0131] Figure 1 The figure is a flow chart of a path planning method according to an exemplary embodiment.
[0132] Figure 2 is a convergence diagram of average reward values under different convergence constants c according to an exemplary embodiment.
[0133] Figure 3 The figure is a convergence diagram of average reward values of a UAV at different flight altitudes according to an exemplary embodiment.
[0134] Figure 4The present invention is a flight trajectory diagram of a path planning of a UAV according to an exemplary embodiment.
[0135] Figure 5 is a schematic diagram of a path planning device according to an exemplary embodiment.
[0136] Figure 6 It is a block diagram of an electronic device for path planning according to an exemplary embodiment.
[0137] Figure 7 It is a block diagram of a device for path planning according to an exemplary embodiment. DETAILED DESCRIPTION
[0138] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0139] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0140] Figure 1 is a flow chart of a path planning method according to an exemplary embodiment. Figure 1 As shown, the path planning method includes the following steps.
[0141] In step S11, the preset obstacle information, the task demand of the ground base station, the starting position coordinates of the UAV, the end position coordinates, the energy consumption information and the channel information between the UAV and the ground base station are obtained.
[0142] In the embodiment of the present invention, before planning the path of the UAV, it is necessary to build a working model of the UAV edge computing system. In this working model, it is assumed that the UAV carrying the edge computing server is flying in an unknown environment. There are some obstacles in the unknown environment, such as high-rise buildings, signal towers or mountains, and there are also some fixed ground base stations. k,During the flight, the UAV needs to maintain a certain safe distance from obstacles to avoid ,collision with obstacles, and also needs to handle the mission requirements of the ground ,base station, and finally reach the target point. Usually, the location environment is an urban ,space environment, or can also be a rural or other space environment, which is not ,specifically limited.
[0143] Based on the above working model, the path planning of the UAV requires obtaining the preset obstacle information, the task demand of the ground base station, the starting position coordinates of the UAV, the end position coordinates, the energy consumption information, and the channel information between the UAV and the ground base station.
[0144] Among them, the preset obstacle information includes the position coordinates and number of the preset obstacles. The position coordinates of the preset obstacles, the starting position coordinates of the drone and the end position coordinates are usually longitude and latitude coordinates, or they can be relative position coordinates between each other, without specific limitation; the task demand of the ground base station refers to the data demand of the ground base station for the drone data. Different ground base stations can process different amounts of data, so the data demand for the drone is also different; the energy consumption information is used to determine the energy that the drone needs to consume during the flight, including but not limited to: the reference channel power gain, communication bandwidth and transmission power of the ground base station between the drone at the reference distance and the ground base station. The energy consumption information includes calculation parameters, the preset speed of the drone, the preset acceleration, motion parameters and total energy; the channel information between the drone and the ground base station includes but is not limited to: the reference channel power gain, communication bandwidth and transmission power of the ground base station between the drone at the reference distance and the ground base station.
[0145] In step S12, based on the preset obstacle information, the risk coefficient corresponding to the position coordinates of the UAV is determined, and the risk coefficient is proportional to the collision risk caused by the preset obstacle to the UAV.
[0146] In other words, the higher the risk coefficient, the higher the possibility of the UAV colliding with the preset obstacle. Therefore, by calculating the risk coefficient, the collision between the UAV and the preset obstacle can be avoided to a large extent in the subsequent path planning process, the rationality of path planning can be improved, and the flight safety of the UAV can be maintained.
[0147] In this step, when the preset obstacle information indicates that the position coordinates of the preset obstacle conform to the Gaussian distribution, the process of determining the risk coefficient corresponding to the position coordinates of the drone based on the preset obstacle information may include:
[0148] Use the following formula to determine the risk coefficient corresponding to the drone's location coordinates:
[0149]
[0150] Among them, P(t) represents the risk factor of the drone at flight time t, q u (t) represents the position coordinate of the UAV at the flight time t, σ represents the variance of the Gaussian distribution, o n Indicates the location coordinates of the preset obstacle.
[0151] In step S13, based on the energy consumption information and the channel information, the remaining energy value corresponding to the state information of the UAV is determined, and the state information includes the position coordinates and the flight time of the UAV.
[0152] It is understandable that the total energy of the drone in its initial state is limited. During the flight, it will continue to consume energy. When the energy is exhausted, the drone will not be able to continue flying. Therefore, when planning the path, it is necessary to take the remaining energy value of the drone into consideration, try to avoid the situation where the drone energy is exhausted and the flight mission fails, improve the rationality of path planning, and maintain flight safety.
[0153] In the present disclosure, the energy consumed by the drone during flight can be divided into two parts, namely data calculation energy consumption and flight energy consumption, wherein data calculation energy consumption refers to the energy consumed by the drone when performing data calculation tasks and communicating with ground base stations, and flight energy consumption refers to the energy required for the drone to fly. The state information of the drone includes the coordinates of the drone's location and the corresponding flight time. It can be understood that the flight path of the drone is composed of the coordinates of the drone's location at each moment, so the state information can form a continuous flight path.
[0154] In this step, if the channel information includes the reference channel power gain, communication bandwidth and transmission power of the ground base station between the UAV and the ground base station at the reference distance, and the energy consumption information includes calculation parameters, preset speed, preset acceleration, motion parameters and total energy; then, based on the energy consumption information and the channel information, the step of determining the remaining energy value corresponding to the state information of the UAV may include:
[0155] According to the reference channel power gain, communication bandwidth and transmission power, the amount of received data corresponding to the status information of the UAV is determined; according to the amount of received data and the calculation parameters, the data calculation energy consumption corresponding to the status information of the UAV is determined; according to the preset speed, preset acceleration and motion parameters of the UAV, the flight energy consumption corresponding to the status information of the UAV is determined; the cumulative data calculation energy consumption and the cumulative flight energy consumption of the UAV before the current flight time are determined, and the difference between the total energy and the cumulative data calculation energy consumption and the cumulative flight energy consumption is used as the residual energy value corresponding to the status information of the UAV.
[0156] For example, according to the amount of received data and energy consumption information, the energy consumption corresponding to the data of the drone status information can be calculated using the following formula:
[0157] E ucom (t) = η u C u f u 2 L u (t)
[0158] Among them, E ucom (t) represents the energy consumption of the drone at the flight time t, η u represents the effective capacitance coefficient of the drone, C u f represents the number of computing cycles required by the drone’s CPU (Central Processing Unit) to process 1 bit of data. u Indicates the CPU calculation frequency of the drone, L u (t) represents the amount of received data corresponding to the UAV at the flight time t;
[0159] According to the preset speed, preset acceleration and motion parameters of the drone, the flight energy consumption corresponding to the state information of the drone can be determined using the following formula:
[0160]
[0161] Among them, E f (t) represents the flight energy consumption of the UAV at the flight time t, s1 and s2 represent constant coefficients, G represents the gravitational acceleration, v u (t) represents the preset speed, a u (t) represents a preset acceleration, where s1 and s2 depend on the drag coefficient of the drone, the area of the wing, etc., and can be set according to specific circumstances, which is not limited in the present disclosure;
[0162] Correspondingly, the accumulated data calculation energy consumption and accumulated flight energy consumption of the UAV before the current flight time are determined, and the difference between the total energy and the accumulated data calculation energy consumption and the accumulated flight energy consumption is used as the remaining energy value corresponding to the UAV status information. The following formula can be used:
[0163] E u (t+1)=E u (t)-E f (t)-E ucom (t)
[0164] Among them, E u (t+1) represents the remaining energy value of the drone at the flight time t+1, E u (t) represents the remaining energy value of the UAV at the flight time t.
[0165] In one implementation, determining the amount of received data corresponding to the state information of the drone based on the reference channel power gain, the communication bandwidth, and the transmit power includes:
[0166] Obtain the flight altitude of the UAV and the location coordinates of the ground base station; determine the channel gain corresponding to the location coordinates of the UAV based on the reference channel power gain, flight altitude and location coordinates of the ground base station; determine the data transmission rate corresponding to the location coordinates of the UAV based on the channel gain, communication bandwidth and transmission power; determine the amount of received data corresponding to the status information of the UAV based on the data transmission rate and the flight time of the UAV.
[0167] Wherein, according to the reference channel power gain, the flight altitude and the position coordinates of the ground base station, the channel gain corresponding to the position coordinates of the UAV is determined, including:
[0168]
[0169] Where β0 represents the reference channel power gain, H represents the flight altitude of the UAV, and s k represents the location coordinates of the ground base station, h k (t) represents the reference channel power gain of the UAV at flight time t;
[0170] According to the reference channel power gain, communication bandwidth and transmission power, the data transmission rate corresponding to the position coordinates of the UAV is determined, including:
[0171]
[0172] Where B represents the communication bandwidth, p k represents the transmission power, σ represents the variance of the Gaussian distribution, R k (t) represents the data receiving rate of the UAV at the flight time t;
[0173] According to the data transmission rate and the flight time of the UAV, the amount of received data corresponding to the UAV status information is determined, including:
[0174] L u (t) = tR k (t)
[0175] Among them, L u (t) represents the amount of received data corresponding to the UAV at the flight time t.
[0176] In step S14, based on the task demand and the channel information, the remaining demand of the ground base station corresponding to the status information is determined.
[0177] It can be understood that based on different mission requirements, the ground base station has different mission requirements for each flight of the drone. Every time the drone passes a ground base station, it will unload a certain amount of data to the ground base station. It only needs to complete the data unloading task of the mission requirement before reaching the destination position coordinates. Therefore, planning the flight path based on the mission requirements of the ground base station can further improve the rationality of path planning.
[0178] In this step, if the channel information includes the reference channel power gain, communication bandwidth, and transmission power of the ground base station between the UAV and the ground base station at the reference distance, then the step of determining the remaining demand of the ground base station corresponding to the status information based on the task demand and the channel information may include:
[0179] According to the reference channel power gain, communication bandwidth and transmission power, the amount of received data corresponding to the status information of the UAV is determined; based on the amount of received data, the cumulative data transmission volume of the UAV is calculated, and the difference between the task demand and the cumulative data transmission volume is used as the remaining demand of the ground base station corresponding to the status information.
[0180] For example, the amount of received data corresponding to the state information of the drone can be determined by continuing the formula in step S13, which will not be described in detail in this step; based on the amount of received data, the cumulative data transmission amount of the drone is calculated, and the difference between the task demand and the cumulative data transmission amount is used as the remaining demand of the ground base station corresponding to the state information. The following formula can be used:
[0181] μ(t+1)=μ(t)-tR k (t)
[0182] Where μ(t) represents the remaining demand of the ground base station at flight time t, R k (t) represents the data receiving rate of the UAV at the flight time t, μ(t+1) represents the remaining demand of the ground base station at the flight time t+1, then, tR k (t) represents the amount of received data corresponding to the UAV at the flight time t.
[0183] In step S15, a reward value corresponding to the state information is determined according to the risk coefficient, the remaining energy value and the remaining demand, and a reward function is obtained. The reward value is positively correlated with the remaining energy value and negatively correlated with the risk coefficient and the remaining demand.
[0184] In the present disclosure, the path planning of the drone can be performed based on the reinforcement learning algorithm. In the reinforcement learning algorithm, an agent will take an action, interact with the environment, and then evaluate whether an action is good based on the state and reward. In other words, the reward function can be used to determine the path finally chosen by the drone. Since the flight process and energy consumption of the drone have Markov properties, Markov modeling of the flight process of the drone can maximize the amount of data unloading of the drone to the ground base station and the remaining energy value of the drone.
[0185] For example, in the scenario of planning the flight path of a drone, the agent is the drone itself;
[0186] The state of the drone can be represented as the state space S:
[0187] S={s t |t=1,2,...N}
[0188] S={s t |s t = u (t),μ(t),E u (t),P(t)>}
[0189] where q u (t) is the position coordinate of the UAV at the flight time t, μ(t) is the remaining demand of the ground base station at the flight time t, E u (t) is the remaining energy value of the UAV at flight time t, P(t) is the risk coefficient of the UAV at flight time t, and N represents the flight time corresponding to the flight path.
[0190] The actions of the drone can be represented as the action space A:
[0191] A={a t |a k (t)}
[0192] Among them, a k (t) indicates that the UAV needs to process the task requirements for the kth ground base station at flight time t.
[0193] That is to say, in the present disclosure, based on the reinforcement learning algorithm, it is necessary to evaluate whether the action of the drone to process the task demand for the kth ground base station at the flight time t is good, and then determine the optimal solution from multiple possible actions. However, there is often a nonlinear relationship between the amount of data unloading from the ground base station processed by the drone and the task demand of the ground base station. Therefore, in one implementation, the reward value corresponding to the state information is determined according to the risk coefficient, the remaining energy value and the remaining demand, and the reward function is obtained, including:
[0194] According to the remaining demand, the data unloading amount corresponding to the status information is determined; the normalized results of the risk coefficient and the remaining energy value are determined respectively, and the difference between the data unloading amount and the normalized result of the risk coefficient and the normalized result of the remaining energy value is used as the reward value corresponding to the status information.
[0195] For example, the data offloading amount corresponding to the status information can be determined according to the remaining demand, and the following formula can be used:
[0196]
[0197] Among them, U(μ(t)) represents the data unloading amount corresponding to the state information, μ(t) represents the remaining demand of the ground base station at the flight time t, η and β both represent control variables, and η∈(1,∞), β∈(0,∞);
[0198] In this way, the function U(μ(t)) can make the UAV tend to serve the ground base station with greater service mission demand, and at the same time prevent it from serving a certain ground base station for a long time, thereby improving the service quality and computing efficiency of the UAV edge computing system to a certain extent.
[0199] Furthermore, the normalized results of the risk coefficient and the remaining energy value are determined respectively, and the difference between the data unloading amount and the normalized result of the risk coefficient and the normalized result of the remaining energy value is used as the reward value corresponding to the state information. The following formula can be used:
[0200]
[0201] Among them, R t represents the reward value of the state information corresponding to the flight time t, E u (0) represents the total energy of the drone, E u E(t) represents the remaining energy value of the drone at flight time t, P represents the cumulative value of the risk factor of the drone during the total flight time, and P(t) represents the risk factor of the drone at flight time t. u (t) / E u (0) and P(t) / P are used to normalize the residual energy value and risk factor.
[0202] The first item in the reward function is determined according to the remaining energy value, which means that the more ground base stations the drone passes during flight, the more data unloaded by the ground base stations is collected, and the greater the reward value; the second item is determined according to the remaining demand, which means the ratio of the energy consumed by the drone in each time slot to the initial energy; the third item is determined according to the risk coefficient, which means that the more obstacles the drone encounters during flight, the greater the risk and the smaller the reward value.
[0203] In step S16, a machine learning algorithm is used to determine the flight path of the drone from the starting position coordinates to the end position coordinates based on the reward function, the starting position coordinates and the end position coordinates. The flight path includes multiple state information and the average of the reward values corresponding to the multiple state information reaches the maximum.
[0204] In this step, a machine learning algorithm is used to determine the flight path of the drone from the starting position coordinates to the end position coordinates according to the reward function, the starting position coordinates and the end position coordinates, including:
[0205] According to the reward function, the starting position coordinates and the end position coordinates, the mean expression of the reward values corresponding to the multiple state information included in the flight path is constructed; using the ε-greedy strategy, based on the mean expression, the flight path of the UAV from the starting position coordinates to the end position coordinates is determined.
[0206] In other words, the purpose of this method is to achieve the optimal trade-off between the amount of data unloading from the drone to the ground base station, the remaining energy value of the drone, and the risk factor. The simulation curve of the drone flight path is analyzed by a machine learning algorithm, so as to verify that the drone path planning based on reinforcement learning can maximize the task requirements of the ground base station while ensuring safe flight, and improve the service quality of the system, that is, through the drone flight strategy π, maximize the average reward ξ of the drone edge computing system in the entire time T. Among them, the machine learning algorithm can be specifically a Q-learning algorithm.
[0207] For example, according to the reward function, the starting position coordinates and the end position coordinates, a mean expression of the reward values corresponding to the multiple state information included in the flight path is constructed, including:
[0208]
[0209] Among them, ξ represents the mean of the reward values corresponding to the multiple state information included in the flight path, T represents the total flight time of the drone, and R t represents the reward value of the state information corresponding to the flight time t, is the constraint condition on ξ, E u (0) represents the total energy of the drone, E f(t) represents the flight energy consumption of the UAV at the flight time t, E ucom (t) represents the energy consumption of the drone calculated based on the data corresponding to the flight time t, that is, the total energy consumed is not greater than the initial total energy of the drone.
[0210] Furthermore, the service quality of the drone edge computing system can be quantified to determine the effectiveness of the drone path planning. For example, the formula for quantifying the service quality of the drone edge computing system is as follows:
[0211]
[0212] where μ k (T) represents the remaining demand of ground base station k after the UAV reaches the target point, μ k (0) represents the initial task demand of ground base station k.
[0213] In the present disclosure, the parameter ε of the ε-greedy strategy can be set to be related to the number of iterations episode:
[0214]
[0215] Where c is a constant used to control the convergence speed of the algorithm.
[0216] like Figure 2 As shown, it is the convergence graph of the average reward value under different convergence constants c in the present invention, wherein the upper part is the convergence curve corresponding to the convergence constant c value of 20, and the lower part is the convergence curve corresponding to the convergence constant c value of 15. It can be seen that the average reward value starts with a lower value, and then as the number of iterations increases, the value of the average reward value gradually increases and tends to be stable. The convergence constant c can affect the convergence speed of the algorithm. The larger the constant c, the slower the convergence speed of the algorithm, but when the constant c is higher, a larger average reward value can be obtained.
[0217] like Figure 3 As shown, it is the average reward value convergence diagram of the drone at different flight altitudes in the present invention, wherein the upper part is the convergence curve corresponding to a flight altitude of 60 meters, and the lower part is the convergence curve corresponding to a flight altitude of 100 meters. It can be seen that the higher the flight altitude of the drone, the farther the distance from the ground base station, and the long-distance data transmission will face greater channel fading, so the speed and amount of data transmission between the drone and the ground base station will be affected to a certain extent; at the same time, when the drone flies at a higher altitude, it needs to consume more energy to maintain its own flight altitude, which will also lead to a decrease in the reward value, so the flight altitude of the drone should be kept at the altitude that is most conducive to data transmission as much as possible.
[0218] The number of ground base stations is set to K = 10, the flight altitude of the UAV is set to H = 60m, the maximum flight speed of the UAV is set to V = 20m / s, and the task demand of the ground base station can be randomly generated, expressed as μ k (t)∈[4,10], the total energy of the drone is E u (0) = 2000 J, the transmission power of the ground base station is p k =0.1w, the control algorithm convergence constant is c=15, the drone CPU calculation frequency is f u =3GHz, the channel power gain is β=-50dB, and the CPU speed for processing 1 bit of data is C u =1000 cycles / bit, σ 2 =-100dBm, η=2, β=5, learning rate α=0.1, discount factor γ=0.9.
[0219] like Figure 4 As shown, it is the path planning flight trajectory diagram of the UAV in the present invention. Starting from the starting position coordinates, the UAV needs to get as close to the ground base station as possible while avoiding obstacles, so as to ensure that the UAV and the ground base station are at a good communication distance, improve the speed and amount of data unloading of the ground base station, and arrive at the terminal position coordinates after processing the task requirements of each ground base station. It can be seen from the flight path that the UAV has better processed the data requirements of the ground base station, so the service quality of the system is high.
[0220] From the above, it can be seen that the technical solution provided by the embodiment of the present disclosure establishes a reward function according to the risk coefficient of collision between the drone and the preset obstacle, the remaining energy value of the drone and the remaining demand of the ground base station, and plans the flight path of the drone from the starting position coordinates to the end position coordinates, so that the drone can give priority to serving the ground base stations with large data demands during the flight, effectively process the data requests of the ground base stations, and plan a reasonable flight trajectory in an unknown environment.
[0221] Figure 5 is a block diagram of a path planning device according to an exemplary embodiment, the device comprising:
[0222] The acquisition unit 201 is configured to acquire preset obstacle information, the task demand of the ground base station, the starting position coordinates of the UAV, the end position coordinates, energy consumption information, and the channel information between the UAV and the ground base station;
[0223] The risk calculation unit 202 is configured to determine a risk coefficient corresponding to the position coordinates of the drone based on the preset obstacle information, wherein the risk coefficient is proportional to the collision risk caused by the preset obstacle to the drone;
[0224] The remaining energy calculation unit 203 is configured to determine the remaining energy value corresponding to the state information of the drone based on the energy consumption information and the channel information, wherein the state information includes the position coordinates and flight time of the drone;
[0225] The demand calculation unit 204 is configured to determine the remaining demand of the ground base station corresponding to the state information based on the task demand and the channel information;
[0226] A reward calculation unit 205 is configured to determine a reward value corresponding to the state information according to the risk coefficient, the remaining energy value and the remaining demand, and obtain a reward function, wherein the reward value is positively correlated with the remaining energy value and negatively correlated with the risk coefficient and the remaining demand;
[0227] The planning unit 206 is configured to execute a machine learning algorithm to determine a flight path of the UAV from the starting position coordinates to the end position coordinates according to the reward function, the starting position coordinates and the end position coordinates, wherein the flight path includes multiple state information and the average of the reward values corresponding to the multiple state information reaches a maximum.
[0228] In one implementation, the risk calculation unit 202 is configured to execute:
[0229] The risk coefficient corresponding to the position coordinates of the drone is determined using the following formula:
[0230]
[0231] Wherein, P(t) represents the risk factor of the UAV at the flight time t, and q u (t) represents the position coordinate of the UAV at the flight time t, σ represents the variance of the Gaussian distribution, and o n Indicates the position coordinates of the preset obstacle
[0232] In one implementation, the channel information includes a reference channel power gain, a communication bandwidth, and a transmission power of the ground base station between the UAV and the ground base station at a reference distance, and the energy consumption information includes a calculation parameter, a preset speed, a preset acceleration, a motion parameter, and a total energy;
[0233] The remaining energy calculation unit 203 is configured to execute:
[0234] Determining the amount of received data corresponding to the state information of the drone according to the reference channel power gain, the communication bandwidth, and the transmit power;
[0235] Determine the data calculation energy consumption corresponding to the state information of the drone according to the received data volume and the calculation parameters;
[0236] Determining the flight energy consumption corresponding to the state information of the drone according to the preset speed, preset acceleration and motion parameters of the drone;
[0237] Determine the accumulated data calculated energy consumption and the accumulated flight energy consumption of the UAV before the current flight time, and use the difference between the total energy and the accumulated data calculated energy consumption and the accumulated flight energy consumption as the remaining energy value corresponding to the state information of the UAV.
[0238] In one implementation, the remaining energy calculation unit 203 is configured to execute:
[0239] E ucom (t) = η u C u f u 2 L u (t)
[0240] Among them, the E ucom (t) represents the energy consumption of the drone at the flight time t, and η u represents the effective capacitance coefficient of the UAV, the C u represents the number of computing cycles required by the CPU to process 1 bit of data. u Indicates the CPU calculation frequency of the drone, the L u (t) represents the amount of received data corresponding to the UAV at the flight time t;
[0241]
[0242] Among them, the E f (t) represents the flight energy consumption of the UAV at the flight time t, s1 and s2 represent constant coefficients, G represents the gravitational acceleration, and v u (t) represents the preset speed, and a u (t) represents the preset acceleration.
[0243] In one implementation, the channel information includes a reference channel power gain, a communication bandwidth, and a transmission power of the ground base station between the UAV and the ground base station at a reference distance;
[0244] The demand calculation unit 204 is configured to execute:
[0245] Determining the amount of received data corresponding to the state information of the drone according to the reference channel power gain, the communication bandwidth, and the transmit power;
[0246] The accumulated data transmission volume of the UAV is calculated based on the received data volume, and the difference between the task demand volume and the accumulated data transmission volume is used as the remaining demand volume of the ground base station corresponding to the status information.
[0247] In one implementation, the apparatus further includes a received data amount calculation unit configured to execute:
[0248] Obtaining the flight altitude of the UAV and the position coordinates of the ground base station;
[0249] Determine the channel gain corresponding to the position coordinates of the UAV according to the reference channel power gain, the flight altitude and the position coordinates of the ground base station;
[0250] Determine a data transmission rate corresponding to the position coordinates of the UAV according to the channel gain, the communication bandwidth and the transmission power;
[0251] The amount of received data corresponding to the status information of the drone is determined according to the data transmission rate and the flight time of the drone.
[0252] In one implementation, the received data amount calculation unit is configured to execute:
[0253]
[0254] Wherein, β0 represents the reference channel power gain, H represents the flight altitude of the UAV, and s k represents the position coordinates of the ground base station, and the h k (t) represents the reference channel power gain of the UAV at flight time t;
[0255]
[0256] Wherein, B represents the communication bandwidth, and p k represents the transmission power, σ represents the variance of Gaussian distribution, and R k (t) represents the data receiving rate of the UAV at the flight time t;
[0257] L u (t) = tR k (t)
[0258] Among them, the L u (t) represents the amount of received data corresponding to the UAV at the flight time t.
[0259] In one implementation, the reward calculation unit 205 is configured to execute:
[0260] Determining the data offloading amount corresponding to the status information according to the remaining demand amount;
[0261] The normalized results of the risk coefficient and the remaining energy value are determined respectively, and the difference between the data unloading amount and the normalized result of the risk coefficient and the normalized result of the remaining energy value is used as the reward value corresponding to the state information.
[0262] In one implementation, the reward calculation unit 205 is configured to execute:
[0263]
[0264] Wherein, U(μ(t)) represents the data unloading amount corresponding to the state information, μ(t) represents the remaining demand of the ground base station at the flight time t, η and β both represent control variables, and η∈(1,∞), β∈(0,∞);
[0265]
[0266] Among them, the R t represents the reward value of the state information corresponding to the flight time t, the E u (0) represents the total energy of the drone, and the E u (t) represents the remaining energy value of the UAV at the flight time t, P represents the cumulative value of the risk coefficient of the UAV during the total flight time, and P(t) represents the risk coefficient of the UAV at the flight time t.
[0267] In one implementation, the planning unit 206 is configured to execute:
[0268] Constructing a mean expression of reward values corresponding to a plurality of state information included in the flight path according to the reward function, the starting position coordinates and the end position coordinates;
[0269] The ε-greedy strategy is used to determine the flight path of the UAV from the starting position coordinates to the ending position coordinates based on the mean expression.
[0270] In one implementation, the planning unit 206 is configured to execute:
[0271]
[0272] Wherein, ξ represents the mean of the reward values corresponding to the multiple state information included in the flight path, T represents the total flight time of the UAV, and R t represents the reward value of the state information corresponding to the flight time t, is the constraint condition on ξ, the E u (0) represents the total energy of the drone, and the E f (t) represents the flight energy consumption of the UAV at the flight time t, and the E ucom (t) represents the energy consumption of the drone at the flight time t;
[0273] The parameter ε of the ε-greedy strategy is set to be related to the number of iterations episode:
[0274]
[0275] Wherein, c represents a constant used to control the convergence speed of the algorithm.
[0276] From the above, it can be seen that the technical solution provided by the embodiment of the present disclosure establishes a reward function according to the risk coefficient of collision between the drone and the preset obstacle, the remaining energy value of the drone and the remaining demand of the ground base station, and plans the flight path of the drone from the starting position coordinates to the end position coordinates, so that the drone can give priority to serving the ground base stations with large data demands during the flight, effectively process the data requests of the ground base stations, and plan a reasonable flight trajectory in an unknown environment.
[0277] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0278] Figure 6 The invention is a block diagram of an electronic device for path planning according to an exemplary embodiment, which includes a processor and a memory, wherein the memory is used to store computer programs; and the processor is used to execute the programs stored in the memory.
[0279] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0280] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0281] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions, and the above instructions can be executed by a processor of an electronic device to perform the above method. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0282] In an exemplary embodiment, a computer program product is also provided, which, when executed on a computer, enables the computer to implement the above-mentioned method for processing path planning.
[0283] From the above, it can be seen that the technical solution provided by the embodiment of the present disclosure establishes a reward function according to the risk coefficient of collision between the drone and the preset obstacle, the remaining energy value of the drone and the remaining demand of the ground base station, and plans the flight path of the drone from the starting position coordinates to the end position coordinates, so that the drone can give priority to serving the ground base stations with large data demands during the flight, effectively process the data requests of the ground base stations, and plan a reasonable flight trajectory in an unknown environment.
[0284] Figure 7 It is a block diagram of a device 800 for path planning according to an exemplary embodiment.
[0285] For example, apparatus 800 may be a mobile phone, a computer, a digital broadcast electronic device, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0286] Reference Figure 7 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0287] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0288] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0289] The power supply component 807 provides power to the various components of the device 800. The power supply component 807 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0290] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data to be processed. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0291] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0292] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0293] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0294] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0295] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the methods described in the first and second aspects.
[0296] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to complete the above method. Optionally, for example, the storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0297] In an exemplary embodiment, a computer program product including instructions is also provided. When the computer program product is executed on a computer, the computer is enabled to execute the path planning method described in any one of the above embodiments.
[0298] From the above, it can be seen that the technical solution provided by the embodiment of the present disclosure establishes a reward function according to the risk coefficient of collision between the drone and the preset obstacle, the remaining energy value of the drone and the remaining demand of the ground base station, and plans the flight path of the drone from the starting position coordinates to the end position coordinates, so that the drone can give priority to serving the ground base stations with large data demands during the flight, effectively process the data requests of the ground base stations, and plan a reasonable flight trajectory in an unknown environment.
[0299] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0300] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A path planning method, It is characterized in that include: Obtaining preset obstacle information, task requirements of the ground base station, starting position coordinates of the drone, end position coordinates, energy consumption information, and channel information between the drone and the ground base station; Based on the preset obstacle information, determining a risk coefficient corresponding to the position coordinates of the drone, wherein the risk coefficient is proportional to the collision risk caused by the preset obstacle to the drone; Based on the energy consumption information and the channel information, determining a remaining energy value corresponding to the state information of the drone, wherein the state information includes the position coordinates and the flight time of the drone; Determining a remaining demand of the ground base station corresponding to the state information based on the task demand and the channel information; Determine a reward value corresponding to the state information according to the risk coefficient, the remaining energy value and the remaining demand, and obtain a reward function, wherein the reward value is positively correlated with the remaining energy value and negatively correlated with the risk coefficient and the remaining demand; Determine, by using a machine learning algorithm, a flight path of the UAV from the starting position coordinates to the ending position coordinates according to the reward function, the starting position coordinates and the ending position coordinates, wherein the flight path includes a plurality of state information and the average of the reward values corresponding to the plurality of state information reaches a maximum; Wherein, when the preset obstacle information indicates that the position coordinates of the preset obstacle conform to the Gaussian distribution, determining the risk coefficient corresponding to the position coordinates of the drone based on the preset obstacle information includes: The risk coefficient corresponding to the position coordinates of the drone is determined using the following formula: Wherein, P(t) represents the risk factor of the UAV at the flight time t, and q u (t) represents the position coordinate of the UAV at the flight time t, σ represents the variance of the Gaussian distribution, and o n Indicates the position coordinates of the preset obstacle; The channel information includes the reference channel power gain, communication bandwidth and transmission power of the ground base station between the UAV and the ground base station at the reference distance, and the energy consumption information includes calculation parameters, preset speed, preset acceleration, motion parameters and total energy; The determining, based on the energy consumption information and the channel information, a remaining energy value corresponding to the state information of the drone includes: Determining the amount of received data corresponding to the state information of the drone according to the reference channel power gain, the communication bandwidth, and the transmit power; Determine the data calculation energy consumption corresponding to the state information of the drone according to the received data volume and the calculation parameters; Determining the flight energy consumption corresponding to the state information of the drone according to the preset speed, the preset acceleration and the motion parameter; Determine the accumulated data calculated energy consumption and accumulated flight energy consumption of the UAV before the current flight time, and use the difference between the total energy and the accumulated data calculated energy consumption and the accumulated flight energy consumption as the remaining energy value corresponding to the state information of the UAV; Wherein, determining the remaining demand of the ground base station corresponding to the state information based on the task demand and the channel information includes: Determining the amount of received data corresponding to the state information of the drone according to the reference channel power gain, the communication bandwidth, and the transmit power; Calculate the accumulated data transmission volume of the UAV according to the received data volume, and use the difference between the task demand volume and the accumulated data transmission volume as the remaining demand volume of the ground base station corresponding to the status information; Wherein, determining the reward value corresponding to the state information according to the risk coefficient, the remaining energy value and the remaining demand to obtain the reward function includes: Determining the data offloading amount corresponding to the status information according to the remaining demand amount; Determine the normalized results of the risk coefficient and the remaining energy value respectively, and use the difference between the data offloading amount and the normalized result of the risk coefficient and the normalized result of the remaining energy value as the reward value corresponding to the state information; The step of determining the data offloading amount corresponding to the status information according to the remaining demand amount includes: Wherein, U(μ(t)) represents the data unloading amount corresponding to the state information, μ(t) represents the remaining demand of the ground base station at the flight time t, η and β both represent control variables, and η∈(1,∞), β∈(0,∞); The step of respectively determining the normalized results of the risk coefficient and the remaining energy value, and taking the difference between the data offloading amount and the normalized result of the risk coefficient and the normalized result of the remaining energy value as the reward value corresponding to the state information includes: Among them, the R t represents the reward value of the state information corresponding to the flight time t, the E u (0) represents the total energy of the UAV, and the E u (t) represents the remaining energy value of the UAV at the flight time t, P represents the cumulative value of the risk coefficient of the UAV during the total flight time, and P(t) represents the risk coefficient of the UAV at the flight time t.
2. The path planning method according to claim 1, It is characterized in that The step of determining the data calculation energy consumption corresponding to the state information of the drone according to the amount of received data and the energy consumption information includes: E ucom (t)=η u C u f u 2 L u (t) Among them, the E ucom (t) represents the energy consumption of the drone at the flight time t, and η u represents the effective capacitance coefficient of the UAV, the C u represents the number of computing cycles required by the CPU to process 1 bit of data. u Indicates the CPU calculation frequency of the drone, the L u (t) represents the amount of received data corresponding to the UAV at the flight time t; The determining, according to the preset speed, preset acceleration and motion parameters of the drone, the flight energy consumption corresponding to the state information of the drone comprises: Among them, the E f (t) represents the flight energy consumption of the UAV at the flight time t, and s 1 and the 2 represents the constant coefficient, G represents the acceleration due to gravity, and v u (t) represents the preset speed, and a u (t) represents the preset acceleration.
3. The path planning method according to any one of claims 1 or 2, It is characterized in that The determining, according to the reference channel power gain, the communication bandwidth and the transmit power, the amount of received data corresponding to the state information of the drone includes: Obtaining the flight altitude of the UAV and the position coordinates of the ground base station; Determine the channel gain corresponding to the position coordinates of the UAV according to the reference channel power gain, the flight altitude and the position coordinates of the ground base station; Determine a data transmission rate corresponding to the position coordinates of the UAV according to the channel gain, the communication bandwidth and the transmission power; The amount of received data corresponding to the status information of the drone is determined according to the data transmission rate and the flight time of the drone.
4. The path planning method according to claim 3, It is characterized in that The determining, according to the reference channel power gain, the flight altitude, and the position coordinates of the ground base station, a channel gain corresponding to the position coordinates of the UAV includes: Among them, the β 0 represents the reference channel power gain, H represents the flight altitude of the UAV, and s k represents the position coordinates of the ground base station, and the h k (t) represents the reference channel power gain of the UAV at flight time t; The determining, according to the reference channel power gain, the communication bandwidth and the transmit power, a data transmission rate corresponding to the position coordinates of the drone includes: Wherein, B represents the communication bandwidth, and p k represents the transmission power, σ represents the variance of Gaussian distribution, and R k (t) represents the data receiving rate of the UAV at the flight time t; The step of determining the amount of received data corresponding to the status information of the drone according to the data transmission rate and the flight time of the drone includes: L u (t)=tR k (t) Among them, the L u (t) represents the amount of received data corresponding to the UAV at the flight time t.
5. The path planning method according to claim 1, It is characterized in that The method of using a machine learning algorithm to determine a flight path of the drone from the starting position coordinates to the ending position coordinates according to the reward function, the starting position coordinates and the ending position coordinates includes: Constructing a mean expression of reward values corresponding to a plurality of state information included in the flight path according to the reward function, the starting position coordinates and the end position coordinates; The ε-greedy strategy is used to determine the flight path of the UAV from the starting position coordinates to the ending position coordinates based on the mean expression.
6. The path planning method according to claim 5, It is characterized in that The constructing, according to the reward function, the starting position coordinates and the end position coordinates, a mean value expression of the reward values corresponding to the plurality of state information included in the flight path comprises: Wherein, ξ represents the mean of the reward values corresponding to the multiple state information included in the flight path, T represents the total flight time of the UAV, and R t represents the reward value of the state information corresponding to the flight time t, is the constraint condition on ξ, the E u (0) represents the total energy of the UAV, and the E f (t) represents the flight energy consumption of the UAV at the flight time t, and the E ucom (t) represents the energy consumption of the drone at the flight time t; The parameter ε of the ε-greedy strategy is set to be related to the number of iterations episode: Wherein, c represents a constant used to control the convergence speed of the algorithm.
7. A path planning device, It is characterized in that include: An acquisition unit is configured to acquire preset obstacle information, a task requirement of a ground base station, a starting position coordinate of a UAV, an end position coordinate, energy consumption information, and channel information between the UAV and the ground base station; A risk calculation unit is configured to determine a risk coefficient corresponding to the position coordinates of the drone based on the preset obstacle information, wherein the risk coefficient is proportional to a collision risk caused by the preset obstacle to the drone; a remaining energy calculation unit, configured to determine a remaining energy value corresponding to the state information of the drone based on the energy consumption information and the channel information, wherein the state information includes the position coordinates and flight time of the drone; A demand calculation unit is configured to determine the remaining demand of the ground base station corresponding to the state information based on the task demand and the channel information; a reward calculation unit, configured to determine a reward value corresponding to the state information according to the risk coefficient, the remaining energy value, and the remaining demand, to obtain a reward function, wherein the reward value is positively correlated with the remaining energy value and negatively correlated with the risk coefficient and the remaining demand; a planning unit configured to execute, using a machine learning algorithm, determining a flight path of the drone from the starting position coordinates to the ending position coordinates according to the reward function, the starting position coordinates and the ending position coordinates, wherein the flight path includes a plurality of state information and an average of the reward values corresponding to the plurality of state information reaches a maximum; Wherein, the risk calculation unit is configured to execute: The risk coefficient corresponding to the position coordinates of the drone is determined using the following formula: Wherein, P(t) represents the risk factor of the UAV at the flight time t, and q u (t) represents the position coordinate of the UAV at the flight time t, σ represents the variance of the Gaussian distribution, and o n Indicates the position coordinates of the preset obstacle; The channel information includes the reference channel power gain, communication bandwidth and transmission power of the ground base station between the UAV and the ground base station at the reference distance, and the energy consumption information includes calculation parameters, preset speed, preset acceleration, motion parameters and total energy; The remaining energy calculation unit is configured to execute: Determining the amount of received data corresponding to the state information of the drone according to the reference channel power gain, the communication bandwidth, and the transmit power; Determine the data calculation energy consumption corresponding to the state information of the drone according to the received data volume and the calculation parameters; Determining the flight energy consumption corresponding to the state information of the drone according to the preset speed, the preset acceleration and the motion parameter; Determine the accumulated data calculated energy consumption and accumulated flight energy consumption of the UAV before the current flight time, and use the difference between the total energy and the accumulated data calculated energy consumption and the accumulated flight energy consumption as the remaining energy value corresponding to the state information of the UAV; Wherein, the demand quantity calculation unit is configured to execute: Determining the amount of received data corresponding to the state information of the drone according to the reference channel power gain, the communication bandwidth, and the transmit power; Calculate the accumulated data transmission volume of the UAV according to the received data volume, and use the difference between the task demand volume and the accumulated data transmission volume as the remaining demand volume of the ground base station corresponding to the status information; Wherein, the reward calculation unit is configured to execute: Determining the data offloading amount corresponding to the status information according to the remaining demand amount; Determine the normalized results of the risk coefficient and the remaining energy value respectively, and use the difference between the data offloading amount and the normalized result of the risk coefficient and the normalized result of the remaining energy value as the reward value corresponding to the state information; Wherein, the reward calculation unit is configured to execute: Wherein, U(μ(t)) represents the data unloading amount corresponding to the state information, μ(t) represents the remaining demand of the ground base station at the flight time t, η and β both represent control variables, and η∈(1,∞), β∈(0,∞); Among them, the R t represents the reward value of the state information corresponding to the flight time t, the E u (0) represents the total energy of the UAV, and the E u (t) represents the remaining energy value of the UAV at the flight time t, P represents the cumulative value of the risk coefficient of the UAV during the total flight time, and P(t) represents the risk coefficient of the UAV at the flight time t.
8. The path planning device according to claim 7, It is characterized in that The remaining energy calculation unit is configured to execute: E ucom (t)=η u C u f u 2 L u (t) Among them, the E ucom (t) represents the energy consumption of the drone at the flight time t, and η u represents the effective capacitance coefficient of the UAV, the C u represents the number of computing cycles required by the CPU to process 1 bit of data. u Indicates the CPU calculation frequency of the drone, the L u (t) represents the amount of received data corresponding to the UAV at the flight time t; Among them, the E f (t) represents the flight energy consumption of the UAV at the flight time t, and s 1 and the 2 represents the constant coefficient, G represents the acceleration due to gravity, and v u (t) represents the preset speed, and a u (t) represents the preset acceleration.
9. The path planning device according to any one of claims 7 or 8, It is characterized in that The device also includes a received data amount calculation unit configured to execute: Obtaining the flight altitude of the UAV and the position coordinates of the ground base station; Determine the channel gain corresponding to the position coordinates of the UAV according to the reference channel power gain, the flight altitude and the position coordinates of the ground base station; Determine a data transmission rate corresponding to the position coordinates of the UAV according to the channel gain, the communication bandwidth and the transmission power; The amount of received data corresponding to the status information of the drone is determined according to the data transmission rate and the flight time of the drone.
10. The path planning device according to claim 9, It is characterized in that The received data amount calculation unit is configured to execute: Among them, the β 0 represents the reference channel power gain, H represents the flight altitude of the UAV, and s k represents the position coordinates of the ground base station, and the h k (t) represents the reference channel power gain of the UAV at flight time t; Wherein, B represents the communication bandwidth, and p k represents the transmission power, σ represents the variance of Gaussian distribution, and R k (t) represents the data receiving rate of the UAV at the flight time t; L u (t)=tR k (t) Among them, the L u (t) represents the amount of received data corresponding to the UAV at the flight time t.
11. The path planning device according to claim 7, It is characterized in that The planning unit is configured to execute: Constructing a mean expression of reward values corresponding to a plurality of state information included in the flight path according to the reward function, the starting position coordinates and the end position coordinates; The ε-greedy strategy is used to determine the flight path of the UAV from the starting position coordinates to the ending position coordinates based on the mean expression.
12. The path planning device according to claim 11, It is characterized in that The planning unit is configured to execute: Wherein, ξ represents the mean of the reward values corresponding to the multiple state information included in the flight path, T represents the total flight time of the UAV, and R t represents the reward value of the state information corresponding to the flight time t, is the constraint condition on ξ, the E u (0) represents the total energy of the UAV, and the E f (t) represents the flight energy consumption of the UAV at the flight time t, and the E ucom (t) represents the energy consumption of the drone at the flight time t; The parameter ε of the ε-greedy strategy is set to be related to the number of iterations episode: Wherein, c represents a constant used to control the convergence speed of the algorithm.
13. An electronic device, It is characterized in that include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the path planning method as described in any one of claims 1 to 6.
14. A computer-readable storage medium, It is characterized in that When the instructions in the computer-readable storage medium are executed by a processor of a path planning electronic device, the path planning electronic device is enabled to execute the path planning method according to any one of claims 1 to 6.
