Electric leakage fault detection method for low-voltage distribution area containing photovoltaic power supply

Through the dual-current attention residual convolutional neural network model, the problem of leakage fault detection in low-voltage station area of ​​photovoltaic system is solved, and high accuracy and stability are achieved, which is better than traditional methods.

CN119001320APending Publication Date: 2024-11-22HONGHE POWER SUPPLY BUREAU OF YUNNAN POWER GRID
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411092597.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The prior art is difficult to effectively detect leakage faults in low-voltage stages in photovoltaic systems, especially when high-frequency harmonic components and parasitic capacitance increase, traditional methods are not applicable.

Method used

Using a dual-current attention residual convolution neural network method, a feature data set is constructed by collecting and preprocessing the current data in the low-voltage distribution station area, and using the improved residual structure dual-current convolution neural network model for training to achieve Identification of leakage fault types.

Benefits of technology

It improves the accuracy and stability of leakage fault detection, enhances the anti-interference ability, and can identify various types of load failures at an accuracy rate of more than 99.25%, which is better than traditional convolutional or recurrent neural network methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119001320A_ABST
    Figure CN119001320A_ABST
Patent Text Reader

Abstract

The invention relates to an electric leakage fault detection method for a low-voltage distribution area containing a photovoltaic power supply, and belongs to the technical field of photovoltaic electric leakage detection of low-voltage distribution areas. The method comprises the following steps: firstly, collecting current data of a low-voltage power distribution area containing a photovoltaic power supply, analyzing a leakage fault principle of a low-voltage system containing the photovoltaic power supply, and obtaining residual current of various fault types and residual current variation; then constructing a feature data set; constructing a low-voltage distribution area electric leakage fault detection model containing a photovoltaic power supply; and finally, obtaining an electric leakage fault type of the low-voltage power distribution area containing the photovoltaic power supply by using the electric leakage fault detection model of the low-voltage power distribution area containing the photovoltaic power supply. A simulation model verifies that the fault detection accuracy and stability of the method are higher, and the anti-interference capability is stronger.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of photovoltaic leakage detection in low-voltage distribution areas, and relates to a leakage fault detection method for a low-voltage distribution area containing a photovoltaic power supply, and specifically to a leakage fault detection method for a low-voltage distribution area containing a photovoltaic power supply based on a dual-stream attention residual convolutional neural network. Background Art

[0002] As global energy demand continues to rise, environmental issues are becoming increasingly prominent. Under the background of "dual carbon", my country has vigorously promoted the development and utilization of new energy and promoted the development of clean energy. Photovoltaic power generation, as an important renewable energy technology, is widely used in the field of power generation due to its environmental protection and sustainable characteristics. It has become an important support for my country's energy structure adjustment and green development. However, the power electronic equipment in the photovoltaic system is connected to the grid with traditional loads, making the operating environment of the distribution system more complicated. At present, many photovoltaic power sources are directly connected to the distribution network without effective electrical isolation. Due to the parasitic capacitance between the photovoltaic system and the earth, leakage current is generated, affecting the stable operation of the power grid.

[0003] At present, there are many studies on leakage fault detection, and the traditional methods include adaptive threshold method, symmetrical component method, phase and amplitude detection method, cluster analysis, etc. These methods have good detection accuracy for single-phase faults and leakage faults, but photovoltaic leakage will bring high-frequency harmonic components to the power grid, and as the parasitic capacitance increases, the residual current will also increase. The traditional methods are not suitable for detecting photovoltaic leakage faults.

[0004] Therefore, how to overcome the shortcomings of the existing technology is an urgent problem to be solved in the field of photovoltaic leakage detection technology in low-voltage areas. Summary of the invention

[0005] The purpose of the present invention is to solve the deficiencies of the prior art and provide a method for detecting leakage faults in a low-voltage distribution station area containing a photovoltaic power source.

[0006] To achieve the above purpose, the technical solution adopted by the present invention is as follows:

[0007] A method for detecting leakage faults in a low-voltage distribution area containing a photovoltaic power source comprises the following steps:

[0008] Step (1), collecting current data of a low-voltage distribution station area containing a photovoltaic power source, analyzing the principle of leakage fault of a low-voltage system containing a photovoltaic power source, and obtaining residual currents and residual current changes of various fault types; the fault types include normal, distributed capacitance leakage fault, ground leakage fault and common mode leakage fault;

