# Convolutional Neural Network for Voltage Sag Source Azimuth Recognition in Electrical Internet of Things

Authors: Ding Kai; Li Wei; Sun Jianfeng; Xiao Xianyong; Wang Ying
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

Recognition and analytics at the edge enable utility companies to predict and prevent problems in real time. Clearing the voltage sag disturbance source by the positioning method is the most effective way to solve and improve the voltage sag. However, for different grid structures and fault types, the existing methods usually achieve a sag source location based on the single feature of monitoring data extraction. However, due to the effectiveness and applicability of the existing method features, this paper proposes a multidimensional feature of the voltage sag source positioning method of the matrix. Based on the analysis of the characteristics of the voltage sag event caused by the fault, this paper proposes a multidimensional feature matrix for voltage sag source location, based on the convolutional neural network to establish the mapping relationship between the feature matrix and the voltage sag position, thus achieving multiple points based on multiple points. The voltage sag source orientation is identified by the monitoring data. Finally, the voltage sag event caused by the short-circuit fault is simulated in the IEEE14 node model, and the effectiveness of the proposed method is verified by simulation data. The simulation results show that the proposed method has higher accuracy than the traditional method, and the method can be applied to different grid structures and different types of faults.


---

## Body

## 1. Introduction

Electric Internet of Things (UEIoT) realizes the interconnection of everything and human-computer interaction in all aspects of the power system by fully applying mobile Internet technology, artificial intelligence technology, and advanced communication technology. It provides intelligent services characterized by a comprehensive perception of the state, efficient processing of information, and convenient and flexible application. In order to drive reliability and operational efficiency, utility companies now need to leverage advanced distribution analysis. Delivering analytics at the edge means that the energy industry can use data in a far more effective and efficient way. Detection at the edge enables utility companies to predict and prevent problems in real time, to cost-effectively deploy resources and personnel, and to increase overall grid optimization, security, and reliability. A voltage sag is a power quality disturbance event where supply voltage quickly recovers after dropping [1]. The root cause of the voltage sag is the voltage sag of a common connecting point which is caused by the increase in the partial voltage of power impedance due to the increase in current. The causes of the voltage sag can be divided into short-circuit fault, transformer magnetizing inrush current, inductive motor start, and other large-capacity load operations [2–4]. The positioning of the voltage sag can not only be used to divide the temporary responsibility of both power supply and power consumption but also help to shorten the time spent by a power supply company on fault elimination [5].At present, the positioning methods of the current voltage sag can be roughly divided into positioning methods based on a single monitoring point [6–9] and positioning methods based on multiple monitoring points [10, 11]. Literature [6] determines whether the voltage sag source is in the upstream or downstream of the power quality detection device according to the signs of the disturbed active power (i.e., the difference between the active power before and after the occurrence of the voltage sag) and the disturbed active power energy (the integral of the disturbed active power on a time scale). Literature [7] uses the fundamental voltage and current recorded by the power quality monitoring device to calculate equivalent impedance and determines whether the voltage sag is located in the upstream or downstream of the power quality monitoring device according to the signs of the real part of impedance. Literature [8] judges that the voltage sag source is located in the upstream or downstream of the monitoring point according to the slope of the line segment connected by two points before and after the fault. Literature [9] determines whether the voltage sag source is located in the upstream or downstream of the monitoring point according to the signs of the real part of current during the voltage sag. Literature [10] puts forward the sensitivity index of the fault current to the voltage sag, determines the priority of nodes according to the sensitivity index, and then determines the priority of the installation location of the power quality monitor according to this index. Then, the position of the voltage sag source is determined according to the current variation of each monitoring branch before and after the voltage sag event as well as the priority of the nodes. Literature [11] searches the voltage sag path by using the feeder sending end and determines that the branch line with the lowest voltage is the line where the voltage sag occurs. Then, a quadratic function is used to fit the voltage into the function of distance, which can not only realize the estimation of node voltage sag but also achieve the location of the voltage sag source.Traditional locating methods of the voltage sag source have some limitations in practical application. The locating methods based on a single monitoring point are only suitable for a radiation network. Besides, the judgment results based on the disturbed active power and disturbed active energy may not match [2], and this method lacks theoretical derivation [12]. The real part method of equivalent impedance [7], the system trajectory slope method [8], and the real part current method [9] all assume that the circuit conditions will not change when there is a voltage sag caused by the fault, which is bound to affect the judgment result. Although the method proposed in literature [10] is applicable to radiation networks and ring networks, it is affected by the system grounding mode. The method proposed in literature [11] is only applicable to radial networks. To solve the problems such as limited application scope and inaccurate positioning of the existing methods, literature [3, 13, 14] integrates the system slope trajectory and other traditional positioning methods as comprehensive criteria and uses the BP Neural Network (BPNN) and Support Vector Machine (SVM) to establish the mapping relationship between the criteria and positioning results, respectively. Literature [15, 16] obtains the first peak of the disturbed power after the occurrence of the voltage sag as the feature vector, and then, the SVM and Radial Basis Function (RBF) Neural Network are used to conduct classification and then achieve fault location, respectively. The voltage sag source location method based on classification considers the voltage sag source location a binary classification problem and determines whether the voltage sag source is located in the upstream or downstream of a single monitoring point. Such methods are prone to have conflicting features that affect the classification results, especially when they are used for voltage sag positioning in a loop network.As the power grid fault is the main cause of the voltage sag [17, 18], in this paper, on the basis of the research of the existing methods, the main contributions are as follows:
(1)
A voltage sag source location method based on a multidimensional feature matrix is proposed to conduct the positioning of the voltage sag events caused by the power grid fault(2)
Then, the characteristics of voltage sag events are analyzed, and the disturbance power, disturbance energy, real part of equivalent impedance, slope trajectory, and real part of the current of all monitoring nodes of the whole network are extracted to form the feature matrix(3)
Later, the locating problem of the voltage sag source is transformed into a multiclassification problem. The features are extracted by the convolutional layer and sampling layer of the convolutional neural networks (CNN) to avoid the contradiction between the features. The mapping relationship between deep features and the location of the voltage sag source is established through the fully connected layer of CNN to realize the location of the voltage sag source(4)
In the IEEE14 node model, the grid fault data is obtained by simulation, in order to verify the effectiveness of the proposed method. The simulation results show that the proposed method is more accurate than the traditional methods and more applicable to different network structures and different types of faultsThe rest of the paper is organized as follows. We first discuss some related works in voltage sag source location methods, and then, we elaborate our proposed sag source location method based on convolutional neural network algorithm. Moreover, we present experiments to evaluate our method in Simulation Analysis. Finally, the conclusions of this paper are given in Conclusion.


