# Research on a Power Grid Cascading Failure Prevention and Control Method considering WSN

Authors: Huiqiong Deng; Junyuan Wu; Jie Luo; Renwu Yan; Cheng Zhang; Peiqiang Li; Kuo-Chi Chang; Rongjin Zheng
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

The practical application of wireless sensor networks (WSNs) in hot fields is summarized. It is found that compared with traditional monitoring methods, it has better adaptability to complex environments and low cost. It is suitable for monitoring power grid operation parameters. Therefore, this paper combines the above network and cascading failures, analyzes its 24-hour continuous and dynamic monitoring of the operation parameters of the power grid, and considers how to use the obtained parameters to analyze the disturbance of the remaining lines after the initial fault of the power grid. To prevent cascading failures in the power grid, a preventive control model considering safety and economy is proposed, and the model is solved by nondominated sorting genetic algorithm II and particle swarm optimization (NSGA2-PSO). Finally, the rationality of this method is verified in the IEEE39 node system.


---

## Body

## 1. Introduction

In recent years, WSNs have been applied in military, environmental, medical, power systems, and other fields [1]. The application in the military field mainly takes advantage of its rapid deployment, strong concealment, and good environmental adaptability to quickly collect battlefield information and facilitate leaders to formulate the next battle plan, to effectively monitor the ecological environment and effectively predict possible natural disasters and to reduce economic losses and social impact. The application in the medical field mainly focuses on the remote monitoring and care of patients’ physical conditions, which can provide telemedicine services for patients in time [2].In the field of power grid parameter monitoring, its wide application will promote the rapid development of the smart grid. Reference [3] proposed a power quality control system model based on the wireless network, which is used to realize efficient information transmission between sensors and facilitate the comprehensive analysis of power quality in the distribution area. Learn from ZigBee technology to establish a remote monitoring system, which is convenient for operators to grasp the current operation state of the power grid in time. If a failure occurs in the power grid, an alarm message will be sent to the monitoring center to remind the operators to take corresponding measures to prevent the further spread of the failure and even lead to a blackout, which is conducive to ensuring the stable operation of the power grid. Literature [4] analyzes the performance of the linear network model from the aspects of delay and load, introduces cellular communication technology, and proposes a reconfigurable network model, which reduces the delay of data transmission and improves the capacity of the network.At present, cascading large-scale power outages occur all over the world, such as the large-scale power outage in Texas caused by the cold weather in 2021.2. Because the blackout caused by cascading failures in the power grid will bring significant economic losses and adverse social impact, many scholars pay extensive attention to the mechanism of cascading failures and control measures to prevent cascading failures and gradually get some research results that can be used for reference [5, 6]. For example, in reference [7], considering the utilization degree of relevant transmission lines in the process of transmitting power from generator nodes to load nodes in the power grid and considering the influence of generation capacity and load level, the power flow intermediate index of transmission lines is proposed as the basis for judging key lines. In reference [8], aiming at the disadvantages of the previous active power safety correction control methods in power systems, a safe distance sensitivity index is proposed, which can provide a criterion for the adjustment of generators in the power grid.According to the selection of control time, the current control for a large-scale power outage caused by cascading failures can be roughly divided into two categories: preventive control before the failures and blocking control in an accident [9]. If the power grid is disturbed by the expected accident set during normal operation so that the power grid is in an abnormal operation state, it is called preaccident preventive control by taking control measures to return the system to a safe operating state; If a failure has occurred in the power grid, taking blocking control to prevent the further spread of cascading failures is called blocking control in the accident [10].For example, literature [11] proposes a curve fitting method for the cascading failures of transmission line under freezing disaster, monitors the icing thickness of transmission line in real time, and gives early warning before the ice thickness reaches the critical value of line breaking, to achieve the purpose of prevention and control. These studies do not consider the relationship between the security margin of the power grid and the cost of preventive control or blocking control, which may lead to the situation that the security margin of the power grid is still low under the condition of high cost.According to the above analysis, we find that although the monitoring network has been adopted in the power system, it has not been comprehensively considered with cascading failures. Therefore, this paper will use it to analyze the prevention and control of cascading failures based on 24-hour continuous dynamic monitoring of power grid operation parameters. Firstly, the overall structure of the monitoring network and the architecture of power grid data acquisition are analyzed to analyze the disturbance of the remaining lines after the initial failure of the power grid. Then, the security of the power grid uses the node injection power to characterize the current operation state. To prevent cascading failures in the power grid, a preventive control model is proposed. The preventive control model belongs to a two-level optimization model, which is solved by the NSGA2-PSO algorithm. The effectiveness of this method is verified in the IEEE39 node system.


## 2. Prevention and Control of Cascading Failures in Power Grid Based on WSN

### 2.1. WSN and Power Grid Monitoring

In the smart grid, to ensure the efficient and reliable transmission of the power grid, it is necessary to monitor the operation of the power grid in real time. The real-time monitoring, diagnosis, and protection of power system operation information can greatly avoid damage to the whole power grid due to power equipment failures or other natural disasters. Therefore, the application of it to the monitoring and data acquisition of power grid can help the operators to carry out online safety evaluation of the state of power equipment and give an alarm in time before the fault, to take necessary measures to prevent the occurrence of cascading failures [12, 13].


### 2.2. Overall Structure of Monitoring Network

Typical wireless sensor networks are composed of sensor nodes, sink nodes, and monitoring centers. Figure1 shows the basic structure of the wireless sensor network system. In the monitoring area, according to the monitoring requirements, the wireless sensor node is deployed on the object to be monitored, such as the transmission line. The wireless sensor node cooperates to collect various operating state parameters of the transmission line, such as current and voltage, reaching the sink node in the form of multihop routing, and the sensor node directly measures the voltage value and current value. With the help of the processor of the gateway device, other parameters of the power grid, such as active power and apparent power, can be obtained. Through the ZigBee communication mode and optical fiber, the data is transmitted to the monitoring center to realize the monitoring and management of the system [14].Figure 1
Basic structure of WSN system.When transmitting data through the wireless communication channel, it will be affected by electromagnetic noise, which will lead to the loss of collected information. To solve this problem, we can learn from the data reconstruction algorithm of structural noise matrix completion and establish the packet index mechanism, to realize the data recovery [15]. In addition, how to reduce the energy consumption of sensor nodes and prolong the service life of nodes is an important content to be considered in deploying the system shown in Figure 1. Reference [16] proposes a reliable data transmission method for low-energy code distribution, which can effectively reduce energy loss and ensure the reliability of data transmission.


### 2.3. Sensor Node Structure

As can be seen from Figure2, the sensor node is composed of four parts: sensor module, a processor module, wireless communication module, and energy supply module [16]. The sensor module mainly realizes the data acquisition of the monitoring object, then A/D conversion of the data and transmission to the processor module, which is responsible for the operation control, data storage, and processing of the whole sensor node. The wireless communication module is responsible for information exchange and communication. The energy supply module is responsible for providing energy sources to ensure the normal operation of each module [17].Figure 2
Sensor node structure.


### 2.4. Collection of Power Grid Parameters

As an accurate index to evaluate and feedback the operation state of the power grid, power grid parameters must be monitored dynamically in real time. Therefore, this paper focuses on the sensor module in the sensor node, and its hardware system design is shown in Figure3.Figure 3
Hardware diagram of sensor module.As shown in Figure3, in the sensor module, the wireless sensor acquisition node deployed in the power network is responsible for the acquisition, processing, and wireless transmission of voltage and current. It mainly includes a data acquisition circuit, preprocessing circuit, and power module. The power grid parameter acquisition node collects the current signal and voltage signal through the high-precision current transformer and voltage transformer, which are processed by the analog conditioning circuit and input to the sampling unit of CC2530 to complete the A/D conversion of the signal. Finally, wireless communication is realized by the RF transceiver.Herein, the measured sampling value is converted into a frequency-domain signal to obtain the voltage phasorUi of the node and the current phasor Iij of all lines connected to it, which can be expressed as
(1)Ui=2N∑k=0N−1uke−j2π/Nk,İij=2N∑k=0N−1ike−j2π/Nk,where uk and ik represent the kth voltage sampling value and current sampling value, respectively, and N is the total number of samples.According to the voltage phasor and current phasor obtained above, the node injection power can be calculated by further using these data, and the calculation formula is as follows:(2)Sij=İij∗×U̇i,Pij=reSij,Si=∑j∈iSij,where U̇i represents the voltage phasor of node i and İij represents the current phasor flowing through the line; Sij is the complex power on the i side of the line; Pij is the real part of Sij, expressed as the active power of the line; and Si is expressed as the injection power of node i.


### 2.5. Prevention and Control Model of Cascading Failures in Power Grid