[0009] Step (2), labeling the acquired residual current and residual current variation with corresponding fault type labels, preprocessing the residual current and residual current variation data, and then segmenting the labeled residual current and residual current variation using a sliding time window to construct a feature data set;

[0010] Step (3), taking the fault type as output, and taking the preprocessed residual current and residual current change corresponding to the fault type as input, training the two-stream convolutional neural network model based on the improved residual structure, and performing testing and verification to obtain a leakage fault detection model for a low-voltage distribution area containing a photovoltaic power source;

[0011] Step (4) collects leakage fault current data in real time, obtains residual current and residual current change, and uses a leakage fault detection model for a low-voltage distribution station area containing photovoltaic power sources to obtain the leakage fault type of the low-voltage distribution station area containing photovoltaic power sources.

[0012] Further, preferably, the specific method of step (1) is:

[0013] (1.1) When there is no leakage fault in the power grid and load, the residual current in the low-voltage distribution station area for:

[0014]

[0015] Where: and They are leakage current, repetitive ground current and common mode current;

[0016]

[0017] Where: Z NLine is the zero line impedance, is the three-phase unbalanced current, Z RG is the repeated grounding resistance, Z SG is the neutral point to ground impedance;

[0018]

[0019] Where: C pv is the parasitic capacitance of the solar panel to the ground; The variation of common mode voltage over time;

[0020]

[0021] Where: The ground leakage current of phases A, B and C;

[0022] (1.2) Residual current after a leakage fault occurs in the low-voltage distribution area for:

[0023]

[0024] Where: is the fault leakage current; Affected by external power environment and The amount of change produced;

[0025] make Available

[0026] Among them, λ is an intermediate variable;

[0027] (1.3) Calculate the residual current and residual current change of various fault types:

[0028] 1) For distributed capacitance leakage fault, the residual current is expressed as:

[0029]

[0030] Its residual current deviation It is expressed as:

[0031]

[0032] 2) For earth leakage fault, the residual current is expressed as:

[0033]

[0034] Its residual current deviation It is expressed as:

[0035]

[0036] Where: It is the residual current under earth leakage fault;

[0037] 3) For common mode leakage fault, the residual current is expressed as:

[0038]

[0039] Its residual current deviation It is expressed as:

[0040]

[0041] Where: It is the residual current under common mode leakage fault.

[0042] Further, preferably, the specific method of step (2) is:

[0043] (2.1) Fault current data collection:

[0044] Label the residual current and residual current change data, label the corresponding fault type label, set the normal, distributed capacitance leakage fault, ground leakage fault and common mode leakage fault labels, and use 0, 1, 2 and 3 to represent them respectively;

[0045] (2.2) Data preprocessing:

[0046] The labeled residual current and residual current variation data are denoised using the wavelet transform denoising method, and then normalized to obtain the preprocessed data set;

[0047] (2.3) Data periodic segmentation based on sliding time window:

[0048] The preprocessed data set is segmented using a sliding time window to obtain a feature data set.

[0049] Furthermore, preferably, in step (2.2), the maximum-minimum normalization method is used for normalization processing.

[0050] Furthermore, preferably, in step (2.3), when a sliding time window is used for segmentation, the data interval length of the sliding window is 2000 sampling points.

[0051] Furthermore, preferably, in step (3), the samples of the feature data set are divided into a training set, a validation set and a test set in a ratio of 7:1:2.

[0052] Furthermore, preferably, in step (3), the two-stream convolutional neural network model based on the improved residual structure includes a bidirectional parallel convolutional neural network module; the convolutional neural network module includes a residual network layer and an LSTM network layer of a fused CBAM connected sequentially; the outputs of the two LSTM network layers are connected to the input of the fully connected layer, and the output of the fully connected layer is connected to the Softmax layer.

[0053] Furthermore, it is preferred that attention in both spatial and channel dimensions be included in CBAM.

[0054] Furthermore, preferably, the activation functions used in the two-stream convolutional neural network model based on the improved residual structure are all GELU activation functions.

[0055] Furthermore, preferably, during model training, the preprocessed residual current and residual current variation corresponding to the fault type are used as inputs of two convolutional neural network modules, respectively, and the fault type is used as output for training.