## 2. Voltage Sag Source Location Methods

### 2.1. Upstream and Downstream Positioning Methods

Both positioning criteria [6–9] proposed according to the variation of electric quantity when the voltage sag occurs and the method that constitutes a comprehensive criterion for a classifier’s classification and identification [13–16] judge whether the voltage sag source is located in the upstream or downstream of the power quality monitoring device. As shown in Figure 1, the reference direction of the power flow has been marked with arrows. As for the power quality monitoring device M, the lines L1 and L4 where the energy flows to M and the lines L2, L3, and L10 where the energy does not flow through M are the upstream regions, while the lines L5∼L9 where the energy flows through M are the downstream regions. This method which defines upstream and downstream is only applicable to radial networks, but for more complex networks such as ring networks, it may be difficult for this method to define upstream and downstream.Figure 1
Voltage sag source location.


### 2.2. Multimonitoring Point Positioning Method

The positioning method based on multimonitoring points needs to install a large number of monitoring devices in the power grid. At present, the positioning methods based on multimonitoring points mainly include the deviation method based on branch current [10] and the node voltage deviation index method [11].The branch current deviation method uses the system coefficient matrix to calculate the current of the system when the busk fails:
(1)fVfk=∑i=1i≠jm∑j=1j≠imIijk=∑i=1i≠jm∑j=1j≠imzik−zjkVfk/zkk+zfkzb,ij,where zkk is the equivalent resistance at the bus k, zfk represents the fault resistance, zik is the transmission impedance between the buses i and k, and zb,ij represents the line impedance between the buses i and j.The sensitivity of the system current to the transient voltage is defined as(2)∂f∂Vfk=∑i=1i≠jm∑j=1j≠imzik−zjkzb,ijzkk+zfk.The branch current deviation is(3)BCD=Isag−IpreIpre,where Ipre and Isag are defined as the current values before and after the failure, respectively.The sensitivity of all nodes in the network is calculated, and the monitoring device is installed in the nodes with higher sensitivity. When a fault occurs, the current deviation of each branch of the bus equipped with the monitoring device is calculated, and the positioning of the voltage sag source can be realized by searching according to the current deviation. This method has obvious defects, and the fault current varies in different grounding modes, so it is difficult to guarantee the reliability of its application.The node voltage deviation method calculates the voltages of all nodes in the whole network based on the system coefficient and monitoring data. The voltage deviation is defined as(4)V=Vpre−VsagVpre×100%.The busVmax=V1,V2,V3⋯Vn with the maximum voltage deviation is determined as the location where the voltage sag source occurs. This method does not take into account the voltage sag caused by different short-circuit faults, so it has some limitations.


## 2.1. Upstream and Downstream Positioning Methods

Both positioning criteria [6–9] proposed according to the variation of electric quantity when the voltage sag occurs and the method that constitutes a comprehensive criterion for a classifier’s classification and identification [13–16] judge whether the voltage sag source is located in the upstream or downstream of the power quality monitoring device. As shown in Figure 1, the reference direction of the power flow has been marked with arrows. As for the power quality monitoring device M, the lines L1 and L4 where the energy flows to M and the lines L2, L3, and L10 where the energy does not flow through M are the upstream regions, while the lines L5∼L9 where the energy flows through M are the downstream regions. This method which defines upstream and downstream is only applicable to radial networks, but for more complex networks such as ring networks, it may be difficult for this method to define upstream and downstream.Figure 1
Voltage sag source location.


## 2.2. Multimonitoring Point Positioning Method

The positioning method based on multimonitoring points needs to install a large number of monitoring devices in the power grid. At present, the positioning methods based on multimonitoring points mainly include the deviation method based on branch current [10] and the node voltage deviation index method [11].The branch current deviation method uses the system coefficient matrix to calculate the current of the system when the busk fails:
(1)fVfk=∑i=1i≠jm∑j=1j≠imIijk=∑i=1i≠jm∑j=1j≠imzik−zjkVfk/zkk+zfkzb,ij,where zkk is the equivalent resistance at the bus k, zfk represents the fault resistance, zik is the transmission impedance between the buses i and k, and zb,ij represents the line impedance between the buses i and j.The sensitivity of the system current to the transient voltage is defined as(2)∂f∂Vfk=∑i=1i≠jm∑j=1j≠imzik−zjkzb,ijzkk+zfk.The branch current deviation is(3)BCD=Isag−IpreIpre,where Ipre and Isag are defined as the current values before and after the failure, respectively.The sensitivity of all nodes in the network is calculated, and the monitoring device is installed in the nodes with higher sensitivity. When a fault occurs, the current deviation of each branch of the bus equipped with the monitoring device is calculated, and the positioning of the voltage sag source can be realized by searching according to the current deviation. This method has obvious defects, and the fault current varies in different grounding modes, so it is difficult to guarantee the reliability of its application.The node voltage deviation method calculates the voltages of all nodes in the whole network based on the system coefficient and monitoring data. The voltage deviation is defined as(4)V=Vpre−VsagVpre×100%.The busVmax=V1,V2,V3⋯Vn with the maximum voltage deviation is determined as the location where the voltage sag source occurs. This method does not take into account the voltage sag caused by different short-circuit faults, so it has some limitations.


