Box-type substation fault data derivation method based on improved CTGAN model

By introducing the self-attention mechanism and differential evolution algorithm into the CTGAN model, the SA-CTGAN model is constructed, which solves the problems of sparse fault samples and class imbalance in box-type substations, improves the quality of generated data, and significantly improves the accuracy of fault diagnosis. .

CN118643336APending Publication Date: 2024-09-13XIAN UNIV OF TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410803938.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

In the existing technology, when fault samples are scarce in box-type substations and there is an imbalance between healthy samples and fault sample classes, the performance of the deep learning fault diagnosis method decreases, making it difficult to generate high-quality fault data and affecting the accuracy of power grid equipment fault diagnosis.

Method used

Use the improved CTGAN model to learn the relationship matrix between input features through the self-attention mechanism, build the SA-CTGAN data derivative model, and use the differential evolution algorithm to tune the hyperparameters of the generator and discriminator to generate high-quality fault data , to solve the class imbalance problem.

Benefits of technology

The generated data is distributed similarly to the original data, maintaining the correlation between different indicators of box-type substation data, and significantly improving the accuracy of fault diagnosis and data support capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643336A
    Figure CN118643336A
Patent Text Reader

Abstract

The invention discloses a box-type substation fault data derivation method based on an improved CTGAN model, and the method comprises the steps: a data preprocessing stage: employing a MissForest interpolation algorithm, an IF detection algorithm and a Z-score method to carry out the missing value interpolation, abnormal value detection and data normalization of data; in the SA-CTGAN model construction stage, a self-attention mechanism is introduced into a generator of the CTGAN, namely, two full connection layers in the generator of the CTGAN are replaced by self-attention layers, and an SA-CTGAN data derivative model is formed; in the SA-CTGAN model training stage, main hyper-parameters such as the training batch size and the number of iterations of the CTGAN model are adjusted and optimized through DE, and a final SA-CTGAN data derivative model is obtained. According to the method, the problems that fault samples of the box-type substation are rare and healthy samples and fault sample classes are unbalanced can be solved, and the derivation result is remarkably improved when data with relatively high relevance among indexes is derived.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a box-type substation fault data derivation method based on an improved CTGAN model, and belongs to the technical field of smart grids. Background Art

[0002] The rapid advancement of my country's industrialization process has led to the continuous expansion of the scale of the power system and the increasing complexity of its structure, which has put forward higher requirements for the safety, reliability and stability of the power system. As the end of the entire power system, the role of the distribution network is crucial. Timely and accurate discovery and location of faults in the distribution network equipment box substation is of great significance to the safe and reliable operation of the power system. Reasonable combination and application of emerging technologies such as data acquisition, Internet of Things, and deep learning can efficiently, real-time and accurately judge the faults in the distribution network, thereby providing scientific maintenance plans and decisions to ensure the stable operation of the power system. At present, the mainstream fault diagnosis technology is the deep learning fault diagnosis method based on artificial intelligence. The core idea of ​​this method is to use machine learning and data mining technology to autonomously discover and learn fault information and knowledge from massive data to deal with uncertain and ambiguous random faults, thereby achieving efficient fault diagnosis. The deep learning fault diagnosis method relies on the accumulation of massive data, but in actual application scenarios, the power grid equipment is in normal working state in most cases, and the generated fault samples are very few. There is a class imbalance between fault samples and healthy samples, which leads to the performance degradation of the deep learning fault diagnosis method. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a box-type substation fault data derivation method based on the improved CTGAN model to solve the problems of scarce box-type substation fault samples and imbalance between healthy samples and fault samples. It can generate high-quality generated data based on a small number of fault samples, and provide sufficient data support for the fault diagnosis of power grid terminal equipment.

[0004] The technical solution adopted by the present invention is: a box-type substation fault data derivation method based on an improved CTGAN model, the method is: first, data preprocessing is performed, that is, the data is converted and normalized to facilitate subsequent model training; then, a SA-CTGAN data derivation model is constructed, self-attention is applied in the generator G, and the relationship matrix between input features is learned through the self-attention mechanism, so as to maintain the correlation between different features and improve the quality of CTGAN generated data; finally, the learning rate, number of hidden neurons, training batch size and number of iterations of the CTGAN model are tuned based on the differential evolution algorithm (DE), and the performance convergence of the generator and the discriminator is achieved by alternately training the generator and the discriminator, so that the SA-CTGAN data derivation model can generate high-quality data.

[0005] The above data preprocessing method refers to the use of MissForest interpolation algorithm for missing data in the data collection process of the terminal equipment "box-type substation" of the power system. In terms of outlier detection, the IF detection algorithm is used. Finally, in order to unify the data dimension, the Z-score method is selected for data normalization processing to meet the needs of fault diagnosis applications, complete data cleaning (including missing value interpolation and outlier detection) and data normalization, and realize data preprocessing. The data preprocessing process is shown in Figure 1 , the specific method includes the following specific steps:

[0006] Step 1: Classify the fault types of box-type substation into six categories: high-voltage circuit breaker fault, high-voltage lightning arrester fault, dry-type transformer fault, low-voltage incoming circuit breaker fault, low-voltage outgoing circuit breaker fault, and capacitor lightning arrester fault. For these six types of faults, collect 24 indicators as shown in Table 1 as data support for fault information mining.

[0007] Table 1 24 indicators of faults

[0008]

[0009]

[0010] For missing data in the data of collected indicators due to network packet loss or collection anomalies, the MissForest interpolation algorithm is used to interpolate the collected data;

[0011] Step 2: Use the IF detection algorithm to detect whether there are outliers in the box-type substation monitoring data set. If there are outliers, use the MissForest interpolation algorithm to interpolate and replace them;

[0012] Step 3: Select the Z-score method to normalize the cleaned data set, i.e., the data processed in step 2.

[0013] Furthermore, the SA-CTGAN data derivation model constructed above ensures that the generated data is similar to the original data in distribution while maintaining the correlation between different indicators of the box-type substation data. The specific construction method includes the following steps:

[0014] Step a: Use a generator G and a discriminator D to build a standard CTGAN derivative model. The generator and discriminator use a multi-layer perceptron (MLP) structure. The input of the generator is a random vector and a conditional vector, and the output is the generated sample data. The input of the discriminator is a real sample or a sample generated by the generator, and the output is the judgment result of the discriminator on the input sample (real or fake).

[0015] Step b: Introduce the self-attention mechanism in the generator of the CTGAN derivative model, that is, replace the two fully connected layers in the generator of CTGAN with self-attention layers to form the SA-CTGAN data derivative model;