[0056] In the present invention (1.3), the residual current deviation method is used to quantitatively analyze the influence of the residual current disturbance factor on the residual current; because when the line insulation is good, the insulation resistance of the line to the ground is close to infinity, so in the analysis of the present invention, the normal leakage current of the line to the ground is regarded as a capacitive current, and the fault current is a resistive current. Based on the vector relationship between the two, three residual current variation models of fault types are constructed, namely, a normal leakage current variation mathematical model, a repeated grounding current variation mathematical model, and a common mode current and its variation mathematical model; wherein, the common mode current is formed by the common mode voltage in the loop composed of the inverter, the parasitic capacitance of the photovoltaic panel to the ground, the RLC filter and the low-voltage power grid; therefore, at this time:

[0057]

[0058] In the present invention, the training set is used for model building, and the classification model is trained by setting the classifier parameters. The validation set is used to adjust the model hyperparameters, predict the model, and select the hyperparameters corresponding to the best model. The model is predicted using the test set (new data that is completely independent of the training set and validation set) to measure the performance and classification ability of the model, and output the prediction results of the model. If the detection accuracy meets the requirements, the model is established. Otherwise, the training set, validation set and test set are continued to complete the process of model training, parameter tuning and prediction until the model achieves the desired effect.

[0059] The present invention designs a two-stream convolutional neural network that integrates a convolutional block attention module, such as Figure 3 As shown in the figure, the convolutional attention module is added to the branch feature extraction network to enhance the learning ability of key features in the image, avoid calculating redundant feature information, and improve the feature learning efficiency of the network.

[0060] For the same leakage fault data, the present invention adopts the residual network fused with convolutional attention module as the feature extraction network from both the spatial stream network and the temporal stream network; by forming an attention mechanism for the channel and spatial dimensions of the leakage current characteristics, the model's attention to the subject is strengthened and the redundant calculation of non-subject background information is reduced; finally, after both branch networks pass through the LSTM network layer, they are fused through the fully connected layer and then classified through the Softmax layer to obtain the corresponding fault type label.

[0061] The present invention aims at the problem that the residual current in the low-voltage distribution area containing photovoltaic power sources is affected by multiple factors, causing the normal leakage current to fluctuate, making it difficult to accurately identify the leakage current fault. First, the principle of leakage fault in the low-voltage system containing photovoltaic power sources is analyzed to lay the foundation for fault characteristic analysis and feature parameter extraction; secondly, by analyzing the leakage fault characteristics, a multi-dimensional fault feature vector and feature data set are constructed to provide data support for the input of the fault detection algorithm; finally, a leakage fault detection method for low-voltage distribution areas containing photovoltaic power sources based on a dual-stream attention residual convolutional neural network is proposed, and the proposed method is verified through a simulation model to have higher fault detection accuracy and stability, and stronger anti-interference ability.

[0062] Compared with the prior art, the present invention has the following beneficial effects:

[0063] Compared with the traditional method of using only convolution or recurrent neural network, the residual network and LSTM network combined with CBAM proposed in the present invention can extract richer features. In the residual convolution network, two groups of convolution blocks are used to form a residual block to improve the model performance. At the same time, batch normalization is used to reduce the gradient disappearance, accelerate the convergence speed, and also reduce the requirements for the learning rate.

[0064] The present invention adopts a residual network fused with CBAM to ensure the expressiveness of the model and accelerate convergence. The feature map enhanced by attention suppresses unimportant features and noise, thereby improving the accuracy of leakage recognition. The present invention only adopts two residual modules to reduce the number of model parameters while ensuring performance. At the same time, a two-layer LSTM network is used for further feature enhancement.

[0065] Through comparative analysis of examples, it is found that: the CNN algorithm has a poor effect on the identification of distributed capacitor leakage faults, only 89.37%; the CNN-LSTM algorithm has a poor identification effect on common mode leakage faults, only 96.75%; the ResNet18 algorithm has a poor identification effect on distributed capacitor leakage faults, only 92.15%; and the dual-stream attention residual convolutional neural network algorithm proposed in the present invention can achieve an accuracy rate of more than 99.25% in the identification of three faults and normal operation, achieving high-precision load identification of various categories. It is worth noting that both CNN and ResNet18 methods are convolutional networks, and both have the lowest accuracy rate in distributed capacitor leakage faults, and are misjudged as normal operation. CNN-LSTM and the dual-stream attention residual convolutional neural network proposed in the present invention can reach 100% in the identification of this type of faults. Both methods use LSTM networks, indicating that LSTM may be more able to extract the characteristics of distributed capacitor leakage faults, so that it can better identify distributed capacitor leakage faults. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1Flow chart for implementing the present invention;

