# A Real-Time Monitoring and Warning System for Power Grids Based on Edge Computing

Authors: Hang Li; Yongle Dong; Chao Yin; Jia Xi; Luwei Bai; Zhenzhen Hui
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

It is very important for the safe operation of the power grid to be able to achieve real-time online monitoring, but along with the expansion of the smart grid, powerful computing power is required to achieve online monitoring, which cannot be loaded by ordinary servers. Due to the limited computing and storage resources of the server, it is difficult to fully meet the real-time requirements of online power line monitoring. Therefore, this research proposes a smart grid real-time monitoring and early warning system based on edge computing, which can reasonably allocate computing tasks according to the effective use of edge node resources. It can also collect and process information in real time, and can monitor the power grid online, which improves the fault identification efficiency of the power grid, effectively reduces the economic cost, and relieves the computing pressure of the online monitoring equipment on the cloud computing server. Meanwhile, considering the burst problem in allocation queue optimization, a multipriority allocation queue algorithm is proposed, and an improved greedy algorithm allocation model is used to solve the optimal scheduling problem between bursts. Simulation analysis shows that the scheduling scheme proposed in this paper can effectively reduce the monitoring delay of the power line monitoring system, improve the overall adaptability and compatibility of the system, meet the market demand, and facilitate promotion.


---

## Body

## 1. Introduction

In the power system, power line fault monitoring is one of the primary tasks of the grid.It is necessary to monitor the electrical and nonelectrical information in the power lines of the power grid in real time [1]. Especially, in the field of online and timely monitoring of power lines, the demands for real time and accuracy of monitoring are higher. The lower the monitoring delay, the better the monitoring effect [2].With the development of the expansion of smart grid and IoT tech, edge calculation tech has a wide range of applications in these fields. Edge calculation can effectively reduce network congestion, effectively reduce online delay and timely monitoring of power lines, and further improve the security and reliability of smart grids. The online and timely monitoring service network architecture of power lines on account of edge calculation includes cloud, edge, and monitoring equipment layers. In this network, online and timely monitoring equipment for power lines is in charge of gathering data and dispatch assignments to edge peers. Most assignments will be conducted on edge peers closer to them. In addition, the edge peer management and control system of the cloud layer can be mapped out near the edge layer, and the monitoring device data can be allocated to the edge server for processing reasonably and efficiently [3–5].However, the resources of edge peers are relatively restrained, for instance, calculation resources and storage resources [6]. Additionally, most wired online and just-in-time monitoring services are latency-sensitive. If an inconsequent assignment assignation system is used, it will result in allocations to edge peers. The load is unbalanced, and some jobs cannot be completed in time. Furthermore, inconsequent assignment assignation system can lead to a serious waste of computing resources at edge peers. Therefore, a scientific assignment assignation system is required to fully utilize edge peer resources to decrease the total delay of assignments, ensure the completion of delay-sensitive assignments, and ameliorate the security and reliability of smart grids.Currently, research work on timely monitoring of power lines on account of edge calculation is gradually unfolding [7]. The outlines of literature show the relationship between edge calculation and the IoT, the utilization of edge calculation in smart grids, and the propose of an edge calculation framework [8]. Literature proposed a centralized assignment allocation strategy for edge calculation in the power grid, but this algorithm is often locally optimal and does not ameliorate the overall function of the system. Literature proposed a distributed assignment allocation strategy on account of game algorithm, but this strategy is not friendly to delay-sensitive assignments [9]. Literature studied the edge calculation architecture of smart grid timely monitoring and proposed a scheduling algorithm on account of simulated annealing strategy [10]. However, this algorithm can only show its advantages when the number of assignments is small and is not compatible for large-scale utilization. Edge calculation has a wide range of utilizations in the field of smart grid. But there are few research studies on assignment allocation strategies in specific scenarios, and there are certain limitations, often ignoring the unexpected issues of assignment queuing in the current research. Designing an edge calculation framework for specific scenarios and studying assignment allocation unexpected issues in large-scale utilization scenarios need to be resettled urgently.Firstly, the paper proposes a smart grid timely monitoring framework on account of edge calculation to ameliorate the timely monitoring performance under the conventional cloud calculation framework on the above unexpected issues. By adding edge peers, a large amount of data calculation is transferred to the edge of the cyber to decrease the pressure of the cloud server, which decreases monitoring delay and ameliorates monitoring efficiency. Secondly, an ameliorated greedy algorithm assignment scheduling model is proposed to ameliorate the utilization of edge calculation resources and settle the unexpected issues of assignment allocation between fringe servers and monitoring equipment in large-scale utilization scenarios.


