Small sample fault diagnosis method for three-phase four-leg photovoltaic inverter

An adaptive weighted conditional generative adversarial network model is used to generate three-phase current samples that match the fault category and operating conditions, which solves the problem of low quality of generated samples in the existing technology and realizes efficient fault diagnosis of three-phase four-leg photovoltaic inverters.

CN120633374APending Publication Date: 2025-09-12HEFEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510541964.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

In the fault diagnosis of three-phase four-arm photovoltaic inverters, existing technologies have difficulty generating fault samples covering multiple operating conditions, resulting in low quality of samples generated under multiple operating conditions, and traditional generative adversarial network models are unable to effectively generate samples that match specific fault categories and operating conditions.

Method used

An adaptive weighted conditional generative adversarial network model is adopted. By taking the binary codes of fault categories and operating conditions as conditional inputs, a generator and a discriminator are constructed to generate three-phase current samples that match the fault categories and operating conditions, which are used to simulate fault diagnosis in small sample situations.

Benefits of technology

The diversity and quality of generated samples are improved, the model's ability to perceive and process conditional information is enhanced, and good fault classification results are achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120633374A_ABST
    Figure CN120633374A_ABST
Patent Text Reader

Abstract

The invention provides a three-phase four-leg photovoltaic inverter small sample fault diagnosis method, and belongs to the field of power fault diagnosis, and the method comprises the following steps: defining 45 kinds of faults; collecting fault data to construct a real sample set; constructing an adaptive empowerment condition generative adversarial network model, and training the model by using a fault sample in a real sample set to obtain an optimal generator; generating load-side three-phase current data under corresponding fault types and working conditions by using an optimal generator, and constructing and generating a sample set; and dividing a training set and a test set in combination with the real sample set and the generated sample set, training a classifier through the training set to obtain an optimal classifier, and evaluating the accuracy of the optimal classifier on the test set. According to the method provided by the invention, high-quality fault samples of various fault types can be generated, various working conditions are covered, excellent classification performance is shown on a test set, and the problem of insufficient real sample fault data is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power fault diagnosis, and in particular to a novel small sample fault diagnosis method for a three-phase four-bridge-arm photovoltaic inverter, which is based on an adaptive weighted conditional generative adversarial network. Background Art

[0002] Three-phase, four-leg photovoltaic inverters offer high efficiency, strong stability, and wide adaptability, making them widely used in photovoltaic power generation systems. However, due to their complex operating environment and large load variations, they are prone to failure of internal power switches and sensors. Failure to promptly detect and replace these faulty components can lead to circuit overloads, system failures, equipment damage, and even serious safety hazards such as fire, compromising the reliability and safety of photovoltaic power generation systems. Fault diagnosis methods for three-phase, four-leg photovoltaic inverters primarily include signal-based, model-based, and data-driven approaches.

[0003] Signal-based methods analyze the waveform characteristics of the inverter's three-phase output voltage and current signals to perform fault diagnosis. This method can reflect the device's operating status in real time and is suitable for simple fault detection. However, signal-based methods have weaker recognition capabilities for complex faults and are easily affected by external noise, resulting in low diagnostic accuracy for complex faults.

[0004] Model-based approaches identify faults by building an accurate inverter model and then comparing it with actual measurement results. These methods have strong theoretical support and can achieve relatively accurate fault location. However, model-based approaches are highly dependent on the accuracy of the mathematical model. When there is a deviation between the model and the actual system, the accuracy of fault diagnosis will be significantly affected.

[0005] Data-driven methods use machine learning technology and historical operating data for training to achieve fault diagnosis. Compared with signal-based and model-based methods, data-driven methods can automatically extract features from large amounts of data, do not rely on precise mathematical models, and can handle complex nonlinear fault types. However, data-driven methods rely on a large amount of training data, and in practical applications, there is often a lack of sufficient fault samples. To solve this problem, generative adversarial networks have been widely used in the generation of fault data in recent years. By synthesizing a large number of virtual fault samples, they effectively make up for the problem of insufficient fault data, thereby achieving efficient fault diagnosis in the case of small samples. For example:

[0006] The existing public literature, "Qiang Ruiru, Zhao Xiaoqiang. Small-sample rolling bearing fault diagnosis method based on Gram angle difference field and generative adversarial network [J]. Journal of South China University of Technology (Natural Science Edition), 2024, 52(10): 64-75.", first converts the one-dimensional vibration signal into a two-dimensional image through the Gram angle difference field. Then, the conditional generative adversarial network and WGAN-GP are combined to construct CWGAN-GP to generate fault samples. Finally, the generated fault samples are used to train the classifier to achieve fault diagnosis in a small-sample environment. However, the generative adversarial network model in the above method cannot control the generation of samples corresponding to the fault category. For multi-classification tasks, it is usually necessary to train multiple independent models, resulting in a large computational overhead.

[0007] The existing public literature "T. Zhang, J. Chen, F. Li, T. Pan and S. He, "A Small Sample Focused Intelligent Fault Diagnosis Scheme of Machines via Multi modules Learning With Gradient Penalized Generative Adversarial Networks," in IEEE Transactions on Industrial Electronics, v01.68, no. 10, pp. 10130-10141, Oct. 2021" proposes a MGPGAN model, which includes a generator, a discriminator, and a classifier, and can generate samples that are highly consistent with the real data in terms of fault categories. However, this method has limitations in controlling the matching of generated data with specific working conditions, resulting in unsatisfactory performance in multi-working conditions.

[0008] In summary, the existing technology has the following deficiencies:

[0009] (1) Existing fault sample generation methods mainly focus on vibration signal faults, while there is relatively little research on fault sample generation for periodic signals such as three-phase current and voltage;

[0010] (2) The traditional fault sample generation method based on generative adversarial networks can only generate samples corresponding to specific fault categories and cannot effectively generate samples covering multiple working conditions, resulting in low quality of generated samples under multiple working conditions. Summary of the Invention

[0011] The technical problem to be solved by the present invention is the shortcomings of the existing technology described in the background technology. Specifically, an improved generative adversarial network model is proposed, which can simultaneously generate load-side three-phase current samples corresponding to fault categories and operating conditions, and is used to simulate open circuit or sensor failure of the power switch tube of the three-phase four-bridge arm photovoltaic inverter under small sample conditions; the fault samples generated by the model are used to further train the optimal classifier to achieve accurate fault diagnosis.