This paper mainly establishes the chain failure prevention and control model from the perspective of safety and economy. At first, WSN is used to obtain the injected power of each node under the current operation state of the power grid and combined with the safety margin index given below to judge the current operation state of the power grid, to measure the safety level of power grid operation at this time. If the safety margin of the power grid is low, the power grid shall be adjusted according to the preventive control model to ensure the normal operation of the power system.


#### 2.5.1. Safety Margin of Power Cascading Failures

Power equipment data uses the monitoring network analyzed above to obtain, and its system structure is shown in Figure4. The system is composed of sensor nodes and sink nodes. Deployed on the transmission line, it can continuously and dynamically obtain the real-time operation parameters of the power grid for 24 hours. It is necessary and important for the future transmission system and can also greatly improve the stability of the transmission system. The wireless communication network is constructed by the ZigBee wireless communication mode, in which the data is reliably transmitted by a low-energy code distribution algorithm [16]. Firstly, the sensor nodes on the transmission line measure the physical parameters of the conductor, such as voltage and current. Then, these parameters are transmitted to the sink node of the tower by multihop routing, and the sink node forwards them to the substation data terminal. Finally, with the help of an optical fiber network, the data is sent to the remote data monitoring center. Since the delay time of ZigBee technology for data transmission is usually between 15 ms and 30 ms, it meets the requirements of real-time monitoring [18].Figure 4
Architecture of WSN data collection.In addition, in the process of monitoring information transmission, information loss may occur due to the influence of obstacles. Given this phenomenon, the redundant mechanism is adopted to eliminate the impact of data loss; that is, the system adds redundant nodes, and redundant data are used to improve the accuracy of target identification [19]. If the data is lost due to node failure, take the failed node as the center of the circle and the coverage hole area as the radius to find the nearest redundant node in the area to join the network as a substitute node. Moreover, when redundant nodes are deployed, all nodes in the network do not need to be activated at all times to continuously perform communication tasks [20]. Some nodes in the network can be activated while other nodes are dormant or energy-saving, to prolong the life cycle of the whole network monitoring task on the premise of ensuring the normal connection of the network [21].There is no doubt that the application of WSN still faces some urgent problems to be solved, such as how to reduce the energy loss of sensor nodes, prolong the whole network life cycle, and design network communication mechanisms to meet the communication requirements of sensor networks.Generally, whether the remaining lines in the power grid have interlocking tripping is closely related to the backup protection of the lines. If the electrical quantity of each branch enters the action range of backup protection after power flow redistribution, the backup protection will be started to remove the failure, resulting in secondary failure of the power grid and further aggravation of power flow transfer. When a new line trips due to failure, it is called Level 3 failure, and so on, which will be accompanied by a complex dynamic process.Assuming that each line of the power grid is equipped with current type backup protection, and the power grid hasm branches, when the ith branch Li has an initial failure and is removed, the operator can use the system in Figure 4 to obtain the current value of the remaining line, compare it with the set value, and judge whether there are cascade failures in the remaining line Lk in the power grid, which is judged by equation (3) [22]:
(3)Ik,dist=Ik,set−Ik,where Ik,set is the backup protection setting value of the kth line, Ik is the current measurement value of the kth line, and Ik,dist is used to measure the interlocking disturbance degree of the remaining branches affected by the initial failure branch. If it is greater, it will be more obviously affected by the initial failures. It is the measured value of the kth line, which is used as the index of measurement and physical quantity. When Ik,dist>0, the branch does not have interlocking tripping; when Ik,dist=0, branch Lk is at the boundary of the interlocking trip. When Ik,dist<0, the branch will have interlocking tripping.Each transmission line in the power grid is a closely connected whole. When a line fails due to impact or serious disturbance, it will be removed from the power grid to ensure the normal operation of the power grid, which will inevitably cause the power flow of the failure line to transfer to other lines. The instantaneous tide transfer will not make the operation state of the power grid transient. That is, the injection power of the node remains approximately unchanged. It can be seen that the main factor determining whether cascading failures occur in the power grid is the node injection power of the power grid before the initial failures are removed [23]. Furthermore, the form of safety margin after the initial failures can be given according to the node injection power:
(4)D′S=S−S′2,where S is the node injection power vector in the current operating state and S′ is the corresponding node injection power vector in the critical state of cascading failures. When S changes, it will lead to different values of D′S, so D′S is approximately regarded as a function of S.


#### 2.5.2. WSN and Power Grid Monitoring

To prevent and control cascading failures of the power grid, we should effectively control the operation state of the power grid. Besides, we also pay attention to the economic cost of system operation. In this paper, the prevention and control costC defined in the literature [24] can be expressed as
(5)C=∑i=1nαiPGi−PG02,where n is the set of generators participating in the adjustment in the system; PGi and PG0 are, respectively, the active output of the generator on the node i before preventive control and the active output of the generator on the node i after preventive control; and αi is the control cost coefficient.


#### 2.5.3. WSN-Based Power Grid Cascading Failure Prevention and Control Model

According to the safety margin index, it can be judged that the power grid is likely to be in abnormal operation under the disturbance of expected initial failures. Therefore, preventive measures must be taken to improve the safety of power grid operation. In this paper, a double-layer optimization model of chain failure prevention and control is established from the perspective of safety and economy.(1) Inner Layer Model. The inner layer considers the shortest distance between the current power grid operation state and the critical state of cascading failure, that is, optimize the minimum safety margin of the power grid, and its objective function can be expressed as [23]
(6)DS=minD′S,where the smaller the DS, the closer the system is to the critical point of the interlocking trip; that is, the power grid has a high probability of interlocking trips.Constraints:
(1)
Power flow constraintsEquation (6) is an optimization problem, and the electrical constraints that must be satisfied include equality constraints and inequality constraints. On the one hand, the equality constraints mainly include the power flow constraints of the power grid before the initial failure and the power flow constraints of the power grid after the initial failures. Among them, the power flow constraints of the power grid before the initial failures can be abbreviated as
(7)h0x=0,where h0 is the mapping relationship corresponding to the power flow before the initial failure occurs and x is the power grid state variable. Using equation (8) can record the power flow constraint of the power grid after the initial failure:
(8)h1x=0,where h1 is the mapping relationship corresponding to the power flow after the initial failure occurs and x is the power grid state variable.On the other hand, the inequality constraints to be satisfied during the normal operation of the power grid are shown in(9)PGi,min≤PGi≤PGi,max,i=1,⋯,N1,QGi,min≤QGi≤QGi,max,i=1,⋯,N1,Pm≤Pm,max,m=1,2,⋯,l,Uk,min≤Uk≤Uk,max,k=1,2,⋯,N2,where PGi and QGi, respectively, represent the active output and reactive output of the ith generator in the system; PGi,minandPGi,max are the lower limit and upper limit of the active output of the ith generator, respectively; QGi,minandQGi,max are the lower limit and upper limit of reactive output of the ith generator, respectively, and N1 is the total number of generators in the power grid; Pm is the active power transmitted by branch Lm, and Pm,max is the active power limit transmitted by branch Lm; and Uk is the voltage of node k, Uk,maxandUk,min are the upper and lower limits of the voltage of node k, respectively, N2 is the total number of nodes of the power grid, and equation (9) is written in abbreviated form, which can be expressed as
(10)g0x≥0.Similarly, the inequality constraints that need to be satisfied after power grid failure can be abbreviated as(11)g1x≥0.(2)
Constraints during critical operation of power gridUnder the disturbance of initial failures, combined with the analysis of equation (3), it can be obtained that after the initial failure line is removed, the constraints of the critical state of cascading failures in the power grid are as follows:
(12)J=0,J=diagI1,dist,I2,dist,⋯,Ii,dist,⋯,Im−1,dist,Ii,dist≥0,where Ii,dist have the same meaning as Ik,dist in equation (3).(2) Outer Layer Model. From the perspective of complex network theory, considering the prevention and control of power grid cascading failures, on the premise of meeting the load requirements and power grid operation characteristics, if the active output of generator units in the power grid is changed to ensure that DS in equation (4) is greater than zero and as large as possible, the current operation state of the power grid is far away from the critical state, to achieve the effect of preventing cascading tripping. Moreover, in the prevention and control, the economic cost of power grid operation has also been paid more attention to. That is, when taking control measures, we should not only ensure the smooth and safe operation of the power grid but also consider the economy of different control methods. Therefore, its mathematical expression is
(13)F1=maxDS,F2=minC,where F1 represents the optimization effect on power grid safety margin, F1andF2 are the objective functions of the outer model, S represents the node injection power vector, and C is the cost control.Constraint condition:To meet the system power flow equality constraints and inequality constraints is necessary when the power grid is in normal operation, such as generator active power, reactive power output constraints, node voltage constraints, and line transmission power constraints. Its mathematical expression is(14)s.t.p0x=0p1x=0m0x=0m1x=0,where p0xandp1x are the mapping relations corresponding to the power flow before and after the initial failures, m0xandm1x correspond to inequality constraints, and x is the power grid state variable.When the power grid is in a safe operation state, equation (15) must be satisfied:
(15)Ii,dist>0i=1,⋯,m−1,where Ii,dist have the same meaning as Ik,dist in equation (3).


