A power transmission line fault identification method and system for small samples and unbalanced samples

CN123012759APending Publication Date: 2026-10-30SHANGHAI UNIVERSITY OF ELECTRIC POWER
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611096753.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

然而,该方法的多分类模型在处理多类故障辨识时,各类别之间共享同一组网络参数,类别间可能存在相互干扰;该方案虽然引入了Smote过采样处理少数类样本,但Smote仅通过线性插值生成新样本,难以充分拟合故障数据中存在的非线性分布特征

Benefits of technology

1、本发明通过采用一对多策略将多分类任务分解为多个独立的二分类子任务,并为每一故障类别分别构建独立的生成对抗网络,使各二分类判别器仅需专注于单一故障类别的判别,结合焦点损失函数在训练中为正类样本分配高于负类样本的损失权重,有效抑制了样本稀缺和类别不均衡对辨识精度的偏置影响,实现了在故障样本稀缺且类别不平衡条件下对输电线路故障类型的准确辨识。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012759A_ABST
    Figure CN123012759A_ABST
Patent Text Reader

Abstract

The application discloses a power transmission line fault identification method and system for small samples and unbalanced samples, and the method comprises the following steps: acquiring three-phase voltage and three-phase current time series data before and after faults at both ends of a power transmission line and rearranging the data into a two-dimensional matrix; decomposing a fault multi-classification task into multiple binary classification sub-tasks corresponding to different fault categories; constructing a generative adversarial network comprising a generator and a binary classification discriminator for each fault category; alternately training each generative adversarial network using the two-dimensional matrix; adopting a focal loss function for the discriminator to assign a higher loss weight to positive samples than to negative samples during training; inputting to be identified samples into the trained discriminators corresponding to each fault category; and taking the category corresponding to the maximum output probability as the final identification result. Compared with the prior art, the application realizes accurate identification of power transmission line fault types under the condition of scarce fault samples and unbalanced categories.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system relay protection and automation technology, and in particular to a method and system for identifying transmission line faults for small sample and unbalanced sample data. Background Technology

[0002] As the core transmission channel of the power system, the safe and reliable operation of transmission lines is a crucial foundation for ensuring the safe and stable operation of the power system. However, due to the wide geographical distribution, large area spanning multiple regions, and complex and variable operating environment of transmission lines, they are susceptible to severe natural environments and external events such as lightning strikes, icing, wildfires, wind deflection, and external damage, leading to various types of faults during operation. Timely and accurate identification of the cause and type of fault is of great significance for guiding protection and safety automatic devices to quickly isolate faults, restore subsequent power supply, reduce line outage time, and ensure the stable operation of the power system.

[0003] The fundamental tasks of transmission line fault identification include fault detection and fault classification. Existing classical identification methods are mainly based on traveling wave ranging and fault waveform analysis, extracting features of voltage and current waveforms in the time or frequency domains to achieve fault discrimination. Building upon this, researchers have further developed traditional machine learning methods such as support vector machines and decision trees based on manual feature engineering, as well as deep learning methods based on convolutional neural networks (CNNs). However, the performance of traditional deep learning methods is highly dependent on the quantity and quality of a large number of labeled samples, their network structure design is complex, and hyperparameter tuning heavily relies on human experience. Furthermore, obtaining fault samples in actual engineering is difficult, and the sample distribution among different fault types is extremely uneven, making model training prone to bias towards the majority class of faults, resulting in low accuracy in identifying less frequent fault types, and severely insufficient generalization ability under small sample conditions.

[0004] In recent years, deep learning technology has gradually emerged in the field of transmission line fault identification. Deep learning models, especially convolutional neural networks, have advantages such as automatically extracting hierarchical features, eliminating the need for manual feature design, and high computational efficiency. Existing research has combined transfer learning with AlexNet to generate unbalanced fault sample sets through simulation, achieving fault identification of transmission lines under unbalanced sample conditions. However, this method still has limited ability to identify rare faults and does not fully consider the generalization problem caused by differences in different line parameters. Some studies have proposed fault identification algorithms that combine transfer learning with improved YOLOv8s and designed a source domain sample selection module based on sample correlation to improve the recognition effect of small samples. However, this method is mainly geared towards image data, has insufficient adaptability to electrical quantity time-series features, and has a relatively complex model structure. Another study combines variational autoencoders (VAEs) with generative adversarial networks (GANs), using hidden layer features of the GAN discriminator to replace the pixel-wise mean square error to improve the realism of generated samples. However, this method focuses on the quality of image generation, and its discriminator is only used to distinguish between generated samples and real samples. The output discrimination results are not directly used for fault category classification, and its loss function design revolves around the realism of image generation, without addressing the optimization of classification loss under class imbalance conditions in fault identification tasks.

[0005] A search revealed Chinese Patent Publication No. CN117272143A, which discloses a method for identifying transmission line faults based on Gram angle field and residual network. This method acquires three-phase fault waveform data from the secondary side of the transmission line, converts one-dimensional time-series data into a two-dimensional color image based on Gram angle field, utilizes a multi-objective residual network to achieve simultaneous multi-output identification of fault type and cause, and employs Smote oversampling to process minority class samples to alleviate class imbalance. However, when handling multi-class fault identification, the multi-class model of this method shares the same set of network parameters among different classes, potentially leading to mutual interference. Although the scheme introduces Smote oversampling to process minority class samples, Smote only generates new samples through linear interpolation, making it difficult to fully fit the nonlinear distribution characteristics present in the fault data.

[0006] Therefore, how to accurately identify the fault type of transmission lines under the conditions of scarce fault samples and class imbalance is a technical problem that needs to be solved. Summary of the Invention

[0007] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and system for identifying transmission line faults with small and unbalanced samples.