[0016] Step c: In the model training phase, the DE algorithm is used to tune the hyperparameters of the SA-CTGAN data-derived model, including the training learning rate, number of hidden neurons, batch size, and number of iterations, and the SA-CTGAN data-derived model is trained;

[0017] Step d: Use the trained SA-CTGAN data derivation model, input the original data to be derived, and output the generated data to provide sufficient data support for fault diagnosis.

[0018] Furthermore, the specific operation method of step 1 is as follows: for a sample X={X1,X2,...,X n}, where an arbitrary variable X s , Represents X s The observed value of Represents X s The missing values ​​of Represents X s Observations other than Represents X s For the remaining observations other than the missing values, when interpolating missing values, the missing forest is based on the random forest algorithm to build a decision tree forest. Train a model of y~x and Take as input prediction and fill missing values That is, the missing value interpolation of a single data is completed. If it is found through detection that there are missing values ​​in multiple variables in the data set, the MissForest algorithm is used to complete the missing value interpolation of the entire sample in an iterative manner. The specific process is to input the original data set D into the MissForest algorithm, and finally output a complete data set filled with predicted values.

[0019] Furthermore, the specific implementation method in the above step 2 is: using the IF algorithm to detect abnormal values ​​in the data, if the detected abnormal values ​​are no more than the set number of feature data with abnormalities, then interpolation operation is performed on the abnormal values, if more than the set number of feature data have abnormalities, then the record is directly removed;

[0020] Among them, the specific method of using the IF algorithm for outlier detection is: randomly select n samples from the training data as a subset, that is, as the root node of an isolated tree; randomly select a feature from the subset, and randomly select a threshold q within the feature value of the current node; according to the threshold q, the current node space is divided into two subspaces, and the points with current features less than q are used as the left branch of the current node, and the points greater than or equal to q are used as the right branch; each branch node is recursively split according to the above process, and new child nodes are continuously created until there is only one data on a node or the height of the tree reaches log2(n); the generated isolated tree is evaluated for anomalies and the anomaly score S is calculated. For any sample x, the calculation process of the anomaly score S is as follows:

[0021] First, calculate the path length: for each sample x, calculate its path length h(x) in each tree, which refers to the number of edges required for the sample x to reach the isolated node from the root node of the tree (being isolated means that the sample eventually reaches the leaf node of the tree) through the feature selection method of the isolated tree construction stage; then calculate the average path length E(h(x));

[0022] The average path length c(n) of all trees is calculated as follows:

[0023]

[0024] H(·)=ln(·)+ε

[0025] Where H(·) is the harmonic number, ε is the Euler constant, whose value is 0.5772156649, and n is the number of samples. For a given data set size n, the expectation of the average path length is a constant;

[0026] The anomaly score is evaluated using the following formula:

[0027]

[0028] The score of the anomaly score S is between [0, 1]. The larger the value, the greater the suspicion that it is an outlier.

[0029] Furthermore, the specific implementation method in the above step 3 is: convert the data into a standard normal distribution with a mean of 0 and a variance of 1, and the normalization formula is:

[0030]

[0031] Where:

[0032] ——is the mean of characteristic samples; n is the number of samples;

[0033] ——is the mean difference of characteristic samples.

[0034] Furthermore, the specific process of the above DE algorithm is: determine the control parameters and fitness function of the differential evolution algorithm, the control parameters include population size, scaling factor and hybridization probability; randomly generate an initial population; evaluate the initial population, that is, calculate the fitness of individuals in the population; determine whether each individual meets the final optimization conditions or whether the number of evolutionary iterations reaches the maximum, if so, the individual is output as the optimal solution; if not, continue; perform "mutation" and "crossover" operations to obtain an intermediate population; select individuals from the original population and the intermediate population to obtain a new generation of original population; the number of evolutions is +1, and the process is repeated until the performance of the generator and the discriminator converges.

[0035] Furthermore, the above-mentioned SA-CTGAN data-derived model training method is as follows: random noise and conditional vectors are input into the generator to generate generated data in a specified format; the original data samples are modeled through the encoder and input into the discriminator together with the generated data and conditional vectors; the discriminator discriminates the original data samples and the generated data samples respectively, and then updates the weights of the discriminator by back-propagation of the loss function, that is, the discriminator continuously improves its ability to discriminate generated data samples; according to the output of the discriminator, the parameters of the generator are continuously adjusted, that is, the ability of the generator to generate data is improved, so that the data generated by itself is as "consistent" as possible with the original data, so that the discriminator cannot correctly discriminate; repeat the process, and stop training when the loss function of the discriminator converges within a certain number of iterations.

[0036] Beneficial effects of the present invention: Compared with the prior art, the present invention introduces a self-attention mechanism into the generator of the CTGAN model, constructs a SA-CTGAN data derivation model, so that it can generate more "real" generated data, and provide sufficient data support for deep learning fault diagnosis methods. The existing method generates data according to the conditional vector through a classifier, and captures the general distribution of each variable through an encoder, but it does not model the dependency relationship of each feature of the real data set, and only captures the possible relationship between each feature through two fully connected hidden layers in the generator. However, there is a strong correlation between the indicators in the box-type substation monitoring data set, which leads to poor results when using the prior art to generate box-type substation fault samples. When using this method to derive data with strong correlations between indicators, the derived results are significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is the flow chart of SA-CTGAN algorithm;

[0038] Figure 2 Interpolation flowchart for the missing forest algorithm;

[0039] Figure 3 This is the flowchart of Isolation Forest Outlier Detection;

[0040] Figure 4 Visualize the missing values;

[0041] Figure 5 This is the percentage of missing values ​​for each indicator;

[0042] Figure 6 is the mean square error diagram of each interpolation method;

[0043] Figure 7 Performance diagram of different algorithms on different data sets;

[0044] Figure 8 Comparison chart of the accuracy of each anomaly detection method

[0045] Fig. 9 Schematic diagram of CTGAN structure;

[0046] Fig.10 This is a diagram of the working principle of the self-attention mechanism;

[0047] Fig.11 This is the workflow diagram of the self-attention mechanism;

[0048] Fig.12 Schematic diagram of the self-attention mechanism;

[0049] Fig.13 Optimize the flow chart for DE algorithm;

[0050] Fig.14 Data generation result comparison chart; Fig.14 (a), (b), (c), and (d) are the distribution histograms of the original data, SMOTE-generated data, CTGAN-generated data, and SA-CTGAN-generated data, respectively;