[0067] Figure 2 This is the principle diagram of leakage fault of low voltage system including photovoltaic power source;

[0068] Figure 3 is the algorithm flow chart;

[0069] Figure 4 To improve the residual structure;

[0070] Figure 5 It is a CBAM unit structure;

[0071] Figure 6 It is the CBAM channel attention module;

[0072] Figure 7 It is the CBAM spatial attention module;

[0073] Figure 8 It is the LSTM unit structure;

[0074] Fig. 9 Feature extraction for different methods;

[0075] Fig.10 Confusion matrix for comparison algorithms. DETAILED DESCRIPTION

[0076] The present invention is further described in detail below in conjunction with embodiments.

[0077] Those skilled in the art will appreciate that the following examples are only used to illustrate the present invention and should not be considered to limit the scope of the present invention. If no specific techniques or conditions are specified in the examples, the techniques or conditions described in the literature in the art or the product specifications are used. If the manufacturer of the materials or equipment used is not specified, they are all conventional products that can be purchased.

[0078] like Figure 1 and Figure 3 As shown, a method for detecting leakage faults in a low-voltage distribution area containing a photovoltaic power source is characterized in that it includes the following steps:

[0079] Step (1) collects the current data of the low-voltage distribution station area containing photovoltaic power sources, and analyzes the leakage fault principle of the low-voltage system containing photovoltaic power sources. The leakage principle is as follows: Figure 2 , obtaining residual current and residual current variation of various fault types; the fault types include normal, distributed capacitance leakage fault, ground leakage fault and common mode leakage fault;

[0080] Step (2), labeling the acquired residual current and residual current variation with corresponding fault type labels, preprocessing the residual current and residual current variation data, and then segmenting the labeled residual current and residual current variation using a sliding time window to construct a feature data set;

[0081] Step (3), taking the fault type as output, and taking the preprocessed residual current and residual current change corresponding to the fault type as input, training the two-stream convolutional neural network model based on the improved residual structure, and performing testing and verification to obtain a leakage fault detection model for a low-voltage distribution area containing a photovoltaic power source;

[0082] Step (4) collects leakage fault current data in real time, obtains residual current and residual current change, and uses a leakage fault detection model for a low-voltage distribution station area containing photovoltaic power sources to obtain the leakage fault type of the low-voltage distribution station area containing photovoltaic power sources.

[0083] The specific method of step (1) is as follows:

[0084] (1.1) When there is no leakage fault in the power grid and load, the residual current in the low-voltage distribution station area for:

[0085]

[0086] Where: and They are leakage current, repetitive ground current and common mode current;

[0087]

[0088] Where: Z NLine is the zero line impedance, is the three-phase unbalanced current, Z RG is the repeated grounding resistance, Z SG is the neutral point to ground impedance;

[0089]

[0090] Where: C pv is the parasitic capacitance of the solar panel to the ground; The variation of common mode voltage over time;

[0091]

[0092] Where: The ground leakage current of phases A, B and C;

[0093] (1.2) Residual current after a leakage fault occurs in the low-voltage distribution area for:

[0094]

[0095] Where: is the fault leakage current; Affected by external power environment and The amount of change produced;

[0096] make Available

[0097]

[0098] Among them, λ is an intermediate variable;

[0099] (1.3) Calculate the residual current and residual current change of various fault types:

[0100] 1) For distributed capacitance leakage fault, the residual current is expressed as:

[0101]

[0102] Its residual current deviation It is expressed as:

[0103]

[0104] 2) For earth leakage fault, the residual current is expressed as:

[0105]

[0106] Its residual current deviation It is expressed as:

[0107]

[0108] Where: It is the residual current under the ground leakage fault;

[0109] 3) For common mode leakage fault, the residual current is expressed as:

[0110]

[0111] Its residual current deviation It is expressed as:

[0112]

[0113] Where: It is the residual current under common mode leakage fault.

[0114] The specific method of step (2) is:

[0115] (2.1) Fault current data collection:

[0116] Label the residual current and residual current change data, label the corresponding fault type label, set the normal, distributed capacitance leakage fault, ground leakage fault and common mode leakage fault labels, and use 0, 1, 2 and 3 to represent them respectively;