## 2.1. WSN and Power Grid Monitoring

In the smart grid, to ensure the efficient and reliable transmission of the power grid, it is necessary to monitor the operation of the power grid in real time. The real-time monitoring, diagnosis, and protection of power system operation information can greatly avoid damage to the whole power grid due to power equipment failures or other natural disasters. Therefore, the application of it to the monitoring and data acquisition of power grid can help the operators to carry out online safety evaluation of the state of power equipment and give an alarm in time before the fault, to take necessary measures to prevent the occurrence of cascading failures [12, 13].


## 2.2. Overall Structure of Monitoring Network

Typical wireless sensor networks are composed of sensor nodes, sink nodes, and monitoring centers. Figure1 shows the basic structure of the wireless sensor network system. In the monitoring area, according to the monitoring requirements, the wireless sensor node is deployed on the object to be monitored, such as the transmission line. The wireless sensor node cooperates to collect various operating state parameters of the transmission line, such as current and voltage, reaching the sink node in the form of multihop routing, and the sensor node directly measures the voltage value and current value. With the help of the processor of the gateway device, other parameters of the power grid, such as active power and apparent power, can be obtained. Through the ZigBee communication mode and optical fiber, the data is transmitted to the monitoring center to realize the monitoring and management of the system [14].Figure 1
Basic structure of WSN system.When transmitting data through the wireless communication channel, it will be affected by electromagnetic noise, which will lead to the loss of collected information. To solve this problem, we can learn from the data reconstruction algorithm of structural noise matrix completion and establish the packet index mechanism, to realize the data recovery [15]. In addition, how to reduce the energy consumption of sensor nodes and prolong the service life of nodes is an important content to be considered in deploying the system shown in Figure 1. Reference [16] proposes a reliable data transmission method for low-energy code distribution, which can effectively reduce energy loss and ensure the reliability of data transmission.


## 2.3. Sensor Node Structure

As can be seen from Figure2, the sensor node is composed of four parts: sensor module, a processor module, wireless communication module, and energy supply module [16]. The sensor module mainly realizes the data acquisition of the monitoring object, then A/D conversion of the data and transmission to the processor module, which is responsible for the operation control, data storage, and processing of the whole sensor node. The wireless communication module is responsible for information exchange and communication. The energy supply module is responsible for providing energy sources to ensure the normal operation of each module [17].Figure 2
Sensor node structure.


## 2.4. Collection of Power Grid Parameters

As an accurate index to evaluate and feedback the operation state of the power grid, power grid parameters must be monitored dynamically in real time. Therefore, this paper focuses on the sensor module in the sensor node, and its hardware system design is shown in Figure3.Figure 3
Hardware diagram of sensor module.As shown in Figure3, in the sensor module, the wireless sensor acquisition node deployed in the power network is responsible for the acquisition, processing, and wireless transmission of voltage and current. It mainly includes a data acquisition circuit, preprocessing circuit, and power module. The power grid parameter acquisition node collects the current signal and voltage signal through the high-precision current transformer and voltage transformer, which are processed by the analog conditioning circuit and input to the sampling unit of CC2530 to complete the A/D conversion of the signal. Finally, wireless communication is realized by the RF transceiver.Herein, the measured sampling value is converted into a frequency-domain signal to obtain the voltage phasorUi of the node and the current phasor Iij of all lines connected to it, which can be expressed as
(1)Ui=2N∑k=0N−1uke−j2π/Nk,İij=2N∑k=0N−1ike−j2π/Nk,where uk and ik represent the kth voltage sampling value and current sampling value, respectively, and N is the total number of samples.According to the voltage phasor and current phasor obtained above, the node injection power can be calculated by further using these data, and the calculation formula is as follows:(2)Sij=İij∗×U̇i,Pij=reSij,Si=∑j∈iSij,where U̇i represents the voltage phasor of node i and İij represents the current phasor flowing through the line; Sij is the complex power on the i side of the line; Pij is the real part of Sij, expressed as the active power of the line; and Si is expressed as the injection power of node i.


## 2.5. Prevention and Control Model of Cascading Failures in Power Grid

This paper mainly establishes the chain failure prevention and control model from the perspective of safety and economy. At first, WSN is used to obtain the injected power of each node under the current operation state of the power grid and combined with the safety margin index given below to judge the current operation state of the power grid, to measure the safety level of power grid operation at this time. If the safety margin of the power grid is low, the power grid shall be adjusted according to the preventive control model to ensure the normal operation of the power system.


### 2.5.1. Safety Margin of Power Cascading Failures

Power equipment data uses the monitoring network analyzed above to obtain, and its system structure is shown in Figure4. The system is composed of sensor nodes and sink nodes. Deployed on the transmission line, it can continuously and dynamically obtain the real-time operation parameters of the power grid for 24 hours. It is necessary and important for the future transmission system and can also greatly improve the stability of the transmission system. The wireless communication network is constructed by the ZigBee wireless communication mode, in which the data is reliably transmitted by a low-energy code distribution algorithm [16]. Firstly, the sensor nodes on the transmission line measure the physical parameters of the conductor, such as voltage and current. Then, these parameters are transmitted to the sink node of the tower by multihop routing, and the sink node forwards them to the substation data terminal. Finally, with the help of an optical fiber network, the data is sent to the remote data monitoring center. Since the delay time of ZigBee technology for data transmission is usually between 15 ms and 30 ms, it meets the requirements of real-time monitoring [18].Figure 4
Architecture of WSN data collection.In addition, in the process of monitoring information transmission, information loss may occur due to the influence of obstacles. Given this phenomenon, the redundant mechanism is adopted to eliminate the impact of data loss; that is, the system adds redundant nodes, and redundant data are used to improve the accuracy of target identification [19]. If the data is lost due to node failure, take the failed node as the center of the circle and the coverage hole area as the radius to find the nearest redundant node in the area to join the network as a substitute node. Moreover, when redundant nodes are deployed, all nodes in the network do not need to be activated at all times to continuously perform communication tasks [20]. Some nodes in the network can be activated while other nodes are dormant or energy-saving, to prolong the life cycle of the whole network monitoring task on the premise of ensuring the normal connection of the network [21].There is no doubt that the application of WSN still faces some urgent problems to be solved, such as how to reduce the energy loss of sensor nodes, prolong the whole network life cycle, and design network communication mechanisms to meet the communication requirements of sensor networks.Generally, whether the remaining lines in the power grid have interlocking tripping is closely related to the backup protection of the lines. If the electrical quantity of each branch enters the action range of backup protection after power flow redistribution, the backup protection will be started to remove the failure, resulting in secondary failure of the power grid and further aggravation of power flow transfer. When a new line trips due to failure, it is called Level 3 failure, and so on, which will be accompanied by a complex dynamic process.Assuming that each line of the power grid is equipped with current type backup protection, and the power grid hasm branches, when the ith branch Li has an initial failure and is removed, the operator can use the system in Figure 4 to obtain the current value of the remaining line, compare it with the set value, and judge whether there are cascade failures in the remaining line Lk in the power grid, which is judged by equation (3) [22]:
(3)Ik,dist=Ik,set−Ik,where Ik,set is the backup protection setting value of the kth line, Ik is the current measurement value of the kth line, and Ik,dist is used to measure the interlocking disturbance degree of the remaining branches affected by the initial failure branch. If it is greater, it will be more obviously affected by the initial failures. It is the measured value of the kth line, which is used as the index of measurement and physical quantity. When Ik,dist>0, the branch does not have interlocking tripping; when Ik,dist=0, branch Lk is at the boundary of the interlocking trip. When Ik,dist<0, the branch will have interlocking tripping.Each transmission line in the power grid is a closely connected whole. When a line fails due to impact or serious disturbance, it will be removed from the power grid to ensure the normal operation of the power grid, which will inevitably cause the power flow of the failure line to transfer to other lines. The instantaneous tide transfer will not make the operation state of the power grid transient. That is, the injection power of the node remains approximately unchanged. It can be seen that the main factor determining whether cascading failures occur in the power grid is the node injection power of the power grid before the initial failures are removed [23]. Furthermore, the form of safety margin after the initial failures can be given according to the node injection power:
(4)D′S=S−S′2,where S is the node injection power vector in the current operating state and S′ is the corresponding node injection power vector in the critical state of cascading failures. When S changes, it will lead to different values of D′S, so D′S is approximately regarded as a function of S.