## 3. Multidimensional Characteristic Matrix for Sag Source Location

Effective feature selection is the key to realize classification. Based on the existing methods, the disturbance power and energy, the real part of the equivalent impedance, the slope of the system trajectory, and the real part of the current are extracted from each node.


### 3.1. Disturbance Power and Disturbance Energy

DP (disturbance power) is defined as the difference between the instantaneous power and the steady-state operating power, while DE (disturbance energy) is defined as the integral of the disturbance energy during the disturbance.(5)DP=ptf−pts,(6)DE=∫0tDPtdt,where ptf and pts represent the transient power during disturbance and steady-state operation, respectively.


### 3.2. Equivalent Impedance Real Part

Based on the equivalent circuit shown in Figure2, the equivalent impedance variation at the power quality monitoring device caused by the voltage sag is analyzed.Figure 2
Equivalent circuit of the voltage sag.Assuming that there is a disturbance in the downstream of the power quality monitoring device, the system parameters do not change during the disturbance, the voltage variation isΔV, and the current variation is ΔI, then
(7)V=E1−IZ1,(8)V+ΔV=E1−I+ΔIZ1.The equivalent impedance can be calculated by Equations (7) and (8):
(9)Z2=ΔVΔI.Similarly, the equivalent impedance can be calculated when the disturbance occurs in the upstream:(10)Z1=−ΔVΔI.Therefore, the equivalent impedance can be defined asZe=ΔV/ΔI, and the voltage sag source can be localized according to the polarity.


### 3.3. System Slope Trajectory

(11)VIcosθ2=−I2ReZ1+E1Icosθ1.Equation (10) can be transformed into
(12)Vcosθ2=−IReZ1+E1cosθ1,where θ2 denotes the phase difference between V and I and θ1 represents the phase difference between E and I.When the disturbance occurs in the upstream of the power quality monitoring device,cosθ2<0; when the disturbance occurs in the downstream of the power quality monitoring device, cosθ2>0. It can be seen from Equation (11) that, assuming that the operating parameters do not change when the disturbance occurs, the position of the voltage sag can be judged by the correlation between Vcosθ2 and I. Therefore, a line is synthesized during the disturbance to locate the voltage sag source according to the slope of the line k.


### 3.4. Real Part of the Current

According to Equation (12), when the disturbance occurs in the upstream, the current direction during the disturbance is opposite to that before the disturbance. When the disturbance occurs in the downstream, the current direction during the disturbance is the same as that before the disturbance. Therefore, the sag source can be localized according to the polarity.


### 3.5. Characteristic Matrix

The characteristic matrix of the whole network is as follows:(13)Mi=DP1DP2⋯DPnDE1DE2⋯DEnZe1Ze2⋯Zenk1k2⋯knIcosθ1Icosθ2⋯Icosθn,where Mii∈a,b,c represents the characteristic matrix of phase i, and the three-dimensional characteristic matrix formed is used as the input of the three channels of CNN.


## 3.1. Disturbance Power and Disturbance Energy

DP (disturbance power) is defined as the difference between the instantaneous power and the steady-state operating power, while DE (disturbance energy) is defined as the integral of the disturbance energy during the disturbance.(5)DP=ptf−pts,(6)DE=∫0tDPtdt,where ptf and pts represent the transient power during disturbance and steady-state operation, respectively.


## 3.2. Equivalent Impedance Real Part

Based on the equivalent circuit shown in Figure2, the equivalent impedance variation at the power quality monitoring device caused by the voltage sag is analyzed.Figure 2
Equivalent circuit of the voltage sag.Assuming that there is a disturbance in the downstream of the power quality monitoring device, the system parameters do not change during the disturbance, the voltage variation isΔV, and the current variation is ΔI, then
(7)V=E1−IZ1,(8)V+ΔV=E1−I+ΔIZ1.The equivalent impedance can be calculated by Equations (7) and (8):
(9)Z2=ΔVΔI.Similarly, the equivalent impedance can be calculated when the disturbance occurs in the upstream:(10)Z1=−ΔVΔI.Therefore, the equivalent impedance can be defined asZe=ΔV/ΔI, and the voltage sag source can be localized according to the polarity.


## 3.3. System Slope Trajectory

(11)VIcosθ2=−I2ReZ1+E1Icosθ1.Equation (10) can be transformed into
(12)Vcosθ2=−IReZ1+E1cosθ1,where θ2 denotes the phase difference between V and I and θ1 represents the phase difference between E and I.When the disturbance occurs in the upstream of the power quality monitoring device,cosθ2<0; when the disturbance occurs in the downstream of the power quality monitoring device, cosθ2>0. It can be seen from Equation (11) that, assuming that the operating parameters do not change when the disturbance occurs, the position of the voltage sag can be judged by the correlation between Vcosθ2 and I. Therefore, a line is synthesized during the disturbance to locate the voltage sag source according to the slope of the line k.


## 3.4. Real Part of the Current

According to Equation (12), when the disturbance occurs in the upstream, the current direction during the disturbance is opposite to that before the disturbance. When the disturbance occurs in the downstream, the current direction during the disturbance is the same as that before the disturbance. Therefore, the sag source can be localized according to the polarity.


## 3.5. Characteristic Matrix

The characteristic matrix of the whole network is as follows:(13)Mi=DP1DP2⋯DPnDE1DE2⋯DEnZe1Ze2⋯Zenk1k2⋯knIcosθ1Icosθ2⋯Icosθn,where Mii∈a,b,c represents the characteristic matrix of phase i, and the three-dimensional characteristic matrix formed is used as the input of the three channels of CNN.


