Photovoltaic system fault classification method and early warning system based on deep learning
By using the deep learning method of Transformer network and U-Net decoder in photovoltaic system fault prediction, the problem of insufficient prediction and classification accuracy of complex and nonlinear fault mode prediction and classification of photovoltaic systems in the existing technology is solved, and high-precision fault prediction is achieved. Prediction and classification enhance the system’s predictive maintenance capabilities.
Patent Information
- Application Number
- CN202411410683.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has insufficient prediction and classification accuracy when dealing with complex and nonlinear fault modes of photovoltaic systems, making it difficult to effectively identify and evaluate multiple types and severity failures.
A method based on deep learning is used, combined with the Transformer network and U-Net decoder, to build a photovoltaic system fault prediction model. Through data collection and preprocessing, photovoltaic system simulation model generation, feature extraction and model training, high-precision prediction and classification of photovoltaic system faults are achieved.
It significantly improves the accuracy of photovoltaic system fault prediction and can effectively identify multiple types of faults and assess their severity. It performs particularly well in fault scenarios that lack clear trends, and enhances the system's predictive maintenance capabilities.
Smart Images

Figure CN119337095A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic system fault diagnosis, and in particular to a photovoltaic system fault classification method and early warning system based on deep learning. Background Art
[0002] With the widespread application of renewable energy, the reliability and efficiency of photovoltaic power generation systems have become increasingly important. However, due to environmental factors and system complexity, photovoltaic systems often face various faults that may lead to reduced system efficiency and economic losses. Traditional fault diagnosis methods often rely on simple statistical models or shallow neural networks, which have limitations in dealing with complex and nonlinear fault modes. Therefore, it is of great significance to develop a method that can effectively predict and classify photovoltaic system faults. Summary of the invention
[0003] The purpose of the present invention is to provide a photovoltaic system fault classification method and early warning system based on deep learning, aiming to solve the problem of insufficient accuracy in the prediction and classification of complex and nonlinear fault modes in the prior art. The present invention improves the accuracy of prediction and classification of complex faults in photovoltaic systems by introducing Transformer networks and U-Net decoders, which is particularly suitable for fault scenarios that lack clear trends, and provides a new technical solution for predictive maintenance of photovoltaic systems.
[0004] The purpose of the present invention is achieved by at least one of the following technical solutions.
[0005] A photovoltaic system fault classification method and early warning system based on deep learning, comprising the following steps:
[0006] S1: Data collection and preprocessing: Collect current-voltage characteristic curve data from the photovoltaic system, including current, voltage, power, photocurrent, diode saturation current, series resistance and shunt resistance. Preprocess the collected data, including data cleaning, normalization and randomization.
[0007] S2: Generate fault data of different types and degrees through the photovoltaic system simulation model, including four main fault modes: shadow, open circuit, short circuit and short circuit under shadow. Each fault is divided into three levels: slight, medium and severe. Analyze the change rate of IV curve and PV curve, and extract key characteristic parameters. The specific steps are as follows:
[0008] S2.1 Generates fault data of different types and degrees through the photovoltaic system simulation model. Establish simulation models including four main fault modes: shadow, open circuit, short circuit and short circuit under shadow. Each fault is divided into three levels: slight, medium and severe, covering all possible fault scenarios. The mathematical model describing the photovoltaic system includes:
[0009]
[0010] Among them, Isc is the maximum current when the output end of the photovoltaic cell is short-circuited, which is the short-circuit current; Voc is the maximum voltage when the output end of the corresponding photovoltaic cell is open-circuited, which is the open-circuit voltage. Impp and Vmpp are the current and voltage corresponding to the maximum power point, Isat is the reverse current of the diode, and m is the ideal factor, which is generally 1. Vth is the thermal voltage of the pn junction. Rs and Rp are the series impedance and parallel impedance of the diode, respectively.
[0011] S2.2 Based on the simulation data generated by the above formula, the key characteristic parameters extracted include but are not limited to the slope of the curve, the position of the inflection point, the maximum power point, etc.;
[0012] S3: Construct a fault prediction model based on Transformer, including a linearized embedding module, a position encoding module, a multi-head self-attention mechanism, and a feedforward neural network. The input sequence is transformed into a high-dimensional space representation through linearized embedding, the position encoding is used to capture the position information of the data points, and the multi-head self-attention mechanism is used to learn the complex relationship between the data. The specific structure is as follows Figure 2 The specific steps are as follows:
[0013] S3.1 Data normalization.
[0014] S3.2 Linear transformation and position encoding. The position encoding process is as follows: divide the data sequence into separate frames and adjust the spatial size of each frame to a width of 192 pixels. Then extract the 192 consecutive frames as a time series block, and process the first 191 frames in the time series block to predict or generate the 192th frame. After that, these frames are processed by the Transformer encoder to extract key features and analyze different types of photovoltaic faults. Its structure is as follows Figure 3 shown.
[0015] S4: Integrate the U-Net decoder in the Transformer model to enhance the model's ability to extract multi-scale features. The specific structure of the U-Net decoder integrated in the Transformer model includes the model type, position encoder module, encoder layer, and data source mask. These blocks use U-Net to process the input data, and the maximum pooling layer is used for downsampling. The sliding input of 24 bits of data is extracted simultaneously from the 192-bit long position encoder. Its structure is as follows Figure 4 shown.
[0016] S5: Use ReLU as the activation function, use the Adam optimizer to adjust the parameters, and set the learning rate to 0.001 initially. Train the data through batch selection and window selection mechanisms to optimize the model parameters. The specific steps are as follows:
[0017] S6: Use the SoftMax function to convert the model output into the probability distribution of the fault type, and classify different fault types and severity levels. The specific steps are as follows:
[0018] S6.1 uses the following formula to implement the SoftMax function and convert the output of the model into the probability distribution of each fault type.
[0019]
[0020] Among them, (x) i is the probability of the i-th type failure.
[0021] S6.2 calculates the cross entropy loss using the following formula to measure the difference between the predicted result and the true label as the objective function of model optimization.
[0022]
[0023] Among them, y i is the true label, is the predicted probability. When L approaches the threshold θ, the classification is considered valid.
[0024] S7: The fault prediction and classification results are presented in a visual way on the system user interface, including key information such as IV curve, PV curve, fault type and its probability. Set the abnormal detection threshold. When an abnormal fault type is detected, the system automatically triggers the alarm mechanism to promptly remind the operation and maintenance personnel to take corresponding measures. The overall process is as follows Figure 6 shown.
[0025] The technical solution of the present invention has the following advantages:
[0026] (1) High-precision prediction: By introducing the Transformer network and U-Net decoder, this method can effectively capture the complex nonlinear relationships in photovoltaic system data and significantly improve the accuracy of fault prediction, especially when dealing with fault scenarios that lack clear trends.
[0027] (2) Multi-type fault identification: It can simultaneously identify and classify multiple types of PV system faults, including shadow, open circuit, short circuit and short circuit under shadow, and can accurately assess the severity of the fault.
[0028] (3) Adaptive feature extraction: Through the self-attention mechanism of Transformer, the model can automatically focus on the features most relevant to photovoltaic system failures, thereby improving the accuracy of fault classification and prediction.
[0029] (4) Strong robustness: Through data preprocessing and model design, the method’s adaptability to different working conditions and environmental factors is improved, and the generalization performance of the model is enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 For the flow chart.
[0031] Figure 2 This is the Transformer network structure diagram.
[0032] Figure 3 This is a schematic diagram of position coding.
[0033] Figure 4 This is the structure diagram of the U-Net decoder.
[0034] Figure 5 The IV curves and their corresponding PV curves under different fault scenarios.
[0035] Figure 6 This is the system module connection diagram. DETAILED DESCRIPTION
[0036] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other modifications, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and should be included in the protection scope of the present invention.
[0037] An embodiment of a photovoltaic system fault classification method and early warning system based on deep learning includes the following steps:
[0038] S1: Data collection and preprocessing: Collect current-voltage characteristic curve data from the photovoltaic system, including current, voltage, power, photocurrent, diode saturation current, series resistance and shunt resistance. Preprocess the collected data, including data cleaning, normalization and randomization.
[0039] S2: Generate fault data of different types and degrees through the photovoltaic system simulation model, including four main fault modes: shadow, open circuit, short circuit and short circuit under shadow. Each fault is divided into three levels: slight, medium and severe. Analyze the change rate of IV curve and PV curve, and extract key characteristic parameters. The specific steps are as follows:
[0040] S2.1 Generates fault data of different types and degrees through the photovoltaic system simulation model. Establish simulation models including four main fault modes: shadow, open circuit, short circuit and short circuit under shadow. Each fault is divided into three levels: slight, medium and severe, covering all possible fault scenarios. The mathematical model describing the photovoltaic system includes:
[0041]
[0042] Among them, Isc is the maximum current when the output end of the photovoltaic cell is short-circuited, which is the short-circuit current; Voc is the maximum voltage when the output end of the corresponding photovoltaic cell is open-circuited, which is the open-circuit voltage. Impp and Vmpp are the current and voltage corresponding to the maximum power point, Isat is the reverse current of the diode, and m is the ideal factor, which is generally 1. Vth is the thermal voltage of the pn junction. Rs and Rp are the series impedance and parallel impedance of the diode respectively. Figure 5 As shown in Figure 1, the changes in the IV curve reflect the changes in the parameters of the photovoltaic cell. Faults of different severity have different effects on these parameters. The IV curve data is divided into more than 172,000 data points, of which 768 data points have voltage values between 167V and 173V, forming a clear trend of change.
[0043] S2.2 Based on the simulation data generated by the above formula, the key characteristic parameters extracted include but are not limited to the slope of the curve, the position of the inflection point, the maximum power point, etc.
[0044] S3: Construct a fault prediction model based on Transformer, including a linearized embedding module, a position encoding module, a multi-head self-attention mechanism, and a feedforward neural network. The input sequence is transformed into a high-dimensional space representation through linearized embedding, the position encoding is used to capture the position information of the data points, and the multi-head self-attention mechanism is used to learn the complex relationship between the data. The specific structure is as follows Figure 2 The specific steps are as follows:
[0045] S3.1 Data normalization.
[0046] S3.2 Linear transformation and position encoding. The position encoding process is as follows: divide the data sequence into separate frames and adjust the spatial size of each frame to a width of 192 pixels. Then extract the 192 consecutive frames as a time series block, and process the first 191 frames in the time series block to predict or generate the 192th frame. After that, these frames are processed by the Transformer encoder to extract key features and analyze different types of photovoltaic faults. Its structure is as follows Figure 3 shown.
[0047] S4: Integrate the U-Net decoder in the Transformer model to enhance the model's ability to extract multi-scale features. The specific structure of the U-Net decoder integrated in the Transformer model includes the model type, position encoder module, encoder layer, and data source mask. These blocks use U-Net to process the input data, and the maximum pooling layer is used for downsampling. The sliding input of 24 bits of data is extracted simultaneously from the 192-bit long position encoder. Its structure is as follows Figure 4 shown.
[0048] S5: Use ReLU as the activation function, use the Adam optimizer to adjust the parameters, and set the learning rate to 0.001 initially. Train the data through batch selection and window selection mechanisms to optimize the model parameters. The specific steps are as follows:
[0049] S6: Use the SoftMax function to convert the model output into the probability distribution of the fault type, and classify different fault types and severity levels. The specific steps are as follows:
[0050] S6.1 uses the following formula to implement the SoftMax function and convert the output of the model into the probability distribution of each fault type.
[0051]
[0052] Among them, (x) i is the probability of the i-th type failure.
[0053] S6.2 calculates the cross entropy loss using the following formula to measure the difference between the predicted result and the true label as the objective function of model optimization.
[0054]
[0055] Among them, y i is the true label, is the prediction probability. When L approaches the threshold θ, the classification is considered valid. In the training of 172,000 data points of a single IV curve, the error is 0.0886, the validation error is 0.10081, and the test error is 0.09377. When the data points are halved, the accuracy drops by 21% and the test error increases to 0.17887.
[0056] S7: The fault prediction and classification results are presented in a visual way on the system user interface, including key information such as IV curve, PV curve, fault type and its probability. Set the abnormal detection threshold. When an abnormal fault type is detected, the system automatically triggers the alarm mechanism to promptly remind the operation and maintenance personnel to take corresponding measures. The overall process is as follows Figure 6 shown.
Claims
1. A photovoltaic system fault classification method and early warning system based on deep learning, characterized in that: The following steps are involved: S1: Collect current-voltage characteristic curve data from the photovoltaic system and pre-process the data; S2: Generate fault data of different types and degrees through the photovoltaic system simulation model, analyze the change rate of IV curve and PV curve, and extract key characteristic parameters; S3: Build a Transformer-based fault prediction model, including a linearized embedding module, a position encoding module, a multi-head self-attention mechanism, and a feedforward neural network; S4: Integrate the U-Net decoder into the Transformer model to enhance the model’s ability to extract multi-scale features; S5: Use ReLU as the activation function, use Adam optimizer to adjust the parameters, and train the data through batch selection and window selection mechanism; S6: Use the SoftMax function to convert the model output into the probability distribution of the fault type to achieve fault classification and prediction; S7: The fault prediction and classification results are presented in a visual manner on the system user interface, and an abnormal detection threshold is set to trigger an alarm mechanism.
2. According to a photovoltaic system fault classification method and early warning system based on deep learning according to claim 1, it is characterized in that: The step S2 includes simulating four main fault modes: shadow, open circuit, short circuit and short circuit under shadow. Each fault is divided into three levels: slight, medium and severe, and the fault data is generated by the following formula: Among them, Isc is the maximum current when the output end of the photovoltaic cell is short-circuited, which is the short-circuit current; Voc is the maximum voltage when the output end of the corresponding photovoltaic cell is open-circuited, which is the open-circuit voltage; Impp and Vmpp are the current and voltage corresponding to the maximum power point, Isat is the reverse current of the diode, m is the ideal factor, which is generally 1; Vth is the thermal voltage of the pn junction; Rs and Rp are the series impedance and parallel impedance of the diode, respectively.
3. According to a photovoltaic system fault classification method and early warning system based on deep learning according to claim 1, it is characterized in that: The step S3 constructs a Transformer network, and the specific process includes preprocessing and feature extraction; data is fused through multi-dimensional features, and then feature selection and feature amplification are performed; the processed feature data is sent to a deep learning model, which includes two modules: a forward module and a backward module; in these two modules, the data is processed by a ReLU activation function, a 1D convolution, and re-activation respectively; the processed data is output and enters the U-Net training process to complete the entire data processing process.
4. The photovoltaic system fault classification method and early warning system based on deep learning according to claim 1, characterized in that: Position encoding is performed in step S3.2: S3.2: Linear transformation and position encoding. The position encoding process is as follows: the data sequence is divided into separate frames, and the spatial size of each frame is adjusted to a width of 192 pixels. Then, the continuous 192 frames are extracted as a time series block, and the first 191 frames in the time series block are processed to predict or generate the 192th frame. After that, these frames are processed by the Transformer encoder to extract key features and analyze different types of photovoltaic faults. S3.2 Linear transformation and position encoding. The position encoding process is as follows: the data sequence is divided into separate frames, and the spatial size of each frame is adjusted to a width of 192 pixels. Then, the continuous 192 frames are extracted as a time series block, and the first 191 frames in the time series block are processed to predict or generate the 192th frame. After that, these frames are processed by the Transformer encoder to extract key features and analyze different types of photovoltaic faults.
5. The photovoltaic system fault classification method and early warning system based on deep learning according to claim 1, characterized in that: In the step S4, the specific structure of integrating the U-Net decoder in the Transformer model includes a model type, a position encoder module, an encoder layer, and a data source mask; these blocks use U-Net to process input data, and downsampling uses a maximum pooling layer; and a sliding input of 24 bits of data is extracted simultaneously from a 192-bit long position encoder.
6. The photovoltaic system fault classification method and early warning system based on deep learning according to claim 1, characterized in that: In step S6, the model output is converted into a probability distribution of the fault type using the SoftMax function to achieve classification of different fault types and severity levels; the specific steps are as follows: S6.1 uses the SoftMax function to convert the model output into the probability distribution of the fault type and estimates the probability of occurrence using the following formula: in represents the exponential function of the i-th element of the input PV data; the denominator consists of the exponential values of all items of the input PV data, and the sum of the probabilities is equal to 1; S6.2 calculates the cross entropy loss by the following formula to measure the difference between the predicted result and the true label, which is used as the objective function of model optimization; Among them, y i is the true label, is the prediction probability; when L approaches the threshold θ, the classification is considered valid.
Citation Information
Patent Citations
Photovoltaic array fault diagnosis method based on integrated learning
CN113221468A
Visual power grid model fault response method and system
CN116822334A
KR20240140214A
Cited By
Industrial and commercial photovoltaic power station intelligent management system based on Internet of Things
CN120222959A
Photovoltaic system fault prediction and analysis method, equipment and medium
CN121524953A
A photovoltaic system fault prediction and analysis method, device and medium
CN121524953B