A photovoltaic fault classification method based on a lightweight neural network of visual images
By using a lightweight neural network based on visual images, the shortcomings of hardware dependence and data-driven methods in photovoltaic array fault diagnosis are solved, achieving high-precision, low-cost, and interpretable photovoltaic fault classification, which can adapt to complex working conditions and field requirements.
Patent Information
- Application Number
- CN202511937357.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-22
- Publication Date
- 2026-04-03
- Estimated Expiration
- 2045-12-22
AI Technical Summary
Existing photovoltaic array fault diagnosis methods suffer from strong hardware dependence, high cost, poor real-time performance, delayed diagnostic results, and risk of misjudgment. Furthermore, data-driven methods are dependent on labeled data and lack sufficient understanding of feature objects, making them difficult to adapt to complex operating conditions.
A lightweight neural network based on visual images is adopted. High-dimensional robust features are obtained through an unsupervised feature extraction model, which is then converted into a two-dimensional feature matrix. The lightweight neural network is used for classification, and the visualization analysis is performed through an interpretable analysis model. The contribution of features to the classification results is quantified by combining the SHAP method.
It achieves high-precision, low-power inference at the edge, providing photovoltaic fault classification results with clear physical meaning and traceability, meeting the needs of on-site computing power constraints, scarce annotations, and high-reliability operation and maintenance.
Smart Images