[0008] The objective of this invention can be achieved through the following technical solutions: According to a first aspect of the present invention, a method for identifying transmission line faults using small sample and unbalanced sample data is provided, comprising: Acquire the three-phase voltage and three-phase current time-series data before and after the fault at both ends of the transmission line, and rearrange the acquired time-series data into a two-dimensional matrix; The multi-classification task of transmission line faults is decomposed into multiple binary classification sub-tasks corresponding to different fault categories. For each fault category, a generative adversarial network is constructed, which includes a generator and a binary classifier. The binary classifier is used to output the probability that the input sample belongs to the corresponding fault category. The two-dimensional matrix is ​​used to perform alternating adversarial training on the generative adversarial network corresponding to each fault category. The binary class discriminator uses the focus loss function as part of the training loss function to assign a higher loss weight to positive class samples than to negative class samples during training. The time series data to be identified is input into the trained binary classifiers corresponding to each fault category. The probability of each classifier's output belonging to the corresponding fault category is obtained, and the fault category corresponding to the highest probability value is taken as the final identification result.

[0009] As a preferred technical solution, the acquired time-series data is rearranged into a two-dimensional matrix, specifically including: The three-phase voltage time series data and three-phase current time series data of the two ends before and after the fault of the transmission line are sampled at equal intervals. For each fault sample, the sampled time series data are arranged into a two-dimensional matrix according to each electrical quantity channel, so that the row direction of the two-dimensional matrix corresponds to the sampling time series and the column direction corresponds to each electrical quantity channel.

[0010] As a preferred technical solution, after the generative adversarial networks are trained, only the binary classifiers are retained to output the probability that the sample to be identified belongs to the corresponding fault category.

[0011] As a preferred technical solution, the expression for the focus loss function is: , in, This represents the model's predicted probability for the fault category. γ For focusing parameters; α ∈[0,1] is a balancing factor used to balance the weights of positive and negative class samples; For each binary class discriminator, its positive class samples are the samples of the fault category corresponding to that discriminator, and its negative class samples are the samples of all other fault categories and non-fault samples; in the training sample set, the total number of positive class samples is less than the total number of negative class samples.

[0012] As a preferred technical solution, the alternating adversarial training specifically includes: Fix the current binary class discriminator parameters and update the generator parameters so that the prediction results of the pseudo samples generated by the generator on the binary class discriminator are close to the positive class, so that the generator learns the sample distribution corresponding to the fault category; With the current generator parameters fixed, the binary class discriminator parameters are updated so that the output of the binary class discriminator for true positive samples approaches 1, and the output for true negative samples and pseudo samples approaches 0, while minimizing the focus loss function. Repeat the above alternating updates until the preset number of training rounds or the loss function converges.

[0013] As a preferred technical solution, the method further includes automatically searching for optimal training hyperparameters for the corresponding discriminator for each binary classification subtask: A preset hyperparameter search space is defined, which includes the focus parameter γ, the class balance factor α, the training rounds and the learning rate of the generative adversarial network in the focus loss function. Generative adversarial networks for each set of candidate hyperparameters are trained using a training subset, and a comprehensive score is calculated on a validation subset. The comprehensive score is a weighted sum of the F1 score and the balanced accuracy. The hyperparameter combination with the highest overall score is selected as the optimal hyperparameter configuration for this binary classification subtask. The binary classification subtasks corresponding to different fault categories adopt independent optimal hyperparameter configurations.

[0014] As a preferred technical solution, the two-dimensional matrix comes from the fault data of the source domain transmission line, and the time series data to be identified comes from the target domain transmission line. The source domain transmission line and the target domain transmission line are different transmission lines. After each of the binary classifiers is trained on the fault data of the source domain transmission line, it directly predicts the fault category of the time series data to be identified for the target domain transmission line using the trained parameters.

[0015] As a preferred technical solution, the binary classification discriminator is also used to generate a feature visualization image, specifically including: Extract the feature vectors of the fully connected layers in the binary classifier; The feature vectors are subjected to dimensionality reduction, reshaping, and normalization to generate a feature visualization image; The feature visualization image is used to characterize the degree of feature activation of the binary classifier in different regions of the two-dimensional matrix, so as to locate the key waveform segments and key electrical quantity channels on which the binary classifier makes fault category decisions. The different regions correspond to different sampling times or different electrical quantity channels.

[0016] As a preferred technical solution, the fault categories include single-phase ground fault, two-phase fault, two-phase ground fault, and three-phase fault.

[0017] According to a second aspect of the present invention, a system is provided for implementing the method for identifying transmission line faults using small samples and unbalanced samples, comprising: The data acquisition and preprocessing module is used to acquire the three-phase voltage and three-phase current time series data before and after the transmission line fault, and rearrange the acquired time series data into a two-dimensional matrix. The model building module decomposes the multi-classification task of transmission line fault types into multiple independent binary classification sub-tasks, and builds a generative adversarial network containing a generator and a binary classifier for each fault category. The training module uses the two-dimensional matrix to perform alternating adversarial training on the generative adversarial network corresponding to each fault category. The binary classifier uses the focal loss function as part of the training loss function to assign a higher loss weight to positive class samples than to negative class samples during training. The identification module is used to input the time series data to be identified into the trained binary classifiers corresponding to each fault category, obtain the probability of each classifier's output belonging to the corresponding fault category, and take the fault category corresponding to the maximum probability value as the final identification result.