[0051] Fig.15 Heat map comparison of original data and generated data; Fig.15 (a), (b), (c), and (d) are the heat maps of the original data, SMOTE generated data, CTGAN generated data, and SA-CTGAN generated data, respectively. DETAILED DESCRIPTION

[0052] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.

[0053] Example 1: Figure 1-8 As shown in the figure, a box-type substation fault data derivation method based on the improved CTGAN model is specifically divided into three steps, namely, step one, data preprocessing stage; step two, SA-CTGAN model construction stage; step three, SA-CTGAN model training stage, which is subdivided into 6 steps.

[0054] Step 1: Data preprocessing

[0055] The structure of box-type substations is complex, and the collected data has the characteristics of high dimension and large data volume. In actual application scenarios, data is often missing and abnormal due to network packet loss or unstable collection equipment. These missing and abnormal data are uploaded directly to the cloud for fault diagnosis without processing, which will affect the training and diagnosis accuracy of the cloud model. Data preprocessing does not require high computing power, so data preprocessing tasks can be deployed on the edge to clean and normalize the missing and abnormal data before uploading it to the cloud for fault diagnosis to avoid the adverse effects of missing values, abnormal values ​​and dimensional differences on fault diagnosis.

[0056] The fault types of box-type substations are divided into six categories: high-voltage circuit breaker fault, high-voltage lightning arrester fault, dry-type transformer fault, low-voltage incoming circuit breaker fault, low-voltage outgoing circuit breaker fault, and capacitor lightning arrester fault. For these six types of faults, 24 indicators are collected as shown in Table 1;

[0057] For missing data in the data of collected indicators due to network packet loss or collection anomalies, the MissForest interpolation algorithm is used to interpolate the collected data;

[0058] Table 1 24 indicators of fault collection

[0059]

[0060]

[0061] Specific operations of step 1:

[0062] In the detection data of box-type substation, there is a certain correlation between different indicators, so it is not suitable to use the single variable interpolation method, so we focus on the selection of interpolation methods based on machine learning;

[0063] For a sample with missing data X={X1,X2,...,X n}, where an arbitrary variable X s , Represents X s The observed value of Represents X s The missing values ​​of Represents X s Observations other than Represents X s The remaining observations except the missing values. When interpolating missing values, Missing Forest constructs a decision tree forest based on the random forest algorithm. Train a model of y~x and Take as input prediction and fill missing values Completed X s However, there are usually more than one variable in the data set with missing values, so it is necessary to complete the missing value interpolation of the entire sample in an iterative manner. The interpolation process of MissForest is as follows Figure 2 shown.

[0064] Specific operations of step 2:

[0065] In the process of data collection, it is inevitable to encounter situations such as unstable data collection equipment or unstable operation of the box-type substation itself, which leads to abnormal values ​​in the collected data. These abnormal values ​​themselves do not contain valuable information. Transmitting such data not only wastes data transmission resources but also affects the effect of data mining. Therefore, these abnormal values ​​need to be processed. First, it is necessary to detect the abnormal values ​​in the data. If only a few features are abnormal among the detected abnormal values, the abnormal values ​​are interpolated. If most features are abnormal, the record is directly removed.

[0066] First, we need to detect the outliers in the data. If only a few features are abnormal among the detected outliers, we will interpolate the outliers. If most features are abnormal, we will directly remove the record. The detection process of the IF method is as follows: Figure 3 As shown. The steps for outlier detection using the IF method are as follows:

[0067] Step 1: Randomly select n samples from the training data as a subset and use them as the root node of an isolated tree;

[0068] Step 2: Randomly select a feature from the subset and randomly select a threshold q within the feature value of the current node;

[0069] Step 3: According to q, the current node space is divided into two subspaces. The points whose current features are less than q are taken as the left branch of the current node, and the points whose features are greater than or equal to q are taken as the right branch.

[0070] Step 4: Each branch node is recursively split according to Step 2 and Step 3, and new child nodes are continuously created until there is only one data on a node or the height of the tree reaches log2(n);

[0071] Step 5: Perform anomaly evaluation on the generated isolated tree and calculate the anomaly score S. For any sample x, it is necessary to combine the results of each tree and use the formula to evaluate the anomaly score;

[0072] The calculation process of the anomaly score S is as follows:

[0073] First, calculate the path length: for each sample x, calculate its path length h(x) in each tree, which refers to the number of edges required for the sample x to reach the isolated node from the root node of the tree (being isolated means that the sample eventually reaches the leaf node of the tree) through the feature selection method of the isolated tree construction stage; then calculate the average path length E(h(x));

[0074] The average path length c(n) of all trees is calculated as follows:

[0075]

[0076] H(·)=ln(·)+ε

[0077] Where H(·) is the harmonic number, ε is the Euler constant, whose value is 0.5772156649, and n is the number of samples. For a given data set size n, the expectation of the average path length is a constant;

[0078] The anomaly score is evaluated using the following formula:

[0079]

[0080] The score of the anomaly score S is between [0, 1]. The larger the value, the greater the suspicion that it is an outlier.

[0081] Specific operations of step 3:

[0082] The monitoring data of box-type substations is of high dimension. The characteristic units and value ranges of different indicators are different. Some characteristics have huge differences. For example, the value of the low-voltage incoming line voltage is generally around 220, while the core grounding current fluctuates around 0.01. Indicators with large dimensions may usually play a decisive role in data mining, while the characteristics of indicators with relatively small dimensions are usually ignored in data mining. For deep learning diagnostic models, indicators of different scales as input will cause the weight update and optimizer steps to approach the minimum value unevenly, making training more difficult and having a negative impact on diagnostic accuracy. In order to eliminate the impact of excessive differences in feature sizes, data processing is required;

[0083] Common processing methods include normalization, standardization, normalization, and various combinations of these three methods. The data of deep learning applications are processed in different ways, and different evaluation indicators are compared: accuracy, precision, recall, F-score, negative positive value (FP), and area under the receiver operating characteristic curve (ROC curve) (AUC). The results are shown in Table 2. Among them, "positive-standard" means normalization first and then standardization, and so on.

[0084] Table 2 Comparison of deep learning model fitting effects