Figure CN121392448B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of photovoltaic fault detection technology, and in particular relates to a photovoltaic fault classification method based on a lightweight neural network of visual images. Background Technology
[0002] With the transformation of the global energy structure, the extraction and consumption of traditional fossil fuels have gradually exposed problems such as resource depletion and environmental pollution, which has driven the large-scale development of renewable energy photovoltaic (PV) technology. As the core component of a photovoltaic power plant, the operating status of the photovoltaic array directly determines the power generation efficiency and long-term stability of the system. However, due to the complexity of environmental conditions and the inherent factors of the components, photovoltaic arrays inevitably experience various faults during operation, such as open circuits, short circuits, mismatches, shading, and degradation. These faults not only lead to a decrease in power generation but may also cause safety hazards. Therefore, the development of efficient and accurate photovoltaic array fault diagnosis technology has become a common focus of academia and industry.
[0003] In photovoltaic array fault diagnosis research, existing methods can be broadly divided into two categories. The first category emphasizes direct fault location and detection at the photovoltaic module level, typically relying on additional detection equipment such as thermal imaging, infrared detection, and other thermal diagnostic methods. While these methods can identify module anomalies more intuitively, their strong hardware dependence often makes cost and implementation conditions limiting factors.
[0004] The second type of method centers on monitoring and data acquisition systems, emphasizing the intelligent identification and classification of potential faults in photovoltaic systems by mining multi-source monitoring data such as voltage, current, power, and irradiance during operation. This type of method essentially belongs to the data-driven paradigm. Its basic idea is to use the collected large-scale operational data to construct a classification model to determine whether the system is in a fault state and the type of fault. It mainly relies on improvements and innovations to basic models such as Random Forest (RF), Convolutional Neural Network (CNN), and Autoencoder (VAE) to obtain more sophisticated fault diagnosis methods.
[0005] In addition to the above, photovoltaic arrays often suffer from multiple types of complex faults. Traditional thermal methods are easily affected by factors such as ambient temperature, irradiance fluctuations, and equipment aging, making it difficult to obtain deep feature information. This leads to delayed diagnostic results and the risk of misjudgment, thus exhibiting significant limitations under complex operating conditions. In contrast, data-driven methods based on electrical features have attracted more attention due to their real-time and low-cost advantages. Moreover, data-driven methods can automatically learn potential feature patterns directly from large amounts of monitoring data, eliminating reliance on human experience and exhibiting stronger adaptability and generalization ability, thus demonstrating significant advantages in photovoltaic array fault diagnosis. Although data-driven methods demonstrate good fault identification capabilities, their dependence on labeled data and insufficient physical interpretation of features further increase the difficulty of fault diagnosis. Summary of the Invention
[0006] This invention proposes a photovoltaic fault classification method based on a lightweight neural network of visual images to solve the problems existing in the prior art.
[0007] To achieve the above objectives, this invention provides a photovoltaic fault classification method based on a lightweight neural network with visual images, comprising the following steps:
[0008] Obtain the raw runtime sequence data of the photovoltaic system;
[0009] Based on the original runtime sequence data, high-dimensional robust features are extracted using an unsupervised feature extraction model.
[0010] The high-dimensional robust features are converted into a two-dimensional feature matrix;
[0011] The two-dimensional feature matrix is input into a lightweight neural network for classification to obtain the fault classification result.
[0012] Based on the fault classification results, the classification decision criteria are visualized and analyzed using an interpretability analysis model to obtain interpretable data that quantifies the contribution of each input feature to the classification results.
[0013] Optionally, the extraction of high-dimensional robust features through an unsupervised feature extraction model includes:
[0014] Noise disturbances are introduced into the original runtime sequence data to obtain noisy data;
[0015] The noisy data is subjected to deep nonlinear mapping by stacked noise reduction autoencoders to obtain latent feature representations.
[0016] The latent feature representation is subjected to dimensionality reduction and redundancy elimination to obtain the high-dimensional robust features.
[0017] Optionally, obtaining the high-dimensional robust features includes:
[0018] The latent feature representation is linearly projected by principal component analysis to obtain orthogonal features after dimensionality reduction.
[0019] The original runtime sequence data, the dimensionality-reduced orthogonal features, and the fault label information are fused to generate the high-dimensional robust features.
[0020] Optionally, converting the high-dimensional robust features into a two-dimensional feature matrix includes:
[0021] The high-dimensional robust features are mapped from a one-dimensional sequence to a polar coordinate system using the Gram angle field method, and a Gram angle field transformation matrix is constructed based on the angle information. The two-dimensional feature matrix is then generated based on the Gram angle field transformation matrix.
[0022] The expression for the Gram angle field transformation matrix is:
[0023] ;
[0024] ;
[0025] In the formula, for The polar angle of a point For Gram Point and Field, The difference is at Gram's corner.
[0026] Optionally, the lightweight neural network is a MobileViT network that integrates depthwise separable convolutions and a Transformer structure.
[0027] Optionally, the obtained fault classification results include:
[0028] The local feature map is obtained by performing local feature extraction on the input two-dimensional feature matrix through the depthwise separable convolution.
[0029] Global features are obtained by modeling global dependencies in the local feature maps using the Transformer structure.
[0030] Based on the global features, the fault classification result is calculated by a classifier.
[0031] Optionally, the step of calculating the fault classification result based on the global features using a classifier includes:
[0032] The global features are mapped to the fault category dimension through a fully connected layer, and the predicted probability of each category is calculated by the Softmax function. The category with the highest probability is taken as the fault classification result.
[0033] Optionally, the visualization analysis of the classification decision criteria through the interpretability analysis model includes:
[0034] The Shapley value of each feature in the high-dimensional robust features is calculated using the SHAP method to quantify the contribution of each feature to the model decision.
[0035] Optionally, calculating the Shapley value of each feature in the high-dimensional robust features for the fault classification result includes:
[0036] Construct alternative samples containing different feature subsets;
[0037] Calculate the predicted output of the lightweight neural network for each of the alternative samples;
[0038] The Shapley value of each feature is calculated by weighted averaging the difference in predicted outputs based on all possible combinations of feature subsets.
[0039] Optionally, the raw runtime sequence data includes voltage, current, temperature, and irradiance data of the photovoltaic system.
[0040] Compared with the prior art, the present invention has the following advantages and technical effects:
[0041] This invention discloses a photovoltaic fault classification method based on a lightweight neural network with visual images, comprising: acquiring the original runtime sequence data of a photovoltaic system; extracting high-dimensional robust features based on the original runtime sequence data using an unsupervised feature extraction model; converting the high-dimensional robust features into a two-dimensional feature matrix; inputting the two-dimensional feature matrix into a lightweight neural network for classification to obtain fault classification results; and performing visual analysis on the classification decision basis using an interpretability analysis model based on the fault classification results to obtain interpretable data for quantifying the contribution of each input feature to the classification results. This invention transforms implicit fault patterns into visual structures that can be processed by lightweight MobileViT through unsupervised deep feature extraction and image-based dimensionality enhancement. Combined with global dependency modeling, it achieves high-precision, low-power inference at the edge and uses SHAP to provide the marginal contribution of each electrical quantity to the decision, forming a transparent classification result with clear physical meaning, traceability, and verifiability, meeting the needs of field operations in areas with limited computing power, scarce annotations, and high-reliability maintenance. Attached Figure Description
[0042] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0043] Figure 1The figures show the current-voltage characteristic curves under different irradiance and temperature conditions according to embodiments of the present invention.
[0044] Figure 2 This is a diagram showing different fault types of a photovoltaic array according to an embodiment of the present invention;
[0045] Figure 3 This is a schematic diagram of the classification method structure according to an embodiment of the present invention;
[0046] Figure 4 This is a diagram of the MobileViT hybrid network structure according to an embodiment of the present invention. Detailed Implementation
[0047] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0048] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0049] Example 1
[0050] like Figure 3 As shown, this embodiment provides a photovoltaic fault classification method based on a lightweight neural network of visual images, including the following steps:
[0051] Obtain the raw runtime sequence data of the photovoltaic system;
[0052] Based on the original runtime sequence data, high-dimensional robust features are extracted using an unsupervised feature extraction model.
[0053] The high-dimensional robust features are converted into a two-dimensional feature matrix;
[0054] The two-dimensional feature matrix is input into a lightweight neural network for classification to obtain the fault classification result.
[0055] Based on the fault classification results, the classification decision criteria are visualized and analyzed using an interpretability analysis model to obtain interpretable data that quantifies the contribution of each input feature to the classification results.
[0056] Specifically, the general description of photovoltaic array fault detection methods is as follows:
[0057] A photovoltaic array consists of multiple photovoltaic modules connected in series and parallel. Its output characteristics depend on the module performance and environmental conditions. A photovoltaic module is commonly described using a single diode equivalent circuit, where the photocurrent source (I0) is the diode. ph), PN junction diode, series resistor (R) s ) and parallel resistor (R) sh The IV characteristics of the component are determined by the component's output current and voltage, which satisfy the implicit transcendental equation, as shown in equation (1).
[0058] (1)
[0059] in, It is photocurrent, which depends on the intensity of solar radiation; It is the reverse saturation current of the diode; and These are the output current and voltage; A is the diode's corrected quality factor. n is the diode quality factor; It is the Boltzmann constant (1.38×10-23 J / K); It is the charge of an electron (1.602 × 10⁻¹⁹ C). It's about temperature. The working principle of a photovoltaic array is based on the photocurrent effect. Primarily determined by irradiance (G), approximately in contrast to G. Then, as T increases sharply, as shown in equations (2) and (3). In general, the photogenerated current is very sensitive to irradiance, while the saturation current exhibits a significant temperature coefficient due to temperature variations. The current-voltage characteristic curves at different irradiances and temperatures are shown below. Figure 1 As shown.
[0060] (2)
[0061] (3)
[0062] in, STC stands for short-circuit current temperature coefficient, representing standard test conditions (G=1000W / m2, T=25℃). This represents the bandgap energy of semiconductor materials.
[0063] Figure 1 In this diagram, G1, G2, G3, and G4 represent 400W / m², 600W / m², 800W / m², and 1000W / m², respectively; and T1, T2, T3, T4, and T5 represent -20℃, 0℃, 20℃, 40℃, and 60℃, respectively. (Observe the sub-sections.) Figure 1 As shown in (a), the short-circuit current increases significantly with increasing irradiance, while the open-circuit voltage is relatively insensitive to changes in irradiance. Furthermore, the location of the maximum power point also changes with irradiance; typically, the maximum power output increases under high irradiance. Therefore, accurate measurement and control of irradiance are of paramount importance in the construction of photovoltaic power plants. In addition, observation... Figure 1 The IV curve in (b) shows that increased temperature leads to varying degrees of decrease in the open-circuit voltage and increase in the short-circuit current of the photovoltaic module. These experimental results corroborate at least two conclusions: first, photovoltaic arrays can provide good output power provided there is sufficient sunlight; second, high-temperature environments cause a decrease in the conversion efficiency of photovoltaic arrays. Therefore, performance modeling of photovoltaic arrays needs to consider changes in ambient temperature, especially the impact of high temperatures on power output.
[0064] When a photovoltaic array malfunctions, its voltage, current, and power output will all experience abnormal fluctuations closely related to the type of fault. For example... Figure 2 As shown. Common fault types mainly include open circuits, such as... Figure 2 (a) Short circuit, such as Figure 2 (b) Aging, such as Figure 2 (c) and shading, such as Figure 2 Case (d) in the text.
[0065] Open-circuit faults are typically caused by a break in the series circuit of the modules. In this case, the array current drops significantly with the severity of the fault, while the voltage remains relatively stable, leading to a reduction in output power. In contrast, short-circuit faults often originate from abnormal conduction between different potential points within a branch. This type of fault causes a sharp drop in the voltage corresponding to the maximum power point, while the current remains relatively stable, ultimately resulting in a significant drop in power as well. With prolonged use, the modules may also gradually age due to material degradation, thermal cycling, or surface contamination. This is reflected in the P-V curve as a downward shift in the maximum power point and a weakening of the peak value, thereby reducing overall power generation efficiency. In addition, environmental shading is also an important factor affecting array performance. Shading can be caused by buildings, trees, dust, or bird droppings. Modules affected by shading often exhibit multiple local peaks on the power curve, not only weakening output performance but also potentially inducing a "hot spot effect." Slight shading results in limited power loss, while severe shading can significantly suppress output or even damage the modules.
[0066] To address the issues of photovoltaic array fault characteristics being susceptible to noise interference and lacking clear representation, this embodiment constructs an end-to-end diagnostic method. This method utilizes stacked denoising autoencoders to extract robust features and upscales the temporal signal to a two-dimensional image using Gram corner field (GAF). Subsequently, a lightweight MobileViT network is designed, fusing depthwise separable convolutions and Transformer mechanisms to achieve joint modeling of local texture and global dependencies. Finally, SHAP technology is combined to ensure the interpretability of the diagnostic results. This model improves transparency and reliability while maintaining efficiency and accuracy. The overall framework is as follows: Figure 3 .
[0067] like Figure 3As shown, the end-to-end diagnostic method constructed in this embodiment fully integrates key aspects such as feature extraction, temporal dimensionality enhancement, image modeling, and interpretability analysis. Overall, this framework not only effectively captures the local and global features of photovoltaic array faults, but also provides a visual explanation of classification decisions through SHAP, balancing accuracy, robustness, and transparency, laying the foundation for subsequent diagnosis and analysis of multiple types of faults.
[0068] Furthermore, unsupervised feature extraction models include:
[0069] Theory and Design of Stacked Noise Reduction Autoencoders:
[0070] During the operation of a photovoltaic array, the collected multi-source monitoring data, such as voltage, current, temperature, and illumination, often exhibit high dimensionality, strong noise, and nonlinear correlation. Traditional shallow feature extraction methods often struggle to effectively capture complex nonlinear relationships, necessitating a more expressive feature learning framework. To address this, this embodiment introduces a Stacked Denoising Autoencoder (SDAE) to achieve deep representation and robust modeling of multimodal operational features. An autoencoder (AE) is essentially an unsupervised feature learning model, consisting of an encoder and a decoder, as shown in Equation (4).
[0071] (4)
[0072] in, Dimensions representing observed features Let be the dimension of the potential space, and satisfy . . For the input vector, Representation of latent features, It is a non-linear activation function. are the parameters of the encoder and decoder, respectively. The encoder compresses the input into low-dimensional latent features through a nonlinear mapping, and the decoder uses this latent representation to reconstruct the original input. The training objective is to minimize the error between the input and the reconstruction, so that the latent representation can retain the core information of the original data, as shown in Equation (5).
[0073] (5)
[0074] However, ordinary autoencoders tend to degenerate into "identity mappings," making it difficult to learn truly valuable latent features. To address this issue, denoising autoencoders (DAEs) introduce a noise perturbation mechanism at the input, i.e., the original input... Destruction Then the model is trained to recover the undisturbed state in the latent space, as shown in Equation (6), and the loss function is shown in Equation (7).
[0075] (6)
[0076] (7)
[0077] Through a perturbation mechanism, the DAE forces the network to ignore random noise in the input, thereby extracting more robust feature representations. Furthermore, by stacking multiple DAEs layer by layer and pre-training them layer by layer, an SDAE can be formed. Wherein, in the... The generation of latent features in the layer is shown in Equation (8).
[0078] (8)
[0079] in, ,and This is the final deep abstract representation. This layer-by-layer greedy training strategy can avoid the gradient vanishing problem common in deep networks, and can gradually extract hierarchical structural information from shallow physical features to high-order semantic representation. In actual implementation, in order to avoid model overfitting and improve feature sparsity, the loss function of SDAE usually includes a weight decay term and a sparsity constraint term, as shown in equation (9).
[0080] (9)
[0081] in, For regularization parameters, The sparsity coefficient is . For the target sparsity, Indicates the first The average activation probability of each hidden unit. In this way, the network can not only suppress the weight size and prevent overfitting, but also capture the sparse activation pattern under photovoltaic conditions, making the model more discriminative under different fault categories. SDAE, through layer-by-layer nonlinear mapping and noise perturbation mechanisms, effectively improves the stability and generalization ability of the model in strong noise backgrounds while ensuring feature discriminability.
[0082] Principal component analysis and dimensionality reduction are as follows:
[0083] While SDAE performs excellently in nonlinear feature modeling, redundancy or correlation may still exist among the latent features it learns. To further improve the compactness and separability of the features, this embodiment introduces Principal Component Analysis (PCA) for dimensionality reduction based on the SDAE latent features. The basic idea of PCA is to maximize the variance of the data in the new coordinate system through linear projection. Given the SDAE latent feature matrix... Its covariance matrix is shown in formula (10).
[0084] (10)
[0085] in, It is a mean vector. Through... Perform feature decomposition and select the top features. The principal component matrix can be obtained by finding the eigenvectors corresponding to the largest eigenvalues. And complete the projection, as shown in equation (11).
[0086] (11)
[0087] This process not only removes correlations from latent features but also achieves low-dimensional representation while maintaining the variance contribution rate, thereby further compressing the feature space. Based on this, the fusion feature enhancement strategy proposed in this embodiment enhances the original features... SDAE latent feature projection and tag information Combine them to construct the enhanced dataset, as shown in Equation (12).
[0088] (12)
[0089] This fusion strategy retains the intuitive information of the original physical quantities (such as voltage, current, light intensity, and temperature) while combining the deep semantic features learned by SDAE with the orthogonal features compressed by PCA. The resulting enhanced feature set has stronger discriminative power and robustness, providing a solid data foundation for subsequent fault classification.
[0090] The GAF upscaling image conversion is as follows:
[0091] Visual Accuracy Image (GAA) is an encoding method that transforms a one-dimensional time series into a two-dimensional image. It preserves temporal dependencies and time series features by normalizing the time series and mapping it to a polar coordinate system, constructing a Gram matrix using angular information. GAF primarily includes two forms: GASF, which uses cosine addition to capture overall trend information, and GADF, which uses sine subtraction to highlight changing patterns. Combining the two can more comprehensively represent time series features, making it suitable for deep learning models for pattern recognition and classification. The specific implementation is as follows:
[0092] Given sequence First, convert to polar coordinates, then map to angles, as shown in equation (13). Is it normalized to Time series values, It is the converted angle, with a range of... .
[0093] (13)
[0094] The two-dimensional characteristic matrix is then calculated using the Gram angle field transformation matrix from equations (14) and (15). Where, for The polar angle of a point For Gram Point and Field, The difference is at Gram's corner.
[0095] (14)
[0096] (15)
[0097] Generic Image Processing (GAF) transforms time series data into matrix form, making its spatial structure more visually appealing and aiding deep learning models in identifying data patterns. Compared to directly processing raw numerical values, it preserves the non-linear patterns and dynamic structure of time series and enhances feature representation, thereby improving classification stability and accuracy. Furthermore, the image format transformed by GAF is suitable for existing efficient network architectures, helping to improve the model's adaptability and generalization ability to complex data.
[0098] The fault diagnosis model of MobileViT-SHAP is constructed as follows:
[0099] Lightweight MobileViT network architecture:
[0100] Ensuring model expressiveness while reducing computational complexity are the main directions for optimizing current deep learning-based photovoltaic array fault diagnosis models. Based on this, a lightweight MobileViT neural network was designed. This network fully integrates Depthwise Separable Convolution (DSC) and Transformer structures, enabling efficient fusion of local feature extraction and global dependency modeling. Its overall framework consists of an input layer, a lightweight convolutional module, a Transformer representation module, and a classification decision layer, aiming to achieve an organic combination of local feature capture and global dependency modeling. The MobileViT hybrid network structure is as follows: Figure 4 As shown.
[0101] First, the network input layer is defined as follows: ,in , and represents the input height, width, and number of channels, respectively. Input features are normalized to ensure training stability. To achieve lightweight modeling, the network front end uses two cascaded depthwise separable convolutional modules. Each module consists of depthwise convolution and pointwise convolution, supplemented by batch normalization (BN) and nonlinear activation functions, effectively reducing redundant computation in convolution operations while preserving key local spatial features. The first convolutional layer of DSC uses a 3×3 convolutional kernel to extract local edge features, with 16 output channels, and is processed by BN and ReLU activation functions to enhance nonlinear representation capabilities. Subsequently, a 1×1 convolution is used to fuse channel information, with 32 output channels. After the first set of convolutional modules, 2×2 max pooling is used to reduce the spatial dimension, as shown in equation (16).
[0102] (16)
[0103] Wherein, represents the pooling window region. The second-level DSC module has a similar structure, with the number of output channels of the convolution kernel being 32 and 64 respectively. It also uses BN + ReLU + MaxPooling for nonlinear mapping and spatial compression. This part of the structure can decompose complex convolution operations into low-computational-cost subtasks while ensuring local receptive field coverage, thereby improving the overall computational efficiency. After local feature extraction, the network introduces a Transformer block to capture global dependencies. It mainly uses a two-layer fully connected network to approximate the linear mapping and nonlinear projection of the self-attention mechanism, as shown in Equation (17).
[0104] (17)
[0105] in, , Weight matrix, The ReLU activation function is used. The Transformer module primarily models global feature dependencies based on local features, enabling effective integration of cross-regional information and thus improving the network's ability to perceive complex fault modes. Finally, at the network's end is the classification module, which maps the extracted high-dimensional features to the fault category dimension through fully connected layers. And the predicted probability distribution is obtained by using the Softmax function, as shown in equation (18).
[0106] (18)
[0107] in, Indicates the first The network outputs logit values for each category. The entire network architecture comprises 16 effective layers, from local convolutional feature learning to global Transformer modeling and final classification, achieving a lightweight combination of convolution and Transformer. This architecture is not only more streamlined in terms of parameter size compared to traditional convolution-Transformer hybrid models, but also significantly improves training and inference efficiency while maintaining classification performance. Without loss of generality, the Adam optimizer is used for training parameters, with a maximum of 100 training epochs, a batch size of 64, an initial learning rate of 0.0001, and a validation frequency of every 30 iterations. Furthermore, the network rearranges samples in each epoch during training, fully ensuring the model's robustness.
[0108] Model performance evaluation:
[0109] Given the characteristics of network models, selecting comprehensive and objective performance metrics is a crucial step in evaluating the performance of photovoltaic array fault diagnosis models. This embodiment primarily selects precision, recall, F1 score, and the multi-class Receiver Operating Characteristic (ROC) curve and area under the corresponding area (AUC) metric to quantify the model's ability to identify various faults and its overall discriminative performance from different dimensions. Specifically, precision reflects the reliability of the model's prediction results, recall characterizes the model's coverage of actual fault samples, and the F1 score, as the harmonic average of the two, provides a more robust comprehensive evaluation even in cases of imbalanced class distribution. Furthermore, the ROC curve and AUC metric reveal the model's discriminative ability in multi-class scenarios, quantifying the model's recognition performance for each class, and possessing high interpretability and comparability. In terms of specific mathematical definitions, a confusion matrix is constructed... To represent the correspondence between the prediction results and the true labels, and thus obtain different indicators, as shown in Equations (19) to (24).
[0110] (19)
[0111] (20)
[0112] (twenty one)
[0113] (twenty two)
[0114] (twenty three)
[0115] (twenty four)
[0116] in, Indicates the true labels of the test set. This represents the predicted label of the model. For the first The number of class samples that were correctly identified. The total number of categories, and These represent the true and false positive rates, respectively. (This is achieved through...) The ROC curve is plotted on a plane, and the area under the curve (AUC) is used to quantify the model's overall discriminative performance for that category. The closer the AUC is to 1, the better the diagnostic model performs in identifying that type of fault.
[0117] The interpretability analysis is as follows:
[0118] To reveal the discrimination logic of the MobileViT model in photovoltaic array fault classification, this embodiment introduces the SHAP (Shapley Additive Explanations) method to quantitatively analyze the contribution of different input features in the model's decision-making process. SHAP originates from cooperative game theory, and its core idea is to treat each input feature as a "player" participating in the game, measuring its importance to the overall model prediction result by evaluating its marginal contribution across all possible feature combinations. Compared with traditional feature importance measurement methods, SHAP possesses rigorous theoretical completeness and consistency, providing robust interpretability support for the model's decision-making process in deep learning scenarios. Specifically, the SHAP method relies on the idea of additive feature attributes, constructing an interpretable model by summing the baseline prediction value and the contribution values of each input feature (SHAP values). Its expression is as shown in equation (25).
[0119] (25)
[0120] in, Indicates the input sample. This represents the total number of input features. For feature set, This represents the model's output value under baseline input conditions. Representation of features The SHAP value. The SHAP value characterizes the features. The marginal contribution under different combinations of feature subsets can reflect the impact of their individual and combined effects on the final prediction. Based on the value distribution principle of cooperative boson theory, the calculation of SHAP value can be formalized as formula (26).
[0121] (26)
[0122] in, For features not included A feature subset of , where ! represents factorial. Represents a set The number of features Indicates that only subsets are included. The prediction results of the model are based on features. For in subset Based on The predicted output of the time model, Indicates the original feature set Based on this, the first One characteristic, Indicates inclusion and target features eigenvalues, Indicates that only the feature set is included. The predicted output of the information. Formula (26) quantifies the global marginal contribution of features by weighting the average across all possible feature combinations, thereby effectively avoiding the interpretation distortion caused by single feature selection bias. In actual implementation, to avoid the explosive growth of the combination space, this embodiment uses the mean vector of the training set. As a reference value, it is used to approximately estimate the effect of each feature under different subset configurations. For a given input sample In the case of inclusion / exclusion, alternative samples are constructed as shown in equation (27).
[0123] (27)
[0124] in, and They respectively represent the included features Feature input and no features Feature input, This indicates that Hadamard's cumulative nature is... and Contains / Does not contain features The mask vector. The model output difference is shown in equation (28), and combined with the Shapley weights, the features can be obtained. The marginal contribution.
[0125] (28)
[0126] in, The model represents the "features" The output of the constructed sample, This indicates that the model does not contain features. The output is constructed from the sample data. Compared with traditional feature importance measurement methods, SHAP possesses strict theoretical completeness and consistency, providing robust and transparent explanations for the model's inference process in a deep learning environment. This method not only reveals the dependence of the SDAE-MobileViT model on features such as voltage, current, illumination, and temperature when distinguishing different fault categories, but also intuitively depicts the direct mapping relationship between fault features and fault categories, thus providing a solid basis for verifying the physical rationality of the model and subsequent feature enhancement.
[0127] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A photovoltaic fault classification method based on a lightweight neural network of visual images, characterized in that, Includes the following steps: Obtain the raw runtime sequence data of the photovoltaic system; Based on the original runtime sequence data, high-dimensional robust features are extracted using an unsupervised feature extraction model. The extraction of high-dimensional robust features through an unsupervised feature extraction model includes: Noise disturbances are introduced into the original runtime sequence data to obtain noisy data; The noisy data is subjected to deep nonlinear mapping by stacked noise reduction autoencoders to obtain latent feature representations. The latent feature representation is subjected to dimensionality reduction and redundancy elimination to obtain the high-dimensional robust features; The high-dimensional robust features obtained include: The latent feature representation is linearly projected by principal component analysis to obtain orthogonal features after dimensionality reduction. The original runtime sequence data, the dimensionality-reduced orthogonal features, and the fault label information are fused to generate the high-dimensional robust features; The high-dimensional robust features are converted into a two-dimensional feature matrix; The two-dimensional feature matrix is input into a lightweight neural network for classification to obtain the fault classification result. The lightweight neural network is the MobileViT network, which integrates depthwise separable convolution and Transformer structure; Based on the fault classification results, the classification decision criteria are visualized and analyzed using an interpretability analysis model to obtain interpretable data that quantifies the contribution of each input feature to the classification results.
2. The method according to claim 1, characterized in that, Converting the high-dimensional robust features into a two-dimensional feature matrix includes: The high-dimensional robust features are mapped from a one-dimensional sequence to a polar coordinate system using the Gram angle field method, and a Gram angle field transformation matrix is constructed based on the angle information. The two-dimensional feature matrix is then generated based on the Gram angle field transformation matrix. The expression for the Gram angle field transformation matrix is: ; ; In the formula, for The polar angle of a point For Gram Point and Field, The difference is at Gram's Point.
3. The method according to claim 1, characterized in that, The obtained fault classification results include: The local feature map is obtained by performing local feature extraction on the input two-dimensional feature matrix through the depthwise separable convolution. Global features are obtained by modeling global dependencies in the local feature maps using the Transformer structure. Based on the global features, the fault classification result is calculated by a classifier.
4. The method according to claim 3, characterized in that, The process of calculating the fault classification result based on the global features using a classifier includes: The global features are mapped to the fault category dimension through a fully connected layer, and the predicted probability of each category is calculated by the Softmax function. The category with the highest probability is taken as the fault classification result.
5. The method according to claim 1, characterized in that, The visualization analysis of classification decision criteria using an interpretability analysis model includes: The Shapley value of each feature in the high-dimensional robust features is calculated using the SHAP method to quantify the contribution of each feature to the model decision.
6. The method according to claim 5, characterized in that, Calculating the Shapley value of each feature in the high-dimensional robust features for the fault classification result includes: Construct alternative samples containing different feature subsets; Calculate the predicted output of the lightweight neural network for each of the alternative samples; The Shapley value of each feature is calculated by weighted averaging the difference in predicted outputs based on all possible combinations of feature subsets.
7. The method according to claim 1, characterized in that, The raw runtime sequence data includes the voltage, current, temperature, and irradiance data of the photovoltaic system.
Citation Information
Patent Citations
Fault detection method based on feature extraction and Transform model
CN117312821A
Converter valve saturable reactor fault identification method and system based on improved Gramb angle field
CN119577429A