## 2. Edge Calculation and Power Line Monitoring Framework

### 2.1. From Cloud Calculation to Edge Calculation

In the smart grid, an auto-energy transmission cyber which is safer, more dependable, and smarter than the traditional grid can be created by combining advanced technologies such as the IoT and artificial intelligence. A variety of IoT apparatus and processing servers will be applied to replace traditional manual monitoring in the power line monitoring system. Typical sensors and cameras of IoT apparatus gather and upload monitoring data to the processing server. Then, the processing server runs the deep learning algorithm, detects potential threats, and triggers appropriate drivers when necessary to realize timely and intelligent monitoring and automatically identify threats [11]. However, it requires more on the calculation power of cloud servers because deep learning algorithms are extremely sensitive and associated with data, computation, and hardware. Coupled with the gradual maturity of smart grid construction, the massive growth of IoT apparatus connected to the grid and the transfer of a large amount of data to the cloud will put tremendous pressure on the cyber and cloud servers with generation of huge communication costs.As a supplement to cloud calculation, edge calculation can settle these unexpected issues well. Edge calculation points to setting up edge processors in the power grid according to geographic location, and handing over the data in the power grid to the corresponding edge processors for processing on account of geographic location, and combining with deep learning algorithms to intelligently identify threats. When an intelligent algorithm feels threatened, it sends the information to the cloud processor for processing and issues a solution command. Edge calculation can decrease the workload of cloud processors and decrease cyber calculation delays effectively which has broad utilization prospects for services that are sensitive to delay demands.


### 2.2. Timely Monitoring Framework of Power Lines on account of Edge Calculation