[0012] In order to solve the above technical problems, the present invention provides a small sample fault diagnosis method for a three-phase four-bridge-arm photovoltaic inverter. The electrical topology involved in the diagnosis method includes a three-phase four-bridge-arm photovoltaic inverter, a control module, a three-phase current sensor and a load. The three-phase four-bridge-arm photovoltaic inverter includes a DC voltage source, a bridge arm system and an LC filter connected in series in sequence; the bridge arm system includes an A-phase bridge arm, a B-phase bridge arm, a C-phase bridge arm and an F-phase bridge arm, and each phase bridge arm includes two power switches connected in series. The diagnosis method generates an adversarial network based on an adaptive weighted condition, and includes the following steps:

[0013] Step 1: Determine the working state of the three-phase four-bridge-arm photovoltaic inverter, including normal working state and fault state, where the fault state includes 45 fault types;

[0014] Step 2: Collect three-phase current data on the load side of the three-phase four-bridge-arm photovoltaic inverter under normal working conditions and fault conditions, assign a label to each data sample, and create a real sample set;

[0015] Step 3: Build an adaptive weighted conditional generative adversarial network model and train it with 45 fault samples from the real sample set to obtain the optimal generator model.

[0016] Step 4: Generate three-phase current data on the load side of a three-phase four-leg photovoltaic inverter corresponding to 45 fault categories using the optimal generator model obtained in step 3, including fault labels, DC bus voltage levels, and load levels, until y2 samples are generated for each fault state, forming a generated sample set.

[0017] Step 5: Use the data in part of the real sample set to fuse the data in all the generated sample sets as the training set, and use the data in the remaining real sample set as the test set to train the classifier to obtain the optimal classifier, test the accuracy of the optimal classifier, and verify the generalization performance of the model.

[0018] Preferably, the implementation process of step 2 is as follows:

[0019] Step 21: Establish a three-phase four-bridge-arm photovoltaic inverter main circuit model on the Dspace semi-physical simulation platform, import the control code into the DSP-TMS320F28335 control chip, and implement hardware-in-the-loop simulation of the three-phase four-bridge-arm photovoltaic inverter.

[0020] Step 22: Simulate the operating states of a three-phase four-bridge-arm photovoltaic inverter under m different DC bus voltage levels and n different load levels on the Dspace semi-physical simulation platform, including normal operating states and 45 fault states, and collect three-phase current data on the load side of the three-phase four-bridge-arm photovoltaic inverter;

[0021] Step 23: Preprocess the collected three-phase current data, sample the three-phase current data with a sliding window of 900 data points, that is, every 900 data points constitute a sample, and assign corresponding labels;

[0022] Step 24: Repeat step 23 and complete the following data sample collection: generate x samples for the normal working state sampling and generate y1 samples for each of the remaining 45 fault states, forming a real sample set.

[0023] Preferably, the implementation process of step 3 is as follows:

[0024] Step 31: One-hot encode the 45 fault labels; binary encode the m different DC bus voltage levels; binary encode the n different load levels; concatenate the binary codes of the voltage level and the load level to record them as the binary code of the sample working condition;

[0025] Step 32: Concatenate the one-hot encoding of the fault label, the binary encoding of the DC bus voltage level, and the load level to form a conditional vector with 48 neurons.

[0026] Step 33: Construct an adaptive weighted conditional generative adversarial network model, including a generator and a discriminator; define the loss function L of the discriminator D And the generator loss function L G , whose expression is:

[0027] L D =L D1 +L D2 +L D3

[0028] LG=L G1 +L G2 +L G3

[0029] Among them L D1 is the true and false sample loss of the discriminator, L D2 is the fault category loss of the discriminator, LD3 is the working condition loss of the discriminator; L G1 is the sample true and false loss of the generator, L G2 is the fault class loss of the generator, L G3 is the operating loss of the generator;

[0030] Step 34: Using the two loss functions defined in step 33 as optimization targets and the fault samples in step 24 as training samples, train the adaptive weighted conditional generative adversarial network model to obtain the optimal generator model.

[0031] Preferably, the generator in step 33 includes a generator main network and a generator conditional auxiliary network, wherein the generator main network includes 1 input layer, 3 fully connected layers, an adaptive weighting layer, 1 residual connection layer and 1 output layer; the input layer is a one-dimensional random noise splicing conditional vector with 100 neurons and 48 neurons, with a total of 148 neurons; the output layer includes 2700 neurons, which are transformed into a generated sample with a shape size of 900×3 after the reshape layer; the generator conditional auxiliary network includes 1 input layer, 3 fully connected layers and 1 output layer, the input layer is a conditional vector with 48 neurons, and the output layer is a weight vector with 1024 neurons; the weight vector output by the generator conditional auxiliary network is multiplied by the third fully connected layer of the generator main network, and a residual connection is added;

[0032] The discriminator includes a discriminator main network and a discriminator conditional auxiliary network, wherein the discriminator main network includes 1 input layer, 3 fully connected layers, 1 adaptive weighting layer, 1 residual connection layer and 1 output layer; the generated sample or real sample with a shape size of 900×3 is converted into a one-dimensional vector with 2700 neurons through the reshape layer; the input layer is a real sample with 2700 neurons or a generated sample spliced ​​with a conditional vector with 48 neurons, totaling 2748 neurons; the output layer includes three parts: the authenticity of the sample, the one-hot encoding of the sample fault label, and the binary encoding of the sample working condition; the discriminator conditional auxiliary network includes 1 input layer, 1 fully connected layer and 1 output layer; the input layer is a conditional vector with 48 neurons, and the output layer is a weight vector with 256 neurons; the weight vector output by the discriminator conditional auxiliary network is multiplied by the third fully connected layer of the discriminator main network, and a residual connection is added.

[0033] Preferably, the step 5 specifically includes the following steps:

[0034] Step 51: Take some normal state samples in the real sample set and all samples in the generated sample set as the training set, and take the remaining samples in the real sample set as the test set;

[0035] Step 52: Construct a classifier model, including 1 input layer, 2 convolutional layers, 2 maximum pooling layers, 1 LSTM layer, 2 fully connected layers, and 1 output layer. Before passing the sample to the classifier, data preprocessing is required, including data normalization and reshaping operations. The data normalization layer normalizes the three-phase current data into standard normal distribution data with a mean of 0 and a variance of 1. The reshape layer converts the normalized data into a shape that matches the input format of the classifier model.

[0036] Step 53: train the classifier model using the training set to obtain the optimal classifier;

[0037] Step 54: Test the accuracy of the optimal classifier using the test set to verify the generalization performance of the model.

[0038] Preferably, the 45 fault types in step 1 include: 8 types of single-tube open-circuit faults of power switch tubes, 28 types of double-tube open-circuit faults of power switch tubes, and 9 types of current sensor faults;