[0117] (2.2) Data preprocessing:

[0118] The labeled residual current and residual current variation data are denoised using the wavelet transform denoising method, and then normalized to obtain the preprocessed data set;

[0119] (2.3) Data periodic segmentation based on sliding time window:

[0120] The preprocessed data set is segmented using a sliding time window to obtain a feature data set.

[0121] In step (2.2), the maximum-minimum normalization method is used for normalization.

[0122] In step (2.3), when the sliding time window is used for segmentation, the data interval length of the sliding window is 2000 sampling points.

[0123] In step (3), the samples of the feature data set are divided into a training set, a validation set, and a test set in a ratio of 7:1:2.

[0124] In step (3), the two-stream convolutional neural network model based on the improved residual structure includes a bidirectional parallel convolutional neural network module; the convolutional neural network module includes a residual network layer and an LSTM network layer of a fused CBAM connected sequentially; the outputs of the two LSTM network layers are connected to the input of the fully connected layer, and the output of the fully connected layer is connected to the Softmax layer.

[0125] CBAM includes attention in both spatial and channel dimensions.

[0126] The activation function used in the two-stream convolutional neural network model based on the improved residual structure is the GELU activation function.

[0127] When training the model, the preprocessed residual current and residual current change corresponding to the fault type are used as the input of the two convolutional neural network modules, and the fault type is used as the output for training.

[0128] (1) Convolutional network model based on improved residual structure

[0129] Since deep networks are prone to gradient vanishing and gradient exploding problems, the present invention is designed to use an improved residual structure to optimize convolutional networks. Ordinary residual structures generally have two operation branches: x and F(x). However, it is difficult to let one layer of the network learn the constant mapping function H(x)=x. Therefore, the present invention designs the network as a natural constant mapping H(x)=x+F(x), that is, H(x)-x=F(x). If the network is already optimal with the current number of layers, then the next layer of the network is changed, and F(x) will be equal to 0, realizing the constant mapping of H(x)=x. Therefore, the performance of the network will not decrease with the increase in the number of layers, but will remain in the optimal state. The residual module structure is achieved through a shortcut connection with the feed-forward neural network. The structure of the improved residual module designed by the present invention is as follows Figure 4 shown.

[0130] F(x)=W2σ(W1x+b1)+b2……………………(Formula 8)

[0131] H(x)=F(x)+x……………………(Formula 9)

[0132] Where σ is the activation function, W1, W2, b1, b2 are learnable parameters;

[0133] (2) Two-stream network model based on convolutional attention improvement

[0134] The present invention uses a convolutional block attention module (CBAM) to improve the expression of features. The specific implementation of the CBAM module is as follows: Figure 5 shown.

[0135] In CBAM, the features first undergo maximum pooling and average pooling in the spatial dimension, and then the two features pass through two fully connected layers, representing the MLP perceptron. The first fully connected layer is used to reduce the amount of parameters, and the second fully connected layer restores the number of channels. Then, it is activated by the Sigmoid activation function to form attention in the channel field. Subsequently, pooling operations are performed on the channels to collect feature vectors, and then convolution operations are performed, and attention is formed in space through activation functions.

[0136] 1) CBAM channel attention mechanism

[0137] The channel attention module calculates the importance weights of different channels along the dimension of the feature channel to improve the model's attention to the most relevant feature channel of the current task. Its structure is as follows: Figure 6 As shown;

[0138] The calculation formula of the channel attention mechanism is:

[0139]

[0140] Where M c is the channel attention, F c avg is average pooling, F c max is the maximum pooling, W1 and W0 are learnable parameters;

[0141] 2) CBAM spatial attention mechanism

[0142] The spatial attention module calculates the importance weight of each position along the height and width dimensions of the feature map, enabling the model to focus on the most discernible areas in the input feature map. Its structure is as follows Figure 7 As shown;

[0143] The calculation formula is:

[0144]

[0145] Where M c is the channel attention, F c avg is the average pooling, F c max is the maximum pooling, W1 and W0 are learnable parameters;

[0146] 3) Research on two-stream convolution algorithm combined with LSTM recurrent neural network

[0147] In order to extract time series features, the present invention uses a long and short term memory (LSTM) network to form a part of the dual-stream network; the information of the LSTM is transmitted between different units in the hidden layer through several controllable gates, thereby controlling the memory and forgetting degree of the previous information and the current information. The network structure is as follows Figure 8 As shown;