[0085] Accuracy Precision Recall F-score FP AUC No treatment 0.5604 0.5604 1.0000 0.7183 1.0000 0.5000 Normalization 0.5604 0.5604 1.0000 0.7183 1.0000 0.5000 standardization 0.8462 0.8491 0.8824 0.8654 0.2 0.8412 Normalization 0.8571 0.8519 0.9020 0.8762 0.2 0.8510 Positive-standard 0.7802 0.7925 0.8235 0.8077 0.2750 0.7743 Positive-return 0.7912 0.8077 0.8235 0.8155 0.2500 0.7868 Standard-Return 0.8352 0.8462 0.8627 0.8544 0.2 0.8314 Return-Standard 0.8022 0.8113 0.8431 0.8269 0.2500 0.7966 Positive-standard-return 0.8022 0.8235 0.8235 0.8325 0.2250 0.3250 Positive-return-standard 0.8022 0.7797 0.9020 0.8364 0.3250 0.7785

[0086] As can be seen from Table 2, normalization is the most suitable data set processing method for deep learning applications. Normalization can limit the data to a certain range and have the same measurement scale, thereby reducing the negative impact caused by singular sample data, accelerating gradient descent, and improving diagnostic accuracy to a certain extent.

[0087] The normalization method is to convert the data into a standard normal distribution with a mean of 0 and a variance of 1. The normalization formula is:

[0088]

[0089] Where:

[0090] ——is the mean of characteristic samples; n is the number of samples;

[0091] ——is the mean difference of characteristic samples.

[0092] Preprocessing example analysis:

[0093] 1. Data Cleaning

[0094] The 24 monitoring data of the health status of the box-type substation and the 6 fault states in Table 1 were randomly extracted from the database of a power supply company, and a total of 700 pieces were used as original data for example analysis. As shown in Table 3, Label indicates the fault type: 0-normal operation, 1-high-voltage circuit breaker fault, 2-high-voltage lightning arrester fault, 3-dry-type transformer fault, 4-low-voltage incoming circuit breaker fault, 5-low-voltage outgoing circuit breaker fault, 6-capacitor lightning arrester fault.

[0095] Table 3 Original dataset

[0096] Serial number X1 X2 X3 X4 X5 X6 … Label 0 23.24 45.38 21.26 0.04 8.47 23.24 … 0 1 22.51 32.40 18.47 0.13 3.61 22.51 … 0 2 21.19 48.57 16.83 0.04 7.40 21.19 … 0 3 16.76 48.57 24.53 None 6.22 53.50 0 … … … … … … … … … 697 40.25 95.31 51.46 0.80 91.16 83.56 … 6 698 None 93.70 50.41 0.75 91.16 62.79 … 6 699 40.28 94.34 53.21 0.76 91.15 82.26 … 6

[0097] (1) Using MiceForest to interpolate missing values

[0098] Check the missing outliers in the original data set and sort the features according to the number of missing values ​​in ascending order, such as Figure 4 and Figure 5 shown.

[0099] In order to evaluate the quality of MissForest, three methods, namely mean interpolation, K-value nearest neighbor interpolation and MissForest interpolation, were selected for cross-validation experiments. For each method, the experiment was repeated 10 times and the mean square error (MSE) was calculated. The average value was taken as the evaluation index. The smaller the mean square error obtained by a method, the better the interpolation effect of the method. The experimental results are shown in Figure 2. Figure 6 shown.

[0100] Depend on Figure 6 It can be seen that among the three interpolation methods of mean interpolation, K-value nearest neighbor interpolation and MissForest interpolation, the mean square error between the interpolated data set and the original data set by the MissForest interpolation method is the smallest, and the performance is the best.

[0101] (2) Using Isolation Forest to Detect Outliers

[0102] In order to verify the superiority of the IF algorithm, five two-dimensional data sets with different density distributions (unimodal distribution, bimodal distribution, normal distribution, Two-moons distribution and uniform distribution) were constructed. HBOS, PCA, LOF and IF methods were selected to perform anomaly detection on these five data sets respectively. The results are shown in Figure 2. Figure 7 shown.

[0103] according to Figure 7It can be seen that HBOS performs worse than the other three methods on data sets with different distributions, especially on uniformly distributed data sets. The PCA method detects outliers by dimensionality reduction and reconstruction. As can be seen from the figure, PCA is prone to overfitting for uniformly distributed data sets. Without any distribution assumptions on the underlying data, the risk of the PCA method is relatively large. LOF and IF perform well on five data sets with different distributions and can handle situations with different data densities well.

[0104] In order to further compare the accuracy of different detection methods on high-dimensional datasets, the Breast-cancer-unsupervised-ad dataset dedicated to anomaly detection was used for verification. The anomaly detection experiments were repeated 10 times for each of the four methods, and the average accuracy was calculated. The results are shown in the figure below. Figure 8 shown.

[0105] analyze Figure 8 Among the four methods, the accuracy of the IF algorithm is the highest in both the training set and the validation set, indicating that the IF algorithm has better performance for high-dimensional data. The monitoring data of the box-type substation has 24 different indicators, which belongs to high-dimensional data, so the IF algorithm is used for outlier detection.

[0106] (3) Data cleaning results

[0107] Based on the experimental results in (1) and (2), MissForest and IF methods are used to interpolate missing values ​​and detect and interpolate outliers on the original data set. The detection results are shown in Table 4, where None represents missing values ​​and the values ​​in italics are outliers detected by IForest. The interpolation results are shown in Table 5.

[0108] Table 4 Missing values ​​and outliers before interpolation

[0109] Serial number X1 X2 X3 X4 X5 X6 … Label 0 23.24 45.38 21.26 0.04 8.47 23.24 … 0 1 22.51 32.40 18.47 0.13 3.61 22.51 … 0 2 21.19 48.57 16.8 0.04 7.40 21.19 … 0 3 16.76 48.57 24.53 None 6.22 53.50 0 … … … … … … … … … 697 40.25 95.31 51.46 0.80 91.16 83.56 … 6 698 None 93.70 50.41 0.75 91.16 62.79 … 6 699 40.28 94.34 53.21 0.76 91.15 82.26 … 6

[0110] Table 5 After missing values ​​and outliers are imputed

[0111] Serial number X1 X2 X3 X4 X5 X6 … Label 0 23.24 45.38 21.26 0.04 8.47 23.24 … 0 1 22.51 32.40 18.47 0.13 7.68 22.51 … 0 2 21.19 48.57 16.8 0.04 7.40 21.19 … 0 3 16.76 48.57 24.53 0.07 6.22 53.50 0 … … … … … … … … … 697 40.25 95.31 51.46 0.80 91.16 83.56 … 6 698 40.88 93.70 50.41 0.75 91.16 62.67 … 6 699 40.28 94.34 53.21 0.76 91.15 82.26 … 6

[0112] 2 Data Normalization

[0113] In order to eliminate the dimension, the Z-score method suitable for classification data application is used as the normalization processing method for box-change data. The results are shown in Table 6.