[0039] The eight types of power switch single-tube open circuit faults include: Phase A upper arm power switch open circuit, Phase A lower arm power switch open circuit, Phase B upper arm power switch open circuit, Phase B lower arm power switch open circuit, Phase C upper arm power switch open circuit, Phase C lower arm power switch open circuit, Phase F upper arm power switch open circuit, and Phase F lower arm power switch open circuit.

[0040] The 28 types of power switch double-tube open circuit faults include 4 types of same-phase power switch double-tube open circuits, 12 types of different-phase but different-arm power switch double-tube open circuits, and 12 types of different-phase but same-arm power switch double-tube open circuits. Among them, the 4 types of same-phase power switch double-tube open circuits specifically include: the upper and lower bridge arm power switch tubes of phase A are opened at the same time, the upper and lower bridge arm power switch tubes of phase B are opened at the same time, the upper and lower bridge arm power switch tubes of phase C are opened at the same time, and the upper and lower bridge arm power switch tubes of phase F are opened at the same time. The 12 types of different-phase but different-arm power switch double-tube open circuits specifically include: The power switches of the upper bridge arm of phase A and the lower bridge arm of phase B are opened at the same time, the power switches of the upper bridge arm of phase A and the lower bridge arm of phase C are opened at the same time, the power switches of the upper bridge arm of phase A and the lower bridge arm of phase F are opened at the same time, the power switches of the upper bridge arm of phase B and the lower bridge arm of phase A are opened at the same time, the power switches of the upper bridge arm of phase B and the lower bridge arm of phase C are opened at the same time, the power switches of the upper bridge arm of phase B and the lower bridge arm of phase F are opened at the same time, the power switches of the upper bridge arm of phase C and the lower bridge arm of phase A are opened at the same time, the power switches of the upper bridge arm of phase C and the lower bridge arm of phase B are opened at the same time, the power switches of the upper bridge arm of phase C and the lower bridge arm of phase F are opened at the same time The power switches of the lower arm of the phase are opened at the same time, the power switches of the upper arm of the phase F and the lower arm of the phase A are opened at the same time, the power switches of the upper arm of the phase F and the lower arm of the phase B are opened at the same time, and the power switches of the upper arm of the phase F and the lower arm of the phase C are opened at the same time; the 12 different types of double-tube opening of the power switches of the same arm include: the power switches of the upper arm of the phase A and the upper arm of the phase B are opened at the same time, the power switches of the upper arm of the phase A and the upper arm of the phase C are opened at the same time, the power switches of the upper arm of the phase A and the upper arm of the phase F are opened at the same time, and the power switches of the upper arm of the phase B and the upper arm of the phase C are opened at the same time. The switching tubes are opened at the same time, the power switching tubes of the upper bridge arm of phase B and the upper bridge arm of phase F are opened at the same time, the power switching tubes of the upper bridge arm of phase C and the upper bridge arm of phase F are opened at the same time, the power switching tubes of the lower bridge arm of phase A and the lower bridge arm of phase B are opened at the same time, the power switching tubes of the lower bridge arm of phase A and the lower bridge arm of phase C are opened at the same time, the power switching tubes of the lower bridge arm of phase A and the lower bridge arm of phase F are opened at the same time, the power switching tubes of the lower bridge arm of phase B and the lower bridge arm of phase C are opened at the same time, the power switching tubes of the lower bridge arm of phase B and the lower bridge arm of phase F are opened at the same time, and the power switching tubes of the lower bridge arm of phase C and the lower bridge arm of phase F are opened at the same time;

[0041] The 9 types of current sensor faults include: phase A current sensor open circuit, phase B current sensor open circuit, phase C current sensor open circuit, phase A current sensor bias, phase B current sensor bias, phase C current sensor bias, phase A current sensor stuck, phase B current sensor stuck, and phase C current sensor stuck.

[0042] Preferably, the true and false sample loss L of the discriminator in step 33 is D1 , the fault category loss L of the discriminator D2 , the discriminator's working condition loss L D3 , the generator's sample true and false loss L G1 , the fault category loss L of the generator G2 and the generator's operating loss LG3 The calculation of is as follows:

[0043] The sample true and false loss L of the discriminator D1 The loss function based on WGAN-GP is calculated as:

[0044]

[0045] Where z is random input noise, p z is the marginal distribution of random input noise, G(z) is the generated sample, D(G(z)) is the score of the discriminator for the generated sample, represents the expected value of the discriminator's score on the generated sample; x is the real sample, p r is the marginal distribution of the real sample, D(x) is the score of the discriminator for the real sample, Represents the expected value of the discriminator's score on the real sample; is the gradient penalty term, λ is the regularization term coefficient, is the interpolation sample, is the marginal distribution of the interpolation samples, is the score of the discriminator on the interpolated sample, express Interpolation samples The gradient, express Interpolation samples The l2 norm of the gradient of , represents the unweighted gradient penalty term, interpolation sample It is calculated by generating samples G(z) and real samples x, and the calculation formula is:

[0046]

[0047] Where ε is a weight parameter, and ε∈(O, 1);

[0048] The fault category loss L of the discriminator D2 It is calculated by the cross entropy loss function, and the calculation formula is:

[0049] L D2 =CrossEntropy(r,label)+CrossEntropy(f,label)

[0050] Where CrossEntropy is the cross entropy loss function, r is the one-hot encoding of the sample fault label output by the discriminator when the input of the discriminator is a real sample, f is the one-hot encoding of the sample fault label output by the discriminator when the input of the discriminator is a generated sample, and label is the one-hot encoding of the real sample label;

[0051] The working condition loss L of the discriminator D3 It is calculated by the mean square error loss function, and the calculation formula is:

[0052] L D3 =MSE(V r , V)+MSE(V f , V)

[0053] Among them, MSE is the mean square error loss function, V r When the input of the discriminator is a real sample, the binary code of the sample voltage level and load level output by the discriminator is V f is the binary code of the sample voltage level and load level output by the discriminator when the input of the discriminator is the generated sample, and V is the binary code of the voltage level and load level corresponding to the real sample;

[0054] The generator's sample authenticity loss L G1 The loss function based on WGAN-GP is calculated as:

[0055]

[0056] Where z is random input noise, p z is the marginal distribution of random input noise, G(z) is the generated sample, D(G(z)) is the score of the discriminator for the generated sample, represents the expected value of the discriminator's score on the generated sample;

[0057] The fault class loss L of the generator G2 It is calculated by the cross entropy loss function, and the calculation formula is:

[0058] L G2 =CrossEntropy(f, label)

[0059] Where f is the one-hot encoding of the sample fault label output by the discriminator when the input of the discriminator is the generated sample, and label is the one-hot encoding of the real sample label;

[0060] The operating loss of the generator is L G3 It is calculated by the mean square error loss function, and the calculation formula is:

[0061] L G3 =MSE(V f , V)

[0062] Among them, V f is the binary code of the sample voltage level and load level output by the discriminator when the input of the discriminator is the generated sample, and V is the binary code of the voltage level and load level corresponding to the real sample.

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

[0064] (1) The adaptive weighted conditional generative adversarial network model proposed in the present invention binary encodes the DC bus voltage level and load level corresponding to the fault sample and uses them as conditional input. It can not only generate samples corresponding to the fault category, but also generate samples matching specific working conditions, effectively expanding the diversity of sample generation.

[0065] (2) The adaptive weighted conditional generative adversarial network model proposed in this paper improves the traditional ACGAN. By introducing a conditional auxiliary network, the conditional information is mapped to the intermediate layer between the generator and the discriminator, which enhances the model's perception and processing capabilities of the conditional information, improves the quality of the generated samples, and shows good classification results. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 Schematic diagram of the process of the fault diagnosis method of the present invention;

[0067] Figure 2 The electrical topology diagram involved in the diagnostic method of the present invention;

[0068] Figure 3 Schematic diagram of the structure of the adaptive weighted conditional generative adversarial network model in an embodiment of the present invention

[0069] Figure 4 This is a schematic diagram of the generator structure in an embodiment of the present invention;

[0070] Figure 5 Schematic diagram of the discriminator structure in an embodiment of the present invention;

[0071] Figure 6 Schematic diagram of data preprocessing and classifier model structure in an embodiment of the present invention;

[0072] Figure 7 Generate loss curves for the adversarial network model generator and discriminator for the adaptive weighting conditions in an embodiment of the present invention;

[0073] Figure 8 A time domain waveform comparison diagram of some generated samples and real samples in an embodiment of the present invention;

[0074] Figure 9 A comparison diagram of the spectrum of some generated samples and real samples in the embodiment of the present invention;

[0075] Figure 10 Schematic diagram of the test set confusion matrix of the optimal classifier in an embodiment of the present invention. DETAILED DESCRIPTION

[0076] The present invention will be described clearly and completely below with reference to the embodiments of the present invention.

[0077] Figure 2 This is the electrical topology diagram involved in the diagnostic method of the present invention. Figure 2 It can be seen that the electrical topology involved in the diagnostic method of the present invention includes a three-phase four-bridge-arm photovoltaic inverter, a control module, a three-phase current sensor and a load. The three-phase four-bridge-arm photovoltaic inverter includes a DC voltage source, a bridge arm system and an LC filter connected in series in sequence; the bridge arm system includes an A-phase bridge arm, a B-phase bridge arm, a C-phase bridge arm and an F-phase bridge arm, and each phase bridge arm includes two power switching tubes connected in series.

[0078] exist Figure 2 In the figure, C1 and C2 are DC capacitors, U dc is a DC voltage source, S A1 , S A1 , S B1 , S C1 , S F1 is the upper bridge arm power switch tube of the four bridge arms, S A2 , S B2 , S C2 , S F2 is the lower bridge arm power switch tube of the four bridge arms, D is a diode, L A , L B , L C is the three-phase filter inductor, C A , B B , C C is the three-phase filter capacitor, r is the equivalent resistance of the three-phase filter inductor, R A , R B , R C is a three-phase load, i A ,i B ,i C is the three-phase current on the load side of the three-phase four-leg photovoltaic inverter.

[0079] Figure 1 It is a flow chart of the fault diagnosis method of the present invention, which consists of Figure 1 It can be seen that the fault diagnosis method is based on the adaptive weighted condition generation adversarial network and includes the following steps:

[0080] Step 1: Determine the working state of the three-phase four-bridge-arm photovoltaic inverter, including normal working state and fault state, where the fault state includes 45 fault types.

[0081] In this embodiment, the 45 fault types include: 8 types of single power switch tube open circuit faults, 28 types of double power switch tube open circuit faults and 9 types of current sensor faults;

[0082] The eight types of power switch single-tube open circuit faults include: Phase A upper arm power switch open circuit, Phase A lower arm power switch open circuit, Phase B upper arm power switch open circuit, Phase B lower arm power switch open circuit, Phase C upper arm power switch open circuit, Phase C lower arm power switch open circuit, Phase F upper arm power switch open circuit, and Phase F lower arm power switch open circuit.

[0083] The 28 types of power switch double-tube open circuit faults include 4 types of same-phase power switch double-tube open circuits, 12 types of different-phase but different-arm power switch double-tube open circuits, and 12 types of different-phase but same-arm power switch double-tube open circuits. Among them, the 4 types of same-phase power switch double-tube open circuits specifically include: the upper and lower bridge arm power switch tubes of phase A are opened at the same time, the upper and lower bridge arm power switch tubes of phase B are opened at the same time, the upper and lower bridge arm power switch tubes of phase C are opened at the same time, and the upper and lower bridge arm power switch tubes of phase F are opened at the same time. The 12 types of different-phase but different-arm power switch double-tube open circuits specifically include: The power switches of the upper bridge arm of phase A and the lower bridge arm of phase B are opened at the same time, the power switches of the upper bridge arm of phase A and the lower bridge arm of phase C are opened at the same time, the power switches of the upper bridge arm of phase A and the lower bridge arm of phase F are opened at the same time, the power switches of the upper bridge arm of phase B and the lower bridge arm of phase A are opened at the same time, the power switches of the upper bridge arm of phase B and the lower bridge arm of phase C are opened at the same time, the power switches of the upper bridge arm of phase B and the lower bridge arm of phase F are opened at the same time, the power switches of the upper bridge arm of phase C and the lower bridge arm of phase A are opened at the same time, the power switches of the upper bridge arm of phase C and the lower bridge arm of phase B are opened at the same time, the power switches of the upper bridge arm of phase C and the lower bridge arm of phase F are opened at the same time The power switches of the lower arm of the phase are opened at the same time, the power switches of the upper arm of the phase F and the lower arm of the phase A are opened at the same time, the power switches of the upper arm of the phase F and the lower arm of the phase B are opened at the same time, and the power switches of the upper arm of the phase F and the lower arm of the phase C are opened at the same time; the 12 different types of double-tube opening of the power switches of the same arm include: the power switches of the upper arm of the phase A and the upper arm of the phase B are opened at the same time, the power switches of the upper arm of the phase A and the upper arm of the phase C are opened at the same time, the power switches of the upper arm of the phase A and the upper arm of the phase F are opened at the same time, and the power switches of the upper arm of the phase B and the upper arm of the phase C are opened at the same time. The switching tubes are opened at the same time, the power switching tubes of the upper bridge arm of phase B and the upper bridge arm of phase F are opened at the same time, the power switching tubes of the upper bridge arm of phase C and the upper bridge arm of phase F are opened at the same time, the power switching tubes of the lower bridge arm of phase A and the lower bridge arm of phase B are opened at the same time, the power switching tubes of the lower bridge arm of phase A and the lower bridge arm of phase C are opened at the same time, the power switching tubes of the lower bridge arm of phase A and the lower bridge arm of phase F are opened at the same time, the power switching tubes of the lower bridge arm of phase B and the lower bridge arm of phase C are opened at the same time, the power switching tubes of the lower bridge arm of phase B and the lower bridge arm of phase F are opened at the same time, and the power switching tubes of the lower bridge arm of phase C and the lower bridge arm of phase F are opened at the same time;