In the online and timely monitoring framework of power lines on account of edge calculation, the data obtained by online monitor equipment is sent to the edge layer for processing and assessment. If a threat is found, it will immediately send information to the cloud and execute cloud decision instructions. The timely monitoring framework of the power grid is composed of a three-layer structure of equipment, edge, and cloud, as shown in Figure1.Figure 1
Edge calculation framework.Monitoring equipment layer: the monitoring equipment layer belongs to the power grid information collection system, and the components include smart cameras, sensors, and other IoT devices for monitoring the smart grid. These devices are responsible for acquiring high-resolution image or video streams but also help transmit the captured information to edge servers by installing communication modules and local storage.Edge layer: the edge layer is the core part of edge calculation, and its equipment components are shown in Figure2. A key unit of this level is the threat recognition unit, which executes inference algorithms on account of some well-trained deep learning patterns. Once a threat is found in the received image or video, for instance, a person, car, or bird approaching the wire, the unit will upload the monitoring data and warning info to the cloud [12]. Depending on the type of edge cyber linkage, fringe servers can be mapped out close to Wi-Fi access nodes or 5G base stations. These servers should be equipped with certain high-functional GPU resources to support the implementation of the threat identification unit.Figure 2
Edge level equipment.Cloud level: this level is the CPU of the monitoring system, which can gather warning data from all fringe servers and timely respond to these warnings info in line with the smart grid strategy.Ameliorated greedy algorithm assignment allocation model: for the sake of making scientific use of the calculation resources of the edge server and decrease cyber delay, there is an assignment allocation unexpected issues between the edge server and the monitoring equipment. In large-scale utilization scenarios, there will be an optimal queuing unexpected issues when each edge server processes data. Aiming at the above unexpected issues, mathematical modeling is carried out in this section, and a multipriority assignment queuing algorithm and an assignment model of ameliorated greedy algorithm are proposed.Mathematical Modeling: in the assignment distribution on account of the edge calculation grid monitoring framework, the target demand is the lowest possible monitoring delay. Therefore, an objective function needs to be established around this demand.First, a series of simplifications are carried out for the sake of simplify the calculation:(1)
Assume that the same type of monitoring equipment in the smart grid is of the same model and performance, and the size of the data acquired is the same.(2)
Assumed that each edge server in the smart grid has the same calculation resources, and the storage resources of each edge server are considered to be large enough, that is, the constraints brought by storage resources are not considered.(3)
Assumed that all monitoring apparatus and fringe servers in the smart grid can be flexibly connected, and each monitoring apparatus can only link to one edge server at the same time, and one edge apparatus can only process one assignment at the same time.Define variables on account of the above simplified conditions. It is supposed that there is a cloud big data calculation center includingn sets of monitoring apparatus and m sets of fringe servers in the smart grid. Utilize set C to delegate the set of IoT apparatus, and Ci (1 ≤ i ≤ n) to delegate each monitoring apparatus in the smart grid. At the same time, the set E is used to denote the set of fringe servers, and Ej (1 ≤ j ≤ n) is used to denote each edge server in the smart grid. The size of the data generated by each monitoring apparatus is si. Since the probability of detecting a threat is different in different geographic locations, pi is defined as the probability of detecting a threat by the apparatus Ci [13]. These probabilities can be calculated from actual data and info. For each edge server, it defines the edge conducting rate as ve, that is, the number of frames that each edge server can process in 1 second. For cloud servers, the conducting rate is denoted as vc. The uplink bandwidth from each monitoring apparatus Ci to the cloud server is recorded as bci, and the uplink bandwidth from each edge server Ej to the cloud is recorded as bej. The uplink bandwidth between each monitoring apparatus and each edge server will vary due to geographic distance. Define the linkage between the apparatus Ci and the edge server Ej, and the upstream bandwidth is bi, j. When there are many monitoring apparatus, the assignments to be conducted in the edge server Ej need to consider the queuing delay. The queuing delay time is defined as tej. For the power line monitoring framework that only has cloud calculation, the cloud queuing delay time is defined as tcj.Define the setX = {xi,j|1 ≤ i ≤ n,1≤j ≤ m}, which delegates the linkage between each IoT apparatus and the edge server. If you choose Ci to link to Ej, set xi and j to 1, otherwise set to 0. Since every IoT apparatus can only link to one edge server, there are(1)∑j=1mxi,j=1,∀i,xi,j∈0,1,∀i,j.In edge monitoring, the average detection delay of all assignments isDe. De can be divided into four parts: the time from the monitoring apparatus to the edge server, the assignment queuing delay, the edge conducting time, and the potential time to upload from the edge server to the cloud server when a threat to the image frame is detected. The mathematical expression of DE is as follows:(2)De=∑i=1nxi,jsj/bi,j+tej+sj/ve+sj/bejpin.For comparison, the calculation formula of the cloud’s average detection delayDc is as follows:(3)Dc=∑i=1nsj/bci+tcj+sj/ven.For the optimization of monitoring delay, the value of the objective function is required to be as small as possible. Therefore, the ratio between the average delay of edge calculation and the average delay of cloud calculation is taken as the objective functionO(D). The smaller the value of the objective function O(D), the smaller the edge monitoring delay and the better the monitoring performance.(4)OD=DeDc.Therefore, the ultimate goal is to obtain a smart grid timely monitoring framework on account of edge calculation with minimal monitoring delay.Multipriority assignment queuing algorithm: queuing delay affects the total delay of the assignment. Different queuing methods on edge peers have a great impact on assignment delay [14]. For the sake of settle the assignment queuing unexpected issues on edge peers, a multipriority assignment queuing algorithm is proposed, that is, on the premise that all assignments can be completed, if an assignment has a lower delay than other assignments, then this assignment is on the edge peer. Run ahead to decrease the average delay of assignments.The current goal is to minimize the average assignment delay of formula (3) by changing the queuing order. First, sort the assignment queue in a fixed time interval. Then, continuously compare the conducting overhead of two adjacent assignments. If the overhead of the rear assignment is small, the two assignments are exchanged in the queue, and the exchange function is executed recursively on the assignment queue until the end. The program flowchart of the multipriority assignment queuing algorithm is shown in Figure 3.Figure 3
Flowchart of multipriority assignment queuing algorithm.Ameliorated greedy algorithm assignment allocation algorithm model: when solving unexpected problems, greedy algorithm takes the best or optimal (i.e., most favorable) choice at each step of the selection, hoping that the result is the best or optimal algorithm. The results obtained by greedy algorithms are often not optimal (and sometimes optimal), but they are relatively approximate (close to) optimal.Our optimization goal is to settle a scheduling unexpected issues of NP unexpected issues. In this section, we propose a smart grid timely monitoring assignment allocation algorithm on account of an ameliorated greedy algorithm [15]. Compared with the traditional greedy algorithm, the ameliorated greedy algorithm takes into account the optimization factors of assignment queuing at edge peers. For the sake of obtain the minimum delay, it should be combined with the greedy algorithm to enable all the monitoring apparatus in the power grid connected to the edge server with the largest uplink bandwidth first. Secondly, a multipriority assignment queuing algorithm is used to prioritize the assignments of each node in a fixed time interval. Finally, the remaining bandwidth of the edge peer is updated at regular intervals. The flowchart of the algorithm is shown in Figure 4.Figure 4
Flowchart of assignment allocation algorithm.