### 2.5.2. WSN and Power Grid Monitoring

To prevent and control cascading failures of the power grid, we should effectively control the operation state of the power grid. Besides, we also pay attention to the economic cost of system operation. In this paper, the prevention and control costC defined in the literature [24] can be expressed as
(5)C=∑i=1nαiPGi−PG02,where n is the set of generators participating in the adjustment in the system; PGi and PG0 are, respectively, the active output of the generator on the node i before preventive control and the active output of the generator on the node i after preventive control; and αi is the control cost coefficient.


### 2.5.3. WSN-Based Power Grid Cascading Failure Prevention and Control Model

According to the safety margin index, it can be judged that the power grid is likely to be in abnormal operation under the disturbance of expected initial failures. Therefore, preventive measures must be taken to improve the safety of power grid operation. In this paper, a double-layer optimization model of chain failure prevention and control is established from the perspective of safety and economy.(1) Inner Layer Model. The inner layer considers the shortest distance between the current power grid operation state and the critical state of cascading failure, that is, optimize the minimum safety margin of the power grid, and its objective function can be expressed as [23]
(6)DS=minD′S,where the smaller the DS, the closer the system is to the critical point of the interlocking trip; that is, the power grid has a high probability of interlocking trips.Constraints:
(1)
Power flow constraintsEquation (6) is an optimization problem, and the electrical constraints that must be satisfied include equality constraints and inequality constraints. On the one hand, the equality constraints mainly include the power flow constraints of the power grid before the initial failure and the power flow constraints of the power grid after the initial failures. Among them, the power flow constraints of the power grid before the initial failures can be abbreviated as
(7)h0x=0,where h0 is the mapping relationship corresponding to the power flow before the initial failure occurs and x is the power grid state variable. Using equation (8) can record the power flow constraint of the power grid after the initial failure:
(8)h1x=0,where h1 is the mapping relationship corresponding to the power flow after the initial failure occurs and x is the power grid state variable.On the other hand, the inequality constraints to be satisfied during the normal operation of the power grid are shown in(9)PGi,min≤PGi≤PGi,max,i=1,⋯,N1,QGi,min≤QGi≤QGi,max,i=1,⋯,N1,Pm≤Pm,max,m=1,2,⋯,l,Uk,min≤Uk≤Uk,max,k=1,2,⋯,N2,where PGi and QGi, respectively, represent the active output and reactive output of the ith generator in the system; PGi,minandPGi,max are the lower limit and upper limit of the active output of the ith generator, respectively; QGi,minandQGi,max are the lower limit and upper limit of reactive output of the ith generator, respectively, and N1 is the total number of generators in the power grid; Pm is the active power transmitted by branch Lm, and Pm,max is the active power limit transmitted by branch Lm; and Uk is the voltage of node k, Uk,maxandUk,min are the upper and lower limits of the voltage of node k, respectively, N2 is the total number of nodes of the power grid, and equation (9) is written in abbreviated form, which can be expressed as
(10)g0x≥0.Similarly, the inequality constraints that need to be satisfied after power grid failure can be abbreviated as(11)g1x≥0.(2)
Constraints during critical operation of power gridUnder the disturbance of initial failures, combined with the analysis of equation (3), it can be obtained that after the initial failure line is removed, the constraints of the critical state of cascading failures in the power grid are as follows:
(12)J=0,J=diagI1,dist,I2,dist,⋯,Ii,dist,⋯,Im−1,dist,Ii,dist≥0,where Ii,dist have the same meaning as Ik,dist in equation (3).(2) Outer Layer Model. From the perspective of complex network theory, considering the prevention and control of power grid cascading failures, on the premise of meeting the load requirements and power grid operation characteristics, if the active output of generator units in the power grid is changed to ensure that DS in equation (4) is greater than zero and as large as possible, the current operation state of the power grid is far away from the critical state, to achieve the effect of preventing cascading tripping. Moreover, in the prevention and control, the economic cost of power grid operation has also been paid more attention to. That is, when taking control measures, we should not only ensure the smooth and safe operation of the power grid but also consider the economy of different control methods. Therefore, its mathematical expression is
(13)F1=maxDS,F2=minC,where F1 represents the optimization effect on power grid safety margin, F1andF2 are the objective functions of the outer model, S represents the node injection power vector, and C is the cost control.Constraint condition:To meet the system power flow equality constraints and inequality constraints is necessary when the power grid is in normal operation, such as generator active power, reactive power output constraints, node voltage constraints, and line transmission power constraints. Its mathematical expression is(14)s.t.p0x=0p1x=0m0x=0m1x=0,where p0xandp1x are the mapping relations corresponding to the power flow before and after the initial failures, m0xandm1x correspond to inequality constraints, and x is the power grid state variable.When the power grid is in a safe operation state, equation (15) must be satisfied:
(15)Ii,dist>0i=1,⋯,m−1,where Ii,dist have the same meaning as Ik,dist in equation (3).


## 2.5.1. Safety Margin of Power Cascading Failures

Power equipment data uses the monitoring network analyzed above to obtain, and its system structure is shown in Figure4. The system is composed of sensor nodes and sink nodes. Deployed on the transmission line, it can continuously and dynamically obtain the real-time operation parameters of the power grid for 24 hours. It is necessary and important for the future transmission system and can also greatly improve the stability of the transmission system. The wireless communication network is constructed by the ZigBee wireless communication mode, in which the data is reliably transmitted by a low-energy code distribution algorithm [16]. Firstly, the sensor nodes on the transmission line measure the physical parameters of the conductor, such as voltage and current. Then, these parameters are transmitted to the sink node of the tower by multihop routing, and the sink node forwards them to the substation data terminal. Finally, with the help of an optical fiber network, the data is sent to the remote data monitoring center. Since the delay time of ZigBee technology for data transmission is usually between 15 ms and 30 ms, it meets the requirements of real-time monitoring [18].Figure 4
Architecture of WSN data collection.In addition, in the process of monitoring information transmission, information loss may occur due to the influence of obstacles. Given this phenomenon, the redundant mechanism is adopted to eliminate the impact of data loss; that is, the system adds redundant nodes, and redundant data are used to improve the accuracy of target identification [19]. If the data is lost due to node failure, take the failed node as the center of the circle and the coverage hole area as the radius to find the nearest redundant node in the area to join the network as a substitute node. Moreover, when redundant nodes are deployed, all nodes in the network do not need to be activated at all times to continuously perform communication tasks [20]. Some nodes in the network can be activated while other nodes are dormant or energy-saving, to prolong the life cycle of the whole network monitoring task on the premise of ensuring the normal connection of the network [21].There is no doubt that the application of WSN still faces some urgent problems to be solved, such as how to reduce the energy loss of sensor nodes, prolong the whole network life cycle, and design network communication mechanisms to meet the communication requirements of sensor networks.Generally, whether the remaining lines in the power grid have interlocking tripping is closely related to the backup protection of the lines. If the electrical quantity of each branch enters the action range of backup protection after power flow redistribution, the backup protection will be started to remove the failure, resulting in secondary failure of the power grid and further aggravation of power flow transfer. When a new line trips due to failure, it is called Level 3 failure, and so on, which will be accompanied by a complex dynamic process.Assuming that each line of the power grid is equipped with current type backup protection, and the power grid hasm branches, when the ith branch Li has an initial failure and is removed, the operator can use the system in Figure 4 to obtain the current value of the remaining line, compare it with the set value, and judge whether there are cascade failures in the remaining line Lk in the power grid, which is judged by equation (3) [22]:
(3)Ik,dist=Ik,set−Ik,where Ik,set is the backup protection setting value of the kth line, Ik is the current measurement value of the kth line, and Ik,dist is used to measure the interlocking disturbance degree of the remaining branches affected by the initial failure branch. If it is greater, it will be more obviously affected by the initial failures. It is the measured value of the kth line, which is used as the index of measurement and physical quantity. When Ik,dist>0, the branch does not have interlocking tripping; when Ik,dist=0, branch Lk is at the boundary of the interlocking trip. When Ik,dist<0, the branch will have interlocking tripping.Each transmission line in the power grid is a closely connected whole. When a line fails due to impact or serious disturbance, it will be removed from the power grid to ensure the normal operation of the power grid, which will inevitably cause the power flow of the failure line to transfer to other lines. The instantaneous tide transfer will not make the operation state of the power grid transient. That is, the injection power of the node remains approximately unchanged. It can be seen that the main factor determining whether cascading failures occur in the power grid is the node injection power of the power grid before the initial failures are removed [23]. Furthermore, the form of safety margin after the initial failures can be given according to the node injection power:
(4)D′S=S−S′2,where S is the node injection power vector in the current operating state and S′ is the corresponding node injection power vector in the critical state of cascading failures. When S changes, it will lead to different values of D′S, so D′S is approximately regarded as a function of S.


