Power grid inspection system energy consumption optimization processing method, device, equipment and medium
By building a preset ground sensing device energy consumption model and using reinforcement learning algorithms to optimize drone path planning and task unloading strategies, the problem of high energy consumption in the coordinated work of drones and ground intelligent sensors is solved, and the system performance and Energy efficiency.
Patent Information
- Application Number
- CN202411351906.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-27
AI Technical Summary
The existing drone path planning strategies fail to effectively combine with the task offloading strategy of ground smart sensors, resulting in insufficient system performance and energy efficiency, especially in complex environments when computing tasks are processed.
By building a preset ground sensing equipment energy consumption model, using reinforcement learning algorithms to optimize drone path planning and task unloading strategies, ensuring the energy consumption of ground sensing equipment is minimized, and collaborative optimization of drones and ground sensors is achieved.
It improves the energy efficiency and system performance of ground sensing equipment, optimizes the drone path planning and calculation and unloading strategies, reduces energy consumption, and improves the automation and intelligence level of power grid patrol systems.
Smart Images

Figure CN119201463A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power grid system inspection, and in particular to a method, device, equipment and medium for optimizing energy consumption of a power grid inspection system. Background Art
[0002] With the increasing demand for electricity in modern society, the stable operation of the power grid has become a key factor in ensuring national energy security and meeting the needs of public life. Therefore, regular inspections of the power grid have become an important part of ensuring energy security, preventing failures and improving system operation efficiency.
[0003] Traditional manual power grid inspection has limitations, such as low work efficiency, high safety risks, and great impact from the regional environment. For example, manual inspection in mountainous areas is not only inefficient but also has a high risk factor. In recent years, the development of drones and ground-based intelligent sensor technology has helped realize the automation of power grid inspection. Ground-based intelligent sensors can sense and process environmental status information such as ambient temperature and light, and can detect faults and anomalies in a timely manner. On the one hand, deploying ground-based intelligent sensors for environmental monitoring in harsh environmental areas can greatly save labor costs; on the other hand, drones have the advantages of flexible deployment, wide inspection range, and low cost. For example, in forested mountainous areas, drone inspections are less affected by terrain factors and have a large inspection coverage. Therefore, the use of drones and ground-based intelligent sensors can conduct all-weather comprehensive inspections of power grid equipment, provide accurate operation and maintenance information, improve the scope, accuracy, and intelligence level of power grid inspections, and effectively avoid accidents.
[0004] However, ground-based smart sensors usually have limited energy and computing power, and it is difficult for them to handle highly complex computing tasks. Their energy consumption needs to be considered to maintain normal operation. UAVs can carry computing units to provide computing offload services for ground-based smart sensors, that is, ground-based smart sensors can offload highly complex computing tasks to UAVs for processing, thereby reducing their energy consumption caused by computing. Therefore, ground-based smart sensors and UAVs can collaborate to form a mobile edge computing system to achieve automated and intelligent power grid inspections and effectively improve the energy efficiency of sensor equipment. Among them, the UAV path planning strategy is crucial to the energy efficiency of ground-based smart sensors.
[0005] At present, there are several main methods for UAV path planning strategies: (1) two commonly used trajectory models, straight line and circle; (2) assuming the UAV path to be a specific set of hovering points; (3) for irregular trajectories, approximating the UAV trajectory with a series of discrete positions to avoid the infinite UAV flight action space. It can be seen that the existing research on UAV path planning strategies usually discretizes the UAV movement to simplify the system model and reduce the complexity. However, discretizing the UAV movement variables will reduce its mobility flexibility. In addition, simply considering the UAV path planning strategy without comprehensively considering the computational offloading strategy will also cause the accuracy and effectiveness of the path planning strategy, thereby reducing the system performance. Summary of the invention
[0006] The purpose of this application is to address the above problems and provide a method, device, equipment and medium for optimizing the energy consumption of a power grid inspection system, so as to jointly optimize the path planning of drones and the task offloading strategy of ground intelligent sensors, thereby improving the energy efficiency of ground sensor equipment and enhancing system performance.
[0007] In a first aspect, the present application provides a method for optimizing energy consumption of a power grid inspection system, which is applied to a power grid inspection system, wherein the power grid inspection system includes a plurality of ground sensing devices and a plurality of inspection drones, including:
[0008] If it is determined that the current time slot is within the system time slot, the real-time position information of the UAV in the current time slot and the real-time computing task information of the ground sensor equipment are obtained;
[0009] Input the real-time location information and the real-time computing task information into a preset ground sensor device energy consumption model; the preset ground sensor device energy consumption model is constructed based on ground sensor device computing task parameters, UAV flight parameters, communication parameters between the ground sensor device and the UAV, data transmission parameters between the ground sensor device and the UAV, and mobile strategy constraints and unloading strategy constraints all within a preset time slot;
[0010] Taking the minimum total energy consumption of all the ground sensor devices as the model optimization goal, the preset ground sensor device energy consumption model is optimized and solved based on the reinforcement learning algorithm to obtain the target movement strategy and the target task unloading strategy;
[0011] The moving trajectory of the UAV is controlled according to the target moving strategy, and the task is unloaded between the ground sensing device and the UAV according to the target task unloading strategy.
[0012] According to the technical solution provided by this application, the method also includes:
[0013] Constructing movement strategy constraints according to the flight parameters of the UAV in the preset time slot;
[0014] Constructing unloading strategy constraints according to the calculation task parameters of the ground sensor equipment, the flight parameters of the UAV, the task unloading parameters of the ground sensor equipment, and the communication parameters between the ground sensor equipment and the UAV within the preset time slot;
[0015] A preset ground sensor equipment energy consumption model is constructed based on the computing task parameters of the ground sensor equipment within the preset time slot, the flight parameters of the UAV, the communication parameters between the ground sensor equipment and the UAV, the data transmission parameters between the ground sensor equipment and the UAV, and the mobile strategy constraints and the unloading strategy constraints.
[0016] According to the technical solution provided by the present application, the flight parameters include: the position coordinates, horizontal flight direction angle and flight speed of the drone in the preset time slot; the mobile strategy constraint conditions are constructed according to the flight parameters of the drone in the preset time slot, including:
[0017] The set of the ground sensor devices is recorded as N={1, 2, ...i...n}, where n is the total number of the ground sensor devices;
[0018] The set of drones is recorded as M = {1, 2, ...j...m}; wherein m is the total number of drones;
[0019] The set of system time slots is denoted as T = {t1, t2, ... t p …t q}; wherein, t1, t2, ... t p …t q are all time slots of length τ, and q is the total number of time slots included in the system time slot;
[0020] The mobility strategy constraints are:
[0021]
[0022] Among them, U j (t) is the position coordinate of the drone at the preset time slot, is the horizontal coordinate of the drone in the preset time slot, is the vertical coordinate of the drone in the preset time slot, x min is the minimum horizontal coordinate of the UAV’s flight area, x max is the maximum horizontal coordinate of the UAV’s flight area, y min is the minimum ordinate of the UAV’s flight area, y max is the maximum vertical coordinate of the UAV’s flight area, and the positions of the UAV in two consecutive time slots are U j (tp ) and U j (t p+1 ), θ j (t) is the horizontal flight direction angle of the drone in the preset time slot, v j (t) is the flight speed of the drone in the preset time slot, l j (t) The flight distance of the UAV in the preset time slot.
[0023] According to the technical solution provided by the present application, the flight parameters also include the flight altitude of the drone in the preset time slot; the task offloading parameters of the ground sensor equipment include the position coordinates of the ground sensor equipment and the task offloading state parameters of the ground sensor equipment; the communication parameters include the number of subchannels and the task offloading characteristic parameters; the offloading strategy constraint conditions are constructed according to the calculation task parameters of the ground sensor equipment in the preset time slot, the flight parameters of the drone, the task offloading parameters of the ground sensor equipment, and the communication parameters between the ground sensor equipment and the drone, including:
[0024] Constructing a first sub-constraint condition based on the position coordinates, flight altitude and azimuth of the UAV at the preset time slot, the position coordinates of the ground sensing device, and the task offloading state parameters of the ground sensing device;
[0025] Based on the task offloading state parameters of the ground sensor equipment and the number of sub-channels, a second sub-constraint condition is constructed;
[0026] A third sub-constraint condition is constructed based on the calculation task parameters of the ground sensor equipment within the preset time slot, the task offloading state parameters of the ground sensor equipment and the task offloading characteristic parameters.
[0027] According to the technical solution provided by the present application, the first sub-constraint condition is constructed based on the position coordinates, flight altitude and azimuth of the drone at the preset time slot, the position coordinates of the ground sensor equipment and the task unloading state parameters of the ground sensor equipment, including:
[0028] The first sub-constraint is expressed as:
[0029]
[0030] As the first sub-constraint; where a i,j (t) is the task unloading state parameter of the ground sensor equipment, d i,j (t) is the horizontal distance between the ground sensing equipment and the UAV at the preset time slot, C is the horizontal coverage radius of the UAV at the preset time slot, and U j (t) is the position coordinate of the drone in the preset time slot, G i is the position coordinate of the ground sensor device in the preset time slot, H is the flight altitude of the UAV in the current time slot, and θ is the azimuth angle of the UAV in the current time slot.
[0031] According to the technical solution provided by the present application, the task offloading state parameter based on the ground sensor equipment and the number of sub-channels are used to construct the second sub-constraint condition, including:
[0032] The second sub-constraint is expressed as:
[0033]
[0034] Among them, a i,j (t) is the task offloading state parameter of the ground sensor equipment, and Q is the number of sub-channels.
[0035] According to the technical solution provided by the present application, the task offloading characteristic parameters include: the CPU frequency assigned to the computing task by the ground sensor device, the transmission rate of the task offloading, the maximum CPU computing frequency of the drone, and the CPU frequency assigned to the ground sensor device by the drone in the preset time slot; the third sub-constraint condition is constructed based on the computing task parameters of the ground sensor device in the preset time slot, the task offloading state parameters of the ground sensor device, and the task offloading characteristic parameters, including:
[0036] The third sub-constraint is expressed as:
[0037]
[0038] Among them, T i,j (t) is the time required to perform the computing task, τ is the time slot length, and a i,j (t) is the task unloading state parameter of the ground sensing equipment, is the CPU frequency allocated by the drone to the ground sensor device in the preset time slot, F max The maximum CPU frequency for the drone. is the time required for the computing task to be offloaded from the ground sensor equipment to the UAV for execution, is the execution time required for the ground sensor device to execute the computing task, F i (t) is the number of CPU cycles required to perform the computing task, f i loc (t) is the CPU frequency of the ground sensor device allocated to the computing task, is the transmission time of the computing task, is the execution time of the computing task, D i (t) represents the size of the computing task, r i,j (t) is the transmission rate of the computing task offloaded.
[0039] According to the technical solution provided by the present application, the data transmission parameters between the ground sensor device and the drone include: subchannel bandwidth, transmission power, noise power, carrier frequency, path loss coefficient in LoS scenario, path loss coefficient and path loss index in NLoS scenario; according to the calculation task parameters of the ground sensor device in the preset time slot, the flight parameters of the drone, the communication parameters between the ground sensor device and the drone, the data transmission parameters between the ground sensor device and the drone, and the mobile strategy constraints and unloading strategy constraints, a preset ground sensor device energy consumption model is constructed, including:
[0040] constructing a local processing energy consumption function according to the size of the computing task, the number of CPU cycles required to execute the computing task, and the CPU frequency allocated to the computing task by the ground sensor device;
[0041] Constructing an offloading processing energy consumption function according to the flight altitude of the drone and the horizontal distance between the ground sensor device and the drone, as well as the subchannel bandwidth, transmission power, noise power, carrier frequency, path loss coefficient in the LoS scenario, path loss coefficient in the NLoS scenario, and path loss index;
[0042] Based on the mobile strategy constraint condition and the offloading strategy constraint condition, and according to the local processing energy consumption function and the offloading processing energy consumption function, a preset ground sensor equipment energy consumption model is constructed.
[0043] According to the technical solution provided by the present application, the local processing energy consumption function is constructed according to the size of the computing task, the number of CPU cycles required to execute the computing task, and the CPU frequency allocated to the computing task by the ground sensor device, including:
[0044] The local processing energy consumption function is expressed as:
[0045]
[0046] in, is the energy consumption of the ground sensor equipment to process the computing task, k i is the effective switching capacitance, μ i is a constant, F i (t) is the number of CPU cycles required to perform the computing task, f i loc (t) is the CPU frequency allocated to the computing task by the ground sensing device.
[0047] According to the technical solution provided by the present application, the root is based on the flight altitude of the drone and the horizontal distance between the ground sensor device and the drone, as well as the subchannel bandwidth, transmission power, noise power, carrier frequency, path loss coefficient in the LoS scenario, path loss coefficient in the NLoS scenario and path loss index. An unloading processing energy consumption function is constructed, including:
[0048] The energy consumption function of the unloading process is expressed as:
[0049]
[0050] in, is the energy consumption of the computing task offloaded from the ground sensor equipment to the UAV for processing, P tr is the transmission power, is the transmission time of the computing task, D i (t) represents the size of the computing task, r i,j (t) is the transmission rate of the computing task offload, B is the subchannel bandwidth, σ 2 is the noise power, β i,j (t) is the channel gain, is the probability of the LoS link between the ground sensor device and the UAV, η1 is the path loss coefficient in the LoS scenario, β0 is the channel gain when the distance is 1 meter, and d i,j (t) is the horizontal distance between the ground sensing device and the UAV at the preset time slot, α is the path loss index, η2 is the path loss coefficient in the NLoS scenario, γ and ψ are constants related to the carrier frequency and environment type, ζ i,j (t) is the elevation angle of the drone at the preset time slot, c is the speed of light, and f c is the carrier frequency, and H is the flight altitude of the drone in the preset time slot.
[0051] According to the technical solution provided by the present application, based on the mobile strategy constraint condition and the offloading strategy constraint condition, according to the local processing energy consumption function and the offloading processing energy consumption function, a preset ground sensor equipment energy consumption model is constructed, including:
[0052] According to the local processing energy consumption function and the offloading processing energy consumption function, the energy consumption function of the ground sensor equipment is expressed as:
[0053]
[0054] Among them, E i,j (t) is the total energy consumption of the ground sensor equipment in processing the computing task, a i,j (t) is the task unloading state parameter of the ground sensing equipment, The energy consumption of the ground sensing equipment to process the computing tasks, The energy consumption of the computing task offloaded from the ground sensor equipment to the UAV for processing.
[0055] The energy consumption function of the ground sensor equipment, the movement strategy constraint condition and the unloading strategy constraint condition are used as the preset ground sensor equipment energy consumption model.
[0056] According to the technical solution provided by the present application, the minimum total energy consumption of all the ground sensor devices is used as the model optimization target, and the preset ground sensor device energy consumption model is optimized and solved based on the reinforcement learning algorithm to obtain the target movement strategy and the target task unloading strategy, including:
[0057] Construct a strategy optimization solution model based on Markov decision process:
[0058]
[0059] Among them, S is the set of system state variables, s j (t) represents the state of the drone at the preset time slot, is the horizontal coordinate of the drone in the preset time slot, is the ordinate of the drone in the preset time slot; A is the set of action variables, representing the action of the drone in the preset time slot, θ uav (t) is the direction angle of the UAV in the preset time slot, v uav (t) is the flight speed of the UAV in the preset time slot, is the task offloading strategy of the drone in the preset time slot; T' is the set of transition probabilities, p' is the probability that the drone's state is s in the preset time slot and the state is converted to s' after the task offloading strategy a, R is the set of reward variables, r j (t) is the reward function, f() is the normalization function minus function, E eq (t) is the total energy consumption of ground sensing equipment, p j is a penalty item;
[0060] Taking the minimization of the total energy consumption of all the ground sensor devices as the model optimization goal, the strategy optimization solution model is trained by the DDPG algorithm until the total energy consumption of the ground sensor devices in processing the computing tasks meets the preset ground sensor device energy consumption model, and the target movement strategy and target task unloading strategy are obtained.
[0061] According to the technical solution provided by the present application, the target movement strategy includes a target horizontal flight direction angle and a target flight speed, and the target task unloading strategy includes a target ground sensor device that needs to be unloaded, a target task that needs to be unloaded, and a target UAV corresponding to the target computing task unloading; controlling the movement trajectory of the UAV according to the target movement strategy, and performing task unloading between the ground sensor device and the UAV according to the target task unloading strategy, includes:
[0062] Generate a movement control instruction according to the target horizontal flight direction angle and the target flight speed, and send the movement control instruction to the UAV to make the UAV move at the target horizontal flight direction angle and the target flight speed;
[0063] A task offloading control instruction is generated according to the target task offloading strategy, and the task offloading control instruction is sent to the target ground sensor device and the target UAV respectively, so that the target ground sensor device offloads the target computing task to the target UAV for processing.
[0064] In a second aspect, the present application provides an energy consumption optimization processing device for a power grid inspection system, which is applied to a power grid inspection system, wherein the power grid inspection system includes a plurality of ground sensing devices and a plurality of inspection drones, including:
[0065] The information acquisition module is used to obtain the real-time position information of the UAV and the real-time computing task information of the ground sensor equipment in the current time slot if it is determined that the current time slot is within the system time slot;
[0066] A model input module is used to input the real-time position information and the real-time computing task information into a preset ground sensor device energy consumption model; the preset ground sensor device energy consumption model is constructed based on ground sensor device computing task parameters, UAV flight parameters, communication parameters between the ground sensor device and the UAV, data transmission parameters between the ground sensor device and the UAV, and mobile strategy constraints and unloading strategy constraints all within a preset time slot;
[0067] An optimization processing module is used to optimize and solve the preset ground sensor equipment energy consumption model based on a reinforcement learning algorithm, taking the minimum total energy consumption of all the ground sensor equipment as a model optimization target, and obtain a target movement strategy and a target task unloading strategy;
[0068] The task offloading module is used to control the movement trajectory of the UAV according to the target movement strategy, and to perform task offloading between the ground sensor device and the UAV according to the target task offloading strategy.
[0069] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described above when executing the computer program.
[0070] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the method described above when executed by a processor.
[0071] Compared with the prior art, the beneficial effects of the present application are as follows: the present application proposes a method, device, equipment and medium for optimizing the energy consumption of a power grid inspection system. When it is determined that the current time slot is within the system time slot, the real-time position information of the drone in the current time slot and the real-time computing task information of the ground sensor equipment are obtained and input into a preset ground sensor equipment energy consumption model. The total energy consumption of all ground sensor equipment is minimized as the model optimization target for optimization and solution. Then, the movement trajectory and task unloading of the drone are respectively controlled according to the obtained target movement strategy and target task unloading strategy. Considering the continuous motion space of the drone, the drone and the ground sensor equipment are cooperated to form a mobile edge computing system, and the drone path planning and computing offloading strategy are jointly optimized, thereby improving the energy efficiency of the ground sensor equipment and enhancing the system performance.
[0072] It should be understood that the description of technical features, technical solutions, beneficial effects or similar language in this application does not imply that all features and advantages can be realized in any single embodiment. On the contrary, it is understood that the description of features or beneficial effects means that specific technical features, technical solutions or beneficial effects are included in at least one embodiment. Therefore, the description of technical features, technical solutions or beneficial effects in this specification does not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions and beneficial effects described in the present embodiment can also be combined in any appropriate manner. Those skilled in the art will understand that the embodiment can be realized without one or more specific technical features, technical solutions or beneficial effects of a specific embodiment. In other embodiments, additional technical features and beneficial effects can also be identified in a specific embodiment that does not embody all embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] In order to more clearly illustrate the technical solution in this embodiment, the drawings required for use in the description of the embodiment will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0074] Figure 1 A schematic diagram of a power grid inspection system provided in an embodiment of the present application;
[0075] Figure 2 A flowchart of a method for optimizing energy consumption of a power grid inspection system provided in an embodiment of the present application;
[0076] Figure 3 A schematic diagram of an energy consumption optimization processing device for a power grid inspection system provided in an embodiment of the present application;
[0077] Figure 4 A schematic diagram of a computer system of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0078] In order to enable those skilled in the art to better understand the technical solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings. The description in this section is only exemplary and explanatory and should not have any limiting effect on the protection scope of the present application. Specifically, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work should fall within the scope of protection of the present application.
[0079] It should be noted that similar reference numerals and letters represent similar items in the following figures, so once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0080] In order to facilitate the understanding of this application, a brief introduction to the related technology is first given:
[0081] like Figure 1As shown in the figure, drone power grid inspection is to use drone technology to inspect and detect power transmission lines, substations and other facilities of the power grid. The mobile edge computing network for power grid inspection consists of multiple ground sensor devices and multiple drones with constant flight altitudes. Among them, sensors with certain computing capabilities are distributed on the ground, namely ground sensor devices, which are used to perceive the state information of the surrounding environment and perform computational processing on the collected information; drones provide flight computing services in collaboration to assist ground sensor devices in processing local computing tasks. Ground smart sensors usually have limited energy and computing capabilities and are difficult to process highly complex computing tasks. Their energy consumption needs to be considered to maintain normal operation; drones can carry computing units to provide computing offloading services for ground smart sensors, namely ground smart sensors can offload highly complex computing tasks to drones for processing, thereby reducing their energy consumption caused by computing. Therefore, drone path planning is required to improve system performance. Existing research on UAV path planning strategies usually discretizes UAV movement to simplify the system model and reduce complexity. However, discretizing UAV movement variables will reduce its mobility flexibility. In addition, simply considering the UAV's path planning strategy without comprehensively considering the computational offloading strategy will also cause the accuracy and effectiveness of the path planning strategy to decrease, thereby reducing system performance.
[0082] In view of this, an embodiment of the present application provides an energy consumption optimization processing method for a power grid inspection system. The method inputs the real-time position information of the drone in the current time slot and the real-time computing task information of the ground sensor equipment into a preset ground sensor equipment energy consumption model when judging that the current time slot is within the system time slot, and optimizes and solves the model with the minimum total energy consumption of all ground sensor equipment as the optimization target. Then, the movement trajectory and task unloading of the drone are controlled respectively according to the obtained target movement strategy and target task unloading strategy. Considering the continuous action space of the drone, the drone and the ground sensor equipment are cooperated to form a mobile edge computing system, and the drone path planning and computing offloading strategy are jointly optimized, thereby improving the energy efficiency of the ground sensor equipment and enhancing the system performance.
[0083] In order to make the technical solution of the present application clearer and easier to understand, the energy consumption optimization processing method of the power grid inspection system provided in the embodiment of the present application is introduced below.
[0084] like Figure 2 As shown, the figure is a flow chart of a method for optimizing energy consumption of a power grid inspection system provided by this embodiment. The method is applied to a power grid inspection system, wherein the power grid inspection system includes a plurality of ground sensing devices and a plurality of inspection drones. The method includes the following steps:
[0085] S101. If it is determined that the current time slot is within the system time slot, the real-time position information of the UAV in the current time slot and the real-time computing task information of the ground sensor equipment are obtained;
[0086] Specifically, the system divided by time slots has a total of multiple time slots with a time slot length of τ. When it is determined that the current time slot is within the system time slot, the energy consumption optimization processing method of the power grid inspection system provided in this application can be used to optimize the system energy consumption, and then the real-time position information of the drone in the current time slot and the real-time computing task information of the ground sensor equipment are obtained. Among them, the real-time position information includes the horizontal and vertical coordinates of the drone, and the real-time position information can be obtained through the satellite system; the real-time computing task information of the ground sensor equipment includes the size of the computing task currently performed by the ground sensor equipment and the number of CPU cycles required to perform the current computing task; of course, the real-time position information and the real-time computing task information can also include other parameter information, which can be set and adjusted according to actual conditions, and are not specifically limited here.
[0087] S102, inputting the real-time location information and the real-time computing task information into a preset ground sensor device energy consumption model; the preset ground sensor device energy consumption model is constructed based on ground sensor device computing task parameters, UAV flight parameters, communication parameters between the ground sensor device and the UAV, data transmission parameters between the ground sensor device and the UAV, and mobile strategy constraints and unloading strategy constraints all within a preset time slot;
[0088] Specifically, a preset ground sensor device energy consumption model is constructed in advance according to the ground sensor device calculation task parameters, the flight parameters of the drone, the communication parameters between the ground sensor device and the drone, the data transmission parameters between the ground sensor device and the drone, and the mobile strategy constraints and the unloading strategy constraints in the preset time slot, and the acquired real-time location information and the real-time calculation task information are input into the preset ground sensor device energy consumption model. The preset time slot can be any time slot in the system time slot, which can be set and adjusted according to the actual situation, and is not specifically limited here.
[0089] S103, taking the minimum total energy consumption of all the ground sensor devices as the model optimization target, optimizing and solving the preset ground sensor device energy consumption model based on the reinforcement learning algorithm, and obtaining a target movement strategy and a target task unloading strategy;
[0090] Specifically, a strategy optimization solution model is constructed based on the Markov decision process, and the total energy consumption of all the ground sensor devices is minimized as the model optimization target. The strategy optimization solution model is trained by the DDPG algorithm until the total energy consumption of the ground sensor device in processing the computing task satisfies the preset ground sensor device energy consumption model, and the target movement strategy and target task unloading strategy are obtained; wherein, the target movement strategy includes the target horizontal flight direction angle and the target flight speed, and the target task unloading strategy includes the target ground sensor device that needs to be unloaded, the target computing task that needs to be unloaded, and the target drone corresponding to the target task unloading. Of course, other methods can also be used to optimize and solve the preset ground sensor device energy consumption model, which can be set and adjusted according to actual conditions, and is not specifically limited here.
[0091] S104: Control the movement trajectory of the UAV according to the target movement strategy, and perform task offloading between the ground sensor device and the UAV according to the target task offloading strategy.
[0092] Specifically, a movement control instruction is generated according to the target horizontal flight direction angle and the target flight speed, and sent to the UAV so that the UAV moves according to the target horizontal flight direction angle and the target flight speed to control the flight path of the UAV in the next time slot, and the target ground sensor device that needs to be unloaded, the target task that needs to be unloaded, and the target computing task unloading corresponding to the target UAV, unload the target computing task of the target ground sensor device to the target UAV corresponding to it. It should be noted that there are multiple UAVs in the system, so there is a target movement strategy corresponding to each UAV, and similarly, each target ground sensor device has a corresponding target UAV.
[0093] An embodiment of the present application provides a method for optimizing energy consumption of a power grid inspection system. The method inputs the real-time position information of a drone in the current time slot and the real-time computing task information of a ground sensor device into a preset ground sensor device energy consumption model when judging that the current time slot is within the system time slot, and optimizes and solves the model with the minimum total energy consumption of all ground sensor devices as the optimization target. Then, the movement trajectory and task unloading of the drone are controlled respectively according to the obtained target movement strategy and target task unloading strategy. In consideration of the continuous motion space of the drone, the drone and the ground sensor device are collaborated to form a mobile edge computing system, and the drone path planning and computing offloading strategy are jointly optimized, thereby improving the energy efficiency of the ground sensor device and enhancing the system performance.
[0094] In the above embodiment, the method further includes:
[0095] Constructing movement strategy constraints according to the flight parameters of the UAV in the preset time slot;
[0096] Specifically, the flight parameters include the position coordinates, horizontal flight direction angle and flight speed of the drone in the preset time slot. The position coordinates of the drone in the next time slot are determined based on the position coordinates of the drone, the horizontal flight direction angle and the flight speed. With the goal of moving the drone within the specified area, the position coordinates of the drone in the preset time slot and the position coordinates of the next time slot are constrained within the specified area, thereby constructing the movement strategy constraint conditions.
[0097] Constructing unloading strategy constraints according to the calculation task parameters of the ground sensor equipment, the flight parameters of the UAV, the task unloading parameters of the ground sensor equipment, and the communication parameters between the ground sensor equipment and the UAV within the preset time slot;
[0098] Specifically, a first sub-constraint is constructed based on the position coordinates, flight altitude and azimuth of the UAV in a preset time slot, the position coordinates of the ground sensor equipment and the task offloading state parameters of the ground sensor equipment; a second sub-constraint is constructed based on the task offloading state parameters of the ground sensor equipment and the number of sub-channels; a third sub-constraint is constructed based on the computing task parameters of the ground sensor equipment in the preset time slot, the task offloading state parameters of the ground sensor equipment and the task offloading characteristic parameters; the first sub-constraint, the second sub-constraint and the third sub-constraint together constitute the offloading strategy constraint; due to limited communication resources, only some ground sensor equipment within the coverage range of each UAV in the preset time slot can offload the computing tasks to the UAV, and the offloading strategy constraint is used to characterize the above constraints.
[0099] A preset ground sensor equipment energy consumption model is constructed based on the computing task parameters of the ground sensor equipment within the preset time slot, the flight parameters of the UAV, the communication parameters between the ground sensor equipment and the UAV, the data transmission parameters between the ground sensor equipment and the UAV, and the mobile strategy constraints and the unloading strategy constraints.
[0100] Specifically, the computing task parameters of the ground sensing device include the size of the computing task and the number of CPU cycles required to execute the computing task; the flight parameters of the UAV include the position coordinates, horizontal flight direction angle and flight speed of the UAV, and may also include the flight altitude; the communication parameters between the ground sensing device and the UAV include the number of sub-channels and task offloading characteristic parameters; the data transmission parameters between the ground sensing device and the UAV include sub-channel bandwidth, transmission power, noise power, carrier frequency, path loss coefficient in LoS scenario, path loss coefficient in NLoS scenario and path loss index. First, a local processing energy consumption function is constructed according to the size of the computing task, the number of CPU cycles required to execute the computing task, and the CPU frequency allocated to the computing task by the ground sensor device; then, an offload processing energy consumption function is constructed according to the flight altitude of the UAV and the horizontal distance between the ground sensor device and the UAV, as well as the subchannel bandwidth, transmission power, noise power, carrier frequency, path loss coefficient in the LoS scenario, path loss coefficient in the NLoS scenario, and path loss index; then, based on the mobile strategy constraints and the offload strategy constraints, a preset ground sensor device energy consumption model is constructed according to the local processing energy consumption function and the offload processing energy consumption function.
[0101] In the above embodiment, the flight parameters include: the position coordinates, horizontal flight direction angle and flight speed of the drone in the preset time slot; the mobile strategy constraint conditions are constructed according to the flight parameters of the drone in the preset time slot, including:
[0102] The set of the ground sensor devices is recorded as N={1, 2, ...i...n}, where n is the total number of the ground sensor devices;
[0103] The set of drones is recorded as M = {1, 2, ...j...m}; wherein m is the total number of drones;
[0104] The set of system time slots is denoted as T = {t1, t2, ... t p …t q}; wherein, t1, t2, ... t p …t q are all time slots of length τ, and q is the total number of time slots included in the system time slot;
[0105] The mobility strategy constraints are:
[0106]
[0107] Among them, U j (t) is the position coordinate of the drone at the preset time slot, is the horizontal coordinate of the drone in the preset time slot, is the vertical coordinate of the drone in the preset time slot, x min is the minimum horizontal coordinate of the UAV’s flight area, x max is the maximum horizontal coordinate of the UAV’s flight area, y min is the minimum ordinate of the UAV’s flight area, y max is the maximum vertical coordinate of the UAV’s flight area, and the positions of the UAV in two consecutive time slots are U j (t p ) and U j (t p+1 ), θ j (t) is the horizontal flight direction angle of the drone in the preset time slot, v j (t) is the flight speed of the drone in the preset time slot, l j (t) The flight distance of the UAV in the preset time slot.
[0108] Specifically, the mobile edge computing network for power grid inspection consists of n ground sensor devices and m drones with a constant flight altitude of H, where the set of ground sensor devices and the set of drones are represented as N = {1, 2, ...i...n} and M = {1, 2, ...j...m}, respectively. Considering the system divided by time slots, there are a total of q time slots with a length of τ, namely t1, t2, ...t p …t q , using T to represent the time slot set, we can get the system time slot set T = {t1, t2, ...t p …t q}.
[0109] For UAV path planning, use U j represents the moving trajectory of UAV j. The overall trajectory consists of the position coordinates of the UAV in each time slot, that is, U j = {U j (t1),U j (t2)...U j (t p )...U j (t q )}, where the position coordinates of the drone at the preset time slot t are expressed as: is the horizontal coordinate of the drone in the preset time slot, is the vertical coordinate of the drone in the preset time slot. For drone j, its horizontal flight direction angle at the preset time slot t is θ j (t) represents the flight speed at the preset time slot t, and v j (t) represents, where θ j (t)∈[0,2π),v j (t)∈[0,V max],V max is the maximum flight speed of the UAV in a time slot, then the flight distance of UAV j in the preset time slot t is expressed as: l j (t) = v j (t)×τ,j∈M,t∈T, then we can further get the position coordinate relationship of UAV j between two consecutive time slots: U j (t p+1 )=U j (t p )+(l j (t p )cos(θ j (t p )),l j (t p )sin(θ j (t p ))), j∈M,t p ∈T,t p+1 ∈T, to ensure that the UAV moves within the specified area, the following constraints are obtained: as well as where x min ,y min 、x max ,y max They are the minimum horizontal coordinate, minimum vertical coordinate, maximum horizontal coordinate and maximum vertical coordinate of the area where the UAV can fly, and are used to indicate the boundary position of the specified area.
[0110] In the above embodiment, the flight parameters also include the flight altitude of the drone in the preset time slot; the task offloading parameters of the ground sensor equipment include the position coordinates of the ground sensor equipment and the task offloading state parameters of the ground sensor equipment; the communication parameters include the number of subchannels and the task offloading characteristic parameters; the offloading strategy constraint conditions are constructed according to the calculation task parameters of the ground sensor equipment in the preset time slot, the flight parameters of the drone, the task offloading parameters of the ground sensor equipment, and the communication parameters between the ground sensor equipment and the drone, including:
[0111] Constructing a first sub-constraint condition based on the position coordinates, flight altitude and azimuth of the UAV at the preset time slot, the position coordinates of the ground sensing device, and the task offloading state parameters of the ground sensing device;
[0112] Based on the task offloading state parameters of the ground sensor equipment and the number of sub-channels, a second sub-constraint condition is constructed;
[0113] A third sub-constraint condition is constructed based on the calculation task parameters of the ground sensor equipment within the preset time slot, the task offloading state parameters of the ground sensor equipment and the task offloading characteristic parameters.
[0114] In the above embodiment, the first sub-constraint condition is constructed based on the position coordinates, flight altitude and azimuth of the drone in the preset time slot, the position coordinates of the ground sensing device and the task offloading state parameters of the ground sensing device, including:
[0115] The first sub-constraint is expressed as:
[0116]
[0117] Among them, a i,j (t) is the task unloading state parameter of the ground sensor equipment, d i,j (t) is the horizontal distance between the ground sensing equipment and the UAV at the preset time slot, C is the horizontal coverage radius of the UAV at the preset time slot, and U j (t) is the position coordinate of the drone in the preset time slot, G i is the position coordinate of the ground sensor device in the preset time slot, H is the flight altitude of the UAV in the current time slot, and θ is the azimuth angle of the UAV in the current time slot.
[0118] Specifically, for each ground sensor device i, the process of sensing the environmental state information and obtaining the computing task is random, and S i (t) = {D i (t),F i (t)} represents the computational task of ground sensor device i at the preset time slot t, where D i (t) represents the size of the computing task, F i (t) represents the number of CPU cycles required to perform the computing task. i (t) can be processed by the ground sensor device i (local execution or waiting) or offloaded to the drone for processing. Define the binary variable a i,j (t) to represent the task S i (t) Whether it is executed in time slot t, that is, the task offloading state parameter of the ground sensor device, where j∈M={1, 2, …j…m}. When j=0, the task indicates that it is processed locally on the ground sensor device i, that is, when the computing task is executed locally by the ground sensor device i, a i,0 (t) = 1, when waiting for processing, a i,0 (t)=0, when S i (t) is unloaded to UAV j∈M={1,2,…j…m}, a i,j (t) = 1. In the same time slot, the ground sensing device can only take one of the above three actions, then we can get:
[0119]
[0120] When ground sensor device i is within the coverage range of UAV j, the task can be unloaded. C represents the horizontal coverage radius of the UAV, d i,j (t) represents the horizontal distance between ground sensor device i and UAV j at the preset time slot t, and we can get:
[0121] a i,j (t)d i,j (t)≤C,i∈N,j∈M,t∈T
[0122] Assuming that the azimuth angle of each drone is θ, the coverage radius of the drone at altitude H is:
[0123] C=Htan(θ)
[0124] Use G i represents the position coordinates of ground sensor device i, then d i,j (t) can be expressed as:
[0125]
[0126] The first sub-constraint condition is obtained accordingly.
[0127] In the above embodiment, the second sub-constraint condition is constructed based on the task offloading state parameter of the ground sensor device and the number of sub-channels, including:
[0128] The second sub-constraint is expressed as:
[0129]
[0130] Among them, a i,j (t) is the task offloading state parameter of the ground sensor equipment, and Q is the number of sub-channels.
[0131] Specifically, due to limited communication resources, only some ground sensor devices within the coverage of UAV j can offload computing tasks within the preset time slot t. Assuming that each ground sensor device i uses one subchannel for task offloading, and the number of subchannels is Q, we can get: This condition is used as the second sub-constraint condition.
[0132] In the above embodiment, the task offloading characteristic parameters include: the CPU frequency assigned to the computing task by the ground sensor device, the transmission rate of the task offloading, the maximum CPU computing frequency of the drone, and the CPU frequency assigned to the ground sensor device by the drone in the preset time slot; the third sub-constraint condition is constructed based on the computing task parameters of the ground sensor device in the preset time slot, the task offloading state parameters of the ground sensor device, and the task offloading characteristic parameters, including:
[0133] The third sub-constraint is expressed as:
[0134]
[0135] Among them, T i,j (t) is the time required to perform the computing task, τ is the time slot length, and a i,j (t) is the task unloading state parameter of the ground sensing equipment, is the CPU frequency allocated by the drone to the ground sensor device in the preset time slot, F max The maximum CPU frequency for the drone. is the time required for the computing task to be offloaded from the ground sensor equipment to the UAV for execution, is the execution time required for the ground sensor device to execute the computing task, F i (t) is the number of CPU cycles required to perform the computing task, f i loc (t) is the CPU frequency of the ground sensor device allocated to the computing task, is the transmission time of the computing task, is the execution time of the computing task, D i (t) represents the size of the computing task, r i,j (t) is the transmission rate of the computing task offloaded.
[0136] Specifically, for the time required for the execution of the computing task, assuming that the computing task S i All processing of (t) must be completed within one time slot, denoted by T i,j (t) represents the time required to perform the calculation task, then:
[0137] T i,j (t)≤τ,i∈N,j∈M,t∈T
[0138] use represents the execution time required for the ground sensor device to locally execute the computing task, The time required for the computing task to be offloaded from the ground sensor equipment to the UAV can be obtained:
[0139]
[0140] Among them, sgn() is the sign function.
[0141] For the ground sensor device to perform the calculation task locally, use f i loc (t) represents the ground sensor device i assigned to the computing task S i (t) CPU frequency, we can get:
[0142]
[0143] For computing tasks to be offloaded from ground sensing equipment to drones, The transmission time of the computing task, that is, the time required for the computing task to be offloaded from the ground sensor equipment to the UAV for execution and calculate task execution time The two parts can be obtained:
[0144]
[0145] in, and The third sub-constraint condition is obtained accordingly.
[0146] In the above embodiment, the data transmission parameters between the ground sensor device and the drone include: subchannel bandwidth, transmission power, noise power, carrier frequency, path loss coefficient in LoS scenario, path loss coefficient and path loss index in NLoS scenario; according to the calculation task parameters of the ground sensor device in the preset time slot, the flight parameters of the drone, the communication parameters between the ground sensor device and the drone, the data transmission parameters between the ground sensor device and the drone, and the mobile strategy constraints and the unloading strategy constraints, a preset ground sensor device energy consumption model is constructed, including:
[0147] constructing a local processing energy consumption function according to the size of the computing task, the number of CPU cycles required to execute the computing task, and the CPU frequency allocated to the computing task by the ground sensor device;
[0148] Constructing an offloading processing energy consumption function according to the flight altitude of the drone and the horizontal distance between the ground sensor device and the drone, as well as the subchannel bandwidth, transmission power, noise power, carrier frequency, path loss coefficient in the LoS scenario, path loss coefficient in the NLoS scenario, and path loss index;
[0149] Based on the mobile strategy constraint condition and the offloading strategy constraint condition, and according to the local processing energy consumption function and the offloading processing energy consumption function, a preset ground sensor equipment energy consumption model is constructed.
[0150] In the above embodiment, the local processing energy consumption function is constructed according to the size of the computing task, the number of CPU cycles required to execute the computing task, and the CPU frequency allocated to the computing task by the ground sensor device, including:
[0151] The local processing energy consumption function is expressed as:
[0152]
[0153] in, is the energy consumption of the ground sensor equipment to process the computing task, k i is the effective switching capacitance, μ i is a constant, F i (t) is the number of CPU cycles required to perform the computing task, f i loc (t) is the CPU frequency allocated to the computing task by the ground sensing device.
[0154] Specifically, for the ground sensor device to process the computing task, k i is the effective switch capacitance, μ i is a constant. In practice, μ i Usually set to 3, we get:
[0155]
[0156] Among them, f i loc (t) is the CPU frequency of the ground sensor device allocated to the computing task, The execution time required for the ground sensing device to perform the computing task.
[0157] For the ground sensor device to perform the calculation task locally, use f i loc (t) represents the ground sensor device i assigned to the computing task S i (t) CPU frequency, we can get:
[0158]
[0159] Among them, F i (t) is the number of CPU cycles required to execute the computing task, based on which the local processing energy consumption function is obtained.
[0160] In the above embodiment, the root is based on the flight altitude of the drone and the horizontal distance between the ground sensor device and the drone, as well as the subchannel bandwidth, transmission power, noise power, carrier frequency, path loss coefficient in the LoS scenario, path loss coefficient in the NLoS scenario and path loss index. The unloading processing energy consumption function is constructed, including:
[0161] The energy consumption function of the unloading process is expressed as:
[0162]
[0163] in, is the energy consumption of the computing task offloaded from the ground sensor equipment to the UAV for processing, Ptr is the transmission power, is the transmission time of the computing task, D i (t) represents the size of the computing task, r i,j (t) is the transmission rate of the computing task offload, B is the subchannel bandwidth, σ 2 is the noise power, β i,j (t) is the channel gain, is the probability of the LoS link between the ground sensor device and the UAV, η1 is the path loss coefficient in the LoS scenario, β0 is the channel gain when the distance is 1 meter, and d i,j (t) is the horizontal distance between the ground sensing device and the UAV at the preset time slot, α is the path loss index, η2 is the path loss coefficient in the NLoS scenario, γ and ψ are constants related to the carrier frequency and environment type, ζ i,j (t) is the elevation angle of the drone at the preset time slot, c is the speed of light, and f c is the carrier frequency, and H is the flight altitude of the drone in the preset time slot.
[0164] Specifically, for the transmission rate of computing tasks offloaded from ground sensor equipment to UAV processing, Line-of-Sight (LoS) and Non-Line-of-Sight (NLoS) probabilistic random links are considered. The probability of a LoS link between ground sensor equipment i and UAV j is:
[0165]
[0166] Among them, γ and ψ are constants related to the carrier frequency and the environment type. is the elevation angle at the preset time slot t. Further, the channel gain β can be obtained i,j (t) is:
[0167]
[0168] Among them, f c is the carrier frequency, η1 and η2 are the path loss coefficients in LoS and NLoS scenarios respectively, c is the speed of light, α is the path loss exponent, and d i,j (t) is the horizontal distance between the ground sensing device and the UAV at the preset time slot t.
[0169] use Representing the channel gain when the distance is 1 meter, we can get:
[0170]
[0171] The transfer rate of computing task offloading can be expressed as:
[0172]
[0173] Where B is the subchannel bandwidth, σ 2 is the noise power, β i,j (t) is the channel gain, and the task transmission time can be expressed as:
[0174]
[0175] When computing tasks are offloaded from ground sensor devices to UAVs for processing, the energy consumption of ground sensor device i is expressed as:
[0176]
[0177] Among them, P tr is the transmission power, is the transmission time of the computing task, based on which an offload processing energy consumption function is constructed.
[0178] In the above embodiment, based on the mobile strategy constraint condition and the offloading strategy constraint condition, according to the local processing energy consumption function and the offloading processing energy consumption function, a preset ground sensor equipment energy consumption model is constructed, including:
[0179] According to the local processing energy consumption function and the offloading processing energy consumption function, the energy consumption function of the ground sensor equipment is expressed as:
[0180]
[0181] Among them, E i,j (t) is the total energy consumption of the ground sensor equipment in processing the computing task, The energy consumption of the ground sensing equipment to process the computing tasks, The energy consumption of the computing task offloaded from the ground sensor equipment to the UAV for processing.
[0182] The energy consumption function of the ground sensor equipment, the movement strategy constraint condition and the unloading strategy constraint condition are used as the preset ground sensor equipment energy consumption model.
[0183] Specifically, use E i,j (t) represents the computing task S processed by the ground sensor device i i (t) energy consumption, and They represent the energy consumption of the ground sensor equipment for processing the computing task and the energy consumption of the computing task being offloaded from the ground sensor equipment to the UAV for processing. It can be obtained:
[0184]
[0185] Among them, a i,j(t) is the task unloading state parameter of the ground sensing equipment.
[0186] The ground sensor equipment energy consumption function, the movement strategy constraint condition and the unloading strategy constraint condition constructed in the above embodiment are used as the preset ground sensor equipment energy consumption model.
[0187] In the above embodiment, the minimum total energy consumption of all the ground sensor devices is used as the model optimization target, and the preset ground sensor device energy consumption model is optimized and solved based on the reinforcement learning algorithm to obtain the target movement strategy and the target task unloading strategy, including:
[0188] Construct a strategy optimization solution model based on Markov decision process:
[0189]
[0190] Among them, S is the set of system state variables, s j (t) represents the state of the drone at the preset time slot, is the horizontal coordinate of the drone in the preset time slot, is the ordinate of the drone in the preset time slot; A is the set of action variables, representing the action of the drone in the preset time slot, θ uav (t) is the direction angle of the UAV in the preset time slot, v uav (t) is the flight speed of the UAV in the preset time slot, is the task offloading strategy of the drone in the preset time slot; T' is the set of transition probabilities, p' is the probability that the drone's state is s in the preset time slot and the state is converted to s' after the task offloading strategy a, R is the set of reward variables, r j (t) is the reward function, f() is the normalization function minus function, E eq (t) is the total energy consumption of ground sensing equipment, p j is a penalty item;
[0191] Taking the minimization of the total energy consumption of all the ground sensor devices as the model optimization goal, the strategy optimization solution model is trained by the DDPG algorithm until the total energy consumption of the ground sensor devices in processing the computing tasks meets the preset ground sensor device energy consumption model, and the target movement strategy and the target task unloading strategy are obtained; wherein, the target movement strategy includes the target horizontal flight direction angle and the target flight speed, and the target task unloading strategy includes the target ground sensor devices that need to perform task unloading and the target UAVs corresponding to the task unloading.
[0192] Specifically, calculate the task offloading state parameter a of the ground sensor equipment i,j(t) is a discrete variable, and continuous variables include the moving direction (i.e. the horizontal flight angle θ of the drone) j (t)), moving speed (i.e., the flight speed of the drone v j (t)) and computing resource allocation (CPU frequency allocated by the drone to the ground sensor equipment in the preset time slot) ). Therefore, the optimization problem contains mixed decision variables. Since the computing task generation and channel status in the mobile edge computing system are dynamically random, it is unrealistic to predict the future state information of the system. Therefore, this application uses a method based on reinforcement learning to solve it.
[0193] The MDP problem is described using the tuple {S, A, T, R}, where S is the set of system state variables, s j (t) represents the state of the drone at the preset time slot, A is the set of action variables, is the set of actions including trajectory planning and computing task offloading, is the set of transition probability density functions, T' is the set of transition probabilities, p' is the probability that the state of the drone at the preset time slot is s and the state is converted to s' after the task offloading strategy a, R is the set of reward variables, r j (t) is the reward function, and f() is the normalized function minus function. In this algorithm, each drone is a separate agent, so the MDP is for drone j and is defined as follows:
[0194] State: At the preset time slot t, the system state of UAV j is defined as in, and They represent the horizontal and vertical coordinates of UAV j at the preset time slot t respectively.
[0195] Action: At a preset time slot t, the action is defined as in It represents the task offloading strategy of UAV j in the preset time slot t.
[0196] Transition probability: The transition probability is defined as j (t) Perform action a j (t), the next state changes to s j The probability of '(t) can be expressed as p{s j '(t)|s j (t),a j (t)}. Since the system state is unpredictable, the state transition probability is difficult to be accurately modeled.
[0197] Reward: To minimize the total energy consumption of the system. Reward function r j (t) is defined as follows:
[0198] r j(t) = f(E eq (t))-p j
[0199] Where f() is the normalized function minus function, where E eq (t) is the total energy consumption of ground sensing equipment, p j It is a penalty item to prevent drones from going beyond the specified boundaries.
[0200] The embodiment of the present application adopts the DDPG reinforcement learning algorithm, and its network model consists of an Actor network Q(s, aθ μ ) and Critic network Q(s,aθ Q ), where the Actor network parameter weight is θ μ , define the target actor network μ', whose network structure is the same as the Actor network. The parameter weight of the Critic network is θ Q , define the target Critic network Q', whose network structure is the same as that of the Critic network. The Critic network is used to output the Q function, which can evaluate the quality of the Actor network output strategy and is used to guide the Actor network to output a better strategy.
[0201] The specific training process is:
[0202] Initialize neural network parameters. Target Actor network parameter weight θ μ' =θ μ , target critic network parameter weight θ Q' =θ Q ;
[0203] Initialize the experience replay buffer.
[0204] At each training step, do the following:
[0205] 1) Collect an experience sample (state, action, reward, next state) from the environment, that is, a tuple {S k ,A k ,T k ,R k} and store it in the experience replay buffer;
[0206] 2) Randomly extract a batch of experience samples from the experience replay buffer and calculate their value function and policy gradient loss function;
[0207] 3) Use the gradient back-propagation algorithm to update the neural network parameters to reduce the value of the loss function;
[0208] 4) Update the target network parameters every certain number of training steps. Update according to the following rules, θ Q'=τθ Q +(1-τ)θ Q' ,θ μ' =τθ μ +(1-τ)θ μ' , where τ∈(0,1) is the rate at which soft updates are performed;
[0209] During the training process, the above steps are repeated until the energy consumption meets the system performance requirements.
[0210] In the above embodiment, the target movement strategy includes the target horizontal flight direction angle and the target flight speed, and the target task unloading strategy includes the target ground sensor device that needs to be unloaded, the target computing task that needs to be unloaded, and the target UAV corresponding to the target task unloading; controlling the movement trajectory of the UAV according to the target movement strategy, and performing task unloading between the ground sensor device and the UAV according to the target task unloading strategy, includes:
[0211] Generate a movement control instruction according to the target horizontal flight direction angle and the target flight speed, and send the movement control instruction to the UAV to make the UAV move at the target horizontal flight direction angle and the target flight speed;
[0212] A task offloading control instruction is generated according to the target task offloading strategy, and the task offloading control instruction is sent to the target ground sensor device and the target UAV respectively, so that the target ground sensor device offloads the target computing task to the target UAV for processing.
[0213] Specifically, the target movement strategy includes a target horizontal flight direction angle and a target flight speed, and the target task unloading strategy includes a target ground sensor device that needs to be unloaded, a target computing task that needs to be unloaded, and a target UAV corresponding to the target task unloading; a movement control instruction is generated according to the target horizontal flight direction angle and the target flight speed, and sent to the UAV, so that the UAV moves according to the target horizontal flight direction angle and the target flight speed to control the flight path of the UAV in the next time slot; and according to the target ground sensor device that needs to be unloaded, the target task that needs to be unloaded, and the target UAV corresponding to the target computing task unloading, the target computing task of the target ground sensor device is unloaded to the target UAV corresponding to it. It should be noted that there are multiple UAVs in the system, so there is a target movement strategy corresponding to each UAV, and similarly, each target ground sensor device has a corresponding target UAV.
[0214] The energy consumption optimization processing method of the power grid inspection system provided in the embodiment of the present application, when judging that the current time slot is within the system time slot, the real-time position information of the drone in the current time slot and the real-time computing task information of the ground sensor equipment are input into the preset ground sensor equipment energy consumption model, and the total energy consumption of all ground sensor equipment is minimized as the model optimization target for optimization and solution, and then the movement trajectory and task unloading of the drone are respectively controlled according to the obtained target movement strategy and target task unloading strategy. In consideration of the continuous action space of the drone, the drone and the ground sensor equipment are cooperated to form a mobile edge computing system, and the drone path planning and computing offloading strategy are jointly optimized, thereby improving the energy efficiency of the ground sensor equipment and enhancing the system performance.
[0215] Combination of the above Figure 1 and Figure 2 The energy consumption optimization processing method of the power grid inspection system provided in the embodiment of the present application is introduced in detail. The energy consumption optimization processing device, electronic device and computer-readable storage medium of the power grid inspection system provided in the embodiment of the present application will be introduced in conjunction with the accompanying drawings.
[0216] like Figure 3 As shown, this figure is a schematic diagram of the energy consumption optimization processing device of the power grid inspection system provided by the present application, and the device includes:
[0217] The information acquisition module 301 is used to obtain the real-time position information of the UAV and the real-time computing task information of the ground sensor equipment in the current time slot if it is determined that the current time slot is within the system time slot;
[0218] The model input module 302 is used to input the real-time position information and the real-time computing task information into a preset ground sensor device energy consumption model; the preset ground sensor device energy consumption model is constructed based on the ground sensor device computing task parameters, the UAV flight parameters, the communication parameters between the ground sensor device and the UAV, the data transmission parameters between the ground sensor device and the UAV, and the mobile strategy constraints and the unloading strategy constraints within a preset time slot;
[0219] The optimization processing module 303 is used to optimize and solve the preset ground sensor equipment energy consumption model based on the reinforcement learning algorithm with the minimum total energy consumption of all the ground sensor equipment as the model optimization target, and obtain the target movement strategy and the target task unloading strategy;
[0220] The task offloading module 304 is used to control the movement trajectory of the UAV according to the target movement strategy, and to perform task offloading between the ground sensor device and the UAV according to the target task offloading strategy.
[0221] The power grid inspection system energy consumption optimization processing device provided in the embodiment of the present application can correspond to the execution of the power grid inspection system energy consumption optimization processing method described in the embodiment of the present application, and the above functions of each module of the system correspond to the implementation of Figure 2 For the sake of brevity, the corresponding process of the method shown will not be repeated here.
[0222] An embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for optimizing energy consumption of a power grid inspection system as described in the above embodiment is implemented.
[0223] like Figure 4 As shown, the computer system 400 of the electronic device includes a CPU 401, which can perform various appropriate actions and processes according to the program stored in the ROM 402 or the program loaded from the storage part 408 to the RAM 403. In the RAM 403, various programs and data required for system operation are also stored. The CPU 401, the ROM 402 and the RAM 403 are connected to each other through a bus 404. The I / O interface 405 is also connected to the bus 404. Among them, CPU 401 represents a central processing unit, ROM 402 represents a read-only memory, RAM 403 represents a random access memory, and I / O represents input / output.
[0224] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube, a liquid crystal display, etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.
[0225] In particular, the process of the power grid inspection system energy consumption optimization processing method described in the above embodiment can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the power grid inspection system energy consumption optimization processing method described in the above embodiment. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 409, and / or installed from the removable medium 411. When the computer program is executed by the CPU 401, the above functions defined in the present computer system 400 are executed.
[0226] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for optimizing energy consumption of a power grid inspection system as described in the above embodiment is implemented.
[0227] Specifically, the computer-readable storage medium may be included in the electronic device described in the above embodiment; or it may exist independently without being assembled into the electronic device. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the energy consumption optimization processing method of the power grid inspection system as described in the above embodiment.
[0228] It should be noted that the computer-readable storage medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical fiber, a portable compact disk read-only memory, an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above.
[0229] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and its core ideas of this application. The above is only the preferred implementation method of this application. It should be pointed out that due to the limitations of textual expression and the objective existence of infinite specific structures, ordinary technicians in this technical field can make several improvements, modifications or changes without departing from the principles of the present invention, and can also combine the above technical features in an appropriate manner; these improvements, modifications, changes or combinations, or the direct application of the inventive concept and technical solution to other occasions without improvement, should be regarded as the scope of protection of this application.
Claims
1. A method for optimizing energy consumption of a power grid inspection system, wherein the power grid inspection system comprises a plurality of ground sensing devices and a plurality of inspection drones, characterized in that: include: If it is determined that the current time slot is within the system time slot, the real-time position information of the UAV in the current time slot and the real-time computing task information of the ground sensor equipment are obtained; Inputting the real-time location information and the real-time computing task information into a preset ground sensor equipment energy consumption model; The preset ground sensor device energy consumption model is constructed based on the ground sensor device calculation task parameters, the UAV flight parameters, the communication parameters between the ground sensor device and the UAV, the data transmission parameters between the ground sensor device and the UAV, and the mobile strategy constraints and the unloading strategy constraints within the preset time slot; Taking the minimum total energy consumption of all the ground sensor devices as the model optimization goal, the preset ground sensor device energy consumption model is optimized and solved based on the reinforcement learning algorithm to obtain the target movement strategy and the target task unloading strategy; The moving trajectory of the UAV is controlled according to the target moving strategy, and the task is unloaded between the ground sensing device and the UAV according to the target task unloading strategy.
2. The method according to claim 1, characterized in that The method further comprises: Constructing movement strategy constraints according to the flight parameters of the UAV in the preset time slot; Constructing unloading strategy constraints according to the calculation task parameters of the ground sensor equipment, the flight parameters of the UAV, the task unloading parameters of the ground sensor equipment, and the communication parameters between the ground sensor equipment and the UAV within the preset time slot; A preset ground sensor equipment energy consumption model is constructed based on the computing task parameters of the ground sensor equipment within the preset time slot, the flight parameters of the UAV, the communication parameters between the ground sensor equipment and the UAV, the data transmission parameters between the ground sensor equipment and the UAV, and the mobile strategy constraints and the unloading strategy constraints.
3. The method according to claim 2, characterized in that The flight parameters include: the position coordinates, horizontal flight direction angle and flight speed of the drone in the preset time slot; the mobile strategy constraint conditions are constructed according to the flight parameters of the drone in the preset time slot, including: The set of the ground sensor devices is recorded as N={1, 2, ...i...n}, where n is the total number of the ground sensor devices; The set of drones is recorded as M = {1, 2, ...j...m}; wherein m is the total number of drones; The set of system time slots is denoted as T = {t1, t2, ... t p …t q }; wherein, t1, t2, ... t p …t q are all time slots of length τ, and q is the total number of time slots included in the system time slot; The mobility strategy constraints are: Among them, U j (t) is the position coordinate of the drone at the preset time slot, is the horizontal coordinate of the drone in the preset time slot, is the vertical coordinate of the drone in the preset time slot, x min is the minimum horizontal coordinate of the UAV’s flight area, x max is the maximum horizontal coordinate of the UAV’s flight area, y min is the minimum ordinate of the UAV’s flight area, y max is the maximum vertical coordinate of the UAV’s flight area, and the positions of the UAV in two consecutive time slots are U j (t p ) and U j (t p+1 ), θ j (t) is the horizontal flight direction angle of the drone in the preset time slot, v j (t) is the flight speed of the drone in the preset time slot, l j (t) The flight distance of the UAV in the preset time slot.
4. The method according to claim 3, characterized in that The flight parameters also include the flight altitude of the UAV in the preset time slot; the task offloading parameters of the ground sensor equipment include the position coordinates of the ground sensor equipment and the task offloading state parameters of the ground sensor equipment; the communication parameters include the number of subchannels and the task offloading characteristic parameters; the offloading strategy constraint conditions are constructed according to the calculation task parameters of the ground sensor equipment in the preset time slot, the flight parameters of the UAV, the task offloading parameters of the ground sensor equipment, and the communication parameters between the ground sensor equipment and the UAV, including: Constructing a first sub-constraint condition based on the position coordinates, flight altitude and azimuth of the UAV at the preset time slot, the position coordinates of the ground sensing device, and the task offloading state parameters of the ground sensing device; Based on the task offloading state parameters of the ground sensor equipment and the number of sub-channels, a second sub-constraint condition is constructed; A third sub-constraint condition is constructed based on the calculation task parameters of the ground sensor equipment within the preset time slot, the task offloading state parameters of the ground sensor equipment and the task offloading characteristic parameters.
5. The method according to claim 4, characterized in that The first sub-constraint condition is constructed based on the position coordinates, flight altitude and azimuth of the UAV at the preset time slot, the position coordinates of the ground sensor equipment and the task offloading state parameters of the ground sensor equipment, including: The first sub-constraint is expressed as: Among them, a i,j (t) is the task unloading state parameter of the ground sensor equipment, d i,j (t) is the horizontal distance between the ground sensing equipment and the UAV at the preset time slot, C is the horizontal coverage radius of the UAV at the preset time slot, and U j (t) is the position coordinate of the drone in the preset time slot, G i is the position coordinate of the ground sensor device in the preset time slot, H is the flight altitude of the UAV in the current time slot, and θ is the azimuth angle of the UAV in the current time slot.
6. The method according to claim 4, characterized in that The second sub-constraint condition is constructed based on the task offloading state parameter of the ground sensor device and the number of sub-channels, including: The second sub-constraint is expressed as: Among them, a i,j (t) is the task offloading state parameter of the ground sensing device, and Q is the number of sub-channels.
7. The method according to claim 4, characterized in that The task offloading characteristic parameters include: the CPU frequency of the ground sensor equipment assigned to the computing task, the transmission rate of the task offloading, the maximum CPU computing frequency of the UAV, and the CPU frequency of the UAV assigned to the ground sensor equipment in the preset time slot; the third sub-constraint condition is constructed based on the computing task parameters of the ground sensor equipment in the preset time slot, the task offloading state parameters of the ground sensor equipment, and the task offloading characteristic parameters, including: The third sub-constraint is expressed as: Among them, T i,j (t) is the time required to perform the computing task, τ is the time slot length, a i,j (t) is the task unloading state parameter of the ground sensing equipment, is the CPU frequency allocated by the drone to the ground sensor device in the preset time slot, F max The maximum CPU frequency for the drone. is the time required for the computing task to be offloaded from the ground sensing equipment to the UAV for execution, is the execution time required for the ground sensor device to execute the computing task, F i (t) is the number of CPU cycles required to perform the computing task, f i loc (t) is the CPU frequency of the ground sensor device allocated to the computing task, is the transmission time of the computing task, is the execution time of the computing task, D i (t) represents the size of the computing task, r i,j (t) is the transmission rate of the computing task offloaded.
8. The method according to claim 4, characterized in that The data transmission parameters between the ground sensor device and the UAV include: subchannel bandwidth, transmission power, noise power, carrier frequency, path loss coefficient in LoS scenario, path loss coefficient in NLoS scenario and path loss index; according to the calculation task parameters of the ground sensor device in the preset time slot, the flight parameters of the UAV, the communication parameters between the ground sensor device and the UAV, the data transmission parameters between the ground sensor device and the UAV, and the mobile strategy constraints and the unloading strategy constraints, a preset ground sensor device energy consumption model is constructed, including: constructing a local processing energy consumption function according to the size of the computing task, the number of CPU cycles required to execute the computing task, and the CPU frequency allocated to the computing task by the ground sensor device; Constructing an offloading processing energy consumption function according to the flight altitude of the UAV, the horizontal distance between the ground sensor device and the UAV, the subchannel bandwidth, the transmission power, the noise power, the carrier frequency, the path loss coefficient in the LoS scenario, the path loss coefficient in the NLoS scenario, and the path loss index; Based on the mobile strategy constraint condition and the offloading strategy constraint condition, and according to the local processing energy consumption function and the offloading processing energy consumption function, a preset ground sensor equipment energy consumption model is constructed.
9. The method according to claim 8, characterized in that The constructing of a local processing energy consumption function according to the size of the computing task, the number of CPU cycles required to execute the computing task, and the CPU frequency allocated by the ground sensor device to the computing task comprises: The local processing energy consumption function is expressed as: in, is the energy consumption of the ground sensor equipment to process the computing task, k i is the effective switching capacitance, μ i is a constant, F i (t) is the number of CPU cycles required to perform the computing task, f i loc (t) is the CPU frequency allocated to the computing task by the ground sensing device.
10. The method according to claim 8, characterized in that The unloading processing energy consumption function is constructed according to the flight altitude of the unmanned aerial vehicle, the horizontal distance between the ground sensor device and the unmanned aerial vehicle, the subchannel bandwidth, the transmission power, the noise power, the carrier frequency, the path loss coefficient in the LoS scenario, the path loss coefficient in the NLoS scenario, and the path loss index, including: The energy consumption function of the unloading process is expressed as: in, is the energy consumption of the computing task offloaded from the ground sensor equipment to the UAV for processing, P tr is the transmission power, is the transmission time of the computing task, D i (t) represents the size of the computing task, r i,j (t) is the transmission rate of the computing task offload, B is the subchannel bandwidth, σ 2 is the noise power, β i,j (t) is the channel gain, is the probability of the LoS link between the ground sensor device and the UAV, η1 is the path loss coefficient in the LoS scenario, β0 is the channel gain when the distance is 1 meter, and d i,j (t) is the horizontal distance between the ground sensing device and the UAV at the preset time slot, α is the path loss index, η2 is the path loss coefficient in the NLoS scenario, γ and ψ are constants related to the carrier frequency and environment type, ζ i,j (t) is the elevation angle of the drone at the preset time slot, c is the speed of light, and f c is the carrier frequency, and H is the flight altitude of the drone in the preset time slot.
11. The method according to claim 8, characterized in that The method of constructing a preset ground sensor equipment energy consumption model based on the mobile strategy constraint condition and the offloading strategy constraint condition and according to the local processing energy consumption function and the offloading processing energy consumption function includes: According to the local processing energy consumption function and the offloading processing energy consumption function, the energy consumption function of the ground sensor equipment is expressed as: Among them, E i,j (t) is the total energy consumption of the ground sensor equipment in processing the computing task, a i,j (t) is the task unloading state parameter of the ground sensing equipment, The energy consumption of the ground sensing equipment to process the computing tasks, The energy consumption of the computing task offloading from the ground sensor equipment to the UAV for processing; The energy consumption function of the ground sensor equipment, the movement strategy constraint condition and the unloading strategy constraint condition are used as the preset ground sensor equipment energy consumption model.
12. The method according to claim 8, characterized in that The method takes the minimum total energy consumption of all the ground sensor devices as the model optimization target, optimizes and solves the preset ground sensor device energy consumption model based on the reinforcement learning algorithm, and obtains the target movement strategy and the target task unloading strategy, including: Construct a strategy optimization solution model based on Markov decision process: Among them, S is the set of system state variables, s j (t) represents the state of the drone at the preset time slot, is the horizontal coordinate of the drone in the preset time slot, is the ordinate of the drone in the preset time slot; A is the set of action variables, representing the action of the drone in the preset time slot, θ uav (t) is the direction angle of the UAV in the preset time slot, v uav (t) is the flight speed of the UAV in the preset time slot, is the task offloading strategy of the drone in the preset time slot; T' is the set of transition probabilities, p' is the probability that the drone's state is s in the preset time slot and the state is converted to s' after the task offloading strategy a, R is the set of reward variables, r j (t) is the reward function, f() is the normalization function minus function, E eq (t) is the total energy consumption of ground sensing equipment, p j is a penalty item; Taking the minimization of the total energy consumption of all the ground sensor devices as the model optimization goal, the strategy optimization solution model is trained by the DDPG algorithm until the total energy consumption of the ground sensor devices in processing the computing tasks meets the preset ground sensor device energy consumption model, and the target movement strategy and target task unloading strategy are obtained.
13. The method according to claim 12, characterized in that The target movement strategy includes a target horizontal flight direction angle and a target flight speed, and the target task unloading strategy includes a target ground sensor device that needs to be unloaded, a target computing task that needs to be unloaded, and a target UAV corresponding to the target task unloading; controlling the movement trajectory of the UAV according to the target movement strategy, and performing task unloading between the ground sensor device and the UAV according to the target task unloading strategy, includes: Generate a movement control instruction according to the target horizontal flight direction angle and the target flight speed, and send the movement control instruction to the UAV to make the UAV move at the target horizontal flight direction angle and the target flight speed; A task offloading control instruction is generated according to the target task offloading strategy, and the task offloading control instruction is sent to the target ground sensor device and the target UAV respectively, so that the target ground sensor device offloads the target computing task to the target UAV for processing.
14. A power grid inspection system energy consumption optimization processing device, applied to a power grid inspection system, wherein the power grid inspection system comprises a plurality of ground sensing devices and a plurality of inspection drones, characterized in that: include: The information acquisition module is used to obtain the real-time position information of the UAV and the real-time computing task information of the ground sensor equipment in the current time slot if it is determined that the current time slot is within the system time slot; A model input module, used for inputting the real-time position information and the real-time computing task information into a preset ground sensor equipment energy consumption model; The preset ground sensor device energy consumption model is constructed based on the ground sensor device calculation task parameters, the UAV flight parameters, the communication parameters between the ground sensor device and the UAV, the data transmission parameters between the ground sensor device and the UAV, and the mobile strategy constraints and the unloading strategy constraints within the preset time slot; An optimization processing module is used to optimize and solve the preset ground sensor equipment energy consumption model based on a reinforcement learning algorithm, taking the minimum total energy consumption of all the ground sensor equipment as a model optimization target, and obtain a target movement strategy and a target task unloading strategy; The task offloading module is used to control the movement trajectory of the UAV according to the target movement strategy, and to perform task offloading between the ground sensor device and the UAV according to the target task offloading strategy.
15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 13 is implemented.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.
Citation Information
Patent Citations
Online trajectory and resource optimization method for multi-unmanned aerial vehicle auxiliary edge calculation
CN116321181A
Multi-unmanned aerial vehicle fair cooperation and task unloading optimization method and system
CN116887355A
Unmanned aerial vehicle task unloading optimization method for power grid inspection
CN117580105A