Photovoltaic power generation anomaly diagnosis method and system based on multi-source data fusion
By integrating multi-source heterogeneous data into a photovoltaic anomaly diagnosis method, and utilizing the Mamba model and multimodal sensing structure, the problems of low prediction accuracy and weak fault diagnosis capability in photovoltaic power generation systems are solved. This achieves efficient anomaly detection and fault location, and improves the intelligent operation and maintenance level of photovoltaic systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- COAL IND JINAN DESIGN & RES
- Filing Date
- 2025-07-28
- Publication Date
- 2026-05-19
AI Technical Summary
Existing photovoltaic power generation systems suffer from problems such as model uniformity, insufficient anomaly detection, and weak cause diagnosis capabilities in prediction and diagnosis. They also struggle to effectively integrate heterogeneous data from multiple sources, resulting in low prediction accuracy, delayed anomaly response, and weak fault tracing capabilities.
By introducing a multimodal sensing structure and the advanced time-series model Mamba, and integrating heterogeneous information from multiple sources such as images, text, sensors, and photovoltaic module status, a unified photovoltaic anomaly diagnosis framework is constructed. Through real-time analysis of environmental changes and equipment status, a closed-loop decision support system is achieved, from prediction to early warning to cause localization.
It improves the accuracy and intelligence of photovoltaic power generation anomaly detection, realizes efficient maintenance and fault early warning of photovoltaic equipment, enhances the stability and operation and maintenance efficiency of the system, and reduces the cost of manual inspection.
Smart Images