[0148] The LSTM calculation formula is:

[0149] f t =sigmoid(W f x t +U f h t-1 +b f )……………………(Formula 12)

[0150] i t =sigmoid(W i x t +U i h t-1 +b i )……………………(Formula 13)

[0151] o t =sigmoid(W o x t +U o h t-1 +b o )……………………(Formula 14)

[0152] c t =f t ·c t-1 +i t tanh(W c x t +U c h t-1 +b c )……………………(Formula 15)

[0153] h t =o t ·tanh(c t )……………………(Formula 16)

[0154] Where W f , W i , W c and W o is the input weight, b f 、b i 、b c and b o is the bias weight, t represents the current time state, t-1 represents the previous time state, X represents the input, H represents the output, and C represents the unit state.

[0155] Application Examples

[0156] In order to verify the correctness and superiority of the leakage fault detection method for low-voltage distribution station area containing photovoltaic power supply based on dual-stream attention residual convolutional neural network proposed in the present invention, a simulation experiment was established for comparison and analysis.

[0157] Step 1: Experimental Setup

[0158] In the experiment established by the present invention, the number of samples comes from laboratory simulation, with a total of 6790 groups. The initial learning rate (learning rate, lr) of the spatial stream network is set to 0.001. When iterating to 200epoch and 300epoch, each learning rate decays to one tenth of the previous one. The initial learning rate of the temporal stream network is 0.00, and it decays to one tenth of the previous one when iterating 300epoch and 450epoch, respectively. In addition to using the pre-training parameter initialization and data enhancement methods, the Dropout mechanism is used to randomly discard features to prevent the network from relying on the training data features and suppress overfitting. The Dropout of the spatial stream network is set to 0.9, and that of the temporal stream network is 0.8.

[0159] The experiment was conducted on a computer equipped with an AMD Ryzen 7 5800H@3.2GHz processor, a GeForce RTX 3060 graphics card, 16GB RAM, running Windows 11 64-bit, and using the PYTORCH environment. MatlabSimulink was used to establish a leakage fault model for a photovoltaic low-voltage distribution network system. The Simulink sampling interval was 0.0001s, and the length of each set of data after the control variable was 3s. The fault model was connected through the BREAK module at 1s, and the grid voltage was 220V / 50Hz.

[0160] Table 1 LSTM hyperparameters

[0161] Hyperparameters scope Numeric Input Layer [16,32,64] 64 Learning Rate [0.001,0.000 1,0.000 01] 0.000 1 Num layers [1,2,4] 2 Hidden Layer [16,32,64] 64 Noise level [0.001,0.01,0.1] 0.01 alpha [0.001,0.01,0.1] 0.01

[0162] Table 2 Residual network parameters

[0163]

[0164] Step 2: Construct evaluation indicators

[0165] In order to comprehensively evaluate the experimental results, the present invention adopts the macro average F1 value (F macro ), Precision and Recall. The F1 value is the harmonic average of Precision and Recall, where Precision is the accuracy and Recall is the proportion of positive examples that the model can correctly predict to the total number of positive examples. macro The calculation formula is as follows:

[0166]

[0167] Where M is the leakage category.

[0168] The F1 value can be calculated by Precision and Recall:

[0169]

[0170] In the formula, TP is true positive, FP is false positive, and FN is false negative.

[0171] The present invention introduces the Hamming Score. The smaller the Hamming loss value, the better the performance of the learning algorithm:

[0172]

[0173] In the formula, n is the number of samples, L is the number of label categories, y is the actual category label, is the predicted category label.

[0174] Step 3: Model performance analysis

[0175] 1) Analysis of the effectiveness of the attention mechanism

[0176] To verify the effectiveness of the algorithm, the present invention selects 75% of the data as the training set and 25% of the data as the test set for comparative experiments. The experimental results before and after the attention mechanism is added are shown in Table 3.

[0177] Table 3 Analysis of CBAM attention effect

[0178] parameter <![CDATA[F1 macro ]]> recall precision Hamming Score TS 0.9949 0.9950 0.9949 0.0025 TS-CBAM 0.9956 0.9956 0.9956 0.0022