[0114] Table 6 Normalization results

[0115] Serial number X1 X2 X3 X4 X5 X6 … Label 0 -1.5644 -0.1110 -0.0546 -0.5798 -0.7632 -0.8914 … 0 1 -1.6805 -0.5266 -0.1947 -0.5993 -0.3550 -0.8012 … 0 2 -1.8896 -0.0089 -0.2769 -0.6061 -0.4418 -0.7739 … 0 3 -2.5943 -0.0089 0.1091 -0.6351 -0.6530 -0.7909 0 … … … … … … … … … 697 1.1397 1.4873 1.4585 2.0976 1.4557 -0.4433 … 6 698 1.2392 1.4359 1.4060 1.9104 1.4557 -0.4496 … 6 699 1.1452 1.4563 1.5461 1.9600 1.4556 -0.4524 … 6

[0116] The preprocessing stage has the following advantages:

[0117] (1) MissForest is used to interpolate missing data due to network packet loss or collection anomalies. A cross-experiment is conducted on the collected data using mean interpolation, KNN interpolation, and MissForest interpolation methods, verifying the superiority of MissForest in missing value interpolation.

[0118] (2) Through comparative experiments, it was verified that the IF detection algorithm has excellent performance in data sets with different distributions. Therefore, the IF method is used to detect outliers in the box-type transformer monitoring data set, and MissForest is used to interpolate and replace them.

[0119] (3) In order to unify the data dimension and improve the training efficiency and performance of the fault diagnosis model, the Z-score method suitable for fault diagnosis applications was selected to normalize the cleaned data set.

[0120] Step 2: SA-CTGAN model construction phase

[0121] The fault diagnosis of box-type substations based on deep learning requires a large number of healthy samples and faulty samples as the data basis. Generally speaking, as a minority class sample, the amount of information carried by the faulty samples is more valuable. However, in actual operation, box-type substations are in a healthy state in most cases, with more healthy samples and very few faulty samples. Under the circumstances of scarcity of fault samples and imbalance between healthy samples and faulty samples, the fault recognition accuracy is low and the diagnosis effect is unsatisfactory. In response to the above problems, according to the characteristics of the data collected by box-type substations, a CTGAN data derivation model based on Self-Attention is established, and it is deployed on the cloud of the cloud-edge collaborative fault diagnosis framework to generate sufficient high-quality generated data based on a small amount of data to solve the problems of scarce number of fault samples and class imbalance;

[0122] Step 4: Use the generator G and a discriminator D to build a standard CTGAN derivative model. The generator and discriminator usually use a multi-layer perceptron (MLP) structure. The input of the generator is a random vector and a conditional vector, and the output is the generated sample data. The input of the discriminator is a real sample or a sample generated by the generator, and the output is the judgment result of the discriminator on the input sample (real or fake). The basic structure of CTGAN is as follows: Fig. 9 shown.

[0123] The overall training process of CTGAN is as follows:

[0124] Step 1: Random noise and conditional vector are input into the generator to generate data in the specified format;

[0125] Step 2: The original data sample is modeled through the encoder and input into the discriminator together with the generated data and conditional vector;

[0126] Step 3: The discriminator discriminates the original data samples and the generated data samples respectively, and then updates the weight of the discriminator by back propagation of the loss function, that is, the discriminator continuously improves its ability to discriminate the generated data samples;

[0127] Step 4: According to the output of the discriminator, the parameters of the generator are continuously adjusted, that is, the ability of the generator to generate data is improved, so that the data generated by itself is as "consistent" as possible with the original data, so that the discriminator cannot make a correct judgment;

[0128] Step 5: Repeat Step 1 to Step 4. When the loss function of the discriminator converges within a certain number of iterations, stop training.

[0129] Specific operations of step 5:

[0130] There is a strong correlation between different indicators in the monitoring data of box-type substations. The traditional generative adversarial network model cannot model the correlation between input features. Therefore, it is necessary to construct a generative adversarial network data derivation model that can maintain the correlation between the various indicators of box-type substation monitoring data.

[0131] The self-attention mechanism is introduced into the generator of CTGAN, that is, the two fully connected layers in the generator of CTGAN are replaced by self-attention layers to form the SA-CTGAN data derivation model.

[0132] CTGAN generates data according to the conditional vector through the classifier, and captures the general distribution of each variable well through the encoder. However, it does not model the dependency relationship between the features of the real data set, and only captures the possible relationship between the features through two fully connected hidden layers in the generator. However, there is a strong correlation between the indicators in the box-type substation monitoring data set, which leads to poor results when using CTGAN to generate box-type substation fault samples. To solve this problem, the CTGAN network model is first constructed, and then self-attention is applied to the generator G to form the SA-CTGAN model. The relationship matrix between the input features is learned through the self-attention mechanism, thereby maintaining the correlation between different features and improving the quality of CTGAN generated data.

[0133] The present invention introduces a self-attention mechanism into the generator of CTGAN to maintain the coupling relationship between features, establishes a SA-CTGAN data derivation model, enhances and expands the original data, provides sufficient data support for fault diagnosis, and thus improves the diagnostic accuracy.

[0134] The weight of the fully connected layer is determined according to the position, that is, its weight generation is static, while the weight generation of the self-attention mechanism is dynamic, which gets rid of the position dependence when the data is input and better maintains the correlation between different features. Therefore, the two fully connected layers in the generator of CTGAN are replaced by self-attention layers.

[0135] The self-attention mechanism allows each network unit to capture the overall information, and different units can be calculated or processed in parallel. That is, the self-attention mechanism can find the connection between different features and consider whether a certain feature will affect another feature. Taking two input feature vectors as an example, the principle of calculating the degree of correlation between two feature vectors is as follows Fig.10 shown.

[0136] Input feature vectors x1 and x2, multiply them by the corresponding weight coefficients to get q1 and k2 respectively, and the two are operated through dot product to get α, which represents the degree of correlation between the two features. The workflow of the self-attention mechanism is as follows Fig.11 As shown:

[0137] The idea is to transform the input X through the linear transformation matrix W q , W k and W v Transformed into Q, K and V. Where Q is the query vector, K is the key vector, and V is the value vector; the similarity is calculated by the dot product operation of Q and K:

[0138] α i,j =q i ·k j

[0139] Perform Softmax normalization on the similarity obtained by S:

[0140]

[0141] Step 4: Calculate the comprehensive output B of each unit after the self-attention mechanism:

[0142]

[0143] The overall diagram of the self-attention mechanism is as follows Fig.12 .