## 2.1. From Cloud Calculation to Edge Calculation

In the smart grid, an auto-energy transmission cyber which is safer, more dependable, and smarter than the traditional grid can be created by combining advanced technologies such as the IoT and artificial intelligence. A variety of IoT apparatus and processing servers will be applied to replace traditional manual monitoring in the power line monitoring system. Typical sensors and cameras of IoT apparatus gather and upload monitoring data to the processing server. Then, the processing server runs the deep learning algorithm, detects potential threats, and triggers appropriate drivers when necessary to realize timely and intelligent monitoring and automatically identify threats [11]. However, it requires more on the calculation power of cloud servers because deep learning algorithms are extremely sensitive and associated with data, computation, and hardware. Coupled with the gradual maturity of smart grid construction, the massive growth of IoT apparatus connected to the grid and the transfer of a large amount of data to the cloud will put tremendous pressure on the cyber and cloud servers with generation of huge communication costs.As a supplement to cloud calculation, edge calculation can settle these unexpected issues well. Edge calculation points to setting up edge processors in the power grid according to geographic location, and handing over the data in the power grid to the corresponding edge processors for processing on account of geographic location, and combining with deep learning algorithms to intelligently identify threats. When an intelligent algorithm feels threatened, it sends the information to the cloud processor for processing and issues a solution command. Edge calculation can decrease the workload of cloud processors and decrease cyber calculation delays effectively which has broad utilization prospects for services that are sensitive to delay demands.


## 2.2. Timely Monitoring Framework of Power Lines on account of Edge Calculation