[0018] Compared with the prior art, the present invention has the following advantages: 1. This invention decomposes a multi-classification task into multiple independent binary classification subtasks by employing a one-to-many strategy, and constructs an independent generative adversarial network for each fault category. This allows each binary classifier to focus only on the discrimination of a single fault category. By combining the focus loss function, positive class samples are assigned a higher loss weight than negative class samples during training, which effectively suppresses the bias effect of sample scarcity and class imbalance on identification accuracy. This enables accurate identification of transmission line fault types under the conditions of scarce fault samples and class imbalance.

[0019] 2. This invention introduces a focus loss function in the discriminator training process. By using a modulation factor, the loss contribution of easily classified negative samples is reduced, enabling the model to actively focus on difficult-to-classify minority positive samples during training. This effectively overcomes the problem of model bias towards the majority class caused by the imbalance of fault sample categories, and improves the sensitivity of rare fault types identification.

[0020] 3. The binary classifier of the present invention learns the essential distribution characteristics of fault categories by distinguishing between real samples and pseudo samples generated by the generator in the alternating adversarial training of generative adversarial networks. After training, only the binary classifier is retained as the final classifier, which avoids the problem of overfitting when the classifier is trained independently under small sample conditions, and saves model parameter storage and inference computing resources.

[0021] 4. After each binary classifier of the present invention is trained on the fault data of the source domain transmission line, it can directly predict the fault category of the time series data to be identified of the target domain transmission line using the trained parameters. There is no need to fine-tune the parameters or retrain on the target domain data, realizing direct transfer application across lines. It is suitable for application scenarios in actual engineering where the target line has no historical fault samples.

[0022] 5. This invention rearranges the three-phase voltage and three-phase current time-series data before and after a fault at both ends of a transmission line into a two-dimensional matrix. It can adapt to the input format of a convolutional neural network without complex signal processing, avoids the problem of insufficient manual feature extraction under small sample conditions, and simplifies the data preprocessing process. Attached Figure Description

[0023] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a topology diagram of the simulation model constructed in the embodiments of the present invention; Figure 3 These are feature heatmaps corresponding to the five operating states generated in this embodiment of the invention; Figure 4 This is a fault identification confusion matrix diagram obtained on the target domain test set in an embodiment of the present invention; Figure 5 This is a fault identification confusion matrix diagram of the ablation experiment of module GAN in this embodiment of the invention; Figure 6 This is a fault identification confusion matrix diagram of the ablation experiment of the Focal Loss module in this embodiment of the invention. Detailed Implementation

[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0025] Example 1: like Figure 1 As shown, the present invention provides a method for identifying transmission line faults using small sample and unbalanced sample data, comprising: Step S1: Obtain the three-phase voltage and three-phase current time series data before and after the fault at both ends of the transmission line, and rearrange the obtained time series data into a two-dimensional matrix.

[0026] Step S2: Decompose the multi-class identification task of transmission line fault types into multiple independent binary classification sub-tasks.

[0027] Step S3: Construct a generative adversarial network containing a generator and a binary classifier for each fault category. The binary classifier is used to output the probability that the input sample belongs to the corresponding fault category.

[0028] Step S4: Use the two-dimensional matrix to perform alternating adversarial training on the generative adversarial network corresponding to each fault category. The binary classifier uses the focal loss function as part of the training loss function to assign a higher loss weight to positive class samples than to negative class samples during training.

[0029] Step S5: Input the three-phase voltage and three-phase current time series data before and after the fault of the transmission line to be identified into the trained binary classifier corresponding to each fault category, obtain the probability of each classifier outputting the corresponding fault category, and take the fault category corresponding to the maximum probability value as the final identification result.

[0030] The following provides a detailed description of each step of the present invention: Step S101: Data acquisition and preprocessing.

[0031] Step S1011: Fault data acquisition.

[0032] In this step, time-series data before and after the fault are obtained from the secondary side of the transmission line. Specifically, three-phase voltage and three-phase current time-series data are collected at both ends of the transmission line (i.e., the beginning and end of the line) before and after the fault. The sampling interval is from one cycle before the fault to two cycles after the fault. The sampling frequency is determined according to the actual waveform recording device configuration. In this embodiment, the sampling frequency is 10kHz. Each sampling point records the instantaneous values ​​of the three-phase voltage and three-phase current at the beginning and end of the line, totaling 12 electrical quantity channels (first-end A-phase voltage, first-end A-phase current, first-end B-phase voltage, first-end B-phase current, first-end C-phase voltage, first-end C-phase current; end-end A-phase voltage, end-end A-phase current, end-end B-phase voltage, end-end B-phase current, end-end C-phase voltage, end-end C-phase current).

[0033] Suppose that the time-series data of a certain fault sample obtained from the collection is represented as follows: , Where T is the total number of sampling points, and each sampling point It is a 12-dimensional vector, corresponding to the sampled values ​​of the above 12 electrical quantity channels.

[0034] Step S1012: Data preprocessing.

[0035] The acquired one-dimensional time-series data is rearranged into a two-dimensional matrix. Specifically, for each fault sample, the sampled time-series data is arranged into a two-dimensional matrix according to each electrical quantity channel, where the rows of the two-dimensional matrix correspond to the sampled time series and the columns correspond to each electrical quantity channel.

[0036] Suppose that the time-series data of a certain fault sample has a dimension of T×12 (T sampling points, 12 electrical quantity channels), rearrange it into a two-dimensional matrix. Each row of the matrix represents the sampled values ​​of 12 electrical quantity channels at the same sampling time, and each column represents the timing waveform of the same electrical quantity channel at different sampling times.

[0037] The reason for rearranging one-dimensional time series data into a two-dimensional matrix is ​​that the two-dimensional matrix form can simultaneously retain the time dimension information of the time series data and the spatial correlation information between electrical quantity channels, so that the subsequent convolutional neural network can extract features in both the time dimension and the channel dimension at the same time. At the same time, the two-dimensional matrix form is compatible with the input format of the convolutional neural network, eliminating the need for additional feature extraction or transformation, and avoiding the problem of insufficient manual feature extraction under small sample conditions.