## 4. Sag Source Location Method Based on the Convolutional Neural Network (CNN)

The voltage sag location method proposed in this paper is used to classify and identify voltage sag events occurring on different lines. When the 3D characteristic matrix selected in Section1 is used for classification and recognition, there may be a problem of mutual redundancy among features or failure to completely represent the voltage sag, which affects the accuracy of the final classification. As a bionic model, CNN’s basic framework usually includes a feature extractor and classifier [19], and it is composed of a convolutional layer, sampling layer, and fully connected layer [20–22]. Its structure is shown in Figure 3. The convolutional layer and the sampling layer can not only effectively learn the original feature matrix of the input at a deeper level but also reduce the number of neurons and simplify the complexity of the network through weight sharing. The fully connected layer, as a classifier, inputs the features after convolution and sampling and outputs classification categories.Figure 3
The structure of CNN.


### 4.1. Forward Pass

In the forward pass process, the output of thelth convolutional layer is
(14)xjl=f∑i∈Mjxil−1∗kijl+bj,where xjl denotes the jth output characteristic matrix of the lth layer, f denotes the activation function, Mj denotes the combination of the characteristic matrix output by the upper layer, kijl denotes the convolution kernel connecting xjl and xil−1, and bj denotes the bias corresponded by xjl.The output of thelth convolutional layer is the input of the lth sampling layer. In this case, the output of the lth sampling layer is
(15)xjl=downxjl−1+bjl,where down represents the lower sampling function.The output obtained by convolution sampling is sorted intoX=x1,x2,⋯,xn∈ℝn, as the input of the fully connected layer, and the output of the lth fully connected layer is
(16)Xl=fWl−1lXl−1+bl,where Wl−1l denotes the weight connecting Xl−1 and Xl and bl is the bias of the lth layer.


### 4.2. Backward Pass

The training of CNN minimizes the error between the output data and the expected data by adjusting the weight and bias, and this process is known as reverse pass. As a supervised learning algorithm, it is necessary to define a loss function before conducting reverse pass. The commonly used error functions include the square error loss function and cross-entropy loss function. In this paper, the cross-entropy loss function is selected:(17)LossW,b,x,y_=−1n∑y_⋅lny+1−y_⋅ln1−y,where n represents the number of samples, y_ represents the expected output, and y represents the actual output.According to the loss function, the error of each neuron in thelth output layer can be calculated:
(18)δjl=∂L∂XjLf′zjl,where zjl is the value of the input activation function of the jth neuron in the lth layer. Equation (17) can be written as the matrix form as follows:
(19)δl=∇XL⊙f′Zl,where ⊙ represents the Hadamard product.The error of thelth layer of the fully connected layer can be used to calculate the error of the l−1th layer of the full connected layer:
(20)δl−1=WlTδl⊙f′Zl−1.Given the sampling layer error, the error of the previous layer can be calculated as follows:(21)δl−1=upsampleδl⊙f′Zl−1,where upsample represents the upsampling function.Given the convolution layer error, the error of the previous layer can be calculated as follows:(22)δl−1=δl∗rot180Wl⊙f′Zl−1.The backpropagation of the error can be used to calculate the gradient of the weight and bias:(23)∂L∂wjkl=Zkl−1δjl,Lbjl=δjl.The gradient descent method is adopted to adjust the weight and bias of the network:(24)Wb=Wb−β∂L∂Wb,where Wb denotes the weight or bias and β denotes the learning rate.


### 4.3. Sag Source Positioning Method

In this paper, a voltage sag source positioning method based on a multidimensional characteristic matrix is proposed to locate single voltage sag events caused by the grid fault. The positioning of the voltage sag source is considered a multiclassification problem, and the voltage sag events occurring on different lines are divided into different categories. The mapping relationship between voltage sag events and lines is established by CNN to realize the location of the voltage sag source. The flowchart of the method proposed in this paper is shown in Figure4.
(1)
Record the voltage and current waveform of all monitoring points in the whole network when the voltage sag occurs. The IEEE14 node model is built in PSCAD/EMTDC to simulate voltage sag events caused by the short-circuit fault, and then, the voltage waveform of each node corresponded by each voltage sag event and the current waveform at both ends of each line are recorded(2)
Based on the data recorded in step (1), the disturbance power, disturbance energy, real part of equivalent impedance, slope of system trajectory, and real part of the current at each end of each line are calculated to form a feature matrix, and then, the corresponding labels are set according to the line where the voltage sag occurs. The characteristic matrix and corresponding tags are used as a sample for CNN training. In this paper, the CNN trained for the test randomly selects a part of the obtained samples as the test samples(3)
Take the training sample as the input of CNN and conduct forward pass to output the predicted tag. In order to make CNN output the result that matches the actual tag, reverse pass is required to adjust the network parameters. The trained CNN has established the mapping relationship between input and output(4)
Based on the CNN completed by training, the positioning of the voltage sag source can be realized. Input the characteristic matrix of voltage sag events that need to be located, and the output is the label of the circuit that occurs. This paper tests the classification performance of CNN completed by training based on the test samples obtained in step (2).Figure 4
Flowchart of the method.


## 4.1. Forward Pass

In the forward pass process, the output of thelth convolutional layer is
(14)xjl=f∑i∈Mjxil−1∗kijl+bj,where xjl denotes the jth output characteristic matrix of the lth layer, f denotes the activation function, Mj denotes the combination of the characteristic matrix output by the upper layer, kijl denotes the convolution kernel connecting xjl and xil−1, and bj denotes the bias corresponded by xjl.The output of thelth convolutional layer is the input of the lth sampling layer. In this case, the output of the lth sampling layer is
(15)xjl=downxjl−1+bjl,where down represents the lower sampling function.The output obtained by convolution sampling is sorted intoX=x1,x2,⋯,xn∈ℝn, as the input of the fully connected layer, and the output of the lth fully connected layer is
(16)Xl=fWl−1lXl−1+bl,where Wl−1l denotes the weight connecting Xl−1 and Xl and bl is the bias of the lth layer.