In the online and timely monitoring framework of power lines on account of edge calculation, the data obtained by online monitor equipment is sent to the edge layer for processing and assessment. If a threat is found, it will immediately send information to the cloud and execute cloud decision instructions. The timely monitoring framework of the power grid is composed of a three-layer structure of equipment, edge, and cloud, as shown in Figure1.Figure 1
Edge calculation framework.Monitoring equipment layer: the monitoring equipment layer belongs to the power grid information collection system, and the components include smart cameras, sensors, and other IoT devices for monitoring the smart grid. These devices are responsible for acquiring high-resolution image or video streams but also help transmit the captured information to edge servers by installing communication modules and local storage.Edge layer: the edge layer is the core part of edge calculation, and its equipment components are shown in Figure2. A key unit of this level is the threat recognition unit, which executes inference algorithms on account of some well-trained deep learning patterns. Once a threat is found in the received image or video, for instance, a person, car, or bird approaching the wire, the unit will upload the monitoring data and warning info to the cloud [12]. Depending on the type of edge cyber linkage, fringe servers can be mapped out close to Wi-Fi access nodes or 5G base stations. These servers should be equipped with certain high-functional GPU resources to support the implementation of the threat identification unit.Figure 2
Edge level equipment.Cloud level: this level is the CPU of the monitoring system, which can gather warning data from all fringe servers and timely respond to these warnings info in line with the smart grid strategy.Ameliorated greedy algorithm assignment allocation model: for the sake of making scientific use of the calculation resources of the edge server and decrease cyber delay, there is an assignment allocation unexpected issues between the edge server and the monitoring equipment. In large-scale utilization scenarios, there will be an optimal queuing unexpected issues when each edge server processes data. Aiming at the above unexpected issues, mathematical modeling is carried out in this section, and a multipriority assignment queuing algorithm and an assignment model of ameliorated greedy algorithm are proposed.Mathematical Modeling: in the assignment distribution on account of the edge calculation grid monitoring framework, the target demand is the lowest possible monitoring delay. Therefore, an objective function needs to be established around this demand.First, a series of simplifications are carried out for the sake of simplify the calculation:(1)
Assume that the same type of monitoring equipment in the smart grid is of the same model and performance, and the size of the data acquired is the same.(2)
Assumed that each edge server in the smart grid has the same calculation resources, and the storage resources of each edge server are considered to be large enough, that is, the constraints brought by storage resources are not considered.(3)
Assumed that all monitoring apparatus and fringe servers in the smart grid can be flexibly connected, and each monitoring apparatus can only link to one edge server at the same time, and one edge apparatus can only process one assignment at the same time.Define variables on account of the above simplified conditions. It is supposed that there is a cloud big data calculation center includingn sets of monitoring apparatus and m sets of fringe servers in the smart grid. Utilize set C to delegate the set of IoT apparatus, and Ci (1 ≤ i ≤ n) to delegate each monitoring apparatus in the smart grid. At the same time, the set E is used to denote the set of fringe servers, and Ej (1 ≤ j ≤ n) is used to denote each edge server in the smart grid. The size of the data generated by each monitoring apparatus is si. Since the probability of detecting a threat is different in different geographic locations, pi is defined as the probability of detecting a threat by the apparatus Ci [13]. These probabilities can be calculated from actual data and info. For each edge server, it defines the edge conducting rate as ve, that is, the number of frames that each edge server can process in 1 second. For cloud servers, the conducting rate is denoted as vc. The uplink bandwidth from each monitoring apparatus Ci to the cloud server is recorded as bci, and the uplink bandwidth from each edge server Ej to the cloud is recorded as bej. The uplink bandwidth between each monitoring apparatus and each edge server will vary due to geographic distance. Define the linkage between the apparatus Ci and the edge server Ej, and the upstream bandwidth is bi, j. When there are many monitoring apparatus, the assignments to be conducted in the edge server Ej need to consider the queuing delay. The queuing delay time is defined as tej. For the power line monitoring framework that only has cloud calculation, the cloud queuing delay time is defined as tcj.Define the setX = {xi,j|1 ≤ i ≤ n,1≤j ≤ m}, which delegates the linkage between each IoT apparatus and the edge server. If you choose Ci to link to Ej, set xi and j to 1, otherwise set to 0. Since every IoT apparatus can only link to one edge server, there are(1)∑j=1mxi,j=1,∀i,xi,j∈0,1,∀i,j.In edge monitoring, the average detection delay of all assignments isDe. De can be divided into four parts: the time from the monitoring apparatus to the edge server, the assignment queuing delay, the edge conducting time, and the potential time to upload from the edge server to the cloud server when a threat to the image frame is detected. The mathematical expression of DE is as follows:(2)De=∑i=1nxi,jsj/bi,j+tej+sj/ve+sj/bejpin.For comparison, the calculation formula of the cloud’s average detection delayDc is as follows:(3)Dc=∑i=1nsj/bci+tcj+sj/ven.For the optimization of monitoring delay, the value of the objective function is required to be as small as possible. Therefore, the ratio between the average delay of edge calculation and the average delay of cloud calculation is taken as the objective functionO(D). The smaller the value of the objective function O(D), the smaller the edge monitoring delay and the better the monitoring performance.(4)OD=DeDc.Therefore, the ultimate goal is to obtain a smart grid timely monitoring framework on account of edge calculation with minimal monitoring delay.Multipriority assignment queuing algorithm: queuing delay affects the total delay of the assignment. Different queuing methods on edge peers have a great impact on assignment delay [14]. For the sake of settle the assignment queuing unexpected issues on edge peers, a multipriority assignment queuing algorithm is proposed, that is, on the premise that all assignments can be completed, if an assignment has a lower delay than other assignments, then this assignment is on the edge peer. Run ahead to decrease the average delay of assignments.The current goal is to minimize the average assignment delay of formula (3) by changing the queuing order. First, sort the assignment queue in a fixed time interval. Then, continuously compare the conducting overhead of two adjacent assignments. If the overhead of the rear assignment is small, the two assignments are exchanged in the queue, and the exchange function is executed recursively on the assignment queue until the end. The program flowchart of the multipriority assignment queuing algorithm is shown in Figure 3.Figure 3
Flowchart of multipriority assignment queuing algorithm.Ameliorated greedy algorithm assignment allocation algorithm model: when solving unexpected problems, greedy algorithm takes the best or optimal (i.e., most favorable) choice at each step of the selection, hoping that the result is the best or optimal algorithm. The results obtained by greedy algorithms are often not optimal (and sometimes optimal), but they are relatively approximate (close to) optimal.Our optimization goal is to settle a scheduling unexpected issues of NP unexpected issues. In this section, we propose a smart grid timely monitoring assignment allocation algorithm on account of an ameliorated greedy algorithm [15]. Compared with the traditional greedy algorithm, the ameliorated greedy algorithm takes into account the optimization factors of assignment queuing at edge peers. For the sake of obtain the minimum delay, it should be combined with the greedy algorithm to enable all the monitoring apparatus in the power grid connected to the edge server with the largest uplink bandwidth first. Secondly, a multipriority assignment queuing algorithm is used to prioritize the assignments of each node in a fixed time interval. Finally, the remaining bandwidth of the edge peer is updated at regular intervals. The flowchart of the algorithm is shown in Figure 4.Figure 4
Flowchart of assignment allocation algorithm.