[0038] Samples of different fault categories are labeled according to fault type and compiled into a source domain sample set. Each sample contains a two-dimensional matrix and its corresponding fault category label. At the same time, a small amount of fault data of the target domain transmission lines is obtained and a target domain sample set is constructed using the same preprocessing method to simulate cross-line migration scenarios in actual applications.

[0039] Step S201: Decompose the fault identification task.

[0040] In multi-class classification tasks, especially when there are many fault categories and a severe imbalance in the number of samples per category, a single multi-classifier tends to favor the majority class, resulting in extremely low recognition rates for minority class faults. In this step, a "one-to-many" strategy is adopted to decompose the multi-class identification task of transmission line fault types into multiple independent binary classification sub-tasks. By decomposing the multi-class task into multiple independent binary classification sub-tasks, each binary classifier only needs to focus on distinguishing between those belonging to and not belonging to its class, avoiding mutual interference between categories in multi-class tasks. This allows each discriminator to focus more on learning the essential features of a single fault category.

[0041] The specific implementation of the "one-to-many" strategy is as follows: Assuming there are K types of transmission line faults (K is a positive integer greater than 1), K binary classification subtasks are constructed. The k-th binary classification subtask corresponds to the k-th fault category and is used to distinguish between faults belonging to the k-th category and those not belonging to the k-th category.

[0042] For a sample (M,y), where y∈{1,2,…,K} is the fault category label, its label is defined as follows in the k-th binary classification subtask: That is, when a sample belongs to the k-th type of fault, it is a positive sample; when a sample belongs to other fault categories or a non-fault state, it is a negative sample.

[0043] Step S301: Construct generative adversarial networks for each fault category.

[0044] Step S3011: Construct a GAN independently for each binary subtask.

[0045] The waveform characteristics of different fault categories differ significantly. For example, the waveforms of single-phase grounding faults and three-phase short-circuit faults are completely different, and their sample distributions are also different. If all categories share the same discriminator, the update of model parameters will be affected by samples from all categories simultaneously, leading to mutual interference between the features of each category. This invention constructs a dedicated Generative Adversarial Network (GAN) for each binary classification subtask. Each GAN contains a generator G and a binary classification discriminator D.

[0046] Let G be the generator for the k-th binary classification subtask. k The binary classifier is D. k The GANs for each subtask are independent of each other, meaning that the training of the k-th GAN only uses the positive and negative samples corresponding to the k-th subtask and is not affected by other subtasks.

[0047] Each category constructs a GAN independently, and each discriminator only needs to focus on learning the discrimination boundary between "belonging to this class" and "not belonging to this class" for a single fault category. There is no need to distinguish the differences between multiple different categories, which reduces the learning difficulty of each discriminator and enables it to achieve good discrimination performance even under small sample conditions.

[0048] Step S3012: Structure and function of the generator.

[0049] Generator G k A fully connected neural network or a network structure containing deconvolutional layers can be used. Its input is a random noise vector z (sampled from a Gaussian distribution), and its output is a pseudo-sample matrix with the same dimensions as the real two-dimensional matrix. The generator's goal is to learn the true distribution of the k-th class of fault samples through adversarial training, so that the generated pseudo-samples... Able to deceive the discriminator D k This makes it indistinguishable. Compared with real samples M .

[0050] In this embodiment, the generator network structure is set as follows: the input layer receives the concatenated noise vector and label information, the middle layer contains multiple fully connected layers or deconvolutional layers, the hidden layer uses the ReLU activation function, and the output layer uses the tanh activation function.

[0051] Step S3013: Structure and function of the binary classifier.

[0052] Binary Classification Discriminant D k This is a convolutional neural network whose input is a two-dimensional matrix (real samples or pseudo-samples generated by the generator), and whose output is the probability that the input sample belongs to the k-th type of fault. p ∈[0,1]. The goal of the discriminator is to accurately distinguish between real positive samples, real negative samples, and pseudo samples generated by the generator during adversarial training, while outputting the probability that the input sample belongs to the k-th type of fault.

[0053] The network structure of the binary classifier is set as follows: it contains multiple convolutional layers to extract waveform features of a two-dimensional matrix, followed by batch normalization layers and pooling layers, and finally a fully connected layer to map the extracted features into a scalar output. The output layer uses the Sigmoid activation function to output probability values.

[0054] During the adversarial training phase, the discriminator needs to distinguish whether the input sample is a real sample or a pseudo sample generated by the generator in order to drive the generator to learn the real data distribution. In the fault identification phase after training is completed, the discriminator directly acts as a classifier for the fault category and outputs the probability that the sample to be identified belongs to the fault category.

[0055] The reason for using the discriminator directly as the classifier is that during adversarial training, the discriminator is forced to learn the essential distribution characteristics of this type of fault sample by constantly distinguishing between real samples and pseudo samples generated by the generator. The features it extracts have high discriminative power. Directly reusing the discriminator as the classifier eliminates the need to train an independent classification model, saving training resources and avoiding the overfitting problem caused by insufficient training data under small sample conditions.

[0056] Step S401: Adversarial training and focus loss optimization.