Figure CN120781264B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic power generation fault diagnosis technology, and in particular to a method, system, storage medium and computing device for photovoltaic power generation anomaly identification and diagnosis oriented towards multi-source heterogeneous data fusion. Background Technology
[0002] With the continuous development and widespread application of photovoltaic power generation technology, photovoltaics is playing an increasingly important role in the global clean energy transition. However, photovoltaic power generation is significantly affected by a variety of dynamic environmental and equipment status factors, such as light intensity, ambient temperature, module contamination, shading, and equipment failure. These factors fluctuate frequently at different time scales, seriously affecting the efficiency and operational stability of photovoltaic power generation.
[0003] In traditional photovoltaic (PV) system operation and maintenance, environmental sensors and electrical measurement equipment are mainly used to monitor the system's operating status. However, these methods are insufficient to comprehensively capture unstructured factors such as component contamination and shading. Due to the lack of joint modeling and intelligent analysis mechanisms for multi-source data, most current prediction and diagnostic systems suffer from low prediction accuracy, delayed anomaly response, and weak fault tracing capabilities, thus limiting the level of intelligent operation and maintenance of PV systems.
[0004] Existing technologies for power generation prediction mainly employ machine learning or deep learning methods based on historical data, such as Long Short-Term Memory (LSTM) networks, Gated Recurrent Units (GRUs), and Transformer models proposed in recent years. While these methods have achieved some success in sequence modeling, they generally face the following challenges: model singularity, for example, most methods rely solely on meteorological numerical data input, ignoring the ability of unstructured information such as images and equipment status to represent power generation anomalies; insufficient anomaly perception, mainly reflected in the decoupling of prediction and anomaly detection processes, lacking an integrated mechanism; and weak cause diagnosis capabilities, with most existing methods stopping at "detecting anomalies" but struggling to accurately determine the specific anomaly type or root cause.
[0005] To address the aforementioned issues, this study introduces a multimodal sensing structure and the advanced time-series model Mamba. This method integrates heterogeneous information from multiple sources, such as images, text, sensors, and photovoltaic module status, to construct a unified photovoltaic anomaly diagnosis framework. This framework has higher anomaly detection sensitivity and cause explanation capability, providing more efficient and accurate technical support for the operation and maintenance of intelligent photovoltaic power plants.
[0006] This study constructs a photovoltaic power generation prediction and anomaly diagnosis system that integrates multimodal perception mechanisms by combining Mamba and GRU prediction models. It can analyze environmental changes and equipment operating status in real time. In addition, it improves the diagnostic capability of photovoltaic power generation anomalies by integrating unstructured information such as images, and realizes closed-loop intelligent decision support from "prediction" to "early warning" and then to "cause localization". Summary of the Invention
[0007] The primary objective of this invention is to overcome the shortcomings and deficiencies of existing technologies and provide a method for identifying and diagnosing photovoltaic (PV) power generation anomalies based on multi-source heterogeneous data fusion. This method diagnoses the causes of PV power generation anomalies by analyzing environmental meteorological data, hardware equipment status information, and PV module image data during the operation of the PV power generation system. This improves the accuracy and intelligence level of PV power generation anomaly detection and plays a crucial role in providing scientific basis for subsequent PV equipment maintenance, fault early warning, and system operation optimization.
[0008] The second objective of this invention is to provide a photovoltaic power generation anomaly identification and diagnosis system for multi-source heterogeneous data fusion.
[0009] A third objective of this invention is to provide a storage medium.
[0010] A fourth objective of this invention is to provide a computing device.
[0011] The first objective of this invention is achieved through the following technical solution: a method for anomaly identification and diagnosis of photovoltaic power generation based on multi-source heterogeneous data fusion, comprising the following steps:
[0012] S1, acquire monitoring data, namely meteorological data, photovoltaic power generation data, photovoltaic equipment status information, photovoltaic panel images and historical power generation anomaly diagnosis records;
[0013] S2, data preprocessing, preprocesses the data obtained in S1, including performing missing value imputation, noise smoothing and normalization operations on structured data, size unification, color conversion and normalization processing on image data, and labeling and classifying the anomaly types of historical anomaly records.
[0014] S3, Construct a photovoltaic power generation prediction model, and predict the theoretical photovoltaic power generation based on the meteorological data in S1;
[0015] S4 compares the theoretical power generation predicted in S3 with the current power generation collected in S1, and determines whether there is any abnormality in photovoltaic power generation based on the set error threshold.
[0016] S5 combines the abnormal results detected in S4 with the processed meteorological data, equipment status, and image features in S2 to predict the cause of abnormal power generation.
[0017] Furthermore, in S1, the meteorological data is weather data obtained through the website interface of the meteorological station where the photovoltaic power station is located, including historical meteorological data and current meteorological data; the photovoltaic power generation data is photovoltaic power generation data recorded in the photovoltaic power station system, including historical power generation data and current power generation data; the photovoltaic equipment status information is the inverter operating status read through the inverter communication structure, the battery panel voltage and current collected by the meter, and photovoltaic fault alarm information in the form of "alarm codes" obtained through the communication protocol; the photovoltaic panel image is a photo of the photovoltaic panel taken by a camera; the historical power generation anomaly diagnosis record is the result of past photovoltaic power generation anomalies and diagnoses;
[0018] Every hour, the system automatically updates meteorological data, acquires photovoltaic power generation data, and takes photos of photovoltaic panels.
[0019] Furthermore, in S2, the data acquired in S1 is preprocessed, including performing missing value imputation, noise smoothing and normalization operations on structured data, size unification, color conversion and normalization processing on image data, and anomaly type labeling and classification on historical anomaly records. The specific details are as follows:
[0020] A. Based on the structured data observations from a previous period at the current time point, the missing values of the structured data at the current time point in S1 are imputed using the sliding window averaging method:
[0021]
[0022] in, This is the interpolation result at the current time point. For window size, Before the current time point Valid data at each time point;
[0023] B. Smooth the structured data at the current time point in S1 using the exponentially weighted moving average method:
[0024]
[0025] in, The result is a smoothed version of the current time. As a smoothing factor, This is the original value at the current time point. This is the smoothed value from the previous time point;
[0026] C. Using Min-Max, normalize the structured data at the current time point in S1 after imputing missing values in step A and smoothing in step B:
[0027]
[0028] in, This is the normalized current value. This is the current original value after smoothing. and These are the minimum and maximum values of the features in the historical training dataset;
[0029] D. The specific steps for performing size unification, color conversion, and normalization on image data are as follows:
[0030] D.1. Use bilinear interpolation to unify the size of the photovoltaic panel images captured in S1:
[0031]
[0032] in, The pixel value at the target location. These are the four nearest pixels in the original image. These are the corresponding interpolation weights;
[0033] D.2. Convert the BGR format image to RGB format by converting the first and second channels, and then convert the RGB format image to grayscale using a weighted average method.
[0034]
[0035] in, For the corresponding grayscale value, R , G , B These are the red, green, and blue channel values of the pixel, respectively.
[0036] D.3. Normalize the image pixels using the mean and variance to obtain normalized pixel values:
[0037]
[0038] in, For the image in the first i line, number j Column pixel values, The average pixel value. The standard deviation of pixel values;
[0039] E. According to the input data format requirements of the anomaly cause prediction model, label the cause corresponding to each anomaly in the historical power generation anomaly diagnosis record.
[0040] Furthermore, in S3, a photovoltaic power generation prediction model is constructed. Based on the meteorological data in S1, the specific details of the predicted theoretical photovoltaic power generation are as follows:
[0041] A. The specific steps for constructing the input feature vector of the prediction model are as follows:
[0042] A.1 Constructing static input feature vectors:
[0043]
[0044] in, For the first A static feature, The number of static features;
[0045] A.2. Constructing the input feature tensor for the time series model:
[0046]
[0047] in, For time points t meteorological characteristics, d For each time point, the feature dimension, n The length of the historical time window used;
[0048] B. The specific steps for multi-model integrated modeling are as follows:
[0049] B.1. Compress and embed static input feature vectors using a fully connected network:
[0050]
[0051] in, s For feature vectors, h The feature dimension after embedding;
[0052] B.2. Using the Mamba time-series model to extract long-dependent meteorological features:
[0053]
[0054] in, For the past n A sequence of weather data at specific points in time;
[0055] B.3. Using GRU to extract short-term fluctuation features:
[0056]
[0057] B.4 Multi-model fusion representation vector:
[0058]
[0059] Where Z is the comprehensive feature vector. Concat This is a vector concatenation operation;
[0060] C. The specific steps for defining the regression loss function and optimizing the model's prediction are as follows:
[0061] C.1. The Mean Absolute Error (MAE) is used to measure the accuracy of the multi-model prediction of power generation in C:
[0062]
[0063] in, This represents the actual amount of electricity generated. To predict power generation, N The number of samples;
[0064] C.2. Use root mean square error to measure the overall error between actual power generation and predicted power generation:
[0065]
[0066] C.3. The mean absolute percentage error is used to measure the percentage of actual power generation that differs from the predicted power generation.
[0067]
[0068] C.4. Calculate the total loss function by weighted combination of the loss functions in D.1, D.2, and D.3 to guide multi-model training:
[0069]
[0070] D. Adjust the model parameters by training the model multiple times using the preprocessed historical meteorological data and power generation information in S2;
[0071] E. Using the processed meteorological data from S2 as input, predict power generation through the multi-model fusion in B:
[0072]
[0073] in, For the predicted power generation, This is the regression layer.
[0074] Furthermore, in S4, the theoretical power generation predicted in S3 is compared with the current power generation collected in S1. Based on the set error threshold, the following specific situations are used to determine whether there are any anomalies in photovoltaic power generation:
[0075] A. Based on historical data statistics, the specific steps for setting dynamic thresholds and establishing rules for judging power generation anomalies are as follows:
[0076] A.1. Collect historical residual data: ,in For the first N Predicted power generation With the N Actual power generation The difference;
[0077] A.2 The specific steps for calculating the historical residual mean and standard deviation are as follows:
[0078] a. Calculate the mean residual:
[0079]
[0080] b. Calculate the standard deviation of the residuals:
[0081]
[0082] c. Set a dynamic threshold based on the mean of the residuals in a and the standard deviation of the residuals in b:
[0083]
[0084] in, k For control parameters;
[0085] d. Set rules for determining abnormal power generation:
[0086]
[0087] B. The specific steps for comparing the actual power generation after processing in S2 with the predicted power generation in S3 to detect whether the photovoltaic power generation is abnormal are as follows:
[0088] a. Calculate the residual of the current power generation:
[0089]
[0090] b. Combine the residuals in a with the dynamic threshold in step A. By comparing the results, we can determine whether the photovoltaic power generation is abnormal.
[0091] Furthermore, in S5, combining the abnormal results detected in S4 with the processed meteorological data, equipment status, and image features from S2, the specific reasons for the abnormal power generation are predicted as follows:
[0092] A. The specific steps for constructing input features are as follows:
[0093] A.1. Inputting structured data by splicing: ,in, Environmental characteristics, including solar irradiance, temperature, humidity, wind speed, and time information, Equipment status characteristics include voltage, current, operating status code, and alarm status;
[0094] A.2 The specific steps for image feature extraction are as follows:
[0095] a. Use the image semantic segmentation model SAM to segment the preprocessed photovoltaic panel photos in S2:
[0096]
[0097] Among them, the segmentation mask 1 indicates a polluted or obstructed area, and 0 indicates a normal area. H , W These are the height and width of the image, respectively; the original image.
[0098] b. Use the segmentation mask from step a to calculate the proportion of the contaminated or occluded portion of the entire image:
[0099]
[0100] in, Indicates the relative proportion of contaminated or occluded areas in an image. pixel position The label values are 1 for pollution and 0 for normal.
[0101] c. Extracting image depth features using a Convolutional Neural Network (CNN):
[0102]
[0103] in, The image encoding vector represents the visual features of the photovoltaic photograph. For encoding dimensions;
[0104] d. The proportion of polluted area By concatenating the image with the image depth features, the final image feature vector is obtained:
[0105]
[0106] B. Integrate the input features and image features into an input sequence: Feature interaction and fusion are performed through the multimodal Transformer module. The specific encoding steps are as follows:
[0107] B.1 Project each modal feature onto a unified dimension using a linear mapping:
[0108]
[0109] B.2 Constructing the input sequence:
[0110]
[0111] B.3. Input the input sequence from B.2 into the Transformer encoder to perform multi-layer attention modeling, and output the fused representation:
[0112]
[0113] B.4. Perform pooling operation on the fused vector in B.3 to obtain the fused representation vector:
[0114]
[0115] C. Adjust the model parameters by repeatedly training the model using the annotated historical power generation anomalies and their causes data in S2;
[0116] D. Using an MLP classifier, output the probability distribution of each type of anomaly, and analyze the causes of the anomalies. The specific steps are as follows:
[0117]
[0118] in, For the probability distribution of each anomaly type, c This is a set of possible causes for abnormal power generation, including photovoltaic panel surface contamination, equipment failure, meteorological factors, photovoltaic shading, and unknown causes. W Here is the weight matrix of the classifier. b This is the bias vector of the classifier. The most likely type of abnormality diagnosed at the current moment.
[0119] The second objective of this invention is achieved through the following technical solution: a photovoltaic power generation anomaly identification and diagnosis system for multi-source heterogeneous data fusion, used to implement the aforementioned photovoltaic power generation anomaly identification and diagnosis method for multi-source heterogeneous data fusion, comprising:
[0120] The data acquisition module is used to acquire meteorological data, photovoltaic power generation data, photovoltaic equipment status information, photovoltaic panel images, and historical power generation anomaly diagnostic records;
[0121] The data preprocessing module is used to perform missing value imputation, noise smoothing and normalization operations on structured data, perform size unification, color conversion and normalization processing on image data, and label and classify the anomaly types of historical anomaly records.
[0122] The power generation prediction module is used to build a photovoltaic power generation prediction model to predict the theoretical power generation of photovoltaics in real-world scenarios.
[0123] The power generation anomaly detection module is used to statistically analyze historical data to determine the threshold for abnormal power generation deviations and to analyze whether the current photovoltaic power generation is abnormal.
[0124] The power generation anomaly analysis module is used to analyze the causes of current photovoltaic power generation anomalies based on existing photovoltaic-related information and historical photovoltaic power generation anomaly diagnostic information.
[0125] The third objective of this invention is achieved through the following technical solution: a storage medium storing a program, which, when executed by a processor, implements the above-mentioned method for identifying and diagnosing photovoltaic power generation anomalies oriented towards multi-source heterogeneous data fusion.
[0126] The fourth objective of this invention is achieved through the following technical solution: a computing device, including the device and a memory for storing processor-executable programs, wherein when the processor executes the program stored in the memory, it implements the above-mentioned photovoltaic power generation anomaly identification and diagnosis method oriented towards multi-source heterogeneous data fusion.
[0127] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0128] 1. This invention introduces a novel linear state-space network, Mamba, into the power generation prediction model for the first time, which improves the long-term dependency modeling ability and inference efficiency of power generation prediction, and enhances the accuracy and generalization ability of power generation prediction.
[0129] 2. This invention is the first to integrate and model structured and unstructured data in a unified manner. The structured data and image data complement each other, which improves the system's ability to identify power generation anomalies and provides strong support for analyzing the causes of power generation anomalies.
[0130] 3. This invention is the first to construct a residual-driven dynamic anomaly detection mechanism, which can automatically adjust the judgment criteria according to different seasons, weather or equipment operating status, and infer the cause of the anomaly through a further supervised classification model, forming a closed-loop diagnostic process from prediction to detection to cause location, effectively supporting the autonomous maintenance and intelligent scheduling of photovoltaic systems.
[0131] 4. This invention enables real-time prediction, fault warning, and anomaly location of photovoltaic power generation behavior, improving the operation and maintenance efficiency of photovoltaic power plants, reducing manual inspection costs, and promoting the intelligent and low-carbon development of clean energy.
[0132] 5. The data structure used in this invention is standardized and uniform. The computing module can be deployed in edge computing devices or server clusters, making it suitable for various application scenarios such as centralized photovoltaic power plants and distributed photovoltaic rooftops. It has good practicality and scalability. Attached Figure Description
[0133] Figure 1 This is a schematic diagram of the logical flow of the method of the present invention.
[0134] Figure 2 This is an architecture diagram of the system of the present invention. Detailed Implementation
[0135] The present invention will be further described below with reference to specific embodiments.
[0136] like Figure 1 As shown in the figure, this embodiment discloses a photovoltaic power generation anomaly identification and diagnosis method for multi-source heterogeneous data fusion. First, monitoring data is acquired, including meteorological data, photovoltaic power generation data, photovoltaic equipment status information, photovoltaic panel images, and historical power generation anomaly diagnosis records. Then, the acquired data is preprocessed, including performing missing value imputation, noise smoothing, and normalization operations on structured data; performing size unification, color conversion, and normalization processing on image data; and labeling and classifying the anomaly types of historical anomaly records. Next, a photovoltaic power generation prediction model is constructed, trained using historical meteorological data and photovoltaic power generation data, and predicts the theoretical power generation of the current photovoltaic system based on current meteorological data. Then, the deviation between theoretical and actual power generation in historical records is statistically analyzed, a power generation anomaly deviation threshold is set, and the current photovoltaic power generation is detected as abnormal. Finally, based on the anomaly detection results, a fault diagnosis of photovoltaic power generation anomalies is performed by comprehensively considering meteorological conditions, photovoltaic equipment status, and photovoltaic panel shading conditions, and the causes of the anomalies are analyzed. The method includes the following steps:
[0137] S1. Acquire monitoring data, namely meteorological data, photovoltaic power generation data, photovoltaic equipment status information, photovoltaic panel images, and historical power generation anomaly diagnostic records. The meteorological data is obtained through the weather data interface of the meteorological station website where the photovoltaic power station is located, including historical and current meteorological data. The photovoltaic power generation data is the photovoltaic power generation data recorded in the photovoltaic power station system, including historical and current power generation data. The photovoltaic equipment status information is the inverter operating status read through the inverter communication structure, the voltage and current of the solar panels collected by the meter, and photovoltaic fault alarm information in the form of "alarm codes" obtained through the communication protocol. The photovoltaic panel images are photos of the photovoltaic panels taken by a camera. The historical power generation anomaly diagnostic records are the results of past photovoltaic power generation anomalies and diagnoses.
[0138] Every hour, the system automatically updates meteorological data, acquires photovoltaic power generation data, and takes photos of photovoltaic panels.
[0139] By following the steps above, raw weather data can be obtained. Original photovoltaic power generation data Photovoltaic equipment status Original photovoltaic panel image Historical meteorological data and power generation information, as well as historical power generation anomaly diagnosis records. .
[0140] S2, Data Preprocessing, involves preprocessing the data obtained in S1. This includes performing missing value imputation, noise smoothing, and normalization on structured data; size unification, color conversion, and normalization on image data; and anomaly type labeling and classification on historical anomaly records. The specific details are as follows:
[0141] A. Based on the structured data observations from a previous period at the current time point, the missing values of the structured data at the current time point in S1 are imputed using the sliding window averaging method:
[0142]
[0143] in, This is the interpolation result at the current time point. For window size, Before the current time point Valid data at each time point;
[0144] B. Smooth the structured data at the current time point in S1 using the exponentially weighted moving average method:
[0145]
[0146] in, The result is a smoothed version of the current time. As a smoothing factor, This is the original value at the current time point. This is the smoothed value from the previous time point;
[0147] C. Using Min-Max, normalize the structured data at the current time point in S1 after imputing missing values in step A and smoothing in step B:
[0148]
[0149] in, This is the normalized current value. This is the current original value after smoothing. and These are the minimum and maximum values of the features in the historical training dataset;
[0150] D. The specific steps for performing size unification, color conversion, and normalization on image data are as follows:
[0151] D.1. Use bilinear interpolation to unify the size of the photovoltaic panel images captured in S1:
[0152]
[0153] in, The pixel value at the target location. These are the four nearest pixels in the original image. These are the corresponding interpolation weights;
[0154] D.2. Convert the BGR format image to RGB format by converting the first and second channels, and then convert the RGB format image to grayscale using a weighted average method.
[0155]
[0156] in, For the corresponding grayscale value, R , G , B These are the red, green, and blue channel values of the pixel, respectively.
[0157] D.3. Normalize the image pixels using the mean and variance to obtain normalized pixel values:
[0158]
[0159] in, For the image in the first i line, number j Column pixel values, The average pixel value. The standard deviation of pixel values;
[0160] E. According to the input data format requirements of the anomaly cause prediction model, label the cause corresponding to each anomaly in the historical power generation anomaly diagnosis record.
[0161] By using the above steps, preprocessed meteorological data can be obtained. Preprocessed photovoltaic power generation data Preprocessed photovoltaic panel images And diagnostic information on historical photovoltaic power generation anomalies with anomaly type labels. .
[0162] S3, Construct a photovoltaic power generation prediction model. Based on the meteorological data in S1, predict the specific details of the theoretical photovoltaic power generation as follows:
[0163] A. The specific steps for constructing the input feature vector of the prediction model are as follows:
[0164] A.1 Constructing static input feature vectors:
[0165]
[0166] in, For the first A static feature, The number of static features;
[0167] A.2. Constructing the input feature tensor for the time series model:
[0168]
[0169] in, For time points t meteorological characteristics, d For each time point, the feature dimension, n The length of the historical time window used;
[0170] B. The specific steps for multi-model integrated modeling are as follows:
[0171] B.1. Compress and embed static input feature vectors using a fully connected network:
[0172]
[0173] in, s For feature vectors, h The feature dimension after embedding;
[0174] B.2. Using the Mamba time-series model to extract long-dependent meteorological features:
[0175]
[0176] in, For the past n A sequence of weather data at specific points in time;
[0177] B.3. Using GRU to extract short-term fluctuation features:
[0178]
[0179] B.4 Multi-model fusion representation vector:
[0180]
[0181] Where Z is the comprehensive feature vector. Concat This is a vector concatenation operation;
[0182] C. The specific steps for defining the regression loss function and optimizing the model's prediction are as follows:
[0183] C.1. The Mean Absolute Error (MAE) is used to measure the accuracy of the multi-model prediction of power generation in C:
[0184]
[0185] in, This represents the actual amount of electricity generated. To predict power generation, N The number of samples;
[0186] C.2. Use root mean square error to measure the overall error between actual power generation and predicted power generation:
[0187]
[0188] C.3. The mean absolute percentage error is used to measure the percentage of actual power generation that differs from the predicted power generation.
[0189]
[0190] C.4. Calculate the total loss function by weighted combination of the loss functions in D.1, D.2, and D.3 to guide multi-model training:
[0191]
[0192] D. Adjust the model parameters by training the model multiple times using the preprocessed historical meteorological data and power generation information in S2;
[0193] E. Using the processed meteorological data from S2 as input, predict power generation through the multi-model fusion in B:
[0194]
[0195] in, For the predicted power generation, This is the regression layer.
[0196] Using the above steps, a photovoltaic power generation prediction model is constructed. Using the preprocessed meteorological data in S2 As input, obtain the theoretical power generation of photovoltaics in real-world scenarios. .
[0197] Furthermore, in S4, the theoretical power generation predicted in S3 is compared with the current power generation collected in S1. Based on the set error threshold, the following specific situations are used to determine whether there are any anomalies in photovoltaic power generation:
[0198] A. Based on historical data statistics, the specific steps for setting dynamic thresholds and establishing rules for judging power generation anomalies are as follows:
[0199] A.1. Collect historical residual data: ,in For the first N Predicted power generation With the N Actual power generation The difference;
[0200] A.2 The specific steps for calculating the historical residual mean and standard deviation are as follows:
[0201] a. Calculate the mean residual:
[0202]
[0203] b. Calculate the standard deviation of the residuals:
[0204]
[0205] c. Set a dynamic threshold based on the mean of the residuals in a and the standard deviation of the residuals in b:
[0206]
[0207] in, k For control parameters;
[0208] d. Set rules for determining abnormal power generation:
[0209]
[0210] B. The specific steps for comparing the actual power generation after processing in S2 with the predicted power generation in S3 to detect whether the photovoltaic power generation is abnormal are as follows:
[0211] a. Calculate the residual of the current power generation:
[0212]
[0213] b. Combine the residuals in a with the dynamic threshold in step A. By comparing the results, we can determine whether the photovoltaic power generation is abnormal.
[0214] By using the above steps, theoretical power generation is calculated from historical data. and actual power generation residual Establish a threshold for power generation deviation. Analyze the current photovoltaic power generation status and obtain the analysis results. .
[0215] S5, combining the abnormal results detected in S4 with the processed meteorological data, equipment status, and image features in S2, predicts the specific reasons for the abnormal power generation as follows:
[0216] A. The specific steps for constructing input features are as follows:
[0217] A.1. Inputting structured data by splicing: ,in, Environmental characteristics, including solar irradiance, temperature, humidity, wind speed, and time information, Equipment status characteristics include voltage, current, operating status code, and alarm status;
[0218] A.2 The specific steps for image feature extraction are as follows:
[0219] a. Use the image semantic segmentation model SAM to segment the preprocessed photovoltaic panel photos in S2:
[0220]
[0221] Among them, the segmentation mask 1 indicates a polluted or obstructed area, and 0 indicates a normal area. H , W These are the height and width of the image, respectively; the original image.
[0222] b. Use the segmentation mask from step a to calculate the proportion of the contaminated or occluded portion of the entire image:
[0223]
[0224] in, Indicates the relative proportion of contaminated or occluded areas in an image. pixel position The label values are 1 for pollution and 0 for normal.
[0225] c. Extracting image depth features using a Convolutional Neural Network (CNN):
[0226]
[0227] in, The image encoding vector represents the visual features of the photovoltaic photograph. For encoding dimensions;
[0228] d. The proportion of polluted area By concatenating the image with the image depth features, the final image feature vector is obtained:
[0229]
[0230] B. Integrate the input features and image features into an input sequence: Feature interaction and fusion are performed through the multimodal Transformer module. The specific encoding steps are as follows:
[0231] B.1 Project each modal feature onto a unified dimension using a linear mapping:
[0232]
[0233] B.2 Constructing the input sequence:
[0234]
[0235] B.3. Input the input sequence from B.2 into the Transformer encoder to perform multi-layer attention modeling, and output the fused representation:
[0236]
[0237] B.4. Perform pooling operation on the fused vector in B.3 to obtain the fused representation vector:
[0238]
[0239] C. Adjust the model parameters by repeatedly training the model using the annotated historical power generation anomalies and their causes data in S2;
[0240] D. Using an MLP classifier, output the probability distribution of each type of anomaly, and analyze the causes of the anomalies. The specific steps are as follows:
[0241]
[0242] in, For the probability distribution of each anomaly type, c This is a set of possible causes for abnormal power generation, including photovoltaic panel surface contamination, equipment failure, meteorological factors, photovoltaic shading, and unknown causes. W Here is the weight matrix of the classifier. b This is the bias vector of the classifier. The most likely type of abnormality diagnosed at the current moment.
[0243] Using the above steps, based on the power generation anomaly analysis results in S4 The preprocessed meteorological data in S2 Photovoltaic panel images and photovoltaic equipment status Feature vectors are concatenated, and feature interaction and fusion are performed through the multimodal Transformer module. Anomaly diagnostic information from historical photovoltaic power generation with anomaly type annotations is then used. Train the model to identify the causes of current abnormal photovoltaic power generation. .
[0244] Example 2
[0245] This embodiment discloses a photovoltaic power generation anomaly identification and diagnosis system for multi-source heterogeneous data fusion, used to implement the photovoltaic power generation anomaly identification and diagnosis method for multi-source heterogeneous data fusion described in Embodiment 1, such as... Figure 2 As shown, the system includes the following functional modules:
[0246] The data acquisition module is used to acquire meteorological data, photovoltaic power generation data, photovoltaic equipment status information, photovoltaic panel images, and historical power generation anomaly diagnostic records;
[0247] The data preprocessing module is used to perform missing value imputation, noise smoothing and normalization operations on structured data, perform size unification, color conversion and normalization processing on image data, and label and classify the anomaly types of historical anomaly records.
[0248] The power generation prediction module is used to build a photovoltaic power generation prediction model to predict the theoretical power generation of photovoltaics in real-world scenarios.
[0249] The power generation anomaly detection module is used to statistically analyze historical data to determine the threshold for abnormal power generation deviations and to analyze whether the current photovoltaic power generation is abnormal.
[0250] The power generation anomaly analysis module is used to analyze the causes of current photovoltaic power generation anomalies based on existing photovoltaic-related information and historical photovoltaic power generation anomaly diagnostic information.
[0251] Example 3
[0252] This embodiment discloses a storage medium storing a program. When the program is executed by a processor, it implements the photovoltaic power generation anomaly identification and diagnosis method for multi-source heterogeneous data fusion as described in Embodiment 1.
[0253] The storage medium in this embodiment can be a disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), USB flash drive, portable hard drive, etc.
[0254] Example 4
[0255] This embodiment discloses a computing device, including a processor and a memory for storing processor-executable programs. When the processor executes the program stored in the memory, it implements the photovoltaic power generation anomaly identification and diagnosis method for multi-source heterogeneous data fusion described in Embodiment 1.
[0256] The computing device described in this embodiment may be a desktop computer, laptop computer, smartphone, PDA handheld terminal, tablet computer, programmable logic controller (PLC), or other terminal device with processor function.
[0257] In summary, this invention proposes a method and system for photovoltaic power generation anomaly identification and diagnosis based on multi-source heterogeneous data fusion. It introduces for the first time a novel linear state-space model, Mamba, to construct a high-performance power generation prediction model. Based on meteorological information and historical power generation data, it accurately models photovoltaic power generation trends, improving the model's inference efficiency and generalization ability. Simultaneously, the system integrates photovoltaic equipment operating status data with computer vision-based component image recognition technology, enabling efficient identification of unstructured anomalies such as pollution and shading, thereby achieving accurate diagnosis of the causes of power generation anomalies. This method possesses high automation and intelligence, enabling unattended operation of photovoltaic power plants, improving the accuracy and response efficiency of power generation prediction, effectively reducing operation and maintenance costs, and demonstrating good engineering practicality and broad application value.
[0258] The above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Therefore, any changes made in accordance with the shape and principle of the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for diagnosing photovoltaic power generation anomalies through multi-source data fusion, characterized in that, Includes the following steps: S1, acquire monitoring data, namely meteorological data, photovoltaic power generation data, photovoltaic equipment status information, photovoltaic panel images and historical power generation anomaly diagnosis records; S2, data preprocessing, preprocesses the data obtained in S1, including performing missing value imputation, noise smoothing and normalization operations on structured data, size unification, color conversion and normalization processing on image data, and labeling and classifying the anomaly types of historical anomaly records. S3, Construct a photovoltaic power generation prediction model, and predict the theoretical photovoltaic power generation based on the meteorological data in S1; S4 compares the theoretical power generation predicted in S3 with the current power generation collected in S1, and determines whether there is any abnormality in photovoltaic power generation based on the set error threshold. S5, combining the abnormal results detected in S4 with the processed meteorological data, equipment status, and image features in S2, predicts the cause of the abnormal power generation, as detailed below: A. The specific steps for constructing input features are as follows: A.
1. Inputting structured data by splicing: ,in, Environmental characteristics, including solar irradiance, temperature, humidity, wind speed, and time information, Equipment status characteristics include voltage, current, operating status codes, and alarm status. This is the predicted power generation. This is the actual amount of electricity generated. This represents the difference between the predicted power generation and the actual power generation. A.2 The specific steps for image feature extraction are as follows: a. Use the image semantic segmentation model SAM to segment the preprocessed photovoltaic panel photos in S2: ; Among them, the segmentation mask 1 indicates a polluted or obstructed area, and 0 indicates a normal area. H , W These are the height and width of the image, respectively; the original image. ; b. Use the segmentation mask from step a to calculate the proportion of the contaminated or occluded portion of the entire image: ; in, Indicates the relative proportion of contaminated or occluded areas in an image. pixel position The label values are 1 for pollution and 0 for normal. c. Extracting image depth features using a Convolutional Neural Network (CNN): ; in, is the image encoding vector, representing the visual features of the photovoltaic photo, and is the encoding dimension; d. The proportion of polluted area By concatenating the image with the image depth features, the final image feature vector is obtained: ; B. Integrate the input features and image features into an input sequence: Feature interaction and fusion are performed through the multimodal Transformer module. The specific encoding steps are as follows: B.1 Project each modal feature onto a unified dimension using a linear mapping: ; B.2 Constructing the input sequence: ; B.
3. Input the input sequence from B.2 into the Transformer encoder to perform multi-layer attention modeling, and output the fused representation: ; B.
4. Perform pooling operation on the fused vector in B.3 to obtain the fused representation vector: ; C. Adjust the model parameters by repeatedly training the model using the annotated historical power generation anomalies and their causes data in S2; D. Using an MLP classifier, output the probability distribution of each type of anomaly, and analyze the causes of the anomalies. The specific steps are as follows: ; Where represents the probability distribution for each anomaly type. c This is a set of possible causes for abnormal power generation, including photovoltaic panel surface contamination, equipment failure, meteorological factors, photovoltaic shading, and unknown causes. W The weight matrix of the classifier. b This is the bias vector of the classifier. The most likely type of abnormality diagnosed at the current moment.
2. The photovoltaic power generation anomaly diagnosis method based on multi-source data fusion according to claim 1, characterized in that: In S1, the meteorological data is obtained through the weather station website interface at the location of the photovoltaic power station, including historical and current meteorological data; the photovoltaic power generation data is the photovoltaic power generation data recorded in the photovoltaic power station system, including historical and current power generation data; the photovoltaic equipment status information is the inverter operating status read through the inverter communication structure, the battery panel voltage and current collected by the meter, and photovoltaic fault alarm information in the form of "alarm codes" obtained through the communication protocol; the photovoltaic panel image is a photograph of the photovoltaic panel taken by a camera; the historical power generation anomaly diagnosis record is the result of past photovoltaic power generation anomalies and diagnoses. Every hour, the system automatically updates meteorological data, acquires photovoltaic power generation data, and takes photos of photovoltaic panels.
3. The photovoltaic power generation anomaly diagnosis method based on multi-source data fusion according to claim 1, characterized in that: In S2, the data acquired in S1 is preprocessed, including performing missing value imputation, noise smoothing and normalization operations on structured data, size unification, color conversion and normalization processing on image data, and anomaly type labeling and classification on historical anomaly records. The specific details are as follows: A. Based on the structured data observations from a previous period at the current time point, the missing values of the structured data at the current time point in S1 are imputed using the sliding window averaging method: ; in, This is the interpolation result at the current time point. For window size, Before the current time point Valid data at each time point; B. Smooth the structured data at the current time point in S1 using the exponentially weighted moving average method: ; in, The result is a smoothed version of the current time. As a smoothing factor, This is the original value at the current time point. This is the smoothed value from the previous time point; C. Using Min-Max, normalize the structured data at the current time point in S1 after imputing missing values in step A and smoothing in step B: ; in, This is the normalized current value. This is the current original value after smoothing. and These are the minimum and maximum values of the features in the historical training dataset; D. The specific steps for performing size unification, color conversion, and normalization on image data are as follows: D.
1. Use bilinear interpolation to unify the size of the photovoltaic panel images captured in S1: ; in, The pixel value at the target location. These are the four nearest pixels in the original image. These are the corresponding interpolation weights; D.
2. Convert the BGR format image to RGB format by converting the first and second channels, and then convert the RGB format image to grayscale using a weighted average method. ; in, For the corresponding grayscale value, R , G , B These are the red, green, and blue channel values of the pixel, respectively. D.
3. Normalize the image pixels using the mean and variance to obtain normalized pixel values: ; in, For the image in the first i line, number j Column pixel values, The average pixel value. The standard deviation of pixel values; E. According to the input data format requirements of the anomaly cause prediction model, label the cause corresponding to each anomaly in the historical power generation anomaly diagnosis record.
4. The photovoltaic power generation anomaly diagnosis method based on multi-source data fusion according to claim 1, characterized in that: In S3, a photovoltaic power generation prediction model is constructed. Based on the meteorological data in S1, the specific details of the predicted theoretical photovoltaic power generation are as follows: A. The specific steps for constructing the input feature vector of the prediction model are as follows: A.1 Constructing static input feature vectors: ; in, For the first A static feature, The number of static features; A.
2. Constructing the input feature tensor for the time series model: ; in, The meteorological characteristics at time point t, d For each time point, the feature dimension, n The length of the historical time window used; B. The specific steps for multi-model integrated modeling are as follows: B.
1. Compress and embed static input feature vectors using a fully connected network: ; in, s For feature vectors, h The feature dimension after embedding; B.
2. Using the Mamba time-series model to extract long-dependent meteorological features: ; in, For the past n A sequence of weather data at specific points in time; B.
3. Using GRU to extract short-term volatility features: ; B.4 Multi-model fusion representation vector: ; in, For the comprehensive feature vector, Concat This is a vector concatenation operation; C. The specific steps for defining the regression loss function and optimizing the model's prediction are as follows: C.
1. The Mean Absolute Error (MAE) is used to measure the accuracy of the multi-model prediction of power generation in C: ; in, This represents the actual amount of electricity generated. To predict power generation, N The number of samples; C.
2. Use root mean square error to measure the overall error between actual power generation and predicted power generation: ; C.
3. The mean absolute percentage error is used to measure the percentage of actual power generation that differs from the predicted power generation. ; C.
4. Weighted combination of the loss functions in C.1, C.2, and C.3 to calculate the total loss function and guide multi-model training: ; D. Adjust the model parameters by training the model multiple times using the preprocessed historical meteorological data and power generation information in S2; E. Using the processed meteorological data from S2 as input, predict power generation through the multi-model fusion in B: in, For the predicted power generation, This is the regression layer.
5. The photovoltaic power generation anomaly diagnosis method based on multi-source data fusion according to claim 1, characterized in that: In S4, the theoretical power generation predicted in S3 is compared with the current power generation collected in S1. Based on the set error threshold, the following are the specific situations in which the photovoltaic power generation is deemed abnormal: A. Based on historical data statistics, the specific steps for setting dynamic thresholds and establishing rules for judging power generation anomalies are as follows: A.
1. Collect historical residual data: ,in For the first N Predicted power generation With the N Actual power generation The difference; A.2 The specific steps for calculating the historical residual mean and standard deviation are as follows: a. Calculate the mean residual: b. Calculate the standard deviation of the residuals: c. Set a dynamic threshold based on the mean of the residuals in a and the standard deviation of the residuals in b: in, k For control parameters; d. Set rules for determining abnormal power generation: B. The specific steps for comparing the actual power generation after processing in S2 with the predicted power generation in S3 to detect whether the photovoltaic power generation is abnormal are as follows: a. Calculate the residual of the current power generation: in, This is the actual amount of electricity generated. This is the predicted power generation; b. Combine the residuals in a with the dynamic threshold in step A. By comparing the results, we can determine whether the photovoltaic power generation is abnormal.
6. A photovoltaic power generation anomaly diagnosis system based on multi-source data fusion, characterized in that, A photovoltaic power generation anomaly diagnosis method for implementing multi-source data fusion as described in any one of claims 1 to 5, comprising: The data acquisition module is used to acquire meteorological data, photovoltaic power generation data, photovoltaic equipment status information, photovoltaic panel images, and historical power generation anomaly diagnostic records; The data preprocessing module is used to perform missing value imputation, noise smoothing and normalization operations on structured data, size unification, color conversion and normalization processing on image data, and anomaly type labeling and classification on historical anomaly records. The power generation prediction module is used to build a photovoltaic power generation prediction model to predict the theoretical power generation of photovoltaics in real-world scenarios. The power generation anomaly detection module is used to statistically analyze historical data to determine the threshold for abnormal power generation deviations and to analyze whether the current photovoltaic power generation is abnormal. The power generation anomaly analysis module is used to analyze the causes of current photovoltaic power generation anomalies based on existing photovoltaic-related information and historical photovoltaic power generation anomaly diagnostic information.
7. A storage medium storing a program, characterized in that, When the program is executed by the processor, it implements the photovoltaic power generation anomaly diagnosis method based on multi-source data fusion as described in any one of claims 1 to 5.
8. A computing device, comprising a processor and a memory for storing a processor-executable program, characterized in that, When the processor executes the program stored in the memory, it implements the photovoltaic power generation anomaly diagnosis method based on multi-source data fusion as described in any one of claims 1 to 5.