## 2.5.2. WSN and Power Grid Monitoring

To prevent and control cascading failures of the power grid, we should effectively control the operation state of the power grid. Besides, we also pay attention to the economic cost of system operation. In this paper, the prevention and control costC defined in the literature [24] can be expressed as
(5)C=∑i=1nαiPGi−PG02,where n is the set of generators participating in the adjustment in the system; PGi and PG0 are, respectively, the active output of the generator on the node i before preventive control and the active output of the generator on the node i after preventive control; and αi is the control cost coefficient.


## 2.5.3. WSN-Based Power Grid Cascading Failure Prevention and Control Model

According to the safety margin index, it can be judged that the power grid is likely to be in abnormal operation under the disturbance of expected initial failures. Therefore, preventive measures must be taken to improve the safety of power grid operation. In this paper, a double-layer optimization model of chain failure prevention and control is established from the perspective of safety and economy.(1) Inner Layer Model. The inner layer considers the shortest distance between the current power grid operation state and the critical state of cascading failure, that is, optimize the minimum safety margin of the power grid, and its objective function can be expressed as [23]
(6)DS=minD′S,where the smaller the DS, the closer the system is to the critical point of the interlocking trip; that is, the power grid has a high probability of interlocking trips.Constraints:
(1)
Power flow constraintsEquation (6) is an optimization problem, and the electrical constraints that must be satisfied include equality constraints and inequality constraints. On the one hand, the equality constraints mainly include the power flow constraints of the power grid before the initial failure and the power flow constraints of the power grid after the initial failures. Among them, the power flow constraints of the power grid before the initial failures can be abbreviated as
(7)h0x=0,where h0 is the mapping relationship corresponding to the power flow before the initial failure occurs and x is the power grid state variable. Using equation (8) can record the power flow constraint of the power grid after the initial failure:
(8)h1x=0,where h1 is the mapping relationship corresponding to the power flow after the initial failure occurs and x is the power grid state variable.On the other hand, the inequality constraints to be satisfied during the normal operation of the power grid are shown in(9)PGi,min≤PGi≤PGi,max,i=1,⋯,N1,QGi,min≤QGi≤QGi,max,i=1,⋯,N1,Pm≤Pm,max,m=1,2,⋯,l,Uk,min≤Uk≤Uk,max,k=1,2,⋯,N2,where PGi and QGi, respectively, represent the active output and reactive output of the ith generator in the system; PGi,minandPGi,max are the lower limit and upper limit of the active output of the ith generator, respectively; QGi,minandQGi,max are the lower limit and upper limit of reactive output of the ith generator, respectively, and N1 is the total number of generators in the power grid; Pm is the active power transmitted by branch Lm, and Pm,max is the active power limit transmitted by branch Lm; and Uk is the voltage of node k, Uk,maxandUk,min are the upper and lower limits of the voltage of node k, respectively, N2 is the total number of nodes of the power grid, and equation (9) is written in abbreviated form, which can be expressed as
(10)g0x≥0.Similarly, the inequality constraints that need to be satisfied after power grid failure can be abbreviated as(11)g1x≥0.(2)
Constraints during critical operation of power gridUnder the disturbance of initial failures, combined with the analysis of equation (3), it can be obtained that after the initial failure line is removed, the constraints of the critical state of cascading failures in the power grid are as follows:
(12)J=0,J=diagI1,dist,I2,dist,⋯,Ii,dist,⋯,Im−1,dist,Ii,dist≥0,where Ii,dist have the same meaning as Ik,dist in equation (3).(2) Outer Layer Model. From the perspective of complex network theory, considering the prevention and control of power grid cascading failures, on the premise of meeting the load requirements and power grid operation characteristics, if the active output of generator units in the power grid is changed to ensure that DS in equation (4) is greater than zero and as large as possible, the current operation state of the power grid is far away from the critical state, to achieve the effect of preventing cascading tripping. Moreover, in the prevention and control, the economic cost of power grid operation has also been paid more attention to. That is, when taking control measures, we should not only ensure the smooth and safe operation of the power grid but also consider the economy of different control methods. Therefore, its mathematical expression is
(13)F1=maxDS,F2=minC,where F1 represents the optimization effect on power grid safety margin, F1andF2 are the objective functions of the outer model, S represents the node injection power vector, and C is the cost control.Constraint condition:To meet the system power flow equality constraints and inequality constraints is necessary when the power grid is in normal operation, such as generator active power, reactive power output constraints, node voltage constraints, and line transmission power constraints. Its mathematical expression is(14)s.t.p0x=0p1x=0m0x=0m1x=0,where p0xandp1x are the mapping relations corresponding to the power flow before and after the initial failures, m0xandm1x correspond to inequality constraints, and x is the power grid state variable.When the power grid is in a safe operation state, equation (15) must be satisfied:
(15)Ii,dist>0i=1,⋯,m−1,where Ii,dist have the same meaning as Ik,dist in equation (3).


## 3. Solution of Prevention and Control Model

### 3.1. Calculate Fitness Function Value

In this paper, the objective function of the required solution is combined with the constraints to construct an augmented objective function, that is, the fitness function:(16)f1=DS+∑k1αkmin0,−hkx2+1δkmin0,−gkx2+∑m1ςmmin0,−dmx2,f2=F1+∑k1αkmin0,−pkx2+∑k1δkmin0,−mkx2+∑m1ςmmin0,−emx2,f3=F2+∑k1αkmin0,−pkx2+∑k1δkmin0,−mkx2+∑m1ςmmin0,−emx2,where equations (12) and (15) are abbreviated as dx>0andex>0, respectively, and hkx corresponds to the kth component in h0xorh1x; gkx,pkx,mkx,andhkx have similar meanings; α,β,andζ is the penalty factor, which is given according to the actual situation and is positive.


### 3.2. The NSGA2-PSO Algorithm

Literature [25] compares multiobjective particle swarm optimization (MOPSO), nondominated sorting genetic algorithm (NSGA2), and archived multiobjective simulated annealing algorithm (AMOSA), respectively. It is found that the NSGA2 algorithm has the advantages of low complexity and high precision. Therefore, in this paper, the outer layer of the double-layer optimization model uses the NSGA2 algorithm; the PSO algorithm solves the inner model. Among them, the inner model transmits the result of equation (6) to the outer model. The exterior model adjusts the generator’s active power output according to the information of the inner model and transmits the current power grid operation state to the inner model for further optimization of the inner model. The population size of the NSGA2-PSO algorithm is usually between 20 and 50. If the total population exceeds 50, the optimization efficiency of the algorithm will not be improved, but the calculation time will be increased [26].


#### 3.2.1. NSGA2 Algorithm

In the traditional multiobjective optimization algorithm, multiple objective functions are usually converted into a single objective function for the solution. However, in the conversion process, it is easy to be affected by the subjective factors of decision-makers, which will cause deviation to the results. Moreover, in the multiobjective problem, each objective restricts and affects the other. On the contrary, the NSGA2 algorithm adopts crowding degree calculation and elite strategy. In the process of evolution, it retains some excellent individuals in the population and reduces the impact of human factors on solution set distribution [27].The NSGA2 algorithm is a multiobjective intelligent optimization algorithm based on Pareto optimal solution theory. The specific process is shown in Figure5.
(1)
InitializationFigure 5
NSGA2 algorithm flow chart.Define the number of iterationsLc, crossover probability pc, and mutation probability pm. Since the number of variables to be optimized mentioned above is m, the length of each individual is set to m. Assuming that the population size is pop1, the initial parent population Ch is randomly generated according to
(17)Ch=randpop1,m∗maxv−minv+minv,where maxv is the upper limit of the variable and minv is the lower limit of the variable and randpop1,m is a random matrix that generates a pop1 row and m column with elements within 1.
(2)
Crossover, mutation, and recombinationThe parent populationCh was crossed and mutated to generate the offspring population SCh. The parent population and the child population were recombined to form the population SCh1. The convergence of normal power flow and breaking power flow of ground-state data of each particle is verified. All particles can enter the next step only after passing the verification. If the power flow of a particle does not converge, the original ground state data is given to the particle.
(3)
Calculate fitness value(4)
Fast nondominated sortingAccording to the individual’s nondominated ranking valueirank, the whole population is nondominated stratified. Individuals with the same nondominated ranking value irank belong to the same nondominated layer.
(5)
Individual congestion distance calculationThe purpose is to selectively sort the individuals with the same nondominated order value and select the excellent individuals. Set the crowding distance of theith individual in the same layer to 0, and record it as Ldi=0. The individuals in the same layer are arranged in descending order according to the fitness value. Next, let Ld1=Ldend=M, where M is a large number. Finally, calculate the congestion distance for the individuals in the middle of the ranking according to equation (18) [28]:
(18)Ldi=Ldi+Ld,mi+1−Ld,mi−1fm,max,fm,min,where Ld,mi+1 represents the mth fitness value of the i+1st individual, fm,max represents the maximum fitness value corresponding to the mth objective function, and fm,min represents the minimum fitness value corresponding to the mth objective function.
(6)
Elite strategy selection calculationThe populationSCh1 was screened to obtain a new parent population Ch. Therefore, according to the ranking of irank from low to high, particles with the same irank value are put into Ch in turn until they exceed the population size pop1 when they are put into a certain layer of Fi; then, they are sorted from large to small according to the crowding distance of individuals in Fi and continue to fill Ch until the population number is pop1. Enter the next cycle with the newly obtained parent population Ch.