[0144] Step 3: SA-CTGAN model training phase

[0145] Specific operations of step 6:

[0146] In the case of large demand for fault diagnosis data in box-type substations and large amount of calculation for diagnostic models, grid search is too time-consuming, random search cannot guarantee the quality of optimization results, Bayesian search is prone to fall into local optimality, and population-based optimization methods have no obvious defects.

[0147] Differential Evolution (DE) is a common population-based optimization algorithm that simulates biological evolution to find the optimal solution. This method selects new individuals based on differential mutation operations and a global one-to-one competition strategy. It has the characteristics of randomness, simple calculation, and strong adaptability. Its basic principle is to obtain the search step and direction from the existing population, and complete crossover and mutation within the population to obtain new individuals, thereby completing the screening between the new and old individuals and retaining the better individuals to the next generation. The overall process includes: initializing the population, mutation operations, crossover operations, and screening operations, etc.

[0148] Compared with other population optimization methods, DE is applicable to both continuous and discrete problems and is suitable for fault diagnosis problems. Therefore, the DE algorithm is selected to perform hyperparameter tuning on the SA-CTGAN data-derived model and subsequent fault diagnosis model.

[0149] like Fig.13 As shown, the optimization steps of the DE algorithm are as follows:

[0150] Step 1: Determine the differential evolution algorithm control parameters (including population size, scaling factor and hybridization probability) and fitness function;

[0151] Step 2: Randomly generate the initial population;

[0152] Step 3: Evaluate the initial population, that is, calculate the fitness of individuals in the population;

[0153] Step 4: Determine whether each individual has reached the final optimization condition or whether the number of evolutionary iterations has reached the maximum. If so, the individual is output as the optimal solution; if not, continue;

[0154] Step 5: Perform "mutation" and "crossover" operations to obtain the intermediate population;

[0155] Step 6: Select individuals from the original population and the intermediate population to obtain a new generation of original population;

[0156] Step 7: Evolution times (iteration times) + 1, repeat Step 4 to Step 7.

[0157] The specific contents of initialization, mutation, crossover and selection in the above steps are as follows:

[0158] (1) Initialize the population

[0159] Initialize NP real-valued parameter vectors of dimension D as the population of each generation, i.e., model hyperparameters;

[0160] X i (g),i=1,2,...,NP

[0161] Where:

[0162] i——the serial number of the individual in the population;

[0163] g——The number of iterations, i.e. the evolutionary algebra.

[0164] In the differential evolution algorithm, all initialized populations conform to the uniform probability distribution, so the initialized population is:

[0165]

[0166] Where:

[0167] random(0,1)——uniform random number between (0,1);

[0168] X i U ——upper limit of parameter variable;

[0169] X i L ——The lower limit of the parameter variable.

[0170] (2) Variation

[0171] The random difference strategy is selected to achieve individual mutation, that is, two different individuals are randomly selected from the population, and vector difference scaling is performed to obtain a difference vector, which is then combined with the vector of the individual to be mutated to obtain a mutation vector V i (g+1):

[0172] V i (g+1)=X r1 (g)+F×(X r2 (g)-X r3 (g))

[0173] Where:

[0174] r1, r2, r3——random numbers between [1, NP];

[0175] F——scaling factor, which is a certain constant;

[0176] g——indicates the number of iterations.

[0177] (3) Cross

[0178] The purpose of the crossover operation is to randomly select individuals:

[0179]

[0180] Where:

[0181] CR - hybridization probability.

[0182] (4)Select

[0183] The differential evolution algorithm uses a greedy selection strategy to select individuals, that is, to select better individuals to become the individuals or outputs of the next iteration:

[0184]

[0185] CTGAN generates data according to the conditional vector through the classifier, and captures the general distribution of each variable well through the encoder. However, it does not model the dependency relationship between the features of the real data set, and only captures the possible relationship between the features through two fully connected hidden layers in the generator. However, there is a strong correlation between the indicators in the box-type substation monitoring data set, which leads to poor results when using CTGAN to generate box-type substation fault samples. To solve this problem, the CTGAN network model is first constructed, and then self-attention is applied to the generator G to form the SA-CTGAN model. The relationship matrix between the input features is learned through the self-attention mechanism, thereby maintaining the correlation between different features and improving the quality of CTGAN generated data.

[0186] The weights of the fully connected layer are determined according to the position, that is, the generation of its weights is static, while the weight generation of Self-Attention is dynamic, which gets rid of the position dependence when the data is input and better maintains the correlation between different features. Therefore, the two fully connected layers in the generator of CTGAN are replaced by self-attention layers.

[0187] To ensure the training effect of the model, it is necessary to tune the main hyperparameters of the CTGAN model, such as the training batch size and the number of iterations, before training the SA-CTGAN model. To improve the model training efficiency, the DE algorithm is selected to automatically tune the SA-CTGAN model. On this basis, the SA-CTGAN data derivative model is constructed.

[0188] The overall training process of SA-CTGAN is as follows:

[0189] Random noise and conditional vectors are input into the generator to generate generated data in a specified format; the original data samples are modeled through the encoder and input into the discriminator together with the generated data and conditional vector; the discriminator discriminates the original data samples and the generated data samples respectively, and then updates the weights of the discriminator by back-propagation of the loss function, that is, the discriminator continuously improves its ability to discriminate generated data samples; according to the output of the discriminator, the parameters of the generator are continuously adjusted, that is, the ability of the generator to generate data is improved, so that the data generated by itself is as "consistent" as possible with the original data, making it impossible for the discriminator to correctly discriminate; repeat the above process, and stop training when the loss function of the discriminator converges within a certain number of iterations.

[0190] Step 7: This step is a routine operation. Specifically, the cleaned data is used as input to conduct experiments using the trained SA-CTGAN data derivative model. The number of samples in each category after model expansion is set to 1400 to generate high-quality generated data.

[0191] In order to verify the superiority of SA-CTGAN, the cleaned data was used as input, and the SMOTE model, CTGAN model and SA-CTGAN model were used for data derivation experiments. The number of nearest neighbors of the SMOTE model was set to 5; for the CTGAN model and SA-CTGAN model, the DE optimization algorithm was used to tune the number of iterations, training batches and learning rates. The number of samples in each category after expansion of the three models was set to 1400.

[0192] Select the original data and generated data of the high-voltage circuit breaker fault type to draw a distribution histogram, such as Fig.14 , Fig.14 (a), (b), (c), and (d) are the distribution histograms of the original data, SMOTE generated data, CTGAN generated data, and SA-CTGAN generated data, respectively.