## 4.2. Backward Pass

The training of CNN minimizes the error between the output data and the expected data by adjusting the weight and bias, and this process is known as reverse pass. As a supervised learning algorithm, it is necessary to define a loss function before conducting reverse pass. The commonly used error functions include the square error loss function and cross-entropy loss function. In this paper, the cross-entropy loss function is selected:(17)LossW,b,x,y_=−1n∑y_⋅lny+1−y_⋅ln1−y,where n represents the number of samples, y_ represents the expected output, and y represents the actual output.According to the loss function, the error of each neuron in thelth output layer can be calculated:
(18)δjl=∂L∂XjLf′zjl,where zjl is the value of the input activation function of the jth neuron in the lth layer. Equation (17) can be written as the matrix form as follows:
(19)δl=∇XL⊙f′Zl,where ⊙ represents the Hadamard product.The error of thelth layer of the fully connected layer can be used to calculate the error of the l−1th layer of the full connected layer:
(20)δl−1=WlTδl⊙f′Zl−1.Given the sampling layer error, the error of the previous layer can be calculated as follows:(21)δl−1=upsampleδl⊙f′Zl−1,where upsample represents the upsampling function.Given the convolution layer error, the error of the previous layer can be calculated as follows:(22)δl−1=δl∗rot180Wl⊙f′Zl−1.The backpropagation of the error can be used to calculate the gradient of the weight and bias:(23)∂L∂wjkl=Zkl−1δjl,Lbjl=δjl.The gradient descent method is adopted to adjust the weight and bias of the network:(24)Wb=Wb−β∂L∂Wb,where Wb denotes the weight or bias and β denotes the learning rate.


## 4.3. Sag Source Positioning Method

In this paper, a voltage sag source positioning method based on a multidimensional characteristic matrix is proposed to locate single voltage sag events caused by the grid fault. The positioning of the voltage sag source is considered a multiclassification problem, and the voltage sag events occurring on different lines are divided into different categories. The mapping relationship between voltage sag events and lines is established by CNN to realize the location of the voltage sag source. The flowchart of the method proposed in this paper is shown in Figure4.
(1)
Record the voltage and current waveform of all monitoring points in the whole network when the voltage sag occurs. The IEEE14 node model is built in PSCAD/EMTDC to simulate voltage sag events caused by the short-circuit fault, and then, the voltage waveform of each node corresponded by each voltage sag event and the current waveform at both ends of each line are recorded(2)
Based on the data recorded in step (1), the disturbance power, disturbance energy, real part of equivalent impedance, slope of system trajectory, and real part of the current at each end of each line are calculated to form a feature matrix, and then, the corresponding labels are set according to the line where the voltage sag occurs. The characteristic matrix and corresponding tags are used as a sample for CNN training. In this paper, the CNN trained for the test randomly selects a part of the obtained samples as the test samples(3)
Take the training sample as the input of CNN and conduct forward pass to output the predicted tag. In order to make CNN output the result that matches the actual tag, reverse pass is required to adjust the network parameters. The trained CNN has established the mapping relationship between input and output(4)
Based on the CNN completed by training, the positioning of the voltage sag source can be realized. Input the characteristic matrix of voltage sag events that need to be located, and the output is the label of the circuit that occurs. This paper tests the classification performance of CNN completed by training based on the test samples obtained in step (2).Figure 4
Flowchart of the method.


## 5. Simulation Analysis

### 5.1. Data Acquisition

To verify the CNN-based voltage sag source location method proposed in this paper, a large amount of data of voltage sag events are needed. Firstly, the IEEE14 node model is built in PSCAD/EMTDC, as shown in Figure5. Faults are set at each ten equal points of each line, including single line-to-ground fault (SLGF), phase-to-phase fault (PPF), double line-to-ground fault (DLGF), and three line-to-ground fault (TLGF). Ten uniform random numbers whose transition resistance is between 0 and 10 Ω are set at each fault point for simulation. Then, the sampling frequency of 5 kHz is used to record the voltage waveform of 14 nodes and the current waveform at both ends of 17 lines during each simulation.Figure 5
IEEE14 model.The recorded waveform data is input into MATLAB for processing. First of all, an FIR low-pass filter is designed to filter the collected data and retain the power frequency component. Secondly, the features mentioned in Section2 at both ends of each line are extracted to form a feature matrix of 5×34×3, and then, the corresponding label (label format is 5×34×3) is set. The 100 sample sets of each line are randomly divided into 80 training samples and 20 test samples, and the sample distribution is shown in Table 1.Table 1
Distribution of samples.
TypeSample sizeTraining setsTesting setsSLGF17001360340PPF17001360340DLGF17001360340TLGF17001360340


### 5.2. Model Evaluation Index

The indexes which are used to evaluate dichotomy problems mainly include accuracy rate, recall rate, F1 value index, ROC curve, etc. [23–26], but they are no longer fully applicable to the multiple classification problems appearing in this paper. Therefore, the accuracy rate and kappa coefficient [27–30] are intended to be used to evaluate the models used in this paper.The calculation formula of kappa is as follows:(25)K=P0−Pe1−Pe,(26)Pe=a1b1+a2b2+⋯+aibiN⋅N,where P0 represents the classification accuracy of samples, ai represents the number of samples of category, bi represents the number of samples predicted to be category i, and N represents the total number of samples.


### 5.3. Construction of the CNN Model