#### 3.2.2. PSO Algorithm

Particle swarm optimization (PSO) simulates the predation process of birds and continuously approaches the best advantage of search according to each particle’s learning and group experience. Each particle’s speed and position can reflect its motion state, and the speed and position of each particle can be updated according to equation (19) [29]:
(19)vik+1=wvik+c1r1Pbest,i−xik+c2r2gbest−xik,xik+1=vik+vik+1,where vik+1 and xik+1 are the iterative speed and position of particle i at k+1st time, respectively; vik+1 meets vmin≤vik+1≤vmax; Pbest,i is the optimal solution experienced by particle i itself; Gbest is the population optimal solution; W is the inertia coefficient, which generally decreases linearly from 0.9 to 0.1; c1andc2 are acceleration factors, and their values are generally taken as 2; and r1andr2 are random numbers on 0,1.To search the critical operation state of interlocking tripping, the line most affected by the initial failure and the node-set that plays a pivotal role in the branch can be analyzed, which will help to improve the calculation speed. Therefore, when solving the inner model, this paper uses the power sensitivity matrix to find the key node set [30].This paper assumes that the reactance value on the line is much greater than the resistance value. From the relevant knowledge, the relationship between branch current and node current can be obtained:(20)IB=YBATYN−1IN,where IB is the branch current vector, YB is the branch susceptance matrix, A is the node branch incidence matrix, YN−1 is the inverse of node susceptance matrix, and IN is the node current vector. For the convenience of the following description, let Dμ=YBATYN−1 be the coefficient matrix representing the correlation degree between the branch current vector and the node injection current vector.Assuming that there aren nodes and m lines in the power network, the expression of line i current can be obtained according to equation (20):
(21)Ii,B=μi,1I1,N+μi,2I2,N+⋯μi,nIn,N.Equation (21) is processed, converted into the relationship between branch power and node injection power, and sorted to obtain
(22)Pi,B+jQi,B=∑l=1nμi,1Pl,N+jQl,NUi,Bcosϕi,B+sinϕi,BUl,Ncosϕl,N+jsinϕl,N,where Pi,B and Qi,B represent the active power and reactive power flowing through the line i, respectively; μi,N is the element in row i and column n of Dμ; Ui,B and ϕi,B are the voltage amplitude and phase angle of the first node of the i branch, respectively; and Ui,Nandϕi,N are the voltage amplitude and phase angle of the lth node.In this paper, only the active power of nodes is considered for the prevention and control of cascading failures, so equation (22) is simplified to equation (23). That is, the relationship between the active power of transmission line i and the active power injected by all nodes in the grid can be obtained as follows:
(23)Pi,B=∑l=1nλi,lPlcosϕi,Bcosϕl,N+sinϕi,Bsinϕl,N,λi,l=μi,lUiUl,where Pi is the active power passing through the transmission line i, Pl is the active power injected by the lth node, N is the total number of nodes in the system, and μi,l is the coefficient matrix Dμ of the element that intersects row i and column l.By further simplifying equation (23), the sensitivity coefficients of branch active power Pi and node injection active power Pl can be obtained, which can be expressed as
(24)βi,l=∂Pi∂Pl=λi,lPlcosϕicosϕl+sinϕisinϕl,where βi,j is the sensitivity coefficient, and the meaning of other parameters is consistent with equation (23).Define incidence matrixLβ, βi,j is the element in the matrix L where the ith row and the lth column intersect. If βi,j<0 is obtained, it can be multiplied by -1 to make it positive, and the sensitivity after treatment is still recorded as βi,j. It can be seen from equation (24) that the greater the value of βi,j, the more obvious the impact on the power of the ith branch when the node l power changes.When searching for the key nodes in the critical state of the nearest cascading failures, the node injection power vector can be assigned to each particle. The specific methods are as follows: in the first step, calculate the current valueIk,dist of the remaining lines in the power grid after the initial failure shutdown according to equation (3) from the expected initial failures, and calculate the minimum value of Ik,dist and the corresponding branch number and record it as lm in the second step, solve the sensitivity matrix of the most seriously disturbed branch lm according to equations (23) and (24). According to the actual needs, an appropriate threshold Evalue is defined to judge the relationship between elements βi,j and Evalue of the sensitivity matrix. If βi,j>Evalue, the node number corresponding to element βi,j is classified into set A. Finally, the variable with the solution is set to the node injection power in set A, and the penalty function is defined and solved in combination with the particle swarm optimization algorithm.


## 3.1. Calculate Fitness Function Value

In this paper, the objective function of the required solution is combined with the constraints to construct an augmented objective function, that is, the fitness function:(16)f1=DS+∑k1αkmin0,−hkx2+1δkmin0,−gkx2+∑m1ςmmin0,−dmx2,f2=F1+∑k1αkmin0,−pkx2+∑k1δkmin0,−mkx2+∑m1ςmmin0,−emx2,f3=F2+∑k1αkmin0,−pkx2+∑k1δkmin0,−mkx2+∑m1ςmmin0,−emx2,where equations (12) and (15) are abbreviated as dx>0andex>0, respectively, and hkx corresponds to the kth component in h0xorh1x; gkx,pkx,mkx,andhkx have similar meanings; α,β,andζ is the penalty factor, which is given according to the actual situation and is positive.


## 3.2. The NSGA2-PSO Algorithm

Literature [25] compares multiobjective particle swarm optimization (MOPSO), nondominated sorting genetic algorithm (NSGA2), and archived multiobjective simulated annealing algorithm (AMOSA), respectively. It is found that the NSGA2 algorithm has the advantages of low complexity and high precision. Therefore, in this paper, the outer layer of the double-layer optimization model uses the NSGA2 algorithm; the PSO algorithm solves the inner model. Among them, the inner model transmits the result of equation (6) to the outer model. The exterior model adjusts the generator’s active power output according to the information of the inner model and transmits the current power grid operation state to the inner model for further optimization of the inner model. The population size of the NSGA2-PSO algorithm is usually between 20 and 50. If the total population exceeds 50, the optimization efficiency of the algorithm will not be improved, but the calculation time will be increased [26].


### 3.2.1. NSGA2 Algorithm