[0179] As shown in Table 2, TS is a two-stream convolutional network without attention mechanism, and TS-CBAM is a two-stream convolutional network with attention mechanism. After adding attention mechanism, fault recognition F1 macro , recall, precision, and Hamming Score are all improved, with better classification performance, which verifies that the algorithm model proposed in the present invention can effectively enhance the characteristics of different faults.

[0180] Different fault characteristics such as Fig. 9 As shown. Fig. 9 ,There are obvious differences in the characteristics of the residual convolution method of the fused CBAM for normal, distributed capacitance leakage fault, ground leakage fault, and common mode leakage fault, while the characteristics of the residual convolution method for ground leakage fault and common mode leakage fault are relatively similar, which may make it difficult to distinguish between ground leakage fault and common mode leakage fault.

[0181] In summary, from Table 3 and Fig. 9 It can be seen that the fusion of convolutional attention module can effectively improve the learning ability of the basic feature extraction network for the key features of leakage fault current, and greatly improve the overall recognition accuracy.

[0182] 2) Comparative experiment

[0183] In order to verify the superiority of the method proposed in the present invention, the present invention selects 75% of the data from the simulation data as the training set and 25% of the data as the test set, and compares the proposed method with ExtraTrees, GBDT, CNN, CNN-LSTM and ResNet18 methods. The results of leakage recognition of different algorithms are shown in Table 4.

[0184] Table 4 Performance comparison of different algorithms

[0185] algorithm <![CDATA[F1 macro ]]> recall precision Hamming Score Extra Trees 0.5085 0.5277 0.6092 0.2351 GBDT 0.5622 0.5721 0.6897 0.1988 CNN 0.9673 0.9672 0.9696 0.01630 CNN-LSTM 0.9862 0.9863 0.9865 0.0069 ResNet18 0.9774 0.9773 0.9788 0.0113 Methods 0.9956 0.9956 0.9956 0.0022

[0186] As shown in Table 4, the photovoltaic leakage fault detection algorithm based on the dual-stream attention residual convolutional neural network proposed in the present invention has the best leakage recognition performance, F1 macro , recall, precision, and Hamming Score are 0.9956, 0.9956, 0.9956, and 0.0022, respectively. At the same time, it can be seen that the F1 macro The values ​​are only 0.5085 and 0.5622 respectively. The recognition effects of different leakage faults are worse than those of CNN, CNN-LSTM, ResNet18 and the dual-stream attention residual convolutional neural network proposed in the present invention, indicating that traditional machine learning methods cannot accurately identify leakage faults.

[0187] The confusion matrix of different algorithms is as follows Fig.10 As shown by Fig.10 It can be seen that the CNN algorithm has a poor effect in identifying distributed capacitor leakage faults, only 89.37%; the CNN-LSTM algorithm has a poor recognition effect on common mode leakage faults, only 96.75%; the ResNet18 algorithm has a poor recognition effect on distributed capacitor leakage faults, only 92.15%; and the dual-stream attention residual convolutional neural network algorithm proposed in the present invention can achieve an accuracy rate of more than 99.25% in the recognition of three faults and normal operation, achieving high-precision load identification of various categories. It is worth noting that both CNN and ResNet18 methods are convolutional networks, and both have the lowest accuracy rate in distributed capacitor leakage faults, and are misjudged as normal operation. CNN-LSTM and the dual-stream attention residual convolutional neural network proposed in the present invention can reach 100% in the recognition of this type of faults. Both methods use LSTM networks, indicating that LSTM may be more able to extract the characteristics of distributed capacitor leakage faults, so that it can better identify distributed capacitor leakage faults.

[0188] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A method for detecting leakage faults in a low-voltage distribution area containing a photovoltaic power source, characterized in that: The steps include: Step (1), collecting current data of a low-voltage distribution station area containing a photovoltaic power source, analyzing the principle of leakage fault of a low-voltage system containing a photovoltaic power source, and obtaining residual currents and residual current changes of various fault types; the fault types include normal, distributed capacitance leakage fault, ground leakage fault and common mode leakage fault; Step (2), labeling the acquired residual current and residual current variation with corresponding fault type labels, preprocessing the residual current and residual current variation data, and then segmenting the labeled residual current and residual current variation using a sliding time window to construct a feature data set; Step (3), taking the fault type as output, and taking the preprocessed residual current and residual current change corresponding to the fault type as input, training the two-stream convolutional neural network model based on the improved residual structure, and performing testing and verification to obtain a leakage fault detection model for a low-voltage distribution area containing a photovoltaic power source; Step (4) collects leakage fault current data in real time, obtains residual current and residual current change, and uses a leakage fault detection model for a low-voltage distribution station area containing photovoltaic power sources to obtain the leakage fault type of the low-voltage distribution station area containing photovoltaic power sources.