Based on TensorFlow, a deep learning framework developed by Google, CNN is built. The CNN consists of two convolutional sampling layers and three fully connected layers [31–36]. The first convolutional layer has 32 convolution kernels with a size of 2×5, the second convolutional layer has 64 convolution kernels with a size of 1×6, the convolution kernel of the sampling layer is 2×2, and the number of nodes in the middle layer of the fully connected layer is 1024. Among them, the activation function of the hidden layer is “RELU,” the activation function of the output layer is “SOFTMAX,” the convolution mode is “VALID,” and the sampling mode is “SAME.”The CNN which has been built is trained in batches, and 80 training samples are randomly trained in each batch. The weight is set as a normally distributed random number with a mean value of 0 and variance of 0.1, the bias is set as a constant of 0.1, the learning rate is set as 0.0001, and the number of training is set as 1000. Adam-Optimizer is selected to adaptively control the learning rate of each parameter in the network.


### 5.4. Single-Phase Ground Fault Analysis

The classification results of the voltage sag source caused by SLGF are analyzed, and only the classification results of other fault types are given. The change curve of the loss function value and the change curve of classification accuracy of the training set and test set are shown in Figure6.Figure 6
Training process: (a) loss function value curve and (b) accuracy rate curve.
(a)(b)Based on the obfuscation matrix, the evaluation index of the model is calculated, each column of the obfuscation matrix represents the predicted category, and each row represents the actual category. In this paper, there are 17 types of SLGF samples, so the dimension of the confusion matrix is17×17. To observe and draw the confusion matrix easily, as shown in Figure 7, the omitted parts are all correctly classified samples. Based on the confusion matrix, one sample of line L2¯3 (L2¯3 represents the line between node 2 and node 3) is misclassified as line L6¯13 by the classifier and two samples of line L¯4 as line L1¯2, and the samples of other lines can be correctly classified as the real category.Figure 7
Confusion matrix of classification results.The confusion matrix as shown in Figure7 can be drawn by using the K-nearest Neighbor (KNN) and Ensemble Learning Algorithm (EL) (the confusion matrix of the classification results of the comparison classifier is omitted here due to space limitation). The respective classification indexes can be calculated according to the confounding matrices of different classifiers, as shown in Table 2.Table 2
Classification indicator.
Classification algorithmClassification featureAccuracyKappaCNNCharacteristic matrix99.12%99.06%KNNCharacteristic matrix97.06%96.88%Disturbance power43.53%40.00%Equivalent impedance54.41%51.56%System slope51.76%48.75%Real part of current57.94%55.31%ELCharacteristic matrix87.94%87.19%Disturbance power40.29%36.56%Equivalent impedance57.06%54.38%System slope41.18%37.50%Real part of current32.94%28.75%The classification accuracy of CNN is 99.12% and the kappa coefficient is 99.06%, which are the highest among the three classifiers.


### 5.5. Other Short-Circuit Fault Analysis

The samples of PPF, DLGF, and TLGF are trained and classified by the same classification model. The training process of CNN is shown in Figure8, and the classification results are shown in Table 3.Figure 8
Training process: (a) phase-to-phase fault, (b) double line-to-ground fault, and (c) three line-to-ground fault.
(a)(b)(c)Table 3
Classification indicator.
Fault typeClassification algorithmClassification featureAccuracyKappaPPFCNNMultidimensional feature100.00%100.00%KNNMultidimensional feature83.24%82.19%Disturbance power88.53%87.81%Equivalent impedance76.18%74.69%System slope82.35%81.25%Real part of current82.35%81.25%ELMultidimensional feature64.12%61.88%Disturbance power64.41%62.19%Equivalent impedance64.12%61.88%System slope64.71%62.50%Real part of current64.71%62.50%DLGFCNNMultidimensional feature100.00%100.00%KNNMultidimensional feature90.59%90.00%Disturbance power93.24%92.81%Equivalent impedance82.35%81.25%System slope89.41%88.75%Real part of current81.18%80.00%ELMultidimensional feature63.82%61.56%%Disturbance power58.82%56.25%Equivalent impedance64.41%62.19%System slope64.12%61.88%Real part of current64.41%62.19%TLGFCNNMultidimensional feature100%100%KNNMultidimensional feature97.65%97.50%Disturbance power79.12%77.81%Equivalent impedance80.00%78.75%System slope31.18%90.63%Real part of current76.76%75.31%ELMultidimensional feature64.12%61.88%Disturbance power35.29%31.25%Equivalent impedance35.29%31.25%System slope47.06%43.75%Real part of current64.12%61.88%It can be seen that, when the voltage sag sources caused by different fault types are classified based on single transient characteristics, the classification accuracy of voltage sag sources caused by different fault types is seriously affected by different feature selections, different classifiers, and different fault types. The classification accuracy of KNN and EL is improved based on multidimensional features, but it cannot meet the requirements. Regardless of the voltage sag events caused by any type of fault, CNN can be used to accurately classify based on the multidimensional feature matrix, and the classification accuracy is up to 100%.


### 5.6. Comparison with Existing Methods