## 3. Simulation Analysis

In this section, it would perform simulation assessment on the edge monitoring system and use the algorithm given in the above section to evaluate the monitoring performance of the edge monitoring system.


### 3.1. Comparison of Edge Calculation and Cloud Calculation Simulation

The simulation analyses the cloud calculation average assignment delay and edge calculation assignment delay and compares them as shown in Figure5. It can be observed that the latency of cloud calculation assignments is much greater than the latency of edge calculation assignments. With the increase in the number of assignments, cloud calculation relies on its powerful calculation resources, and the assignment delay is basically unchanged, but due to the high transmission delay, the average assignment delay is high [16]. Compared with cloud calculation, after edge calculation transfers the assignment calculation to the edge side, the transmission delay is smaller, thereby reducing the average assignment delay. However, due to the restrained calculation resources of edge calculation servers, as the number of assignments increases, the average assignment delay gradually increases. The average assignment latency of edge calculation is about 10%–50% of cloud calculation.Figure 5
Comparison of average assignment latency between edge calculation and cloud calculation.


### 3.2. Multipriority Assignment Queuing Algorithm Simulation

In this section, it should conduct a simulation study on the multipriority assignment queuing algorithm. The initial load of the edge peer to 0 is set and assignment queuing performed every fixed time interval. The simulation result is shown in Figure6.Figure 6
Simulation results of multipriority assignment queuing algorithm.It can be seen that as the number of assignments increases, the average assignment delay of edge peers gradually increases. With the increasing numbers of assignments and queue of edge peers, it leads to an increase in the average assignment delay. Compared with the time when the assignments are not sorted, the multipriority assignment queuing algorithm can effectively decrease the assignment queuing delay, thereby reducing the average assignment delay. It should be pointed out that you can consider not using the multipriority assignment queuing algorithm when the number of queuing assignments is small. Because in this case, the proportion of assignment exchange is not large, the effect is not obvious, and assignment exchange takes time.