[0193] analyze Fig.14 , the data generated by the three models are roughly similar to the distribution of the original data, among which the SMOTE model has the worst generation effect, while the CTGAN model and the SA-CTGAN model are better. This is because the SMOTE model can only generate marginal data when it generates data with positive samples distributed at the edge through sampling, and cannot solve the problem of marginal distribution.

[0194] Draw the heat maps of the original data and the generated data respectively, such as Fig.15 As shown, Fig.15 (a), (b), (c), and (d) are the heat maps of the original data, SMOTE generated data, CTGAN generated data, and SA-CTGAN generated data, respectively.

[0195] from Fig.15 From the correlation coefficients in , the correlation coefficient matrix of the data generated by SA-CTGAN is closest to the original data. In order to quantitatively compare the data derivation effects of the three derivative models, the following four evaluation indicators are used to evaluate the derived data of the three models respectively:

[0196] The effect of the established SA-CTGAN in data derivation is evaluated by calculating the similarity evaluation model between the generated data set and the original data set. The derivation effect of the model is evaluated from two perspectives: data distribution similarity and correlation of different dimensions. Four evaluation indicators, including KL divergence (Kullback-Leible, KL), mean cosine similarity, cumulative deviation of correlation coefficient and heat map SSIM indicator (Structural Similarity, SSIM), are constructed to evaluate the performance of the SA-CTGAN model.

[0197] (1) KL divergence

[0198] KL divergence is a metric used to measure the similarity between two probability distributions. It is used to express the similarity between two distributions P and Q. KL (P||Q) indicates that its calculation formula is:

[0199]

[0200] The smaller the KL divergence, the higher the similarity between P and Q.

[0201] (2) Average cosine similarity

[0202] Cosine Similarity (CS) evaluates the similarity between two vectors by calculating the cosine value of the angle between the two spatial vectors. The formula for calculating the cosine similarity between n-dimensional vectors A and B is:

[0203]

[0204] Cosine similarity is not sensitive to the dimension and modulus of the vector. It mainly measures the similarity of two vectors in direction, which is suitable for the fault classification data set in this paper (fault type is equivalent to the direction of the sample vector). Therefore, this paper evaluates the data similarity by calculating the cosine similarity between the original data set and the generated data set of the same category, and calculating the average cosine similarity after cumulative summation. The calculation formula is:

[0205]

[0206] Where:

[0207] RAW i ——The i-th indicator vector of the original data;

[0208] GEN i ——Generate the i-th indicator vector of data.

[0209] The value range is [-1, 1], where -1 means completely dissimilar and 1 means completely similar.

[0210] (3) Cumulative deviation of correlation coefficient

[0211] The correlation coefficient is a statistic proposed by statistician Pearson to calculate the degree of linear correlation between two random variables. It is defined as the covariance of the two variables divided by the product of their standard deviations, as shown in formula (4-12):

[0212]

[0213] Calculate the correlation coefficient matrix of the original data set and the generated data set, and then calculate the cumulative deviation of the correlation coefficient of the generated data set relative to the original data set using formula (4-13):

[0214]

[0215] Where:

[0216] ——Dimension X in the original data i With dimension X j The correlation coefficient of

[0217] ——Dimension X in the original data i With dimension X j The correlation coefficient of .

[0218] The smaller the cumulative deviation of the correlation coefficient, the greater the similarity between the generated data and the original data in terms of data correlation.

[0219] (4) Heat map SSIM index

[0220] A heat map is a way to express the correlation of different indicators in a dataset in the form of an image, and describes the magnitude of the correlation through different RGBA values. Therefore, the dimensional correlation between the generated dataset and the original dataset can be evaluated by comparing the heat maps of the original dataset and the generated dataset.

[0221] SSIM is an indicator that measures the similarity of images by comprehensively considering brightness, contrast, and structure. The SSIM indicator calculation formula for two images x and y with N pixels is:

[0222]

[0223] Where:

[0224] N——the number of pixels in the image;

[0225] xi——the i-th pixel of image x;

[0226] μ x ——The average gray value of image x;

[0227] σ x ——Unbiased estimate of the grayscale standard deviation of image x;

[0228] C1, C2, C3——constants, generally 6.5025, 58.5225, and 29.5613 respectively.

[0229] The range of SSIM is [0,1]. The larger the value, the higher the similarity between the two images, that is, the closer the correlation in different dimensions between the original data set and the generated data set.

[0230] The evaluation results are shown in Table 7:

[0231] Table 7 Comparison of performance of each model

[0232] SMOTE CTGAN SA-CTGAN KL divergence 0.0101 0.0042 0.0037 Average cosine similarity 0.8494 0.8768 0.8996 Cumulative deviation of correlation coefficient 11.9714 11.9682 9.8331 Heatmap SSIM indicator 0.8365 0.8527 0.9135

[0233] Analyzing Table 7, by comparing the two indicators of KL divergence and average cosine similarity, it is found that the CTGAN model and the SA-CTGAN model are better than the SMOTE model in data distribution similarity. Comparing the cumulative deviation of the correlation coefficient and the SSIM indicator of the heat map, it is found that the cumulative deviation of the correlation coefficient of the SA-CTGAN model is significantly lower than that of the SMOTE and CTGAN models, and the SSIM indicator of the heat map (excluding text content) is significantly higher than that of the SMOTE and CTGAN models. It can be considered that the SMOTE model and the CTGAN model are similar in maintaining data correlation. The data generated by the SA-CTGAN model that introduces the self-attention mechanism is significantly better than the other two models in terms of correlation similarity, that is, the self-attention mechanism can effectively maintain the correlation between different indicators.

[0234] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A box-type substation fault data derivation method based on an improved CTGAN model, characterized by: The method is as follows: first, the collected indicators of box-type substation faults are preprocessed, that is, the data is converted and normalized; then, the SA-CTGAN data derivation model is constructed, self-attention is applied in the generator G, and the relationship matrix between input features is learned through the self-attention mechanism; finally, the learning rate, number of hidden neurons, training batch size and number of iterations of the SA-CTGAN data derivation model are tuned based on the differential evolution algorithm, and the performance convergence of the generator and the discriminator is achieved by alternately training the generator and the discriminator, so that the SA-CTGAN data derivation model can generate high-quality data.