[0057] Step S4011: Alternating adversarial training of the generative adversarial network The generative adversarial network corresponding to each binary classification subtask is trained alternately in adversarial fashion. The training process is as follows: (1) Fix the discriminator and update the generator: Fix the current binary classifier D k The parameters are updated to generate G. k The parameters of the generator are such that the optimization goal of the generator is to make the generated pseudo-samples... In discriminator D k The prediction results on the above tend to be positive, i.e., Dk( The optimization objective is to make the generator learn the true distribution of the k-th type of fault samples, and the generated pseudo samples become closer and closer to the real fault samples.

[0058] (2) Fix the generator and update the discriminator: Fix the current generator G k Update the parameters of the binary classifier D. k The parameters are such that the optimization objective of the discriminator is: the output of the discriminator approaches 1 for true positive samples and approaches 0 for true negative samples and pseudo samples.

[0059] The discriminator's loss function includes adversarial loss and focus classification loss.

[0060] (3) Alternate iteration: Repeat the above sub-steps (2) and (3) until the preset number of training rounds or the loss function converges.

[0061] Step S4012: Introduction of the focus loss function.

[0062] When training the binary classifier, the Focal Loss function is used as part of the training loss function. The expression for the Focal Loss function is: ,in, p t This represents the model's predicted probability for the fault category, when the sample's true label is positive. p t Take the positive class probability output by the model; when the true label is negative, p t Subtract the positive class probability from 1; γ For focusing parameters; α ∈[0,1] is a balancing factor used to balance the weights of positive and negative class samples.

[0063] For each binary class discriminator, the positive class samples are defined as the samples of the fault category corresponding to that discriminator, and the negative class samples are defined as the samples of all other fault categories plus non-fault samples. In actual transmission line operation, the number of positive class samples (specific fault types) is usually far less than the number of negative class samples (other fault types plus normal operating conditions), i.e., there is a serious class imbalance problem.

[0064] The total loss function of a binary classifier is defined as: , in, For the discriminator's adversarial loss, For the focus of loss, λλ is a weighting coefficient, and in this embodiment, λ is set to 1.0, which can be included in the automatic hyperparameter search range.

[0065] In traditional generative adversarial networks (GANs), the discriminator typically employs the standard cross-entropy loss function. However, in the scenario of power transmission line fault identification, there is a severe imbalance between positive and negative samples. When using the standard cross-entropy loss, the loss contribution of negative samples is far greater than that of positive samples, causing the discriminator to favor the negative class and resulting in extremely low accuracy in identifying positive faults. The focus loss function introduces a modulation factor... This problem has been solved for easily classifiable positive samples ( Approaching 1), As the value approaches zero, its contribution to loss is reduced; for hard-to-classify positive samples ( (close to 0) As the value approaches 1, its loss contribution is preserved. This allows the discriminator to actively focus on difficult-to-distinguish positive samples during training, rather than being dominated by a large number of easily classified negative samples. Simultaneously, the balance factor... α Higher weights can be assigned to positive samples to balance the loss contribution of positive and negative samples.

[0066] In a preferred embodiment, the automatic hyperparameter search is performed as follows: a hyperparameter search space is preset, which includes the focus parameter γ and the class balance factor α in the focus loss function, as well as the training epochs and learning rate of the generative adversarial network; the generative adversarial network is trained on 80% of the training subset of the source domain sample set under each set of candidate hyperparameters, and a comprehensive score is calculated on the remaining 20% ​​validation subset, where the comprehensive score is a weighted sum of the F1 score and the balance accuracy. , in, F The score is the harmonic mean of precision and recall. Balanced Accuracy To balance accuracy.

[0067] The combination of hyperparameters with the highest comprehensive score is selected as the optimal hyperparameter configuration for the binary classification subtask. The binary classification subtasks corresponding to different fault categories adopt independent optimal hyperparameter configurations.

[0068] Step S4013: Generate the specific training process for the adversarial network.

[0069] In a preferred implementation, the specific training process for the generative adversarial network is as follows: First, initialize the generator G. k And binary classifier D k The network parameters are set using a mini-batch training method, with the number of samples per batch iteration determined by the dataset size.

[0070] Secondly, for each training batch, execute in the following order: (1) Randomly sample a batch of positive class samples from the k-th type of fault samples, and randomly sample the same number of negative class samples from other fault categories and non-fault samples; (2) Generate a batch of random noise vectors and input them into the generator to generate pseudo samples; (3) Fix the generator parameters, input the real positive class samples, real negative class samples and pseudo samples into the discriminator respectively, calculate the discriminator loss, and update the discriminator parameters through backpropagation; (4) Fix the discriminator parameters, input the noise vector into the generator, calculate the generator loss, and update the generator parameters through backpropagation; (5) Repeat steps (1)-(4) until the preset number of training rounds or model convergence is reached.

[0071] During training, the optimization objective of the generator is to minimize the generator loss, and the optimization objective of the discriminator is to minimize the discriminator loss. Both the generator and discriminator use the Adam optimizer, whose built-in adaptive learning rate mechanism dynamically adjusts the learning rate of each parameter based on the first and second moments of the gradient. The initial learning rate is set to 1e-4.

[0072] Step S501: Target domain migration and fault identification.

[0073] Step S5011: Source domain training and direct transfer to the target domain In practical engineering applications, when a new transmission line is put into operation, there are often no historical fault samples on that line available for model training or fine-tuning. If conventional transfer learning methods are used, fine-tuning still requires some labeled samples from the target domain, which is often not feasible in engineering practice.

[0074] In this invention, after each binary classifier is trained on the fault data of the source domain transmission lines, it directly uses the trained parameters to predict the fault category of the time-series data of the target domain transmission lines without needing to fine-tune the parameters or retrain on the fault data of the target domain transmission lines. The source domain transmission lines and the target domain transmission lines are different transmission lines, meaning they differ in line length, voltage level, line parameters, etc.

[0075] This invention employs a one-to-many independent discriminator architecture, where each discriminator only needs to learn the "yes / no" discrimination boundary for a single fault category. The extracted features have stronger generalization and cross-line adaptability, and can be directly deployed on target domain lines without fine-tuning.

[0076] After each generative adversarial network is trained, the generator no longer participates in the fault identification process, and only retains each binary classifier for outputting the fault category probability of the sample to be identified.

[0077] Step S5012: Fault identification.

[0078] The three-phase voltage and three-phase current time-series data before and after the transmission line fault to be identified are rearranged into a two-dimensional matrix in the same manner as in step S1, and then input into the trained binary classifiers D1, D2, ..., D corresponding to each fault category. K .

[0079] Each discriminator D K Output a probability value pk ∈[0,1] represents the probability that the input sample belongs to the k-th type of fault. The final identification result is the category with the highest probability value: .

[0080] Step S5013: Generation of feature visualization image.

[0081] To enhance the interpretability of the model's decision-making process, this embodiment also provides a feature visualization image generation function, which presents the key waveform segments and key electrical quantity channels on which the discriminator makes a certain fault category judgment in a visual way, so that operation and maintenance personnel can understand why the model makes this judgment, thereby enhancing their trust in the model's decision.

[0082] Specifically, the generation of feature visualization images includes: The output feature vectors of each discriminator at the fully connected layer are extracted. After normalizing each element of the feature vector, it is reshaped into a two-dimensional matrix with the same number of rows and columns as the input two-dimensional matrix. The normalized two-dimensional matrix is ​​then mapped to a feature visualization image, which is used to characterize the degree of feature activation of the discriminator in different regions of the two-dimensional matrix. These different regions correspond to different sampling times and different electrical quantity channels, respectively. A higher degree of feature activation indicates a greater contribution of the waveform features in that region to the discriminator's decision; a lower degree of feature activation indicates a smaller contribution of the waveform features in that region to the discriminator's decision.

[0083] Preferably, the feature visualization image can be presented in the form of a feature heatmap, with color intensity mapping the degree of feature activation. Alternatively, other visualization forms capable of representing feature activation, such as grayscale images or VI characteristic trajectory diagrams, can also be used. Through the feature visualization image, maintenance personnel can intuitively locate the key waveform segments on which the discriminator bases its fault category judgment, such as transient change segments near the fault occurrence time, and key electrical quantity channels, such as the voltage or current channels of the faulty phase. This effectively enhances the interpretability of the model's decisions and provides auxiliary data for fault analysis for maintenance personnel.

[0084] To verify the effectiveness of the method of the present invention, this embodiment builds a 220kV single-circuit transmission line fault simulation model on the MATLAB / Simulink simulation platform and conducts fault identification experiments for verification.

[0085] Basic setup for simulation experiments: Based on MATLAB / Simulink, such as Figure 2 The simulation topology model of the 220kV single-circuit transmission line shown includes synchronous generators G1 and G2 on both sides, step-up transformer T, and segmented transmission lines l1 and l2. By modifying parameters such as fault location, transition resistance, and fault phase, five types of line operation states are generated in the simulation, labeled 0 to 4, including normal operation, single-phase grounding, two-phase short circuit, two-phase grounding, and three-phase short circuit faults.

[0086] Simulations were used to construct source domain sample sets and target domain small sample test sets respectively: the source domain has sufficient line parameters and a large number of fault samples, which are used for pre-training of GAN networks for each fault category; the target domain adjusts parameters such as line impedance and length to simulate unknown lines, with only a small number of fault samples configured to fit the engineering small sample and cross-line generalization scenarios.

[0087] Collect the three-phase voltage and three-phase current time-series electrical quantities before and after the fault at both ends of the line, and preprocess them into a T×12 two-dimensional feature matrix according to step S1 of this invention; independently select the optimal hyperparameters for each type of fault, set the basic parameters of the focus loss to γ=2.0 and the balance factor α=0.25, and assign a 5 times weight to the loss of positive fault samples during training.

[0088] like Figure 3As shown, to verify the interpretability of the decision-making process of the present invention, the output feature vectors of the first fully connected layer of each binary classifier were extracted. The extracted feature vectors were averaged and reshaped into a 16×16 matrix and normalized to generate feature heatmaps corresponding to five operating states, including five independent heatmaps for fault labels 0 to 4. The brightness of the color blocks in the heatmap represents the activation intensity of the discriminator features: the darker the color and the higher the brightness, the more important it is that the area (corresponding to a specific sampling time and electrical quantity channel) is the core basis for the model to judge the current fault category. There are obvious differences in the distribution of activation areas in the heatmaps corresponding to different fault labels: the sudden change time of transient voltage and current waveforms and sensitive electrical channels of various faults present differentiated bright blocks on the heatmap. The heatmap can intuitively locate the waveform segments and electrical quantity channels that the model focuses on when identifying faults, solving the black-box decision-making problem of deep learning models, providing power grid operation and maintenance personnel with a visual and traceable fault discrimination basis, and improving the engineering credibility of the model in power relay protection scenarios.

[0089] like Figure 4 As shown, the method of this invention inputs a small sample of the target domain into a fully pre-trained binary classifier to complete fault identification, and outputs a fault identification confusion matrix for the test set. The statistical results of the confusion matrix show that: all 20 samples of label 0 (normal operating condition) are correctly identified; fault samples of labels 1, 2, and 4 are all 100% accurately identified; only one fault sample of label 3 is misidentified as label 2, while the remaining 9 samples are correctly identified. This proves that the present invention can accurately distinguish various types of transmission line faults in scenarios with small samples, class imbalance, and cross-line migration.

[0090] like Figure 5 As shown, to remove the GAN generation module, the ablation experiment results were obtained by canceling the GAN generator's sample expansion mechanism and training the discriminator solely on a small number of original real fault samples, while keeping other training conditions and hyperparameters unchanged. This yielded a fault recognition confusion matrix without the GAN module. A comparison with the complete model results clearly shows performance degradation: one fault in label 1 was misclassified as a normal condition; of the 10 samples in label 2, 2 were misclassified as label 3 faults; the number of misclassifications for the few fault categories with scarce samples increased significantly, demonstrating that GAN, by generating pseudo-fault samples to expand the dataset, can effectively alleviate the problem of scarce small sample data and improve the discriminator's ability to learn the waveform features of various faults.

[0091] like Figure 6As shown, the ablation experiment results are presented with the focus loss function removed. The GAN sample generation module is retained, but the discriminator training only uses the standard binary cross-entropy loss, and the focus loss weighting to balance positive and negative class samples is no longer introduced. All other experimental conditions remain unchanged, resulting in a confusion matrix without focus loss. Experimental results show that out of 10 samples for label 2 faults, only 6 were correctly identified, and 4 were misidentified as label 3 faults. The accuracy of minority class fault identification drops significantly. Standard cross-entropy causes the model to be dominated by a large number of negative class samples, weakening the learning of a few rare faults. The focus loss introduced in this invention can increase the loss weight of positive class fault samples, forcing the model to focus on the few difficult-to-identify faults, effectively solving the identification bias caused by the imbalance of fault sample classes.

[0092] The method of this invention avoids mutual interference between categories in multi-class classification tasks through a one-to-many task decomposition strategy, effectively suppresses the dominant effect of sample imbalance on model training through a dynamic scaling mechanism of focus loss, achieves zero-fine-tuning deployment in cross-line scenarios through independent training and direct transfer of each discriminator, and enhances the interpretability of model decisions by generating feature visualization images through the visualization of discriminator features. Thus, it improves the accuracy and generalization ability of transmission line fault identification under conditions of small sample size and class imbalance.

[0093] Example 2: This invention provides a transmission line fault identification system for small sample and unbalanced sample data to implement the method described in Embodiment 1. The system includes: Data acquisition and preprocessing module: This is used to acquire the three-phase voltage and three-phase current time-series data before and after a fault at both ends of a transmission line, and then rearrange the acquired time-series data into a two-dimensional matrix.

[0094] Specifically, the data acquisition unit reads the timing data before and after the fault from the waveform recording device on the secondary side of the transmission line. The acquired timing data includes the instantaneous value sequence of three-phase voltage and three-phase current at the beginning and end of the line, totaling 12 electrical quantity channels. The sampling interval is from one cycle before the fault to two cycles after the fault.

[0095] The preprocessing unit arranges the acquired one-dimensional time-series data into a two-dimensional matrix according to each electrical quantity channel. The rows of the two-dimensional matrix correspond to the sampling time series, and the columns correspond to each electrical quantity channel. After preprocessing, samples of different fault categories are labeled according to their categories to construct a source domain sample set.

[0096] Model building module: The multi-classification identification task of transmission line fault types is decomposed into multiple independent binary classification sub-tasks using a "one-to-many" strategy. A generative adversarial network containing a generator and a binary classifier is constructed for each fault category.

[0097] Specifically, assuming there are K types of transmission line faults, the model building module constructs K independent generative adversarial networks (GANs). The k-th GAN corresponds to the k-th fault category and contains a generator G. k A binary classifier D k .

[0098] The generator is a fully connected neural network, whose input is a random noise vector and whose output is a pseudo-sample matrix with the same dimensions as the real two-dimensional matrix. The binary classifier is a convolutional neural network, whose input is a two-dimensional matrix and whose output is the probability that the input sample belongs to the corresponding fault category.

[0099] Each generative adversarial network is independent of the others, and their model parameters do not affect each other.

[0100] Training module: The training module uses the two-dimensional matrix to perform alternating adversarial training on the generative adversarial network corresponding to each fault category.

[0101] The training module performs the following alternating training process: Fix the current binary class discriminator parameters and update the generator parameters so that the prediction results of the pseudo samples generated by the generator on the binary class discriminator are close to the positive class. Fix the current generator parameters and update the binary class discriminator parameters so that the output of the binary class discriminator for true positive samples approaches 1 and the output for true negative samples and pseudo samples approaches 0. Repeat the above alternating updates until the preset number of training rounds or the loss function converges.

[0102] The binary classifier uses the focal loss function as part of the training loss function.

[0103] For each binary class discriminator, its positive class samples are defined as samples of the corresponding fault category, and its negative class samples are defined as samples of all other fault categories plus non-fault samples. The focus loss function causes the discriminator to assign higher loss weights to positive class samples than to negative class samples during training, thereby focusing on feature learning for the few fault categories.

[0104] Fault identification module: This method is used to input the three-phase voltage and three-phase current time series data before and after the fault in the transmission line to be identified into the trained binary classifier corresponding to each fault category, obtain the probability of each classifier belonging to the corresponding fault category, and take the fault category corresponding to the maximum probability value as the final identification result.

[0105] After each generative adversarial network is trained, the generator no longer participates in the fault identification process; only the binary classifiers are retained to output the fault category probability for the samples to be identified. When the source domain transmission line and the target domain transmission line are different lines, each binary classifier directly predicts the fault category of the time series data to be identified for the target domain transmission line using the trained parameters, without needing to fine-tune the parameters in the target domain.

[0106] The various modules of this invention work together to achieve high-precision fault identification under conditions of small sample size and class imbalance, and have the ability to directly transfer faults across lines, providing an end-to-end solution for transmission line fault identification.

[0107] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for identifying transmission line faults using small and unbalanced samples, characterized in that, include: Acquire the three-phase voltage and three-phase current time-series data before and after the fault at both ends of the transmission line, and rearrange the acquired time-series data into a two-dimensional matrix; The multi-classification task of transmission line faults is decomposed into multiple binary classification sub-tasks corresponding to different fault categories. For each fault category, a generative adversarial network is constructed, which includes a generator and a binary classifier. The binary classifier is used to output the probability that the input sample belongs to the corresponding fault category. The two-dimensional matrix is ​​used to perform alternating adversarial training on the generative adversarial network corresponding to each fault category. The binary class discriminator uses the focus loss function as part of the training loss function to assign a higher loss weight to positive class samples than to negative class samples during training. The time series data to be identified is input into the trained binary classifiers corresponding to each fault category. The probability of each classifier's output belonging to the corresponding fault category is obtained, and the fault category corresponding to the highest probability value is taken as the final identification result.

2. The method for identifying transmission line faults using small and unbalanced samples according to claim 1, characterized in that, The acquired time-series data is rearranged into a two-dimensional matrix, specifically including: The three-phase voltage time series data and three-phase current time series data of the two ends before and after the fault of the transmission line are sampled at equal intervals. For each fault sample, the sampled time series data are arranged into a two-dimensional matrix according to each electrical quantity channel, so that the row direction of the two-dimensional matrix corresponds to the sampling time series and the column direction corresponds to each electrical quantity channel.

3. The method for identifying transmission line faults using small and unbalanced samples according to claim 1, characterized in that, After the generative adversarial networks are trained, only the binary classifiers are retained to output the probability that the sample to be identified belongs to the corresponding fault category.

4. The method for identifying transmission line faults using small and unbalanced samples according to claim 1, characterized in that, The expression for the focus loss function is: , in, This represents the model's predicted probability for the fault category. γ For focusing parameters; α ∈[0,1] is a balancing factor used to balance the weights of positive and negative class samples; For each binary class discriminator, its positive class samples are the samples of the fault category corresponding to that discriminator, and its negative class samples are the samples of all other fault categories and non-fault samples; in the training sample set, the total number of positive class samples is less than the total number of negative class samples.

5. The method for identifying transmission line faults using small and unbalanced samples according to claim 1, characterized in that, The alternating adversarial training specifically includes: Fix the current binary class discriminator parameters and update the generator parameters so that the prediction results of the pseudo samples generated by the generator on the binary class discriminator are close to the positive class, so that the generator learns the sample distribution corresponding to the fault category; With the current generator parameters fixed, the binary class discriminator parameters are updated so that the output of the binary class discriminator for true positive samples approaches 1, and the output for true negative samples and pseudo samples approaches 0, while minimizing the focus loss function. Repeat the above alternating updates until the preset number of training rounds or the loss function converges.

6. The method for identifying transmission line faults using small and unbalanced samples according to claim 1, characterized in that, The method further includes automatically searching for optimal training hyperparameters for the corresponding discriminator for each binary classification subtask: A preset hyperparameter search space is defined, which includes the focus parameter γ, the class balance factor α, the training rounds and the learning rate of the generative adversarial network in the focus loss function. Generative adversarial networks for each set of candidate hyperparameters are trained using a training subset, and a comprehensive score is calculated on a validation subset. The comprehensive score is a weighted sum of the F1 score and the balanced accuracy. The hyperparameter combination with the highest overall score is selected as the optimal hyperparameter configuration for this binary classification subtask. The binary classification subtasks corresponding to different fault categories adopt independent optimal hyperparameter configurations.

7. The method for identifying transmission line faults using small and unbalanced samples according to claim 1, characterized in that, The two-dimensional matrix comes from the fault data of the source domain transmission line, and the time series data to be identified comes from the target domain transmission line. The source domain transmission line and the target domain transmission line are different transmission lines. After each of the binary classifiers is trained on the fault data of the source domain transmission line, it directly predicts the fault category of the time series data to be identified for the target domain transmission line using the trained parameters.

8. The method for identifying transmission line faults using small and unbalanced samples according to claim 1, characterized in that, The binary classification discriminator is also used to generate feature visualization images, specifically including: Extract the feature vectors of the fully connected layers in the binary classifier; The feature vectors are subjected to dimensionality reduction, reshaping, and normalization to generate a feature visualization image; The feature visualization image is used to characterize the degree of feature activation of the binary classifier in different regions of the two-dimensional matrix, so as to locate the key waveform segments and key electrical quantity channels on which the binary classifier makes fault category decisions. The different regions correspond to different sampling times or different electrical quantity channels.

9. The method for identifying transmission line faults using small and unbalanced samples according to claim 1, characterized in that, The fault categories include single-phase ground fault, two-phase fault, two-phase ground fault, and three-phase fault.

10. A system for implementing the transmission line fault identification method for small sample and unbalanced sample as described in any one of claims 1-9, characterized in that, include: The data acquisition and preprocessing module is used to acquire the three-phase voltage and three-phase current time series data before and after the transmission line fault, and rearrange the acquired time series data into a two-dimensional matrix. The model building module decomposes the multi-classification task of transmission line fault types into multiple independent binary classification sub-tasks, and builds a generative adversarial network containing a generator and a binary classifier for each fault category. The training module uses the two-dimensional matrix to perform alternating adversarial training on the generative adversarial network corresponding to each fault category. The binary classifier uses the focal loss function as part of the training loss function to assign a higher loss weight to positive class samples than to negative class samples during training. The identification module is used to input the time series data to be identified into the trained binary classifiers corresponding to each fault category, obtain the probability of each classifier's output belonging to the corresponding fault category, and take the fault category corresponding to the maximum probability value as the final identification result.

Citation Information

Patent Citations

  • Power transmission line fault identification method and device based on Grubrum angle field and residual network

    CN117272143A