### 3.3. Ameliorated Greedy Algorithm Simulation

In the established mathematical model, the objective function is the ratioO(D) of the average delay of edge calculation and the average delay of cloud calculation. In the cloud calculation detection framework, the average latency of cloud calculation is a fixed value. To minimize O(D), the value of De needs to be decreased. According to formula (3), the value of De is related to the threat probability pi and the number of assignments n. We consider the power line monitoring performance under different threat probabilities and different assignments.First, the relationship between the system delay objective functionO(D) and the edge assignment number n is analyzed. When the probability that the monitoring device senses a threat is 5%, the relationship between O(D) and n is shown in Figure 7. It can be seen that as the number of assignments increases, the objective function O(D) increases gradually. Due to the increase in the number of allocations, the queuing delay, computation delay, and transmission delay in the monitoring system will also increase accordingly, resulting in an increase in the average delay of the system. Compared with the objective function under the traditional greedy algorithm, the incremental value of the objective function using the improved algorithm decreases as the number of assignments in the monitoring system increases. This is because the improved greedy algorithm optimizes and adjusts the queuing sequence, so that the queuing delay is reduced and the average delay increment of the system is reduced.Figure 7
The relationship between the objective functionO(D) and the number of monitoring equipment N.Then it should analyze the relationship between the objective functionO(D) and the threatened probability pi. When there are 80 monitoring apparatus in the system (n = 80), the change curve of the objective function O(D) in the monitoring system with the monitoring threat probability pi is shown in Figure 8. It can be observed that as the threatened probability pi increases, the total system delay O(D) also gradually increases, because the threat probability increases, the more data needs to be transmitted to the cloud, the transmission delay increases, and the system delay will increase [17, 18]. Compared with the traditional greedy algorithm, the ameliorated greedy algorithm optimizes the queuing sequence and its objective function is relatively small.Figure 8
The relationship between the objective functionO(D) and the threatened probability pi.It can be seen from the simulation results that the power line timely monitoring framework on account of edge calculation decreases the delay of timely monitoring effectively and ensure the effectiveness and accuracy of timely monitoring [19, 20]. Meanwhile, the ameliorated greedy algorithm scheduling model incorporating the multipriority queuing algorithm can also decrease the delay of the edge monitoring system effectively and ameliorate the monitoring performance.


## 3.1. Comparison of Edge Calculation and Cloud Calculation Simulation

The simulation analyses the cloud calculation average assignment delay and edge calculation assignment delay and compares them as shown in Figure5. It can be observed that the latency of cloud calculation assignments is much greater than the latency of edge calculation assignments. With the increase in the number of assignments, cloud calculation relies on its powerful calculation resources, and the assignment delay is basically unchanged, but due to the high transmission delay, the average assignment delay is high [16]. Compared with cloud calculation, after edge calculation transfers the assignment calculation to the edge side, the transmission delay is smaller, thereby reducing the average assignment delay. However, due to the restrained calculation resources of edge calculation servers, as the number of assignments increases, the average assignment delay gradually increases. The average assignment latency of edge calculation is about 10%–50% of cloud calculation.Figure 5
Comparison of average assignment latency between edge calculation and cloud calculation.


## 3.2. Multipriority Assignment Queuing Algorithm Simulation