In the traditional multiobjective optimization algorithm, multiple objective functions are usually converted into a single objective function for the solution. However, in the conversion process, it is easy to be affected by the subjective factors of decision-makers, which will cause deviation to the results. Moreover, in the multiobjective problem, each objective restricts and affects the other. On the contrary, the NSGA2 algorithm adopts crowding degree calculation and elite strategy. In the process of evolution, it retains some excellent individuals in the population and reduces the impact of human factors on solution set distribution [27].The NSGA2 algorithm is a multiobjective intelligent optimization algorithm based on Pareto optimal solution theory. The specific process is shown in Figure5.
(1)
InitializationFigure 5
NSGA2 algorithm flow chart.Define the number of iterationsLc, crossover probability pc, and mutation probability pm. Since the number of variables to be optimized mentioned above is m, the length of each individual is set to m. Assuming that the population size is pop1, the initial parent population Ch is randomly generated according to
(17)Ch=randpop1,m∗maxv−minv+minv,where maxv is the upper limit of the variable and minv is the lower limit of the variable and randpop1,m is a random matrix that generates a pop1 row and m column with elements within 1.
(2)
Crossover, mutation, and recombinationThe parent populationCh was crossed and mutated to generate the offspring population SCh. The parent population and the child population were recombined to form the population SCh1. The convergence of normal power flow and breaking power flow of ground-state data of each particle is verified. All particles can enter the next step only after passing the verification. If the power flow of a particle does not converge, the original ground state data is given to the particle.
(3)
Calculate fitness value(4)
Fast nondominated sortingAccording to the individual’s nondominated ranking valueirank, the whole population is nondominated stratified. Individuals with the same nondominated ranking value irank belong to the same nondominated layer.
(5)
Individual congestion distance calculationThe purpose is to selectively sort the individuals with the same nondominated order value and select the excellent individuals. Set the crowding distance of theith individual in the same layer to 0, and record it as Ldi=0. The individuals in the same layer are arranged in descending order according to the fitness value. Next, let Ld1=Ldend=M, where M is a large number. Finally, calculate the congestion distance for the individuals in the middle of the ranking according to equation (18) [28]:
(18)Ldi=Ldi+Ld,mi+1−Ld,mi−1fm,max,fm,min,where Ld,mi+1 represents the mth fitness value of the i+1st individual, fm,max represents the maximum fitness value corresponding to the mth objective function, and fm,min represents the minimum fitness value corresponding to the mth objective function.
(6)
Elite strategy selection calculationThe populationSCh1 was screened to obtain a new parent population Ch. Therefore, according to the ranking of irank from low to high, particles with the same irank value are put into Ch in turn until they exceed the population size pop1 when they are put into a certain layer of Fi; then, they are sorted from large to small according to the crowding distance of individuals in Fi and continue to fill Ch until the population number is pop1. Enter the next cycle with the newly obtained parent population Ch.


### 3.2.2. PSO Algorithm

Particle swarm optimization (PSO) simulates the predation process of birds and continuously approaches the best advantage of search according to each particle’s learning and group experience. Each particle’s speed and position can reflect its motion state, and the speed and position of each particle can be updated according to equation (19) [29]:
(19)vik+1=wvik+c1r1Pbest,i−xik+c2r2gbest−xik,xik+1=vik+vik+1,where vik+1 and xik+1 are the iterative speed and position of particle i at k+1st time, respectively; vik+1 meets vmin≤vik+1≤vmax; Pbest,i is the optimal solution experienced by particle i itself; Gbest is the population optimal solution; W is the inertia coefficient, which generally decreases linearly from 0.9 to 0.1; c1andc2 are acceleration factors, and their values are generally taken as 2; and r1andr2 are random numbers on 0,1.To search the critical operation state of interlocking tripping, the line most affected by the initial failure and the node-set that plays a pivotal role in the branch can be analyzed, which will help to improve the calculation speed. Therefore, when solving the inner model, this paper uses the power sensitivity matrix to find the key node set [30].This paper assumes that the reactance value on the line is much greater than the resistance value. From the relevant knowledge, the relationship between branch current and node current can be obtained:(20)IB=YBATYN−1IN,where IB is the branch current vector, YB is the branch susceptance matrix, A is the node branch incidence matrix, YN−1 is the inverse of node susceptance matrix, and IN is the node current vector. For the convenience of the following description, let Dμ=YBATYN−1 be the coefficient matrix representing the correlation degree between the branch current vector and the node injection current vector.Assuming that there aren nodes and m lines in the power network, the expression of line i current can be obtained according to equation (20):
(21)Ii,B=μi,1I1,N+μi,2I2,N+⋯μi,nIn,N.Equation (21) is processed, converted into the relationship between branch power and node injection power, and sorted to obtain
(22)Pi,B+jQi,B=∑l=1nμi,1Pl,N+jQl,NUi,Bcosϕi,B+sinϕi,BUl,Ncosϕl,N+jsinϕl,N,where Pi,B and Qi,B represent the active power and reactive power flowing through the line i, respectively; μi,N is the element in row i and column n of Dμ; Ui,B and ϕi,B are the voltage amplitude and phase angle of the first node of the i branch, respectively; and Ui,Nandϕi,N are the voltage amplitude and phase angle of the lth node.In this paper, only the active power of nodes is considered for the prevention and control of cascading failures, so equation (22) is simplified to equation (23). That is, the relationship between the active power of transmission line i and the active power injected by all nodes in the grid can be obtained as follows:
(23)Pi,B=∑l=1nλi,lPlcosϕi,Bcosϕl,N+sinϕi,Bsinϕl,N,λi,l=μi,lUiUl,where Pi is the active power passing through the transmission line i, Pl is the active power injected by the lth node, N is the total number of nodes in the system, and μi,l is the coefficient matrix Dμ of the element that intersects row i and column l.By further simplifying equation (23), the sensitivity coefficients of branch active power Pi and node injection active power Pl can be obtained, which can be expressed as
(24)βi,l=∂Pi∂Pl=λi,lPlcosϕicosϕl+sinϕisinϕl,where βi,j is the sensitivity coefficient, and the meaning of other parameters is consistent with equation (23).Define incidence matrixLβ, βi,j is the element in the matrix L where the ith row and the lth column intersect. If βi,j<0 is obtained, it can be multiplied by -1 to make it positive, and the sensitivity after treatment is still recorded as βi,j. It can be seen from equation (24) that the greater the value of βi,j, the more obvious the impact on the power of the ith branch when the node l power changes.When searching for the key nodes in the critical state of the nearest cascading failures, the node injection power vector can be assigned to each particle. The specific methods are as follows: in the first step, calculate the current valueIk,dist of the remaining lines in the power grid after the initial failure shutdown according to equation (3) from the expected initial failures, and calculate the minimum value of Ik,dist and the corresponding branch number and record it as lm in the second step, solve the sensitivity matrix of the most seriously disturbed branch lm according to equations (23) and (24). According to the actual needs, an appropriate threshold Evalue is defined to judge the relationship between elements βi,j and Evalue of the sensitivity matrix. If βi,j>Evalue, the node number corresponding to element βi,j is classified into set A. Finally, the variable with the solution is set to the node injection power in set A, and the penalty function is defined and solved in combination with the particle swarm optimization algorithm.


## 3.2.1. NSGA2 Algorithm

In the traditional multiobjective optimization algorithm, multiple objective functions are usually converted into a single objective function for the solution. However, in the conversion process, it is easy to be affected by the subjective factors of decision-makers, which will cause deviation to the results. Moreover, in the multiobjective problem, each objective restricts and affects the other. On the contrary, the NSGA2 algorithm adopts crowding degree calculation and elite strategy. In the process of evolution, it retains some excellent individuals in the population and reduces the impact of human factors on solution set distribution [27].The NSGA2 algorithm is a multiobjective intelligent optimization algorithm based on Pareto optimal solution theory. The specific process is shown in Figure5.
(1)
InitializationFigure 5
NSGA2 algorithm flow chart.Define the number of iterationsLc, crossover probability pc, and mutation probability pm. Since the number of variables to be optimized mentioned above is m, the length of each individual is set to m. Assuming that the population size is pop1, the initial parent population Ch is randomly generated according to
(17)Ch=randpop1,m∗maxv−minv+minv,where maxv is the upper limit of the variable and minv is the lower limit of the variable and randpop1,m is a random matrix that generates a pop1 row and m column with elements within 1.
(2)
Crossover, mutation, and recombinationThe parent populationCh was crossed and mutated to generate the offspring population SCh. The parent population and the child population were recombined to form the population SCh1. The convergence of normal power flow and breaking power flow of ground-state data of each particle is verified. All particles can enter the next step only after passing the verification. If the power flow of a particle does not converge, the original ground state data is given to the particle.
(3)
Calculate fitness value(4)
Fast nondominated sortingAccording to the individual’s nondominated ranking valueirank, the whole population is nondominated stratified. Individuals with the same nondominated ranking value irank belong to the same nondominated layer.
(5)
Individual congestion distance calculationThe purpose is to selectively sort the individuals with the same nondominated order value and select the excellent individuals. Set the crowding distance of theith individual in the same layer to 0, and record it as Ldi=0. The individuals in the same layer are arranged in descending order according to the fitness value. Next, let Ld1=Ldend=M, where M is a large number. Finally, calculate the congestion distance for the individuals in the middle of the ranking according to equation (18) [28]:
(18)Ldi=Ldi+Ld,mi+1−Ld,mi−1fm,max,fm,min,where Ld,mi+1 represents the mth fitness value of the i+1st individual, fm,max represents the maximum fitness value corresponding to the mth objective function, and fm,min represents the minimum fitness value corresponding to the mth objective function.
(6)
Elite strategy selection calculationThe populationSCh1 was screened to obtain a new parent population Ch. Therefore, according to the ranking of irank from low to high, particles with the same irank value are put into Ch in turn until they exceed the population size pop1 when they are put into a certain layer of Fi; then, they are sorted from large to small according to the crowding distance of individuals in Fi and continue to fill Ch until the population number is pop1. Enter the next cycle with the newly obtained parent population Ch.