The proposed method is based on multipoint monitoring data and can be used to identify voltage sag sources in loop and radiation networks. The existing voltage sag source positioning methods based on multimonitoring points include the branch current deviation method and node voltage deviation method. Among them, the node voltage deviation method does not consider SLGF, DLGF, and TLGF faults. Therefore, the proposed method is compared with the branch current deviation method.The branch current deviation method defines the current outflow node as the positive direction. The deviation current of the branch is calculated by Equation (3), and the priority is determined according to the magnitude of the deviation current, thus determining the direction of the voltage sag source. The primary SLGF on line L1¯2 is positioned, and the branch current deviation method is briefly described as an example.The deviation coefficients of all branch currents are calculated, as shown in Table4. It can be seen that, according to the priority, fault current flows through line L1¯2 from node 1 and through line L1¯2 from node 2. Therefore, it can be judged that SLGF occurs on line L1¯2.Table 4
Branch current deviation table.
LineNodeBranch current deviationNodeBranch current deviationL121A: 26.48842A: 20.5416B: -0.0009B: 0.0013C: 0.0033C: -0.0028L151A: 0.00075A: 0.0007B: 0.0004B: 0.0004C: 0.0000C: 0.0000……………L141313A: 0.000014A: 0.0000B: 0.0002B: 0.0002C: 0.0003C: 0.0003Based on the branch current deviation method, the samples used for the CNN test are located for the voltage sag source, and the positioning results are shown in Table5.Table 5
Location result.
Fault typeSLGFPPFDLGFTLGFAccuracy48.24%60.59%48.24%48.24%It can be seen from Table5 that the branch current deviation method is used to locate the voltage sag caused by SLGF, DLGF, and TLGF, and the positioning accuracy is 48.24%. The accuracy of voltage sag positioning caused by PPF is 60.29%, so there is a certain gap with the method proposed in this paper. Based on the analysis of the positioning results, this method is greatly affected by the position of the power source, and the fault near the power source generates a larger fault current, so it can be positioned more accurately. Besides, the fault current in the neutral arc suppression coil system is composed of the whole system capacitive current, so this method is not applicable to the neutral arc suppression coil grounded system.


## 5.1. Data Acquisition

To verify the CNN-based voltage sag source location method proposed in this paper, a large amount of data of voltage sag events are needed. Firstly, the IEEE14 node model is built in PSCAD/EMTDC, as shown in Figure5. Faults are set at each ten equal points of each line, including single line-to-ground fault (SLGF), phase-to-phase fault (PPF), double line-to-ground fault (DLGF), and three line-to-ground fault (TLGF). Ten uniform random numbers whose transition resistance is between 0 and 10 Ω are set at each fault point for simulation. Then, the sampling frequency of 5 kHz is used to record the voltage waveform of 14 nodes and the current waveform at both ends of 17 lines during each simulation.Figure 5
IEEE14 model.The recorded waveform data is input into MATLAB for processing. First of all, an FIR low-pass filter is designed to filter the collected data and retain the power frequency component. Secondly, the features mentioned in Section2 at both ends of each line are extracted to form a feature matrix of 5×34×3, and then, the corresponding label (label format is 5×34×3) is set. The 100 sample sets of each line are randomly divided into 80 training samples and 20 test samples, and the sample distribution is shown in Table 1.Table 1
Distribution of samples.
TypeSample sizeTraining setsTesting setsSLGF17001360340PPF17001360340DLGF17001360340TLGF17001360340


## 5.2. Model Evaluation Index

The indexes which are used to evaluate dichotomy problems mainly include accuracy rate, recall rate, F1 value index, ROC curve, etc. [23–26], but they are no longer fully applicable to the multiple classification problems appearing in this paper. Therefore, the accuracy rate and kappa coefficient [27–30] are intended to be used to evaluate the models used in this paper.The calculation formula of kappa is as follows:(25)K=P0−Pe1−Pe,(26)Pe=a1b1+a2b2+⋯+aibiN⋅N,where P0 represents the classification accuracy of samples, ai represents the number of samples of category, bi represents the number of samples predicted to be category i, and N represents the total number of samples.


## 5.3. Construction of the CNN Model

Based on TensorFlow, a deep learning framework developed by Google, CNN is built. The CNN consists of two convolutional sampling layers and three fully connected layers [31–36]. The first convolutional layer has 32 convolution kernels with a size of 2×5, the second convolutional layer has 64 convolution kernels with a size of 1×6, the convolution kernel of the sampling layer is 2×2, and the number of nodes in the middle layer of the fully connected layer is 1024. Among them, the activation function of the hidden layer is “RELU,” the activation function of the output layer is “SOFTMAX,” the convolution mode is “VALID,” and the sampling mode is “SAME.”The CNN which has been built is trained in batches, and 80 training samples are randomly trained in each batch. The weight is set as a normally distributed random number with a mean value of 0 and variance of 0.1, the bias is set as a constant of 0.1, the learning rate is set as 0.0001, and the number of training is set as 1000. Adam-Optimizer is selected to adaptively control the learning rate of each parameter in the network.


## 5.4. Single-Phase Ground Fault Analysis

The classification results of the voltage sag source caused by SLGF are analyzed, and only the classification results of other fault types are given. The change curve of the loss function value and the change curve of classification accuracy of the training set and test set are shown in Figure6.Figure 6
Training process: (a) loss function value curve and (b) accuracy rate curve.
(a)(b)Based on the obfuscation matrix, the evaluation index of the model is calculated, each column of the obfuscation matrix represents the predicted category, and each row represents the actual category. In this paper, there are 17 types of SLGF samples, so the dimension of the confusion matrix is17×17. To observe and draw the confusion matrix easily, as shown in Figure 7, the omitted parts are all correctly classified samples. Based on the confusion matrix, one sample of line L2¯3 (L2¯3 represents the line between node 2 and node 3) is misclassified as line L6¯13 by the classifier and two samples of line L¯4 as line L1¯2, and the samples of other lines can be correctly classified as the real category.Figure 7
Confusion matrix of classification results.The confusion matrix as shown in Figure7 can be drawn by using the K-nearest Neighbor (KNN) and Ensemble Learning Algorithm (EL) (the confusion matrix of the classification results of the comparison classifier is omitted here due to space limitation). The respective classification indexes can be calculated according to the confounding matrices of different classifiers, as shown in Table 2.Table 2
Classification indicator.
Classification algorithmClassification featureAccuracyKappaCNNCharacteristic matrix99.12%99.06%KNNCharacteristic matrix97.06%96.88%Disturbance power43.53%40.00%Equivalent impedance54.41%51.56%System slope51.76%48.75%Real part of current57.94%55.31%ELCharacteristic matrix87.94%87.19%Disturbance power40.29%36.56%Equivalent impedance57.06%54.38%System slope41.18%37.50%Real part of current32.94%28.75%The classification accuracy of CNN is 99.12% and the kappa coefficient is 99.06%, which are the highest among the three classifiers.