2. The method for detecting leakage faults in a low-voltage distribution area containing a photovoltaic power source according to claim 1 is characterized in that: The specific method of step (1) is: (1.1) When there is no leakage fault in the power grid and load, the residual current in the low-voltage distribution station area for: Where: and They are leakage current, repetitive ground current and common mode current; Where: Z NLine is the zero line impedance, is the three-phase unbalanced current, Z RG is the repeated grounding resistance, Z SG is the neutral point to ground impedance; Where: C pv is the parasitic capacitance of the solar panel to the ground; The variation of common mode voltage over time; Where: The ground leakage current of phases A, B and C; (1.2) Residual current after a leakage fault occurs in the low-voltage distribution area for: Where: is the fault leakage current; Affected by external power environment and The amount of change produced; make Available Among them, λ is an intermediate variable; (1.3) Calculate the residual current and residual current change of various fault types: 1) For distributed capacitance leakage fault, the residual current is expressed as: Its residual current deviation It is expressed as: 2) For earth leakage fault, the residual current is expressed as: Its residual current deviation It is expressed as: Where: It is the residual current under the ground leakage fault; 3) For common mode leakage fault, the residual current is expressed as: Its residual current deviation It is expressed as: Where: It is the residual current under common mode leakage fault.

3. The method for detecting leakage faults in a low-voltage distribution area containing a photovoltaic power source according to claim 1, characterized in that: The specific method of step (2) is: (2.1) Fault current data collection: The residual current and residual current change data are labeled with corresponding fault type labels, and the labels of normal, distributed capacitance leakage fault, ground leakage fault and common mode leakage fault are set, which are represented by 0, 1, 2 and 3 respectively; (2.2) Data preprocessing: The labeled residual current and residual current variation data are denoised using the wavelet transform denoising method, and then normalized to obtain a preprocessed data set; (2.3) Data periodic segmentation based on sliding time window: The preprocessed data set is segmented using a sliding time window to obtain a feature data set.

4. The method for detecting leakage faults in a low-voltage distribution area containing a photovoltaic power source according to claim 3 is characterized in that: In step (2.2), the maximum-minimum normalization method is used for normalization.

5. The method for detecting leakage faults in a low-voltage distribution area containing a photovoltaic power source according to claim 3, characterized in that: In step (2.3), when the sliding time window is used for segmentation, the data interval length of the sliding window is 2000 sampling points.

6. The method for detecting leakage faults in a low-voltage distribution area containing a photovoltaic power source according to claim 1, characterized in that: In step (3), the samples of the feature data set are divided into a training set, a validation set, and a test set in a ratio of 7:1:

2.

7. The method for detecting leakage faults in a low-voltage distribution area containing a photovoltaic power source according to claim 1, characterized in that: In step (3), the two-stream convolutional neural network model based on the improved residual structure includes a bidirectional parallel convolutional neural network module; the convolutional neural network module includes a residual network layer and an LSTM network layer connected sequentially with a CBAM fusion; the outputs of the two LSTM network layers are connected to the input of the fully connected layer, and the output of the fully connected layer is connected to the Softmax layer.

8. The method for detecting leakage faults in a low-voltage distribution area containing a photovoltaic power source according to claim 7, characterized in that: CBAM includes attention in both spatial and channel dimensions.

9. The method for detecting leakage faults in a low-voltage distribution area containing a photovoltaic power source according to claim 7, characterized in that: The activation function used in the two-stream convolutional neural network model based on the improved residual structure is the GELU activation function.

10. The method for detecting leakage faults in a low-voltage distribution area containing a photovoltaic power source according to claim 7, characterized in that: When training the model, the preprocessed residual current and residual current change corresponding to the fault type are used as the input of the two convolutional neural network modules, and the fault type is used as the output for training.

Citation Information

Cited By

  • Integrated power supply system state detection method based on multi-modal information fusion

    CN121117755A

  • Integrated power supply system state detection method based on multi-modal information fusion

    CN121117755B