In this section, it should conduct a simulation study on the multipriority assignment queuing algorithm. The initial load of the edge peer to 0 is set and assignment queuing performed every fixed time interval. The simulation result is shown in Figure6.Figure 6
Simulation results of multipriority assignment queuing algorithm.It can be seen that as the number of assignments increases, the average assignment delay of edge peers gradually increases. With the increasing numbers of assignments and queue of edge peers, it leads to an increase in the average assignment delay. Compared with the time when the assignments are not sorted, the multipriority assignment queuing algorithm can effectively decrease the assignment queuing delay, thereby reducing the average assignment delay. It should be pointed out that you can consider not using the multipriority assignment queuing algorithm when the number of queuing assignments is small. Because in this case, the proportion of assignment exchange is not large, the effect is not obvious, and assignment exchange takes time.


## 3.3. Ameliorated Greedy Algorithm Simulation

In the established mathematical model, the objective function is the ratioO(D) of the average delay of edge calculation and the average delay of cloud calculation. In the cloud calculation detection framework, the average latency of cloud calculation is a fixed value. To minimize O(D), the value of De needs to be decreased. According to formula (3), the value of De is related to the threat probability pi and the number of assignments n. We consider the power line monitoring performance under different threat probabilities and different assignments.First, the relationship between the system delay objective functionO(D) and the edge assignment number n is analyzed. When the probability that the monitoring device senses a threat is 5%, the relationship between O(D) and n is shown in Figure 7. It can be seen that as the number of assignments increases, the objective function O(D) increases gradually. Due to the increase in the number of allocations, the queuing delay, computation delay, and transmission delay in the monitoring system will also increase accordingly, resulting in an increase in the average delay of the system. Compared with the objective function under the traditional greedy algorithm, the incremental value of the objective function using the improved algorithm decreases as the number of assignments in the monitoring system increases. This is because the improved greedy algorithm optimizes and adjusts the queuing sequence, so that the queuing delay is reduced and the average delay increment of the system is reduced.Figure 7
The relationship between the objective functionO(D) and the number of monitoring equipment N.Then it should analyze the relationship between the objective functionO(D) and the threatened probability pi. When there are 80 monitoring apparatus in the system (n = 80), the change curve of the objective function O(D) in the monitoring system with the monitoring threat probability pi is shown in Figure 8. It can be observed that as the threatened probability pi increases, the total system delay O(D) also gradually increases, because the threat probability increases, the more data needs to be transmitted to the cloud, the transmission delay increases, and the system delay will increase [17, 18]. Compared with the traditional greedy algorithm, the ameliorated greedy algorithm optimizes the queuing sequence and its objective function is relatively small.Figure 8
The relationship between the objective functionO(D) and the threatened probability pi.It can be seen from the simulation results that the power line timely monitoring framework on account of edge calculation decreases the delay of timely monitoring effectively and ensure the effectiveness and accuracy of timely monitoring [19, 20]. Meanwhile, the ameliorated greedy algorithm scheduling model incorporating the multipriority queuing algorithm can also decrease the delay of the edge monitoring system effectively and ameliorate the monitoring performance.


## 4. Conclusion

This paper proposes an online and timely monitoring strategy for smart grid based on edge computing. This is the first time a smart grid monitoring framework based on edge computing is proposed. The framework transmits the data generated by the system to the edge, which can effectively relieve the pressure of cloud computing and reduce the computing delay of the system. In order to make more scientific use of edge peer-to-peer computing resources, considering the unexpected problem of edge peer-to-peer allocation queuing optimization, a multipriority allocation queuing algorithm is proposed, which can reduce allocation queuing delay. At the same time, an allocation model based on an improved greedy algorithm is proposed to solve the unexpected problem of optimal allocation between monitoring devices and edge servers. Finally, the simulation study shows that the average allocation delay of the smart grid real-time monitoring framework based on edge computing can reach 10%–50% of the cloud computing framework. The improved greedy algorithm allocation model integrates the multiparty priority allocation queuing algorithm, which can effectively reduce the average allocation delay and improve monitoring performance.



---

*Source: 8719227-2022-07-30.xml*