## 5.5. Other Short-Circuit Fault Analysis

The samples of PPF, DLGF, and TLGF are trained and classified by the same classification model. The training process of CNN is shown in Figure8, and the classification results are shown in Table 3.Figure 8
Training process: (a) phase-to-phase fault, (b) double line-to-ground fault, and (c) three line-to-ground fault.
(a)(b)(c)Table 3
Classification indicator.
Fault typeClassification algorithmClassification featureAccuracyKappaPPFCNNMultidimensional feature100.00%100.00%KNNMultidimensional feature83.24%82.19%Disturbance power88.53%87.81%Equivalent impedance76.18%74.69%System slope82.35%81.25%Real part of current82.35%81.25%ELMultidimensional feature64.12%61.88%Disturbance power64.41%62.19%Equivalent impedance64.12%61.88%System slope64.71%62.50%Real part of current64.71%62.50%DLGFCNNMultidimensional feature100.00%100.00%KNNMultidimensional feature90.59%90.00%Disturbance power93.24%92.81%Equivalent impedance82.35%81.25%System slope89.41%88.75%Real part of current81.18%80.00%ELMultidimensional feature63.82%61.56%%Disturbance power58.82%56.25%Equivalent impedance64.41%62.19%System slope64.12%61.88%Real part of current64.41%62.19%TLGFCNNMultidimensional feature100%100%KNNMultidimensional feature97.65%97.50%Disturbance power79.12%77.81%Equivalent impedance80.00%78.75%System slope31.18%90.63%Real part of current76.76%75.31%ELMultidimensional feature64.12%61.88%Disturbance power35.29%31.25%Equivalent impedance35.29%31.25%System slope47.06%43.75%Real part of current64.12%61.88%It can be seen that, when the voltage sag sources caused by different fault types are classified based on single transient characteristics, the classification accuracy of voltage sag sources caused by different fault types is seriously affected by different feature selections, different classifiers, and different fault types. The classification accuracy of KNN and EL is improved based on multidimensional features, but it cannot meet the requirements. Regardless of the voltage sag events caused by any type of fault, CNN can be used to accurately classify based on the multidimensional feature matrix, and the classification accuracy is up to 100%.


## 5.6. Comparison with Existing Methods

The proposed method is based on multipoint monitoring data and can be used to identify voltage sag sources in loop and radiation networks. The existing voltage sag source positioning methods based on multimonitoring points include the branch current deviation method and node voltage deviation method. Among them, the node voltage deviation method does not consider SLGF, DLGF, and TLGF faults. Therefore, the proposed method is compared with the branch current deviation method.The branch current deviation method defines the current outflow node as the positive direction. The deviation current of the branch is calculated by Equation (3), and the priority is determined according to the magnitude of the deviation current, thus determining the direction of the voltage sag source. The primary SLGF on line L1¯2 is positioned, and the branch current deviation method is briefly described as an example.The deviation coefficients of all branch currents are calculated, as shown in Table4. It can be seen that, according to the priority, fault current flows through line L1¯2 from node 1 and through line L1¯2 from node 2. Therefore, it can be judged that SLGF occurs on line L1¯2.Table 4
Branch current deviation table.
LineNodeBranch current deviationNodeBranch current deviationL121A: 26.48842A: 20.5416B: -0.0009B: 0.0013C: 0.0033C: -0.0028L151A: 0.00075A: 0.0007B: 0.0004B: 0.0004C: 0.0000C: 0.0000……………L141313A: 0.000014A: 0.0000B: 0.0002B: 0.0002C: 0.0003C: 0.0003Based on the branch current deviation method, the samples used for the CNN test are located for the voltage sag source, and the positioning results are shown in Table5.Table 5
Location result.
Fault typeSLGFPPFDLGFTLGFAccuracy48.24%60.59%48.24%48.24%It can be seen from Table5 that the branch current deviation method is used to locate the voltage sag caused by SLGF, DLGF, and TLGF, and the positioning accuracy is 48.24%. The accuracy of voltage sag positioning caused by PPF is 60.29%, so there is a certain gap with the method proposed in this paper. Based on the analysis of the positioning results, this method is greatly affected by the position of the power source, and the fault near the power source generates a larger fault current, so it can be positioned more accurately. Besides, the fault current in the neutral arc suppression coil system is composed of the whole system capacitive current, so this method is not applicable to the neutral arc suppression coil grounded system.


## 6. Conclusion

In summary, the voltage sag source location method based on the multidimensional characteristic matrix proposed in this paper can accurately locate the voltage sag caused by different fault types. Compared with the traditional voltage sag source location method based on multipoint monitoring data, it has higher accuracy and is more suitable for the voltage sag source location in the loop network.In this paper, a locating method of the voltage sag source based on the multidimensional feature matrix was proposed; then, a multidimensional feature matrix was constructed by extracting the disturbance power and disturbance energy, the real part of equivalent impedance, the slope of system trajectory, and the real part of the current at both ends of the whole network line, and then, CNN was used to realize the voltage sag source. The IEEE14 node model was built in PSCAD\EMTDC, and a large number of waveform data obtained by simulation under different fault types was adopted to verify the proposed method in this paper, and then, it was compared with the branch current deviation method. The simulation results show that the proposed method could accurately identify the location of voltage sag sources under different fault types, and the accuracy was higher than that of traditional methods.



---

*Source: 6656564-2021-03-22.xml*