2. According to claim 1, a box-type substation fault data derivation method based on an improved CTGAN model is characterized by: The data preprocessing method includes the following specific steps: Step 1: Classify the fault types of box-type substation into six categories: high-voltage circuit breaker fault, high-voltage lightning arrester fault, dry-type transformer fault, low-voltage incoming line circuit breaker fault, low-voltage outgoing line circuit breaker fault, and capacitor lightning arrester fault. For these six types of faults, collect 24 indicators, namely, box temperature, box humidity, box water immersion, box smoke, box condensation, contact resistance, partial discharge, dielectric loss rate, winding absorption ratio, core grounding current, core temperature, frequency, high-voltage voltage, high-voltage current, low-voltage incoming line voltage, low-voltage outgoing line voltage, low-voltage incoming line current, low-voltage outgoing line current, busbar temperature, neutral line current, action refusal information, tripping information, circuit contact temperature and current at both ends of the circuit breaker; For missing data in the data of collected indicators due to network packet loss or collection anomalies, the MissForest interpolation algorithm is used to interpolate the collected data; Step 2: Use the IF detection algorithm to detect whether there are outliers in the box-type substation monitoring data set. If there are outliers, use the MissForest interpolation algorithm to interpolate and replace them; Step 3: Select the Z-score method to normalize the cleaned data set, i.e., the data processed in step 2.

3. According to claim 1, a box-type substation fault data derivation method based on an improved CTGAN model is characterized in that: The SA-CTGAN data-derived model construction method includes the following steps: Step a: Use a generator G and a discriminator D to build a standard CTGAN derivative model. The generator and discriminator use a multi-layer perceptron structure. The input of the generator is a random vector and a conditional vector, and the output is the generated sample data. The input of the discriminator is a real sample or a sample generated by the generator, and the output is the judgment result of the discriminator on the input sample. Step b: Introduce the self-attention mechanism in the generator of the CTGAN derivative model, that is, replace the two fully connected layers in the generator of CTGAN with self-attention layers to form the SA-CTGAN data derivative model; Step c: In the model training phase, the DE algorithm is used to tune the hyperparameters of the SA-CTGAN data-derived model, including the training learning rate, number of hidden neurons, batch size, and number of iterations, and the SA-CTGAN data-derived model is trained; Step d: Use the trained SA-CTGAN data derivation model, input the original data to be derived, and output the generated data.

4. According to claim 3, a box-type substation fault data derivation method based on an improved CTGAN model is characterized in that: The specific operation method of step 1 is: for the sample X={X1,X2,...,X n }, where an arbitrary variable X s , Represents X s The observed value of Represents X s The missing values ​​of Represents X s Observations other than Represents X s For the remaining observations other than the missing values, when interpolating missing values, the missing forest is based on the random forest algorithm to build a decision tree forest. Train a model of y~x and Take as input prediction and fill missing values That is, a single data X is completed s If missing values ​​are found in multiple variables in the data set, the MissForest algorithm is used to interpolate the missing values ​​of the entire sample in an iterative manner. The specific process is to input the original data set D into the MissForest algorithm and finally output a complete data set filled with predicted values.

5. According to claim 4, a box-type substation fault data derivation method based on an improved CTGAN model is characterized in that: The specific implementation method in step 2 is: use the IF algorithm to detect outliers in the data. If the detected outliers are no more than the set number of feature data, the outliers are interpolated. If more than the set number of feature data are abnormal, the record is directly removed. Among them, the specific method of using the IF algorithm for outlier detection is: randomly select n samples from the training data as a subset, that is, as the root node of an isolated tree; randomly select a feature from the subset, and randomly select a threshold q within the feature value of the current node; according to the threshold q, the current node space is divided into two subspaces, and the points with current features less than q are used as the left branch of the current node, and the points greater than or equal to q are used as the right branch; each branch node is recursively split according to the above process, and new child nodes are continuously created until there is only one data on a node or the height of the tree reaches log2(n); the generated isolated tree is evaluated for anomalies and the anomaly score S is calculated. For any sample x, the results of each tree need to be integrated; The calculation steps of anomaly score S are as follows: First, calculate the path length: for each sample x, calculate its path length h(x) in each tree, which refers to the number of edges required for the sample x to reach the node where the sample is isolated from the root node of the tree through the feature selection method in the isolated tree construction stage; then calculate the average path length E(h(x)): The average path length c(n) of all trees is calculated as follows: H(·)=ln(·)+ε Where H(·) is the harmonic number, ε is the Euler constant, and n is the number of samples. For a given dataset size n, the expectation of the average path length is a constant; The anomaly score is evaluated using the following formula: The score of the anomaly score S is between [0, 1]. The larger the value, the greater the suspicion that it is an outlier.

6. According to claim 5, a box-type substation fault data derivation method based on an improved CTGAN model is characterized in that: The specific implementation method in step 3 is: convert the data into a standard normal distribution with a mean of 0 and a variance of 1. The normalization formula is: Where: ——is the mean of characteristic samples; n is the number of samples; ——is the mean difference of characteristic samples.

7. The method for deriving fault data of a box-type substation based on an improved CTGAN model according to claim 6 is characterized in that: The specific process of the DE algorithm is as follows: determine the control parameters and fitness function of the differential evolution algorithm, and the control parameters include population size, scaling factor and hybridization probability; randomly generate an initial population; evaluate the initial population, that is, calculate the fitness of individuals in the population; determine whether each individual meets the final optimization conditions or whether the number of evolutionary iterations has reached the maximum, if so, the individual is output as the optimal solution; if not, continue; perform "mutation" and "crossover" operations to obtain an intermediate population; select individuals from the original population and the intermediate population to obtain a new generation of original population; the number of evolutions is +1, and the process is repeated until the performance of the generator and the discriminator converges.

8. The method for deriving fault data of a box-type substation based on an improved CTGAN model according to claim 7 is characterized in that: The training method of the SA-CTGAN data-derived model is as follows: random noise and conditional vectors are input into the generator to generate generated data in a specified format; the original data samples are modeled through the encoder and input into the discriminator together with the generated data and conditional vectors; the discriminator discriminates the original data samples and the generated data samples respectively, and then updates the weights of the discriminator by back-propagation of the loss function, that is, the discriminator continuously improves its ability to discriminate generated data samples; according to the output of the discriminator, the parameters of the generator are continuously adjusted, that is, the ability of the generator to generate data is improved, so that the data generated by itself is consistent with the original data, and the discriminator cannot correctly discriminate; repeat the process, and stop training when the loss function of the discriminator converges within a certain number of iterations.

Citation Information

Cited By

  • Water quality monitoring method and device for secondary water supply system

    CN121258292A

  • A water quality monitoring method and device for a secondary water supply system

    CN121258292B