A photovoltaic fault diagnosis method and system based on deep digital twinning
By combining mechanistic simulation and deep learning to create a deep digital twin model, diverse data is generated and features are automatically selected, solving the problems of insufficient and unbalanced data in photovoltaic system fault diagnosis and improving the accuracy and robustness of diagnosis.
Patent Information
- Application Number
- CN202410048523.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-12
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2044-01-12
AI Technical Summary
In photovoltaic system fault diagnosis, there are problems such as missing fault data, data imbalance, and insufficient training data for deep learning models, resulting in poor diagnostic results.
By combining mechanistic simulation models and deep data models, a diverse range of data is generated through a one-dimensional deep convolutional generative adversarial network (1D-DCGAN). Information gain ratio (IGR) and stacked sparse autoencoders (SSAE) are used for automatic feature selection and multi-level feature compression to construct a deep digital twin model (DDT-IGSSAE) for fault diagnosis.
It effectively solves the problems of missing and unbalanced data in photovoltaic system fault diagnosis, improves the accuracy and robustness of diagnosis, reduces the bias of human selection of features, and achieves better diagnostic results.
Smart Images

Figure CN117874615B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic system fault diagnosis, and more specifically, to a photovoltaic fault diagnosis method and system based on deep digital twins. Background Technology
[0002] Solar photovoltaic (PV) technology, as a clean and renewable energy source, is receiving widespread attention and rapid development globally. However, the performance stability and reliability of solar PV systems remain a persistent challenge, limiting their widespread application. During long-term operation, PV systems may be affected by various factors, such as weather changes, component aging, and short circuits, all of which can lead to a decline in system productivity, impacting their economic viability and environmental impact.
[0003] To ensure the efficient operation and sustainable utilization of photovoltaic systems, system monitoring and fault diagnosis have become crucial. Current photovoltaic fault diagnosis methods are mainly divided into the following categories: (1) Traditional methods based on threshold judgment. Traditional photovoltaic system fault diagnosis methods rely on setting threshold ranges for specific parameters such as voltage and current to determine whether a fault has occurred in the system. The advantage of this method is its rapid response speed, which can quickly identify the fault state. However, this method is easily affected by factors such as photovoltaic module aging and environmental changes, which limits its stability and accuracy in practical applications. (2) Deep learning algorithms based on voltage and current time series characteristic curve data. This type of research attempts to use deep learning technology, especially convolutional neural networks (CNN) and recurrent neural networks (RNN), to analyze the time series characteristics of voltage and current characteristic curves of photovoltaic systems. This type of method can capture complex voltage and current relationships, thereby improving the accuracy of fault diagnosis. However, these methods require whole or partial curves as input data, resulting in low real-time performance. (3) Machine learning algorithms based on post-electrical signal features extracted from multiple sequence data. By extracting feature vectors of voltage and current, and then using these feature vectors for fault diagnosis. These methods have good scalability and practicality. Compared with (1), they can learn the distribution of data, the model has high robustness, and are less affected by changes in the internal characteristics of photovoltaics, and can adapt to the needs of different photovoltaic systems. Compared with (2), when the diagnostic accuracy is similar, they do not rely on the collected sequence data such as voltage and current, and can be collected during operation, with better timeliness and generalization ability. Among them, autoencoder (AE) is a powerful feature compression code extractor, which has achieved good results in learning the feature vector constructed from electrical signals. The Sparse Autoencoder Virtual In-Situ Calibration Model (SAE-VIC) based on Bayesian inference realizes the fault detection and calibration of photovoltaic heat pump system (PVT). The SAE replaces the original mathematical model and achieves good results. The AE-ANN method for fault diagnosis of photovoltaic array electrical signals is applied. First, the AE performs unsupervised feature learning on the electrical signal, and then the ANN realizes supervised fault diagnosis. The effectiveness of the algorithm is verified on a real operating photovoltaic system in Algeria. Dropout-optimized stacked autoencoders (D-SAE) are a method for fault diagnosis in photovoltaic arrays, achieving automatic encoding of high-level features and accelerating model convergence. While diagnostic algorithms based on electrical signal features can achieve good results in photovoltaic fault diagnosis, in actual operation, photovoltaic systems experience relatively few fault events, and the collection and recording of fault data are often limited by time, cost, and feasibility. Therefore, the acquisition of fault data is constrained by various factors, preventing the aforementioned diagnostic algorithms from being adequately trained in the presence of missing data, leading to performance degradation.
[0004] On the one hand, digital twin technology, as a digital system replication and simulation method, can effectively solve the problem of missing actual fault data and has made significant progress in various engineering fields. Digital twin technology allows us to create digital copies of actual systems to simulate their behavior under different operating conditions. This simulation method can generate a large amount of simulated data, including data under normal and fault conditions, effectively solving the problem of missing fault data. Digital twin-driven intelligent fault diagnosis methods are often applied to rolling bearings, achieving efficient data generation through high-fidelity digital twin models, improving data quality, and increasing diagnostic accuracy. Digital twin-assisted augmented meta-transfer learning methods can simulate typical operating conditions to generate data under fault conditions, achieving a model error of less than 5%. However, traditional mechanism simulation digital twins are often limited by specific conditions and parameter settings, leading to imbalanced and incomplete datasets, which in turn affects the balance of the diagnostic model, causing the diagnostic model to bias towards learning the majority class and resulting in biased errors.
[0005] On the other hand, the rapid development of deep learning technology has provided powerful tools for photovoltaic system monitoring and fault diagnosis. Its powerful feature extraction capabilities can automatically collect features from data, making it excellent at processing complex photovoltaic system data. Among them, GANs, as powerful deep learning generators, can effectively extract the distribution features of data, achieving diversified data generation and improving the accuracy of fault diagnosis. Improved Auxiliary Classifier Generative Adversarial Networks (IACGAN) can effectively enhance the feature image extraction capability of echo signals, improving the quality of generated samples. By introducing the GAN framework, data interpolation and synthesis are achieved, generating samples and improving the quality of the dataset. Conditional Variational Generative Networks (CVAE-GAN) achieve the fusion and generation of multi-source signals, effectively solving the problems of insufficient and imbalanced samples in fault diagnosis. Although these deep learning generative models have been proven to effectively improve diagnostic accuracy, using deep learning generative models alone for fault diagnosis can lead to a lack of interpretability, and deep learning models require sufficient training data to ensure the effectiveness of learning.
[0006] In view of this, the present invention is hereby proposed. Summary of the Invention
[0007] In view of this, the present invention discloses a photovoltaic fault diagnosis method and system based on deep digital twins, which can effectively solve the bias of human selection of features, improve the diagnosis effect of photovoltaic systems, overcome the problem of insufficient typical data in photovoltaic fault diagnosis, and provide a novel construction method for digital twin models by combining mechanism modeling and deep learning. Finally, it proposes an effective method for solving the fault diagnosis problem of photovoltaic systems and has good practical value.
[0008] Specifically, the present invention is achieved through the following technical solutions:
[0009] This invention provides a photovoltaic fault diagnosis method based on digital twins, comprising the following steps:
[0010] After constructing the mechanism simulation model, unbalanced fault data is collected and filtered through IGR feature automatic selection. The data is then input into the deep data model for learning, resulting in diverse and complete data. Finally, SSAE feature compression is performed to achieve diagnosis.
[0011] The photovoltaic fault diagnosis method of the present invention addresses the problems of insufficient actual photovoltaic fault data in the existing technology, poor diagnostic performance due to the influence of high-frequency sampling units and human-selected features on current photovoltaic electrical signal sampling, the limitation of mechanism simulation digital twins on specific conditions and parameter settings, and the imbalance of the constructed dataset, and the need for sufficient samples for training of deep network generation models, which have poor generalization ability when sufficient data is lacking. Therefore, a photovoltaic system intelligent fault diagnosis method based on deep digital twins (DDT-IGSSAE) is proposed.
[0012] The entire operation process of this method is as follows:
[0013] First, a mechanism simulation model of a physical photovoltaic system is established to generate system operation data under fault conditions, and a dataset is constructed. Then, a deep data model—a one-dimensional deep convolutional generative adversarial network (1D-DCGAN)—is designed to further capture the distribution characteristics of the data generated by the mechanism simulation model, thus addressing the problem of data uniformity. The deep data model and the mechanism simulation model achieve data complementarity, solving both the problem of fault data generation and overcoming the issues of data imbalance and insufficient training data for the deep model. Next, the data generated by the two models are fused to construct a deep digital twin model. Finally, an IGSSAE diagnostic network is proposed, and an information gain ratio (IGR) is designed to obtain the feature classification contribution, achieving automatic feature selection and multi-level feature compression to complete fault classification diagnosis. The proposed method can effectively solve the bias of human feature selection and improve the diagnostic effect of photovoltaic systems. This invention overcomes the problem of insufficient typical data in photovoltaic fault diagnosis and provides a novel construction method for digital twin models by combining mechanism modeling and deep learning. Ultimately, it offers an effective method for solving the fault diagnosis problem of photovoltaic systems and has good practical value.
[0014] The diagnostic model framework is mainly divided into two parts: the construction of a deep digital twin (mechanistic simulation model and deep data model) to achieve diversified data generation; and the combination of the mechanistic simulation model and the deep data model to achieve complementarity, resulting in a deep digital twin (DDT) model that can generate diversified data. This model builds a mechanistic simulation model based on physical parameters, then generates diversified samples through the deep data model, balances the dataset, and updates the DDT-IGSSAE diagnostic model.
[0015] Preferably, the method for collecting unbalanced fault data after constructing a mechanism simulation model includes:
[0016] A grid-connected photovoltaic system simulation model was built using Simulink to simulate three types of faults: short circuit faults in a single photovoltaic string, grounding faults in a single photovoltaic string, and string-to-string connection faults.
[0017] By adjusting the light intensity IR and temperature T, unbalanced fault data under different parameter conditions are obtained, and data are collected based on the characteristics of electrical signals.
[0018] Preferably, the data x′ generated by the mechanism simulation model is automatically selected and filtered by IGR to obtain the input data x for entering the deep data model. The automatic filtering method includes:
[0019] The overall entropy of the unbalanced fault dataset is calculated as shown in Equation (8):
[0020]
[0021] Where H(D) is the entropy of the dataset, c is the number of classes, and p i This represents the proportion of each category in the dataset. For each feature, the conditional entropy after partitioning the dataset based on that feature is calculated:
[0022]
[0023] Where H(D|A) is the conditional entropy, n is the number of feature values, and D... i It is a subset partitioned based on the i-th sum value of feature A, |D i | represents the subset's distribution, |D| represents the size of the overall dataset, and the information gain IG(A) is calculated based on H(D) and H(D|A):
[0024] IG(A)=H(D)-H(D|A) (10)
[0025] IG(A) represents the degree of reduction in overall entropy, while intrinsic information H(A) is the information entropy of feature A itself, used to measure the uncertainty level of the feature;
[0026]
[0027] Where n is the number of feature values, p j It is the proportion of the j-th value of feature A in the dataset. The information gain IGR(A) ratio is calculated based on the obtained H(A) and IG(A):
[0028]
[0029] Information gain ratio (IGR) is the ratio of information gain IG(A) to the intrinsic information content H(A) of a feature.
[0030] Because the electrical signal data extracted manually from the mechanism simulation model is not always effective for fault diagnosis of photovoltaic systems, some electrical signal features may even act as noise, affecting the accuracy of fault diagnosis. Therefore, to address these technical issues, a method combining Information Gain Ratio (IGR) and Stacked Sparse Autoencoder (SSAE) is proposed to achieve automatic selection and multi-level feature extraction of photovoltaic electrical signal data for fault diagnosis.
[0031] The solution of this invention reduces the noise of the signal input by using a mechanism simulation model in advance, thereby solving the problem that the IGR itself has poor ability to distinguish noise samples and will affect the correlation discrimination results. It can be seen that there are reasons for the solution of this invention to use the two models with IGR to form a specific combination.
[0032] In order to better adapt to the field of photovoltaic system diagnostic technology of the present invention, in the above-mentioned IGR process, the measurement index of entropy and sample class inherent information is added, such as formula (11). In this way, the proportion of a single feature A in the electrical signal sample is transformed into the relationship between information content and category, which enhances the applicability of IGR in the selection of good features in electrical signals.
[0033] In addition, the scoring rules incorporate diagnostic network-assisted selection, and the information content of the electrical signal is scored by class correlation in the IGR using the results obtained by formula (12). The diagnostic network is also embedded to test the number of optimal parameters selected in the IGR and to achieve preliminary feature screening. The establishment of the above indicators is based on a specific design in the specific field of the present invention, and the prior art does not involve the above content.
[0034] This diagnostic model uses Information Gain Ratio (IGR) to measure features. IGR effectively measures a feature's contribution to a classification task, while the inherent information content of a feature is used to account for the uncertainty of the feature itself. Therefore, Information Gain Ratio (IGR) not only considers the feature's ability to classify the target variable but also focuses on the complexity of the feature itself, thereby achieving effective automatic feature selection.
[0035] Preferably, the method for learning input data x in a deep data model includes:
[0036] The deep data model 1D-DCGAN consists of two sub-networks: a one-dimensional convolutional generator (1DGen) and a one-dimensional convolutional discriminator (1DDisc). The designed 1DGen uses two convolutional layers with a scale of 1×3 and 32-64 channels, employing GELU as the activation function, to finally generate pseudo-samples. The generated results can be represented as follows:
[0037]
[0038] The generated result 1DGen() can be represented as follows:
[0039] FEAT(X)=GELU(Conv(X)) (2)
[0040] X G =randn(k) (3)
[0041] 1DGen(X G ) = W G1 (FEAT G2 (FEAT G1 (X G ))))+b G1 (4)
[0042] Where X G The input to 1DGen is random noise data, randn(k) represents the initial random generation of k-dimensional fault data, one-dimensional convolution is represented by Conv(x), FEAT() represents the feature extraction module activated by Gaussian linear error units, the weights and biases of the fully connected layer are represented by W and b, and finally pseudo samples are generated. In 1DDisc, the input is real sample data, which adopts a convolutional layer with a similar structure to the generator, and finally outputs the discrimination results of samples and labels.
[0043] Preferably, it also includes a method for optimizing the depth data model, specifically referring to the following formulas (5)-(7), 1DDisc(X input ) = W D2 (W D1 (FEAT D2 (FEAT D1 (X D )))+b D1 )+b D2 (5)
[0044] The objective function for adversarial training of 1DGen and 1DDisc is shown in the following formula:
[0045]
[0046] The first term in the above formula To make it a constant, the second term must be... To achieve the desired effect, the discriminator should be able to distinguish between true and false data. In other words, 1DDisc(1DGEN(z)) should be made as large as possible to achieve the desired training effect. During discriminator training, the second term should be made as large as possible, that is, 1DDisc(1DGen(z)) should be made as small as possible. This will maximize the expected value of both terms and achieve the desired effect of training the discriminator's discrimination ability. During training, an adaptive learning rate optimization algorithm (Adam) is used to update the model parameters based on the gradient of the loss function.
[0047] When training 1D-DCGAN, the generated sequence data is set to be output once every 50 epochs. Then, the average Pearson correlation coefficient (r) between the training samples and the generated results is calculated to determine the degree of linear correlation between the generated samples:
[0048]
[0049] Where m represents the sample size, x i and y i These are the i-th values from the training samples and the generated results, respectively. and These are the mean values of the training samples and the generated results, respectively. When r is greater than 0.8, we consider that the distribution characteristics have been learned. At this point, we stop training 1D-DCGAN and save the model.
[0050] The construction of deep data models involves adjusting the traditional two-dimensional convolution for images to one-dimensional convolution, and adjusting the number of convolutional layers and channels to build a new network structure, thereby better learning the nonlinear distribution relationships in the data. The Pearson index is used to determine whether the distribution characteristics of the original data and the generated samples match, thereby stopping training to ensure that the generator fully learns the data distribution and generates more effective and diverse data. The activation function is adjusted to Gaussian Error Linear Unit (GELU) to better capture the complex nonlinear relationships of the input data.
[0051] Deep data models like 1D-DCGAN can learn complex feature patterns in data, generating features that more closely resemble real-world data. This is crucial for the accuracy and reliability of building digital twin models.
[0052] Preferably, the method for performing SSAE feature compression includes:
[0053] SSAE consists of two sparse autoencoders connected together. The input sample (x) of the first autoencoder (SAE1) is a well-balanced deep digital twin dataset, and the input sample is compressed and represented by `encode()`.
[0054] feat1 = encode(SAE1, x) (13)
[0055] x is compressed using SAE1 to obtain a higher-level feature representation, feat1. The loss function used is mean squared error (MSE).
[0056] MSE=(1 / n)*∑(x-decode(SAE1,feat1)) 2 (14)
[0057] Where n is the number of samples, decode() is the decoding function, and the network parameters are trained by backpropagation using MSE. During training, L2 weight regularization (L2R) and sparse regularization (SR) are used.
[0058] L2R=(λ / 2))*∑(θ^2) (15)
[0059] Where λ is the regularization parameter and θ represents the learnable weight parameter;
[0060]
[0061] Where β is a regularization parameter used to control the strength of sparsity regularization, and ρ is the desired sparsity level, representing the target activation probability of the neuron. It represents the actual activation probability of neurons during training;
[0062] In the second autoencoder SAE2, the input is the compressed feature feat1 from the first autoencoder, and the feature encoded by SAE2 is:
[0063] feat2=encode(SAE2,feat1) (17)
[0064] In SAE2, feature1 is further encoded and compressed to obtain a higher-level feature feature, feature2. The nonlinear relationship of the data is further learned. After SAE2 is trained, feature2 is used as the input of Softmax and mapped to the category. IGR, SAE1, SAE2 and Softmax are connected together to build the IGSSAE intelligent fault diagnosis framework.
[0065] In addition to providing a photovoltaic fault diagnosis method, this invention also provides a diagnostic system for photovoltaic fault diagnosis, comprising:
[0066] Acquisition module: Used to collect unbalanced fault data after constructing the mechanism simulation model;
[0067] The filtering module is used to input the data into the deep data model for learning after the IGR feature automatic selection and filtering operation, so as to obtain diversified completion data.
[0068] Compression module: Used to perform SSAE feature compression for diagnostic purposes.
[0069] In summary, this invention effectively addresses the issue of imbalanced and incomplete datasets resulting from the limitations of simulated digital twins due to specific conditions and parameter settings. By combining mechanistic simulation models and deep data models, the nonlinear distribution within the data can be learned even under imbalanced and incomplete dataset conditions. This enables the model to generate diverse samples, effectively supplementing the fault data generated by the model, reducing the bias caused by using mechanistic simulation models alone, and facilitating model updates. Simultaneously, an information gain stacked sparse autoencoder diagnostic network structure is designed, enabling automatic feature selection and effectively solving the bias errors that may be caused by manual feature selection. Using a sparse autoencoder (SSAE) for training and high-level feature compression encoding, the fault diagnosis problem of photovoltaic systems is successfully solved, demonstrating significant practical value. Attached Figure Description
[0070] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.
[0071] Figure 1 Overall structure diagram of fault diagnosis for deep digital twin photovoltaic systems;
[0072] Figure 2 Photovoltaic mechanism model;
[0073] Figure 3 Photovoltaic fault setup diagram;
[0074] Figure 4 1D-DCGAN deep data model structure diagram;
[0075] Figure 5 Figures showing different classification accuracy results obtained by selecting different feature numbers based on IGR;
[0076] Figure 6 The generation results of the 1D-DCGAN deep data model on four types of data;
[0077] Figure 7 t-SNE comparison before and after automatic IGR feature selection;
[0078] Figure 8 Accuracy comparison chart before and after data balancing;
[0079] Figure 9 t-SNE provides a feature visualization comparison chart of the experimental results;
[0080] Figure 10 The confusion matrix results are shown in the figure, which verifies the sparsity and stacking effects.
[0081] Figure 11 The results of ten rounds of ablation experiments are shown in the figure.
[0082] Figure 12 This is a flowchart illustrating a computer device provided in an embodiment of the present invention. Detailed Implementation
[0083] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure; rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0084] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of this disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms. Unless the context clearly indicates otherwise, it should be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0085] It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, depending on the context. For example, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0086] This invention primarily addresses the difficulty in obtaining fault data from wind turbines under actual operating conditions and the poor performance of existing data augmentation methods for extracting features from one-dimensional data. First, the effectiveness of the theory and algorithm is verified using the bearing fault platform dataset from Western Reserve University. Then, the algorithm is tested on real wind turbine operating data to illustrate its implementation process.
[0087] Example
[0088] like Figure 1 As shown, this invention proposes a novel intelligent fault diagnosis method for photovoltaic systems based on deep digital twins. The framework mainly consists of two parts: the construction of a deep digital twin (mechanism simulation model and deep data model) to achieve diversified data generation; and an information gain stacked sparse autoencoder network for photovoltaic system fault diagnosis. Finally, the model parameters are adjusted based on feedback from actual photovoltaic operating data indicators. The implementation steps of this method are as follows:
[0089] A. Deep Digital Twin Construction
[0090] 1) Establishment of a simulation model for the mechanism of photovoltaic systems
[0091] A grid-connected 250kW photovoltaic system simulation model was built using Simulink in MATLAB to simulate data under both standard and fault conditions. Mechanism simulation and digital twins are used. Figure 2 As shown.
[0092] This model primarily simulates three types of faults: fault one is a short circuit fault in a single photovoltaic string; fault two is a grounding fault in a single photovoltaic string; and faults arise from string-to-string connections. Figure 3 As shown.
[0093] Under the same operating conditions, the illuminance (IR) was adjusted from 100 W / m² to 1,000 W / m², and the temperature (T) was adjusted from 10℃ to 35℃. Data under different parameter conditions were obtained by adjusting IR and temperature (T) to enhance the model's robustness. The electrical signal characteristics of the data were also collected.
[0094] 2) Deep data model construction
[0095] This invention designs an improved 1D-DCGAN network based on the DCGAN network structure. Its structure is as follows: Figure 4 As shown.
[0096] 1D-DCGAN comprises two sub-networks: a one-dimensional convolutional generator (1DGen) and a one-dimensional convolutional discriminator (1DDisc). It effectively learns the selected one-dimensional feature vectors. The designed 1DGen uses two 1×3 convolutional layers with 32 and 64 channels, employing GELU as the activation function, to generate pseudo-samples. The generated results can be represented as follows:
[0097]
[0098] The generated result 1DGen() can be represented as follows:
[0099] FEAT(X)=GELU(Conv(X)) (2)
[0100] X G =randn(k) (3)
[0101] 1DGen(X G ) = W G1 (FEAT G2 (FEAT G1 (XG))))+b G1 (4)
[0102] Where X G In 1DGen, the input is random noise data, where randn(k) represents the initial random generation of k-dimensional fault data. One-dimensional convolution is represented by Conv(x), FEAT() represents the feature extraction module activated by Gaussian linear error units, and the weights and biases of the fully connected layers are represented by W and b. Finally, pseudo-samples are generated. In 1DDisc, the input is real sample data, which uses convolutional layers with a similar structure to the generator, and finally outputs the discrimination results of samples and labels.
[0103] 1DDisc(X input ) = W D2 (W D1 (FEAT D2 (FEAT D1 (X D )))+b D1 )+b D2 (5)
[0104] The objective function for adversarial training of 1DGen and 1DDisc is shown in the following formula:
[0105]
[0106] During the training process of the generator, the first term in the formula To make it a constant, the second term must be... To minimize the difference between true and false signals, we need to make 1DDisc(1DGen(z)) as large as possible to achieve optimal training results. During discriminator training, we also need to maximize the second term, i.e., minimize 1DDisc(1DGen(z)), to maximize the expected value of both terms and thus improve the discriminator's discrimination ability. The training process employs an adaptive learning rate optimization algorithm (Adam), updating the model parameters based on the gradient of the loss function.
[0107] In this embodiment, when training the 1D-DCGAN, the generated sequence data is set to be output once every 50 epochs. Then, the average Pearson correlation coefficient (r) between the training samples and the generated results is calculated to determine the degree of linear correlation between the generated samples.
[0108]
[0109] Where m represents the sample size, x i and y i These are the i-th values from the training samples and the generated results, respectively. and These are the mean values of the training samples and the generated results, respectively. When r is greater than 0.8, we consider that the distribution characteristics have been learned. At this point, we stop training 1D-DCGAN and save the model. The overall parameters of the 1D-DCGAN network are shown in Table 1.
[0110] Table 1 1D-DCGAN network structure parameters
[0111]
[0112] B. Construction of Information Gain Stacked Sparse Autoencoder (IGSSAE)
[0113] This embodiment proposes a novel Information Gain Stacked Sparse Autoencoder (IGSSAE), which combines the Information Gain Ratio (IGR) with the Stacked Sparse Autoencoder (SSAE) to achieve automatic selection and multi-level feature extraction of photovoltaic electrical signal data and to perform fault diagnosis.
[0114] First, calculate the overall entropy of the dataset. Entropy is used to measure the uncertainty of the data, as shown in formula (8):
[0115]
[0116] Where H(D) is the entropy of the dataset, c is the number of classes, and p i This represents the proportion of each category in the dataset. For each feature, the conditional entropy is calculated after partitioning the dataset based on that feature. Conditional entropy measures the uncertainty of the target variable given that the features are known.
[0117]
[0118] Where H(D|A) is the conditional entropy, n is the number of feature values, and D... i It is a subset partitioned based on the i-th sum value of feature A, |D i| represents the subset's distribution, and |D| represents the size of the overall dataset. Calculate the information gain IG(A) based on H(D) and H(D|A).
[0119] IG(A)=H(D)-H(D|A) (10)
[0120] In a dataset, when splitting based on feature A, IG(A) represents the degree of reduction in overall entropy. Intrinsic information content H(A), on the other hand, is the information entropy of feature A itself, used to measure the level of uncertainty of the feature.
[0121]
[0122] Where n is the number of feature values, p j It represents the proportion of the j-th value of feature A in the dataset. The information gain IGR(A) ratio is calculated based on the obtained H(A) and IG(A):
[0123]
[0124] Information gain ratio (IGR) is the ratio of information gain IG(A) to the intrinsic information content H(A) of a feature. IGR(A) provides a more comprehensive measure.
[0125] The data (x′) generated by the mechanism simulation model is automatically selected by IGR to obtain the input data (x) for the next-level network. Then, in order to effectively diagnose faults in the automatically selected samples x and improve data classification performance, this embodiment designs an SSAE network structure. This network can achieve unsupervised feature extraction and learn higher-level feature representations, strengthening the classification effect and thus improving the intelligent fault diagnosis performance of the photovoltaic system.
[0126] SSAE consists of two sparse autoencoders connected together, linked by a softmax layer to achieve data classification. The first autoencoder (SAE1) takes a well-balanced deep digital twin dataset as its input sample (x) and performs a compressed representation using `encode()`.
[0127] feat1 = encode(SAE1, x) (13)
[0128] x is compressed using SAE1 to obtain a higher-level feature representation, feat1. The loss function used is mean squared error (MSE).
[0129] MSE=(1 / n)*∑(x-decode(SAE1,feat1)) 2 (14)
[0130] Where n is the number of samples, and decode() is the decoding function. The network parameters are trained via backpropagation using MSE, and L2 weight regularization (L2R) and sparse regularization (SR) are employed during training. L2 weight regularization (L2R) primarily restricts the weight parameters, weakening the weights of insignificant features and preventing the model from overfitting the training data.
[0131] L2R=(λ / 2)*∑(θ^2) (15)
[0132] Where λ is the regularization parameter, which is set to 0.004 in this invention to control the regularization strength, and θ represents the learnable weight parameter.
[0133] The goal of sparse regularization (SR) is to make certain neurons in the model sparser and less activated, thereby improving the interpretability and robustness of the model and forcing the model to select the features most useful for the task.
[0134]
[0135] Where β is a regularization parameter used to control the strength of sparsity regularization, and ρ is the desired sparsity level, representing the target activation probability of the neuron. This represents the actual activation probability of neurons during training. In this invention, β is set to 4 and ρ is set to 0.15. By constraining the activation level of neurons, sparse regularization can prevent some neurons from being overactivated during training, thereby reducing the risk of overfitting.
[0136] In the second autoencoder, SAE2, the input is the compressed feature feat1 from the first autoencoder, and the feature encoded by SAE2 is...
[0137] feat2=encode(SAE2,feat1) (17)
[0138] In SAE2, feature1 is further encoded and compressed to obtain higher-level features, feature2, which further learns the nonlinear relationships in the data. After training SAE2, feature2 is used as the input to Softmax and mapped to categories. IGR, SAE1, SAE2, and Softmax are connected together to build the IGSSAE intelligent fault diagnosis framework. The network structure parameters of IGSSAE are shown in Table 2.
[0139] Table 2 IGSSAE Network Structure Parameters
[0140]
[0141]
[0142] Application examples
[0143] The photovoltaic system mechanism model described in the above embodiment is based on a real 250kW grid-connected photovoltaic power station. Data was collected for normal operation and three fault operation states according to the mechanism model. For each sample generated by the photovoltaic mechanism model, the total simulation time was 0.4 seconds, with the fault set to occur at 0.2 seconds. The measurement time was 0.1 to 0.3 seconds, the transient time was 0.1 to 0.2 seconds, and the fault occurrence time was 0.2 to 0.3 seconds. Training dataset A included 600 instances, of which 100 were fault-free (16.67%), 153 were intra-string faults (25.5%), 149 were string-to-ground faults (24.83%), and 198 were inter-string faults (33%). Test dataset B consisted of 25 instances for each operating state, totaling 100 real-world operating data points. The dataset composition is shown in Table 3.
[0144] Table 3 Dataset A partitioning
[0145]
[0146] A. Automatic Selection and Verification Stage of IGR Features
[0147] Since a large number of photovoltaic panels were collected, the time series data contained a lot of redundant information. Therefore, key feature points were extracted from the time series data to reduce the amount of data and improve the efficiency of data processing and analysis, resulting in a 22-dimensional feature dataset.
[0148] Step 1: To improve the efficiency of deep data model generation, the extracted features are analyzed for correlation using the IGR module of IGSSAE. Features with high correlation coefficients are then identified as the main features. The feature information and IGR are shown in Table 4.
[0149] Table 4. Dataset information and IGR results
[0150]
[0151]
[0152] Step 2: Calculate the class relevance of features using IGR. Sort the 22 features in descending order of relevance. Start the experiment from the first feature, adding one more feature at a time, and test the diagnostic classification effect on the diagnostic network. Figure 5 As shown, the best results are achieved when the first 17 features are selected. Therefore, the first 17 features of each sample are selected to construct the training dataset C.
[0153] B. Dataset balancing phase of deep data models
[0154] Step 1: Use the training dataset C as the input of the training samples for 1DDsic to train the 1DGen model to generate more diverse samples. Figure 6 For the 1D-DCGAN's data generation results, four generated samples are taken as examples for each working state.
[0155] Step 2: When the Pearson index of the generated result > 0.8, the network stops training, and 1DGen is used to generate data for the current category, which is then compared with the real samples. Figure 6 The results show that learning data distribution characteristics through a data-driven approach demonstrates good performance in simulating the behavior of photovoltaic systems. Samples generated using deep data digital twins are used to balance the imbalanced mechanistic model samples, thereby reducing model bias in the diagnostic network. The balanced training dataset D is shown in Table 5.
[0156] Table 5 Dataset D partitioning
[0157]
[0158] C. Ablation experimental verification stage of DDT-IGSSAE
[0159] Step 1: Visualize and verify the effect of automatic IGR feature selection using t-SNE feature dimensionality reduction.
[0160] To validate the data filtering effect of IGR, unfiltered dataset A and filtered dataset C were used as network inputs. Fault diagnosis was achieved through the diagnostic network SSAE. The feature extraction and classification results before and after IGR filtering were analyzed using t-SNE. Figure 7 As shown.
[0161] Automatic feature selection using IGR reduces dimensionality while retaining the most important information, thus reducing model complexity. t-SNE transforms high-dimensional data into a low-dimensional space, better revealing the inherent distribution relationships within the data, enabling data visualization and discovery of potential clustering structures, demonstrating the effectiveness of feature selection. Figure 7 The results analysis shows that the automatic selection of IGR features plays the following roles:
[0162] (1) Class difference: The top 17 features with larger IGR in each class have greater class difference, and the data points are more likely to be clustered in the low-dimensional space after dimensionality reduction.
[0163] (2) Noise reduction: IGR eliminates unimportant features in the data, thus reducing noise in the data.
[0164] Step 2: Verify the effectiveness of the deep digital twin balanced model. Using the training dataset C with filtered features and the completed dataset D, intelligent fault diagnosis of photovoltaic systems is achieved through SSAE, and the classification accuracy is verified on the test set B. The confusion matrix of the first round of verification results is shown below. Figure 8 As shown. By Figure 8 It can be seen that after balancing the model using DDT, the diagnostic effect of the photovoltaic system improved by 9%, which verifies the effectiveness of the model.
[0165] Step 3: Verify the performance of the diagnostic network SSAE. Ablation methods are used to verify the performance of Stacked Autoencoders (StAE) without sparsity, Sparsity Autoencoders (SAE) without stacking, and the SSAE algorithm of this invention. The feature visualization results of the t-SNE for diagnostic performance are shown below. Figure 9 As shown.
[0166] Depend on Figure 9 It can be seen that when using SAE and StAE alone for fault diagnosis, some data from different categories are mixed together, and the boundaries are not clearly defined, resulting in poor classification performance. In the diagnostic method SSAE of this invention, after two-level feature extraction and sparse training during the training process, the clustering effect on the validation dataset B is significantly improved, and the data of the four categories have clear boundaries. The feature spacing within each category is small, while the distance between different categories is large. Except for a few samples in categories 3 and 4 that are still mixed, the classification effect of other samples is good. The confusion matrix corresponding to the network diagnostic accuracy is as follows. Figure 10 As shown.
[0167] Figure 10 In the figure, (a) and (b) represent the validation accuracy of SAE and StAE on test dataset B, respectively. Figure 9 (a), Figure 10 (a) shows that when SAE is used alone, there is significant aliasing between the second and third types of data, indicating that a single round of SAE cannot adequately compress and denoise the data features. However, the results of SAE are different from those of... Figure 9 (b), Figure 10 (b) Compared to StAE, although aliasing occurs in both classes 2 and 3, SAE significantly outperforms StAE. Validation on test data B (not used in training) shows that SAE significantly improves the accuracy of class 2 recognition on the new data, verifying that sparse training can effectively increase the model's generalization ability. The confusion matrix of the algorithm's diagnostic accuracy is as follows: Figure 10 As shown in (c), with Figure 9(c) Corresponding to the TSNE results, it has good classification results for each type of data, and the overall diagnostic accuracy reaches 98%, which is a significant improvement compared with using stacking and sparsity alone, further verifying the effectiveness of the algorithm.
[0168] The ablation experiment was validated in ten rounds, and the average accuracy rate is shown in Table 6. The accuracy rate results for the ten rounds are as follows: Figure 11 As shown, the average diagnostic accuracy of the method of the present invention reaches 98.4% over ten rounds.
[0169] Table 6 Average accuracy over ten rounds
[0170]
[0171] In addition to providing the aforementioned photovoltaic fault diagnosis method based on deep digital twins, this invention also provides the aforementioned photovoltaic fault diagnosis system based on deep digital twins, specifically including:
[0172] Acquisition module: Used to collect unbalanced fault data after constructing the mechanism simulation model;
[0173] The filtering module is used to input the data into the deep data model for learning after the IGR feature automatic selection and filtering operation, so as to obtain diversified completion data.
[0174] Compression module: Used to perform SSAE feature compression for diagnostic purposes.
[0175] In practice, each of the above modules can be implemented as an independent entity or can be combined arbitrarily to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method implementation examples, which will not be repeated here.
[0176] Figure 12 This is a schematic diagram of the structure of a computer device disclosed in this invention. (Reference) Figure 12 As shown, the computer device 400 includes at least a memory 402 and a processor 401; the memory 402 is connected to the processor via a communication bus 403 and is used to store computer instructions executable by the processor 401. The processor 401 is used to read computer instructions from the memory 402 to implement the steps of the method described in any of the above embodiments.
[0177] For the above-described apparatus embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The apparatus embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0178] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, such as semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal disks or removable disks), magneto-optical disks, and CD-ROMs and DVD-ROMs. Processors and memory may be supplemented by or incorporated into dedicated logic circuitry.
[0179] Finally, it should be noted that although this specification contains many specific implementation details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather are primarily used to describe the features of specific embodiments of a particular invention. Certain features described in the various embodiments of this specification may also be implemented in combination in a single embodiment. On the other hand, various features described in a single embodiment may also be implemented separately in various embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described above and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation of a sub-combination.
[0180] Similarly, although the operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
[0181] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims may be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings are not necessarily shown in a specific order or sequence to achieve the desired result. In some implementations, multitasking and parallel processing may be advantageous.
[0182] The above description is merely a preferred embodiment of this disclosure and is not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A photovoltaic fault diagnosis method based on deep digital twins, characterized in that, Includes the following steps: After constructing the mechanism simulation model, the collected imbalance fault data is automatically selected and filtered by IGR features, and then input into the deep data model for learning to obtain diverse complete data. SSAE feature compression is then performed to achieve diagnosis. Methods for collecting unbalanced fault data after constructing a mechanism simulation model include: A grid-connected photovoltaic system simulation model was built using Simulink to simulate three types of faults: short circuit faults in a single photovoltaic string, grounding faults in a single photovoltaic string, and string-to-string connection faults. The illumination intensity IR and temperature T were adjusted to obtain unbalanced fault data under different parameter conditions, and the data were collected based on the characteristics of the electrical signals. Input data Methods for learning from deep data models include: The deep data model 1D-DCGAN consists of two sub-networks: a one-dimensional convolutional generator 1DGen and a one-dimensional convolutional discriminator 1DDisc. The designed 1DGen uses two convolutional layers with a scale of 1×3 and 32-64 channels, employing GELU as the activation function, to finally generate pseudo-samples. The generated results are shown below: (1) Its generation result It is expressed as follows: (2) (3) (4) in for The input random noise data, Indicates initial random generation For faulty data, one-dimensional convolution is represented by Conv(x). This represents the feature extraction module activated by Gaussian linear error units. The weights and biases of the fully connected layers are represented by W and b. Finally, pseudo-samples are generated. In this process, the input is real sample data, which uses convolutional layers with a similar structure to the generator, and finally outputs the discrimination results of samples and labels.
2. The photovoltaic fault diagnosis method according to claim 1, characterized in that, Data generated by mechanism simulation model The input data for use in the deep data model is obtained through the IGR feature automatic selection and filtering method. Automatic selection and filtering methods include: The overall entropy of the unbalanced fault dataset is calculated as shown in Equation (8): (8) in It is the entropy of the dataset. It is the number of categories. This represents the proportion of each category in the dataset. For each feature, the conditional entropy after partitioning the dataset based on that feature is calculated: (9) in It is conditional entropy. It is the number of values that a feature can take. Based on features The A subset of values. Indicates the size of the subset. Represents the size of the overall dataset, according to and Calculate information gain : (10) This represents the degree of reduction in overall entropy, while the inherent information content... These are characteristics Its own information entropy is used to measure the level of uncertainty of a feature; (11) in It is the number of values that a feature can take. It is a feature The The proportion of each value in the dataset, based on the obtained... and Information gain Calculate the ratio: (12) Information gain ratio Information gain The inherent information content of features The ratio.
3. The photovoltaic fault diagnosis method according to claim 2, characterized in that, It also includes methods for training deep data models, specifically refer to the following formulas (5)-(7). (5) The objective function for adversarial training of 1DGen and 1DDisc is shown in the following formula: (6) The first term in the above formula To make it a constant, the second term must be... The smaller the value, the less likely it is to be distinguishable from a fake by the discriminator; in other words, the smaller the value should be. To maximize the training effect, the second term should be maximized during discriminator training. To minimize the expected value of the two items, we can maximize the expected value of the two items and achieve the effect of training the discriminator's discriminative ability. During the training process, we use an adaptive learning rate optimization algorithm (Adam) to update the model parameters based on the gradient of the loss function. When training 1D-DCGAN, the generated sequence data is set to be output once every 50 epochs. Subsequently, the average Pearson correlation coefficient between the training samples and the generated results is calculated. Determine the degree of linear correlation of the generated samples: (7) in Indicates the number of samples. and These are the first two parts of the training samples and the generated results. One value, and These are the mean values of the training samples and the generated results, respectively. If the value is greater than 0.8, stop training 1D-DCGAN and save the model.
4. The photovoltaic fault diagnosis method according to claim 1, characterized in that, Methods for SSAE feature compression include: SSAE consists of two sparse autoencoders connected together, where the input samples of the first autoencoder SAE1 are... To create a well-balanced dataset for deep digital twins, the input samples are compressed and represented. (13) go through Compression yields higher-level feature representations. The loss function uses mean squared error. (14) in For the sample size, For decoding functions, through The network parameters were trained using backpropagation, and L2 weight regularization was employed during the training process. and sparse regularization : (15) in For regularization parameters, Indicates the learnable weight parameters; (16 ) in It is a regularization parameter used to control the strength of sparse regularization. It represents the expected sparsity level, indicating the target activation probability of neurons. It represents the actual activation probability of neurons during training; In the second self-encoder In this process, the input is the compressed features of the first autoencoder. ,pass The encoded features are: (17) exist China Further encoding and compression are performed to obtain higher-level features. To further learn the nonlinear relationships in the data, after training... Then, adopt As input to Softmax, and mapped to categories, , , Softmax is connected together to build the IGSSAE intelligent fault diagnosis framework.
5. The photovoltaic fault diagnosis system according to any one of claims 1-4, characterized in that, include: Acquisition module: Used to collect unbalanced fault data after constructing the mechanism simulation model; The filtering module is used to input the data into the deep data model for learning after the IGR feature automatic selection and filtering operation, so as to obtain diversified completion data. Compression module: Used to perform SSAE feature compression for diagnostic purposes.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the method as described in any one of claims 1-4.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1-4.