[0084] The 9 types of current sensor faults include: phase A current sensor open circuit, phase B current sensor open circuit, phase C current sensor open circuit, phase A current sensor bias, phase B current sensor bias, phase C current sensor bias, phase A current sensor stuck, phase B current sensor stuck, and phase C current sensor stuck.

[0085] Step 2: Collect the three-phase current data of the load side of the three-phase four-bridge-arm photovoltaic inverter under normal working state and fault state, assign a label to each data sample, and produce a real sample set.

[0086] In this embodiment, the implementation process of step 2 is as follows:

[0087] Step 21: Establish a three-phase four-bridge-arm photovoltaic inverter main circuit model on the Dspace semi-physical simulation platform, import the control code into the DSP-TMS320F28335 control chip, and implement hardware-in-the-loop simulation of the three-phase four-bridge-arm photovoltaic inverter.

[0088] Step 22: On the Dspace semi-physical simulation platform, simulate the operating states of the three-phase four-bridge-arm photovoltaic inverter under m different DC bus voltage levels and n different load levels, including normal operating states and 45 fault states, and collect three-phase current data on the load side of the three-phase four-bridge-arm photovoltaic inverter.

[0089] In this embodiment, m=3, n=2.

[0090] Step 23: Preprocess the collected three-phase current data, sample the three-phase current data with a sliding window of 900 data points, that is, every 900 data points constitute a sample, and assign corresponding labels;

[0091] Step 24: Repeat step 23 and complete the following data sample collection: generate x samples for the normal working state sampling, and generate y1 samples for each of the remaining 45 fault states, forming a real sample set.

[0092] In this embodiment, x=300, y1=60, that is, a total of 2700 fault samples are collected for 45 fault states, and there are a total of 3000 samples in the real sample set.

[0093] Step 3: Construct an adaptive weighted conditional generative adversarial network model, train the model with 45 fault samples from the real sample set, and obtain the optimal generator model.

[0094] In this embodiment, the implementation process of step 3 is as follows:

[0095] Step 31: One-hot encode the 45 fault labels; binary encode the three different DC bus voltage levels; binary encode the two different load levels; and concatenate the binary codes of the voltage level and the load level to record them as the binary code of the sample working condition.

[0096] Step 32: Concatenate the one-hot encoding of the fault label, the binary encoding of the DC bus voltage level, and the load level to form a conditional vector with 48 neurons.

[0097] Step 33: Construct an adaptive weighted conditional generative adversarial network model, including a generator and a discriminator.

[0098] The generator includes a generator main network and a generator conditional auxiliary network, wherein the generator main network includes 1 input layer, 3 fully connected layers, an adaptive weighting layer, 1 residual connection layer and 1 output layer; the input layer has 100 neurons and a one-dimensional random noise splicing conditional vector with 48 neurons, totaling 148 neurons; the output layer includes 2700 neurons, which are transformed into a generated sample with a shape size of 900×3 after the reshape layer; the generator conditional auxiliary network includes 1 input layer, 3 fully connected layers and 1 output layer, the input layer is a conditional vector with 48 neurons, and the output layer is a weight vector with 1024 neurons; the weight vector output by the generator conditional auxiliary network is multiplied by the third fully connected layer of the generator main network, and a residual connection is added.

[0099] The discriminator includes a discriminator main network and a discriminator conditional auxiliary network, wherein the discriminator main network includes 1 input layer, 3 fully connected layers, 1 adaptive weighting layer, 1 residual connection layer and 1 output layer; the generated sample or real sample with a shape size of 900×3 is converted into a one-dimensional vector with 2700 neurons through the reshape layer; the input layer is a real sample with 2700 neurons or a generated sample spliced ​​with a conditional vector with 48 neurons, totaling 2748 neurons; the output layer includes three parts: the authenticity of the sample, the one-hot encoding of the sample fault label, and the binary encoding of the sample working condition; the discriminator conditional auxiliary network includes 1 input layer, 1 fully connected layer and 1 output layer; the input layer is a conditional vector with 48 neurons, and the output layer is a weight vector with 256 neurons; the weight vector output by the discriminator conditional auxiliary network is multiplied by the third fully connected layer of the discriminator main network, and a residual connection is added.

[0100] Define the loss function L of the discriminator D And the generator loss function L G , whose expression is:

[0101] L D =L D1 +L D2 +L D3

[0102] L G =L G1 +L G2 +L G3

[0103] Among them L D1 is the true and false sample loss of the discriminator, L D2is the fault category loss of the discriminator, L D3 is the working condition loss of the discriminator; L G1 is the sample true and false loss of the generator, L G2 is the fault class loss of the generator, L G3 is the operating loss of the generator.

[0104] In this embodiment, the sample true and false loss L of the discriminator is D1 , the fault category loss L of the discriminator D2 , the discriminator's working condition loss L D3 , the generator's sample true and false loss L G1 , the fault category loss L of the generator G2 and the generator's operating loss L G3 The calculation is as follows:

[0105] The sample true and false loss L of the discriminator D1 The loss function based on WGAN-GP is calculated as:

[0106]

[0107] Where z is random input noise, p z is the marginal distribution of random input noise, G(z) is the generated sample, D(G(z)) is the score of the discriminator for the generated sample, represents the expected value of the discriminator's score on the generated sample; x is the real sample, p r is the marginal distribution of the real sample, D(x) is the score of the discriminator for the real sample, Represents the expected value of the discriminator's score on the real sample; is the gradient penalty term, λ is the regularization term coefficient, is the interpolation sample, is the marginal distribution of the interpolation samples, is the score of the discriminator on the interpolated sample, express Interpolation samples The gradient, express Interpolation samples The l2 norm of the gradient of , represents the unweighted gradient penalty term, interpolation sample It is calculated by generating samples G(z) and real samples x, and the calculation formula is:

