Power distribution network fault classification method, terminal equipment and storage medium
A dual-branch Transformer-based neural network model enhances fault classification in distribution networks by extracting channel and time series features, addressing the challenges of noise and nonlinearities in existing methods, improving accuracy and reducing manual analysis time.
Patent Information
- Application Number
- CN202411100601.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-27
AI Technical Summary
Existing fault classification methods in distribution networks face challenges in accuracy and versatility due to reliance on manual feature extraction techniques and sensitivity to data noise, especially for complex or nonlinear fault characteristics, and lack of effective handling of long-term dependencies in fault recording data.
A dual-branch Transformer encoder-based neural network model for fault classification that extracts both channel and time series features using position encoding and self-attention mechanisms, enabling parallel processing and cross-attention for enhanced feature fusion.
Improves fault classification accuracy and generalization by effectively capturing complex fault features, reducing manual analysis time, and ensuring stable power grid operation.
Smart Images

Figure CN119202883A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of distribution network fault recording data fault classification, in particular to a distribution network fault classification method, terminal equipment and storage medium. Background Art
[0002] With the in-depth promotion of the concept of energy Internet, intelligence and globalization have become the core orientation of the development of my country's power network, which will inevitably promote the standard of power grid reliability to a new height. In view of the continuous expansion of my country's power grid scale, and the dual drive of industrial prosperity and scientific and technological progress, the demand for electricity in various fields of the national economy has surged, and advanced equipment and technology have been widely integrated into every corner of production and life. Although these devices have excellent performance and high efficiency, they have put forward more stringent requirements on power quality, prompting power users to place higher expectations on power supply stability and power quality.
[0003] The distribution network, as the "nerve endings" of power transmission, has short lines, complex branches, complex and changeable operating environment, and high maintenance difficulty. Therefore, it has become a frequent fault area, posing a severe challenge to power supply reliability. In addition, it is directly facing end users, with limited power supply capacity and susceptible to interference from various factors, and the problem of power quality cannot be ignored. For power grids with ungrounded neutral points, the generator or the equipment connected to the generator end has different sizes of ground capacitance. When a single-phase grounding fault occurs, the current flowing through these ground capacitances will reach several amperes or tens of amperes, which is easy to form intermittent arcs at the fault location. This intermittent arc light is extremely potential safety hazard and may cause resonance of the line and generate overvoltage, which will seriously damage the internal structure of the generator and may further develop into a phase-to-phase short circuit and cause accidents in a larger range. The neutral point of the generator can effectively reduce the current flowing through the ground capacitance during a grounding fault by arc suppression coil or high-resistance grounding, but it is difficult to directly distinguish the grounding fault from the phase current information. It is necessary to monitor the zero-sequence voltage at the substation and distinguish it by the zero-sequence voltage. The faults that often occur in the distribution network also include intermittent faults. Intermittent faults will cause intermittent discharges, and arcs will be generated during discharge. This intermittent fault has certain instantaneous and repeatable characteristics. The time interval between each fault will gradually increase, from a few seconds to a few minutes, and then to a few hours and days, so there is no pattern to follow. In order to quickly locate the fault, early technicians used fault indicators. The development of fault indicators has gone through the development process from overcurrent to remote signaling and recording. When facilities and equipment fail, the fault recording device can automatically record various characteristic parameters of the system. This device is generally not turned on in a safe situation, and will only be triggered when the power grid fails or oscillates. Under normal circumstances, the fault recording device can accurately record the entire process of electrical parameter changes before and after the fault. The data recorded by the recording device provides a scientific basis for analyzing system accidents and troubleshooting. By analyzing the data, the power outage time can be effectively shortened, the power supply reliability of the distribution network can be improved, and the safe operation of the power grid can be guaranteed.
[0004] With the rapid development of artificial intelligence algorithms, distribution network status monitoring and fault identification by detecting recorded data has gradually become a new research direction. Early methods of fault identification based on fault recorded data still rely on manually designed feature extraction techniques, such as time-frequency analysis, differential equation method, wavelet transform and other methods. These methods have different effects on recorded data with different data characteristics and are not versatile enough. The data comparison fault identification method based on FDTW can also achieve waveform matching of data homologous channels after sampling frequency conversion, waveform consistency alignment and other steps, so as to determine the fault type. However, the comparison-based method is sensitive to data noise and difficult to capture complex or nonlinear fault characteristics. With the rise of machine learning, methods for fault feature identification using feature extraction neural networks are also constantly being updated. For example, the classification method based on ResNet18 network learns the complex nonlinear characteristics of fault events to identify the fault type results. The Hilbert-Huang transform is first used to preprocess the data. After ResNet18, the data can identify the subdivided single-phase grounding fault type. ResNet mainly uses convolution operations, which are suitable for local feature extraction, but perform poorly in capturing long-term dependencies. The method based on the fault defect text of power equipment uses BERT to convert the text into a vector, and then obtains global semantic information through a bidirectional long short-term memory network (BI-LSTM), and then uses a fully connected neural network for classification. This method targets text information. Although BERT and BI-LSTM perform well in text understanding, due to the sequential processing characteristics of BI-LSTM, it is difficult to parallelize the calculation for time series data such as fault recording data. In order to extract more time-related information from multivariate time series data such as fault recording data, Transformer shines in the task of multivariate time series classification. The Transformer structure is good at capturing long-term dependencies, and the entire sequence can be processed in parallel during training to improve training efficiency. For example, the Gated Transformer Networks (GTN) network uses a dual-tower Transformer structure. Two groups of Transformer encoders extract channel features and time series features respectively, and finally combine the structures of the two encoders for classification. The GTN is proposed for the generalized multivariate time series classification problem, lacks specific settings for fault recording data classification, does not add position encoding for channel information, and does not fully extract channel and time series features. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a distribution network fault classification method, terminal equipment and storage medium to improve the accuracy and versatility of fault classification in view of the deficiencies in the prior art.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: a distribution network fault classification method, comprising the following steps:
[0007] S1. Collect fault recording data from the power distribution network, pre-process the fault recording data to obtain pre-processed data; and classify the pre-processed data to obtain data labeling results;
[0008] S2. Inputting the training data set into the data classification model, training the data classification model, and obtaining a classification model; wherein the training data set includes the preprocessed data and the corresponding data annotation results;
[0009] The data classification model includes a coding layer, a feature extraction layer, a feature fusion layer and a classification layer connected in sequence; the feature extraction layer includes two parallel branches, each branch includes N cascaded Transformer encoders; the two branches are respectively used to extract the temporal features and channel features of the encoded data output by the coding layer.
[0010] The present invention can automatically classify fault data into the categories to which the labeled data belongs, reducing the time for manual observation and analysis, and is conducive to ensuring the stable operation of the power grid. In addition, the present invention can identify a wide range of fault types and has excellent generalization performance.
[0011] The method of the present invention further comprises:
[0012] S3. Input the data to be classified into the classification model to determine the category to which the data to be classified belongs.
[0013] In step S1, the specific process of obtaining the preprocessed data includes: calculating the zero-sequence voltage and zero-sequence current corresponding to each moment of the fault recording data, converting the zero-sequence voltage and zero-sequence current to obtain a time step coding input matrix, transposing the time step coding matrix to obtain a channel feature input matrix, standardizing the time step coding matrix and the channel feature input matrix, and performing data enhancement on the standardized matrix to obtain preprocessed data.
[0014] Encoded data X in The calculation formula is: in =X·W+b; where X is the channel feature input matrix M T and the time step encoding matrix M, W is the weight in the linear encoding layer, and b is the bias term in the linear encoding layer.
[0015] The two parallel branches are respectively a channel feature extraction branch and a timing feature extraction branch.
[0016] There are two encoding methods for the position encoding of the encoding layer. For the input of the channel feature extraction branch, the pre-processing method of position encoding is expressed as follows: in, where p i () represents the position code of channel i, k1 is Integers within It is the dimension of the input data after passing through the encoding layer. i increases from 1 to the number of channels C. For each channel and each dimension, the position encoding needs to be calculated. For even dimensions, the sine function is used for calculation, and for odd dimensions, the cosine function is used for calculation. For the input of the temporal feature extraction branch, the position encoding pre-processing method is expressed as:
[0017] Where L is the length of the time series, p t () represents the position encoding of time step t, k2 is Integers within It is the dimension of the input data after passing through the encoding layer. t increases from 1 to the maximum length of the time step L. For each time step and each dimension, the position code needs to be calculated. For even dimensions, the sine function is used for calculation, and for odd dimensions, the cosine function is used for calculation.
[0018] The output of the channel feature extraction branch is added to the encoded data to obtain a first addition result; the temporal feature extraction branch is added to the encoded data to obtain a second addition result;
[0019] The first addition result and the second addition result are inputs of the channel feature extraction branch and the timing feature extraction branch respectively.
[0020] The Transformer encoder includes a multi-head self-attention layer, a first residual connection block, a first normalization layer, a feedforward layer, a second residual connection block and a second normalization layer connected in sequence; wherein the first residual connection block adds the input and the input of the multi-head attention layer, and the first normalization layer processes the output data of the first residual connection block; the second residual connection block adds the output of the feedforward layer and the output of the first normalization layer, and the second normalization layer processes the output of the second residual connection block.
[0021] The attention score output of the multi-head attention mechanism of the channel feature extraction branch on the h-th attention head is expressed as:
[0022]
[0023] where z n represents the nth attention score in the input data obtained, are the parameters of the h-th attention head, αn,j is a softmax calculation result, x n and x j Respectively represent the nth data and the jth data, d model1 is the dimension after encoding the linear coding layer data, and C is the number of channels;
[0024] The attention score output of the multi-head attention mechanism of the temporal feature extraction branch on a certain attention head is expressed as:
[0025]
[0026] Among them, d model2 is the dimension of the input data after the encoding layer, w n-j is a position-based bias term.
[0027] The i-th data y output by the normalization layer i The calculation formula is: R i is the i-th data output by the residual connection block, μ is the mean of the data output by the residual connection block, σ 2 is the variance of the data output by the residual connection block, γ and β are trainable parameters, and ε is a very small positive number to ensure that the denominator is not 0.
[0028] As an inventive concept, the present invention also provides a terminal device, including a memory, a processor, and a computer program stored in the memory; the processor executes the computer program to implement the steps of the above method.
[0029] As an inventive concept, the present invention also provides a computer-readable storage medium having a computer program / instruction stored thereon; the computer program / instruction implements the steps of the above method when executed by a processor.
[0030] Compared with the prior art, the present invention has the following beneficial effects:
[0031] 1) The present invention can extract effective fault features from the original data of distribution network recording for accurate fault classification, with high training efficiency and accurate classification results;
[0032] 2) The present invention uses a neural network model to identify data features and classify them, and can automatically classify data into multiple categories. Unlike algorithms that model a certain feature alone, the classification generalization is high;
[0033] 3) The present invention uses a dual-branch Transformer for feature extraction, which achieves the simultaneous acquisition of channel features and time series features of the data. These two features are indispensable for the fault recording classification task, and the accuracy of the classification task is significantly improved through the deep fusion of the two features;
[0034] 4) The present invention uses different position encoding methods and self-attention mechanisms for channel feature branches and time series feature branches. Different position encoding methods and attention mechanisms can adapt to different input data formats and feature extraction tasks, improve the model's ability to model the concept of time in time series, and are also beneficial for distinguishing different channels and identifying different phase faults;
[0035] 5) The present invention adopts the feature fusion method of cross-attention to ensure the full fusion of time series features and channel features, which significantly improves the model's ability to understand complex cross-features and helps identify complex fault features;
[0036] 6) The present invention adopts the Transformer structure for training, and processes the entire sequence in parallel during training, which can effectively improve the training efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 This is a flow chart of a method according to an embodiment of the present invention;
[0038] Figure 2 is a data preprocessing flow chart of an embodiment of the present invention;
[0039] Figure 3 This is a model architecture diagram of an embodiment of the present invention. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] Example 1
[0042] like Figure 1 As shown, this embodiment provides a distribution network fault classification method based on distribution network line fault recording data, comprising the following steps:
[0043] S1. Collect fault recording data from a real power distribution network, preprocess the sample data to obtain preprocessed data; label the preprocessed data by category to obtain data labeling results;
[0044] S2. Construct training and test data sets based on the preprocessed data and the corresponding data annotation results;
[0045] S3. Build a dual Transformer encoder data classification model, input the training data set into the data classification model until the model converges, and obtain a trained data classification optimization model;
[0046] S4. Based on the trained data classification optimization model, the data to be classified is classified and the category to which the data to be classified belongs is determined.
[0047] Attached Figure 1 The following is a flow chart of each module of an embodiment of the present invention.
[0048] In step S1, fault data is collected in a real distribution network environment, and the data involved in fault classification (phase A voltage, phase B voltage, phase C voltage, phase A current, phase B current, phase C current) is intercepted using a Python script. The redundant data is removed, and the zero-sequence voltage and zero-sequence current corresponding to each moment are calculated. The calculation method is 3U0=U A +U B +U C ,3I0=I A +I B +I C , where U0 and I0 represent the calculated zero-sequence voltage and current respectively, U A , U B , U C ,I A ,I B ,I C They are the voltage and current of phases ABC at that moment. Then they are converted to obtain the time step encoding input matrix M, which includes L rows, where L represents the number of time steps. There are 8 columns in total, and the elements of each column are phase A voltage, phase B voltage, phase C voltage, phase A current, phase B current, phase C current, zero-sequence voltage and zero-sequence current at that moment. Then transpose the matrix M to obtain the channel feature extraction input matrix M T. Z-score normalization is used to ensure that both matrices have zero mean and unit variance to improve the performance of the model and the stability of training. Then, time offset and scaling methods are used for data enhancement. Unique hot encoding is used to convert the fault classification labels into numerical representations suitable for model training. The data has three major categories: neutral point ungrounded fault, neutral point grounded fault through resistor, and neutral point grounded fault through arc suppression coil. The first and second major categories are subdivided into metallic grounding fault, low resistance grounding fault, high resistance grounding fault, and arc grounding fault. The third major category is subdivided into metallic grounding fault, low resistance grounding fault, and high resistance grounding fault. In summary, all fault types marked in the data are: metallic grounding fault of each phase in the system with ungrounded neutral point, small resistance grounding fault of each phase in the system with ungrounded neutral point, high resistance grounding fault of each phase in the system with ungrounded neutral point, arc grounding fault of each phase in the system with ungrounded neutral point, metallic grounding fault of each phase in the system with resistance through neutral point, small resistance grounding fault of each phase in the system with resistance through neutral point, high resistance grounding fault of each phase in the system with resistance through neutral point, arc grounding fault of each phase in the system with resistance through neutral point, metallic grounding fault of each phase in the system with arc suppression coil through neutral point, small resistance grounding fault of each phase in the system with arc suppression coil through neutral point and high resistance grounding fault of each phase in the system with arc suppression coil through neutral point, where "each phase" means phase A, phase B or phase C. The data preprocessing flow chart is as follows: Figure 2 shown.
[0049] In step S2, a training data set is obtained based on the registered preprocessed data and its annotation results.
[0050] In step S3, the specific structure of the constructed dual-branch Transformer encoder data classification model is: encoding layer, feature extraction layer, feature fusion layer, classification layer. This example uses an actual data with 8 channels and 4000 time steps to illustrate the method flow. Figure 3 This is an example of the overall model architecture.
[0051] The inputs of the two encoding layers corresponding to the dual branches are channel matrix data and time series matrix data, respectively. The input fault recording data is encoded into the dimension that conforms to the input of the Transformer encoder through the linear layer. In this embodiment, the input channel matrix data is set to be fault recording data with 8 channels and 4000 time steps, then the channel matrix M T The size is [8, 4000], and the size of the time series matrix M is [4000, 8]. After the linear layer calculation, the channel matrix M T The 4000 data of the matrix is mapped to a size of 256, that is, the data size output by the linear layer is [8, 256], and the size of the time series matrix M is mapped to [4000, 64].
[0052] In step S3, after linear encoding, the position encoding is calculated and added to the linearly encoded input data to obtain the input of the feature extraction branch. For the linearly encoded channel feature data, absolute position encoding is used. For the i-th channel and dimension d model1 The position encoding is calculated as follows:
[0053]
[0054] In the calculation, k1 is in the range Integer within 2k1, 2k1 is an even number, and the calculation of the even dimension uses the sine function, 2k1+1 is an odd number, and the calculation of the odd dimension uses the cosine function, i correspondingly increases from 1 to the maximum number of channels C. In this embodiment, C is 8. In this way, a position code is calculated for each dimension and each time step; d model1 is the dimension of the input data after passing through the encoding layer. In this embodiment, d model1 is 256; parameter This is to ensure that different locations have different position codes.
[0055] In the temporal feature extraction branch, absolute position encoding is also used. In view of the particularity of temporal feature extraction, for the tth time step and dimension d model2 The position encoding is calculated as follows:
[0056]
[0057] Where L is the length of the time series, and t correspondingly increases gradually from 1 to the maximum time step L. In this embodiment, L is 4000, d model2 is 64. k2 is in the range An integer in the range 0 to 1. The positional encoding can be better used to distinguish different time steps in the sequence. After calculating the positional encoding, it is added to the linearly encoded data to obtain the input of the feature extraction branch. Finally, the input size of the channel feature extraction layer is [8, 256], and the input size of the temporal feature extraction layer is [4000, 64]. The encoder in the channel feature extraction layer uses the self-attention mechanism of the original Transformer encoder. The attention score output of the attention mechanism on the hth attention head is expressed as:
[0058]
[0059] where z n Represents the attention score of the nth input data. are the parameters of the h-th attention head, α n,j is a softmax calculation result, is the dimension of the model input, in this example, is 256, C is the number of channels, and C is 8.
[0060] On the other hand, the multi-head self-attention mechanism of the temporal feature extraction branch incorporates the relative position encoding method, which enables the model to adapt to the input sequence position during training. The calculation formula of the original self-attention mechanism is changed to:
[0061]
[0062] Among them, a new term w is introduced n-j , which is a position-based bias term used to enhance the sensitivity of the attention mechanism to relative positions. In this example, L is 4000, is 64.
[0063] In step S3, in a Transformer encoder block, the self-attention module is followed by the first residual connection and the first normalization layer. The first normalization layer is followed by a feed-forward layer, followed by the second residual connection block and the second normalization layer. The second residual connection adds the output of the previous normalization layer to the output of the feed-forward layer. Assuming that the output of the residual connection layer is z, the calculation formula of the normalization layer is:
[0064]
[0065] Among them, z n is the nth data of input z, μ is the mean of input data z, σ 2 is the variance of the input data z, and γ and β are trainable parameters. In this example, after passing through the first residual connection and normalization layer, the data dimensions of the channel feature extraction branch and the temporal feature extraction branch are [8, 256], [4000, 64]. The feedforward layer consists of a linear layer, an activation function (ReLU), and a linear layer. In the channel branch, the linear layer first maps the data to 1024 dimensions, and then maps it to 256 dimensions after passing through the activation layer. The output then passes through the second residual connection and normalization layer, and the final output data dimension is [8, 256]. In the temporal branch, the linear layer first maps the data to 1024 dimensions, and then maps it to 64 dimensions after passing through the activation layer. The output then passes through the second residual connection and normalization layer, and the final output data dimension is [4000, 64].
[0066] The output after passing through N Transformer encoders enters the feature fusion module. Since the dimension of the output of the temporal feature branch is lower than that of the channel feature branch, before the temporal feature is input into the cross-attention module, the dimension of the temporal feature is changed using a linear layer so that the dimension of the temporal feature and the dimension of the channel feature are consistent for cross-attention calculation. In this example, the dimension of the temporal feature after passing through the linear layer is [4000, 256], and it is fused with the channel feature [8, 256]. The attention calculation method of the feature fusion module is:
[0067]
[0068] Among them, z n represents the obtained nth attention score, corresponding to x n ,q n , k n Represent the nth data of value, query and key respectively. In this example, in the first feature fusion cross-attention module, the query is a temporal feature, and both the key and value are channel features; in the second feature fusion cross-attention module, the query is a channel feature, and both the key and value are temporal features. W v , W Q , W K They are the parameters on the attention head, α n,j is a softmax calculation result. The right side of the equation is the softmax calculation method. k is the scaling factor, in this example it is 64. L is the sequence length, in this example, L is 4000 in the first cross-attention module and L is 8 in the second cross-attention module.
[0069] The two fused features are concatenated and passed through the linear layer and the softmax layer to obtain the classification probability. The model is trained using the cross entropy loss until the model converges. The cross entropy loss function is:
[0070]
[0071] Where p is the number of input samples, q is the number of classification categories. In this embodiment, q is 33, and y is j,c is the true label of sample j belonging to category c, p j,c It is the probability that the model in the present invention predicts that sample j belongs to category c. This loss function can better regulate the model to converge in the direction of correct classification.
[0072] Example 2
[0073] Embodiment 2 of the present invention provides a terminal device corresponding to the above-mentioned embodiment 1. The terminal device may be a processing device for a client, such as a mobile phone, a laptop computer, a tablet computer, a desktop computer, etc., to execute the method of the above-mentioned embodiment.
[0074] The terminal device of this embodiment includes a memory, a processor, and a computer program stored in the memory; the processor executes the computer program in the memory to implement the steps of the method in the above-mentioned embodiment 1.
[0075] In some implementations, the memory may be a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory.
[0076] In some other implementations, the processor may be a central processing unit (CPU), a digital signal processor (DSP), or other general-purpose processors of various types, which are not limited herein.
[0077] Example 3
[0078] Embodiment 3 of the present invention provides a computer-readable storage medium corresponding to the above embodiment 1, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the method of the above embodiment 1 are implemented.
[0079] Computer readable storage media can be tangible devices that hold and store instructions used by instruction execution devices. Computer readable storage media can be, for example, but not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any combination thereof.
[0080] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0081] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0082] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0083] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0084] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A distribution network fault classification method, characterized in that: The following steps are involved: S1. Collect fault recording data from the power distribution network, pre-process the fault recording data, and obtain pre-processed data; Perform category labeling on the preprocessed data to obtain data labeling results; S2. Inputting the training data set into the data classification model, training the data classification model, and obtaining a classification model; Wherein, the training data set includes preprocessed data and corresponding data annotation results; The data classification model includes a coding layer, a feature extraction layer, a feature fusion layer and a classification layer connected in sequence; the feature extraction layer includes two parallel branches, each branch includes N cascaded Transformer encoders; the two branches are respectively used to extract the temporal features and channel features of the encoded data output by the coding layer.
2. The distribution network fault classification method according to claim 1, characterized in that: Also includes: S3. Input the data to be classified into the classification model to determine the category to which the data to be classified belongs.
3. The distribution network fault classification method according to claim 1, characterized in that: In step S1, the specific process of obtaining the preprocessed data includes: calculating the zero-sequence voltage and zero-sequence current corresponding to each moment of the fault recording data, converting the zero-sequence voltage and zero-sequence current to obtain a time step coding input matrix, transposing the time step coding matrix to obtain a channel feature input matrix, standardizing the time step coding matrix and the channel feature input matrix, and performing data enhancement on the standardized matrix to obtain preprocessed data.
4. The distribution network fault classification method according to claim 3, characterized in that: Encoded data X in The calculation formula is: ii =X·W+b; where X is the channel feature input matrix M T and the time step encoding matrix M, W is the weight of the encoding layer, and b is the bias term of the encoding layer.
5. The distribution network fault classification method according to claim 1, characterized in that: There are two encoding methods for the position encoding of the encoding layer. For the input of the channel feature extraction branch, the pre-processing method of position encoding is expressed as follows: in, where p i () represents the position code of channel i, k1 is Integers within It is the dimension of the input data after passing through the encoding layer, i increases from 1 to the number of channels C; for the input of the temporal feature extraction branch, the position encoding pre-processing method is expressed as: Where L is the length of the time series, p t () represents the position encoding of time step t, k2 is Integers within It is the dimension of the input data after passing through the encoding layer, t increases from 1 to the maximum length of the time step L; The first position coding mode of the coding layer is added to the encoded channel feature input data to obtain a first addition result; the second position coding mode of the coding layer is added to the encoded time series feature input data to obtain a second addition result; The first addition result and the second addition result are inputs of the channel feature extraction branch and the timing feature extraction branch respectively.
6. The distribution network fault classification method according to claim 1, characterized in that: The Transformer encoder includes a multi-head self-attention layer, a first residual connection block, a first normalization layer, a feedforward layer, a second residual connection block and a second normalization layer connected in sequence; wherein the first residual connection block adds the input and output of the multi-head attention layer, and the first normalization layer processes the output data of the first residual connection block; the second residual connection block adds the output of the feedforward layer and the output of the first normalization layer, and the second normalization layer processes the output of the second residual connection block.
7. The distribution network fault classification method according to claim 6, characterized in that: The attention score output of the multi-head attention mechanism of the channel feature extraction branch on the h-th attention head is expressed as: where z n represents the nth attention score in the input data obtained, are the parameters of the h-th attention head, α n,j is a softmax calculation result, x n and x j Respectively represent the nth data and the jth data, d model1 is the dimension after encoding the linear coding layer data, and C is the number of channels; The attention score output of the multi-head attention mechanism of the temporal feature extraction branch on a certain attention head is expressed as: Among them, d model2 is the dimension of the input data after the encoding layer, w n-j is a position-based bias term.
8. The distribution network fault classification method according to claim 6, characterized in that: The i-th data y output by the normalization layer i The calculation formula is: R i is the i-th data output by the residual connection block, μ is the mean of the data output by the residual connection block, σ 2 is the variance of the data output by the residual connection block, γ and β are trainable parameters, and ε is a positive number.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory; characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program / instruction stored thereon; characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Traction motor turn-to-turn short circuit fault detection method and device, medium and equipment
CN120595106A
Coal mine electrical leakage protection method, apparatus and device based on electrical leakage fault identification model, and program
WO2026208149A1