## 3.2.2. PSO Algorithm

Particle swarm optimization (PSO) simulates the predation process of birds and continuously approaches the best advantage of search according to each particle’s learning and group experience. Each particle’s speed and position can reflect its motion state, and the speed and position of each particle can be updated according to equation (19) [29]:
(19)vik+1=wvik+c1r1Pbest,i−xik+c2r2gbest−xik,xik+1=vik+vik+1,where vik+1 and xik+1 are the iterative speed and position of particle i at k+1st time, respectively; vik+1 meets vmin≤vik+1≤vmax; Pbest,i is the optimal solution experienced by particle i itself; Gbest is the population optimal solution; W is the inertia coefficient, which generally decreases linearly from 0.9 to 0.1; c1andc2 are acceleration factors, and their values are generally taken as 2; and r1andr2 are random numbers on 0,1.To search the critical operation state of interlocking tripping, the line most affected by the initial failure and the node-set that plays a pivotal role in the branch can be analyzed, which will help to improve the calculation speed. Therefore, when solving the inner model, this paper uses the power sensitivity matrix to find the key node set [30].This paper assumes that the reactance value on the line is much greater than the resistance value. From the relevant knowledge, the relationship between branch current and node current can be obtained:(20)IB=YBATYN−1IN,where IB is the branch current vector, YB is the branch susceptance matrix, A is the node branch incidence matrix, YN−1 is the inverse of node susceptance matrix, and IN is the node current vector. For the convenience of the following description, let Dμ=YBATYN−1 be the coefficient matrix representing the correlation degree between the branch current vector and the node injection current vector.Assuming that there aren nodes and m lines in the power network, the expression of line i current can be obtained according to equation (20):
(21)Ii,B=μi,1I1,N+μi,2I2,N+⋯μi,nIn,N.Equation (21) is processed, converted into the relationship between branch power and node injection power, and sorted to obtain
(22)Pi,B+jQi,B=∑l=1nμi,1Pl,N+jQl,NUi,Bcosϕi,B+sinϕi,BUl,Ncosϕl,N+jsinϕl,N,where Pi,B and Qi,B represent the active power and reactive power flowing through the line i, respectively; μi,N is the element in row i and column n of Dμ; Ui,B and ϕi,B are the voltage amplitude and phase angle of the first node of the i branch, respectively; and Ui,Nandϕi,N are the voltage amplitude and phase angle of the lth node.In this paper, only the active power of nodes is considered for the prevention and control of cascading failures, so equation (22) is simplified to equation (23). That is, the relationship between the active power of transmission line i and the active power injected by all nodes in the grid can be obtained as follows:
(23)Pi,B=∑l=1nλi,lPlcosϕi,Bcosϕl,N+sinϕi,Bsinϕl,N,λi,l=μi,lUiUl,where Pi is the active power passing through the transmission line i, Pl is the active power injected by the lth node, N is the total number of nodes in the system, and μi,l is the coefficient matrix Dμ of the element that intersects row i and column l.By further simplifying equation (23), the sensitivity coefficients of branch active power Pi and node injection active power Pl can be obtained, which can be expressed as
(24)βi,l=∂Pi∂Pl=λi,lPlcosϕicosϕl+sinϕisinϕl,where βi,j is the sensitivity coefficient, and the meaning of other parameters is consistent with equation (23).Define incidence matrixLβ, βi,j is the element in the matrix L where the ith row and the lth column intersect. If βi,j<0 is obtained, it can be multiplied by -1 to make it positive, and the sensitivity after treatment is still recorded as βi,j. It can be seen from equation (24) that the greater the value of βi,j, the more obvious the impact on the power of the ith branch when the node l power changes.When searching for the key nodes in the critical state of the nearest cascading failures, the node injection power vector can be assigned to each particle. The specific methods are as follows: in the first step, calculate the current valueIk,dist of the remaining lines in the power grid after the initial failure shutdown according to equation (3) from the expected initial failures, and calculate the minimum value of Ik,dist and the corresponding branch number and record it as lm in the second step, solve the sensitivity matrix of the most seriously disturbed branch lm according to equations (23) and (24). According to the actual needs, an appropriate threshold Evalue is defined to judge the relationship between elements βi,j and Evalue of the sensitivity matrix. If βi,j>Evalue, the node number corresponding to element βi,j is classified into set A. Finally, the variable with the solution is set to the node injection power in set A, and the penalty function is defined and solved in combination with the particle swarm optimization algorithm.


## 4. Example Analysis

According to the previous ideas in this paper, the power grid security assessment using WSN is mainly to analyze the power grid based on the input power of the power grid nodes. In order to focus on the verification of the evaluation method, this example assumes that the IEEE39 node system has been configured with a parameter monitoring device according to the structure shown in Figure6.Figure 6
Diagram of IEEE39 bus system.Use the system in Figure4 with the equipment in Figure 7 to collect node voltage and line current data, as shown in Tables 1 and 2, and their values are expressed as per unit value. The study found that in the process of data transmission using a ZigBee routing protocol, part of data packets need to pass through multiple paths, which is easy to cause the drawbacks of uneven energy distribution and low routing efficiency. Therefore, there is a certain error when comparing the power grid operation parameters collected through the above network with the data of the IEEE39 node system [31]. According to the obtained voltage and current, it is easy to calculate the node injection power according to equation (2). Limited to space, the node injection power data will not be listed here. In the calculation, considering the actual characteristics of power flow, when considering the node injection power state, this paper mainly combines the active power and reactive power of PQ node and the active power of PV node to form the vector S for injection power combination [32]. The control cost coefficient in equation (5) can be used in the literature [9].Figure 7
Experimental equipment.Table 1
Voltage collected by WSN.
Node numberVoltage phasorNode numberVoltage phasorNode numberVoltage phasor11.051141.022271.04121.055151.026281.05331.042161.035291.05141.024171.035301.05251.025181.033310.98361.027191.049320.98470.998200.993330.99880.998211.009341.02391.029291.045351.048101.026301.044361.064111.023310.991371.031121320.994381.032131.023330.997391.028Table 2
Current collected by WSN.
Branch head node numberBranch end node numberCurrent phasorBranch head node numberBranch end node numberCurrent phasor121.16116240.9031391.23217181.819233.67117270.2342252.46121225.954341.38922230.6533180.42223243.434451.65125260.7524142.63926272.693564.76926281.352583.20926291.843674.31228293.3956113.48311120.282781.89713120.332890.8913165.7829390.17132106.71210113.48233197.13210132.96134205.13113142.93235226.12314150.33936235.31115163.21337255.27216172.0413022.36616194.37238298.05216213.19720194.363On the IEEE39 node system, the initial fault linesL17 and L20 are analyzed as the initial fault lines. Set the population number to 30; the maximum number of iterations of the NSGA2 algorithm is 40; the maximum number of iterations of the PSO algorithm is 40. The simulation diagram is as follows.As can be seen from Figures8 and 9, with the improvement of the power grid safety margin, the control cost of the generator set is also increasing. When adjusting, if only safety margin or control cost is considered, the following situations will occur. The first one is by only considering the improvement of power grid safety margin and ignoring the control cost, the increase of safety margin may not be obvious, but more control funds are invested. The second is only considering reducing control costs and pursuing economic benefits may lead to abnormal operation of the power grid. Therefore, in the actual operation of the power grid, it is necessary to consider the security margin of the power grid together with the control cost. For example, if the limited control cost (unit: USD) ranges from 400 to 600, from the above figure, the safety margin is between 10 and 15, which can meet the normal operation of the power grid. Moreover, within a given control cost range, it can be flexibly adjusted according to needs, which can ensure the reliable operation of the power grid.Figure 8
Pareto obtained from the initial failure lineL17.Figure 9
Pareto obtained from the initial failure lineL20.In this paper, the proposed system is verified not only by simulation in MATLAB but also by using the existing experimental equipment. The experimental equipment is shown in Figure7.


## 5. Conclusion

This paper combines WSN technology with cascading failure prevention and control and establishes a prevention and control model considering economy and safety. The main conclusions are as follows:(1)
Using WSN to monitor the power grid parameters can timely feedback the injected power information of the current power grid nodes to the monitoring center. Combined with the safety margin index in this paper, the safety level of the power grid can be quickly judged(2)
This paper establishes a double-layer optimal preventive control model, and the NSGA2-PSO algorithm is used to solve the model. By adjusting the generator active power output strategy, the power generation cost is minimized based on improving the safety margin, so that the power grid can take into account the requirements of safety and economy at the same timeIn short, the method proposed in this paper can provide a reference for further research on cascading failures of the power grid.



---

*Source: 9439977-2021-11-22.xml*