[0108]

[0109] Wherein, ε is a weight parameter, and ε∈(0, 1).

[0110] The fault category loss L of the discriminator D2 It is calculated by the cross entropy loss function, and the calculation formula is:

[0111] L D2 =CrossEntropy(r,label)+CrossEntropy(f,label)

[0112] Among them, CrossEntropy is the cross entropy loss function, r is the one-hot encoding of the sample fault label output by the discriminator when the input of the discriminator is a real sample, f is the one-hot encoding of the sample fault label output by the discriminator when the input of the discriminator is a generated sample, and label is the one-hot encoding of the real sample label.

[0113] The working condition loss L of the discriminator D3 It is calculated by the mean square error loss function, and the calculation formula is:

[0114] L D3 =MSE(V r , V)+MSE(V f , V)

[0115] Among them, MSE is the mean square error loss function, V r When the input of the discriminator is a real sample, the binary code of the sample voltage level and load level output by the discriminator is V f is the binary code of the sample voltage level and load level output by the discriminator when the input of the discriminator is the generated sample, and V is the binary code of the voltage level and load level corresponding to the real sample.

[0116] The generator's sample authenticity loss L G1 The loss function based on WGAN-GP is calculated as:

[0117]

[0118] Where z is random input noise, p z is the marginal distribution of random input noise, G(z) is the generated sample, D(G(z)) is the score of the discriminator for the generated sample, represents the expected value of the discriminator's score on the generated sample.

[0119] The fault class loss L of the generator G2 It is calculated by the cross entropy loss function, and the calculation formula is:

[0120] L G2 =CrossEntropy(f, label)

[0121] Where f is the one-hot encoding of the sample fault label output by the discriminator when the input of the discriminator is the generated sample, and label is the one-hot encoding of the real sample label.

[0122] The operating loss of the generator is L G3 It is calculated by the mean square error loss function, and the calculation formula is:

[0123] L G3 =MSE(V f , V)

[0124] Among them, V f is the binary code of the sample voltage level and load level output by the discriminator when the input of the discriminator is the generated sample, and V is the binary code of the voltage level and load level corresponding to the real sample.

[0125] Step 34: Using the two loss functions defined in step 33 as optimization targets and the fault samples in step 24 as training samples, train the adaptive weighted conditional generative adversarial network model to obtain the optimal generator model.

[0126] Figure 3 This is a schematic diagram of the adversarial network model structure. Figure 4 This is a schematic diagram of the generator structure. Figure 5 Schematic diagram of the discriminator structure.

[0127] Step 4: Generate three-phase current data on the load side of a three-phase four-bridge-arm photovoltaic inverter corresponding to 45 fault categories using the optimal generator model obtained in step 3, including fault labels, DC bus voltage levels, and load levels, until y2 samples are generated for each fault state, forming a generated sample set.

[0128] In this embodiment, y2=240, that is, 10,800 samples are generated from 45 fault states.

[0129] Step 5: Use the data in part of the real sample set to fuse the data in all the generated sample sets as the training set, and use the data in the remaining real sample set as the test set to train the classifier to obtain the optimal classifier, test the accuracy of the optimal classifier, and verify the generalization performance of the model.

[0130] In this embodiment, step 5 specifically includes the following steps:

[0131] Step 51: Take some normal state samples in the real sample set and all samples in the generated sample set as the training set, and take the remaining samples in the real sample set as the test set;

[0132] Specifically, 240 samples from the 300 normal state samples in the real sample set and 10,800 samples from the generated sample set are taken to form the training set, and the remaining 2,760 samples in the real sample set constitute the test set.

[0133] Step 52: Construct a classifier model, including 1 input layer, 2 convolutional layers, 2 maximum pooling layers, 1 LSTM layer, 2 fully connected layers, and 1 output layer. Before passing the sample to the classifier, data preprocessing is required, including data normalization and reshaping operations. The data normalization layer normalizes the three-phase current data into standard normal distribution data with a mean of 0 and a variance of 1. The reshape layer converts the normalized data into a shape that matches the input format of the classifier model.

[0134] Step 53: train the classifier model using the training set to obtain the optimal classifier;

[0135] Step 54: Test the accuracy of the optimal classifier using the test set to verify the generalization performance of the model.

[0136] Figure 6 Schematic diagram of data preprocessing and classifier model structure in an embodiment of the present invention.

[0137] In order to verify the effectiveness of this method, the following verification was carried out:

[0138] Figure 7 The loss curves for the generator and discriminator in the adaptive weighted conditional generative adversarial network model proposed in this paper are shown. After training, the loss values ​​of both the generator and the discriminator tend to stabilize and converge to a constant value, verifying the high stability of the proposed model during training.

[0139] The time domain waveforms and spectral characteristics of the samples generated by the adaptive weighted conditional generative adversarial network proposed in this invention and the real samples are compared and analyzed; Figure 8 As shown in Figure 2, it is a time domain waveform comparison diagram of some generated samples and real samples; Figure 9 The following is a spectrum comparison diagram of some generated samples and real samples. Through comparative analysis, it can be found that the samples generated by the adaptive weighted conditional generative adversarial network proposed in this invention are highly consistent with the real samples in terms of time domain waveform and frequency domain characteristics, proving that the proposed method can effectively generate high-quality multi-operating condition samples.

[0140] The classification performance of the optimal classifier was evaluated by validating it on the test set; Figure 10 As shown in Figure 3, the optimal classifier performs well in most fault categories, showing excellent classification results with an overall accuracy of 96.6%.

Claims

1. A small-sample fault diagnosis method for a three-phase, four-arm photovoltaic inverter. The electrical topology involved in the diagnostic method includes a three-phase, four-arm photovoltaic inverter, a control module, a three-phase current sensor, and a load. The three-phase, four-arm photovoltaic inverter includes a DC voltage source, a bridge arm system, and an LC filter connected in series. The bridge arm system includes an A-phase bridge arm, a B-phase bridge arm, a C-phase bridge arm, and an F-phase bridge arm, and each phase bridge arm includes two power switches connected in series. The method is characterized in that: The diagnostic method is based on an adaptive weighted conditional generative adversarial network and includes the following steps: Step 1: Determine the working state of the three-phase four-bridge-arm photovoltaic inverter, including normal working state and fault state, where the fault state includes 45 fault types; Step 2: Collect three-phase current data on the load side of the three-phase four-bridge-arm photovoltaic inverter under normal working conditions and fault conditions, assign a label to each data sample, and create a real sample set; Step 3: Build an adaptive weighted conditional generative adversarial network model and train it with 45 fault samples from the real sample set to obtain the optimal generator model. Step 4: Generate three-phase current data on the load side of a three-phase four-leg photovoltaic inverter corresponding to 45 fault categories using the optimal generator model obtained in step 3, including fault labels, DC bus voltage levels, and load levels, until y2 samples are generated for each fault state, forming a generated sample set. Step 5: Use the data in part of the real sample set to fuse the data in all the generated sample sets as the training set, and use the data in the remaining real sample set as the test set to train the classifier to obtain the optimal classifier, test the accuracy of the optimal classifier, and verify the generalization performance of the model.

2. A three-phase four-bridge-arm photovoltaic inverter small sample fault diagnosis method according to claim 1, characterized in that: The implementation process of step 2 is as follows: Step 21: Establish a three-phase four-bridge-arm photovoltaic inverter main circuit model on the Dspace semi-physical simulation platform, import the control code into the DSP-TMS320F28335 control chip, and implement hardware-in-the-loop simulation of the three-phase four-bridge-arm photovoltaic inverter. Step 22: Simulate the operating states of a three-phase four-bridge-arm photovoltaic inverter under m different DC bus voltage levels and n different load levels on the Dspace semi-physical simulation platform, including normal operating states and 45 fault states, and collect three-phase current data on the load side of the three-phase four-bridge-arm photovoltaic inverter; Step 23: Preprocess the collected three-phase current data, sample the three-phase current data with a sliding window of 900 data points, that is, every 900 data points constitute a sample, and assign corresponding labels; Step 24: Repeat step 23 and complete the following data sample collection: generate x samples for the normal working state sampling, and generate y1 samples for each of the remaining 45 fault states, forming a real sample set.

3. A three-phase four-bridge-arm photovoltaic inverter small sample fault diagnosis method according to claim 2, characterized in that: The implementation process of step 3 is as follows: Step 31: One-hot encode the 45 fault labels; binary encode the m different DC bus voltage levels; binary encode the n different load levels; concatenate the binary codes of the voltage level and the load level to record them as the binary code of the sample working condition; Step 32: Concatenate the one-hot encoding of the fault label, the binary encoding of the DC bus voltage level, and the load level to form a conditional vector with 48 neurons. Step 33: Construct an adaptive weighted conditional generative adversarial network model, including a generator and a discriminator; define the loss function L of the discriminator D And the generator loss function L G , whose expression is: L D =L D1 +L D2 +L D3 L G =L G1 +L G2 +L G3 Among them L D1 is the true and false sample loss of the discriminator, L D2 is the fault category loss of the discriminator, L D3 is the working condition loss of the discriminator; L G1 is the sample true and false loss of the generator, L G2 is the fault class loss of the generator, L G3 is the operating loss of the generator; Step 34: Using the two loss functions defined in step 33 as optimization targets and the fault samples in step 24 as training samples, train the adaptive weighted conditional generative adversarial network model to obtain the optimal generator model.

4. A three-phase four-bridge-arm photovoltaic inverter small sample fault diagnosis method according to claim 3, characterized in that: The generator in step 33 includes a generator main network and a generator conditional auxiliary network, wherein the generator main network includes 1 input layer, 3 fully connected layers, an adaptive weighting layer, 1 residual connection layer and 1 output layer; the input layer is a one-dimensional random noise splicing conditional vector with 100 neurons and 48 neurons, with a total of 148 neurons; the output layer includes 2700 neurons, which are transformed into a generated sample with a shape size of 900×3 after the reshape layer; the generator conditional auxiliary network includes 1 input layer, 3 fully connected layers and 1 output layer, the input layer is a conditional vector with 48 neurons, and the output layer is a weight vector with 1024 neurons; the weight vector output by the generator conditional auxiliary network is multiplied by the third fully connected layer of the generator main network, and a residual connection is added; The discriminator includes a discriminator main network and a discriminator conditional auxiliary network, wherein the discriminator main network includes 1 input layer, 3 fully connected layers, 1 adaptive weighting layer, 1 residual connection layer and 1 output layer; the generated sample or real sample with a shape size of 900×3 is converted into a one-dimensional vector with 2700 neurons through the reshape layer; the input layer is a real sample with 2700 neurons or a generated sample spliced ​​with a conditional vector with 48 neurons, totaling 2748 neurons; the output layer includes three parts: the authenticity of the sample, the one-hot encoding of the sample fault label, and the binary encoding of the sample working condition; the discriminator conditional auxiliary network includes 1 input layer, 1 fully connected layer and 1 output layer; the input layer is a conditional vector with 48 neurons, and the output layer is a weight vector with 256 neurons; the weight vector output by the discriminator conditional auxiliary network is multiplied by the third fully connected layer of the discriminator main network, and a residual connection is added.

5. A three-phase four-bridge-arm photovoltaic inverter small sample fault diagnosis method according to claim 4, characterized in that: The step 5 specifically includes the following steps: Step 51: Take some normal state samples in the real sample set and all samples in the generated sample set as the training set, and take the remaining samples in the real sample set as the test set; Step 52: Construct a classifier model, including 1 input layer, 2 convolutional layers, 2 maximum pooling layers, 1 LSTM layer, 2 fully connected layers, and 1 output layer. Before passing the sample to the classifier, data preprocessing is required, including data normalization and reshaping operations. The data normalization layer normalizes the three-phase current data into standard normal distribution data with a mean of 0 and a variance of 1. The reshape layer converts the normalized data into a shape that matches the input format of the classifier model. Step 53: train the classifier model using the training set to obtain the optimal classifier; Step 54: Test the accuracy of the optimal classifier using the test set to verify the generalization performance of the model.

6. A three-phase four-bridge-arm photovoltaic inverter small sample fault diagnosis method according to claim 1, characterized in that: The 45 fault types described in step 1 include: 8 types of single-power switch open-circuit faults, 28 types of double-power switch open-circuit faults, and 9 types of current sensor faults. The eight types of power switch single-tube open circuit faults include: Phase A upper arm power switch open circuit, Phase A lower arm power switch open circuit, Phase B upper arm power switch open circuit, Phase B lower arm power switch open circuit, Phase C upper arm power switch open circuit, Phase C lower arm power switch open circuit, Phase F upper arm power switch open circuit, and Phase F lower arm power switch open circuit. The 28 types of power switch double-tube open circuit faults include 4 types of same-phase power switch double-tube open circuits, 12 types of different-phase but different-arm power switch double-tube open circuits, and 12 types of different-phase but same-arm power switch double-tube open circuits. Among them, the 4 types of same-phase power switch double-tube open circuits specifically include: the upper and lower bridge arm power switch tubes of phase A are opened at the same time, the upper and lower bridge arm power switch tubes of phase B are opened at the same time, the upper and lower bridge arm power switch tubes of phase C are opened at the same time, and the upper and lower bridge arm power switch tubes of phase F are opened at the same time. The 12 types of different-phase but different-arm power switch double-tube open circuits specifically include: The power switches of the upper bridge arm of phase A and the lower bridge arm of phase B are opened at the same time, the power switches of the upper bridge arm of phase A and the lower bridge arm of phase C are opened at the same time, the power switches of the upper bridge arm of phase A and the lower bridge arm of phase F are opened at the same time, the power switches of the upper bridge arm of phase B and the lower bridge arm of phase A are opened at the same time, the power switches of the upper bridge arm of phase B and the lower bridge arm of phase C are opened at the same time, the power switches of the upper bridge arm of phase B and the lower bridge arm of phase F are opened at the same time, the power switches of the upper bridge arm of phase C and the lower bridge arm of phase A are opened at the same time, the power switches of the upper bridge arm of phase C and the lower bridge arm of phase B are opened at the same time, the power switches of the upper bridge arm of phase C and the lower bridge arm of phase F are opened at the same time The power switches of the lower arm of the phase are opened at the same time, the power switches of the upper arm of the phase F and the lower arm of the phase A are opened at the same time, the power switches of the upper arm of the phase F and the lower arm of the phase B are opened at the same time, and the power switches of the upper arm of the phase F and the lower arm of the phase C are opened at the same time; the 12 different types of double-tube opening of the power switches of the same arm include: the power switches of the upper arm of the phase A and the upper arm of the phase B are opened at the same time, the power switches of the upper arm of the phase A and the upper arm of the phase C are opened at the same time, the power switches of the upper arm of the phase A and the upper arm of the phase F are opened at the same time, and the power switches of the upper arm of the phase B and the upper arm of the phase C are opened at the same time. The switching tubes are opened at the same time, the power switching tubes of the upper bridge arm of phase B and the upper bridge arm of phase F are opened at the same time, the power switching tubes of the upper bridge arm of phase C and the upper bridge arm of phase F are opened at the same time, the power switching tubes of the lower bridge arm of phase A and the lower bridge arm of phase B are opened at the same time, the power switching tubes of the lower bridge arm of phase A and the lower bridge arm of phase C are opened at the same time, the power switching tubes of the lower bridge arm of phase A and the lower bridge arm of phase F are opened at the same time, the power switching tubes of the lower bridge arm of phase B and the lower bridge arm of phase C are opened at the same time, the power switching tubes of the lower bridge arm of phase B and the lower bridge arm of phase F are opened at the same time, and the power switching tubes of the lower bridge arm of phase C and the lower bridge arm of phase F are opened at the same time; The 9 types of current sensor faults include: phase A current sensor open circuit, phase B current sensor open circuit, phase C current sensor open circuit, phase A current sensor bias, phase B current sensor bias, phase C current sensor bias, phase A current sensor stuck, phase B current sensor stuck, and phase C current sensor stuck.

7. A three-phase four-bridge-arm photovoltaic inverter small sample fault diagnosis method according to claim 3, characterized in that: Step 33: The sample true and false loss L of the discriminator D1 , the fault category loss L of the discriminator D2 , the discriminator's working condition loss L D3 , the generator's sample true and false loss L G1 , the fault category loss L of the generator G2 and the generator's operating loss L G3 The calculation is as follows: The sample true and false loss L of the discriminator D1 The loss function based on WGAN-GP is calculated as: Where z is random input noise, p z is the marginal distribution of random input noise, G(z) is the generated sample, D(G(z)) is the score of the discriminator for the generated sample, represents the expected value of the discriminator's score on the generated sample; x is the real sample, p r is the marginal distribution of the real sample, D(x) is the score of the discriminator for the real sample, Represents the expected value of the discriminator's score on the real sample; is the gradient penalty term, λ is the regularization term coefficient, is the interpolation sample, is the marginal distribution of the interpolation samples, is the score of the discriminator on the interpolated sample, express Interpolation samples The gradient, express Interpolation samples The l2 norm of the gradient of , represents the unweighted gradient penalty term, interpolation sample It is calculated by generating samples G(z) and real samples x, and the calculation formula is: Among them, ε is the weight parameter, and ε∈(0,1); The fault category loss L of the discriminator D2 It is calculated by the cross entropy loss function, and the calculation formula is: L D2 =CrossEntropy(r,label)+CrossEntropy(f,label) Where CrossEntropy is the cross entropy loss function, r is the one-hot encoding of the sample fault label output by the discriminator when the input of the discriminator is a real sample, f is the one-hot encoding of the sample fault label output by the discriminator when the input of the discriminator is a generated sample, and label is the one-hot encoding of the real sample label; The working condition loss L of the discriminator D3 It is calculated by the mean square error loss function, and the calculation formula is: L D3 =MSE(V r ,V)+MSE(V f ,V) Among them, MSE is the mean square error loss function, V r When the input of the discriminator is a real sample, the binary code of the sample voltage level and load level output by the discriminator is V f is the binary code of the sample voltage level and load level output by the discriminator when the input of the discriminator is the generated sample, and V is the binary code of the voltage level and load level corresponding to the real sample; The generator's sample authenticity loss L G1 The loss function based on WGAN-GP is calculated as: Where z is random input noise, p z is the marginal distribution of random input noise, G(z) is the generated sample, D(G(z)) is the score of the discriminator for the generated sample, represents the expected value of the discriminator's score on the generated sample; The fault class loss L of the generator G2 It is calculated by the cross entropy loss function, and the calculation formula is: L G2 =CrossEntropy(f,label) Where f is the one-hot encoding of the sample fault label output by the discriminator when the input of the discriminator is the generated sample, and label is the one-hot encoding of the real sample label; The operating loss of the generator is L G3 It is calculated by the mean square error loss function, and the calculation formula is: L G2 =MSE(V f ,V) Among them, V f is the binary code of the sample voltage level and load level output by the discriminator when the input of the discriminator is the generated sample, and V is the binary code of the voltage level and load level corresponding to the real sample.