A photovoltaic fault quantitative diagnosis method based on an adaptive clustering algorithm and an IC-LSTM neural network
By combining adaptive clustering algorithms and IC-LSTM neural networks with Pearson correlation coefficient analysis and spectral clustering techniques, a photovoltaic power generation prediction model was constructed. This model addresses the shortcomings of quantitative diagnosis of photovoltaic faults, enabling accurate fault diagnosis and elimination suggestions, thereby improving power generation efficiency and economy.
Patent Information
- Application Number
- CN202511316264.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-16
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-09-16
AI Technical Summary
Existing photovoltaic fault diagnosis methods are insufficient in quantitatively diagnosing the severity of faults, making it difficult to effectively cope with complex and ever-changing external environments, thus affecting power generation efficiency and economics.
An adaptive clustering algorithm and an IC-LSTM neural network are used, combined with Pearson correlation coefficient analysis, spectral clustering and vector quantization techniques, to construct a photovoltaic power generation prediction model. The model parameter migration is used to achieve quantitative fault diagnosis and to propose fault removal suggestions.
It enables precise quantitative diagnosis of photovoltaic faults, improves the accuracy and real-time performance of power generation prediction, and enhances the power generation efficiency and economy of photovoltaic systems.
Smart Images

Figure CN120804847B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of photovoltaic fault diagnosis, in particular to a photovoltaic fault quantitative diagnosis method based on adaptive clustering algorithm and IC-LSTM neural network. BACKGROUND
[0002] With the increasing demand for clean energy and the rapid progress of photovoltaic power generation technology, photovoltaic systems have become an important part of the renewable energy field. However, photovoltaic arrays are long-term exposed to outdoor environments and are prone to be affected by various faults such as component aging, hot spots, and short circuits, resulting in a significant decrease in power generation efficiency. Therefore, developing intelligent and efficient fault diagnosis methods to improve the service life and power generation efficiency of photovoltaic systems has become a pressing problem. Currently, photovoltaic fault diagnosis methods mainly focus on fault location, fault type classification, and fault severity quantification. With the development of big data and artificial intelligence technology, data-driven methods based on machine learning have been widely applied in the field of photovoltaic fault diagnosis, such as principal component analysis method based on I-V curve, fuzzy logic control method, and fault diagnosis method combining convolutional neural network (CNN) and other models. These methods have made certain progress in fault location and classification, but there are still obvious deficiencies in the quantitative diagnosis of fault severity.
[0003] In existing research, some methods can diagnose hidden crack faults of photovoltaic components and reflect their occurrence and development process, but the quantitative evaluation of faults is still not comprehensive. For example, although some methods based on power signal analysis combine advanced neural network models and dynamic time warping (DTW) technology, the research on fault quantification still needs to be further deepened. In addition, existing methods have deficiencies in considering the influence of meteorological factors on faults, making it difficult to effectively cope with complex and variable external environments.
[0004] In summary, although existing research has made certain achievements in the field of photovoltaic fault diagnosis, there are still deficiencies in the quantitative diagnosis of fault severity, and there is an urgent need for a method that can effectively quantify the severity of photovoltaic faults to further improve the power generation efficiency and economy of photovoltaic systems. SUMMARY
[0005] (I) Technical problems solved
[0006] In view of the deficiencies of the prior art, the present application provides a photovoltaic fault quantitative diagnosis method based on adaptive clustering algorithm and IC-LSTM neural network, which has the advantages of effectively quantifying the severity of photovoltaic faults to further improve the power generation efficiency of photovoltaic systems, thereby solving the problem that existing technology has deficiencies in considering the influence of meteorological factors on faults and is difficult to effectively cope with complex and variable external environments.
[0007] (ii) Technical Solution
[0008] To achieve the above advantages of effectively quantifying photovoltaic fault severity and further improving the power generation efficiency of the photovoltaic system, the specific technical solutions adopted by the present application are as follows:
[0009] A photovoltaic fault quantitative diagnosis method based on an adaptive clustering algorithm and an IC-LSTM neural network, the method comprising:
[0010] Correlation analysis is performed on multiple variables in the historical operation data using the Pearson correlation coefficient analysis method, and characteristic variables associated with the actual power generation are selected based on the correlation analysis results;
[0011] An improved adaptive clustering algorithm is generated by combining the spectral clustering algorithm and the vector quantization technology, and the weather conditions are classified using the improved adaptive clustering algorithm to obtain the weather condition classification results;
[0012] Based on the weather condition classification results and combined with the input IC-LSTM neural network, a prediction model under normal photovoltaic power generation is constructed; the characteristic variables are used as input variables, and the actual power generation is used as a target variable to train the prediction model under normal photovoltaic power generation;
[0013] Based on a plurality of pre-constructed photovoltaic fault scenarios, the prediction model under normal photovoltaic power generation is trained to migrate the model parameters, and a prediction model under photovoltaic power generation fault is generated;
[0014] The prediction model under photovoltaic power generation fault is used to output the prediction results of photovoltaic fault, quantitatively diagnose the severity of photovoltaic fault, and develop photovoltaic fault clearing measures based on the severity of photovoltaic fault.
[0015] Preferably, before performing correlation analysis on multiple variables in the historical operation data using the Pearson correlation coefficient analysis method, the following steps are further included:
[0016] The historical operation data and historical weather data of the photovoltaic power generation system are obtained; the historical operation data includes solar irradiance, atmospheric temperature, humidity, wind speed, wind direction, and actual power generation data; the historical weather data includes weather type, temperature change, and humidity change.
[0017] Preferably, correlation analysis is performed on multiple variables in the historical operation data using the Pearson correlation coefficient analysis method, and characteristic variables associated with the actual power generation are selected based on the correlation analysis results, including:
[0018] The Pearson correlation coefficient between each variable in the historical operation data and the actual power generation is calculated, and the calculation formula of the Pearson correlation coefficient is:
[0019] ;
[0020] wherein, denotes the number of samples, i denotes the sample index, denotes the actual generated power, denotes the impact factor associated with the actual generated power , denotes the Pearson correlation coefficient between and , denotes the covariance between and , denotes the standard deviation of , and denote the mean of and , respectively;
[0021] The feature variables associated with the actual generated power are screened based on the Pearson correlation coefficient, and the feature variables associated with the actual generated power include solar irradiance, atmospheric temperature and humidity.
[0022] Preferably, an improved adaptive clustering algorithm is generated in combination with a spectral clustering algorithm and a vector quantization technology, and the weather condition is classified by using the improved adaptive clustering algorithm to obtain a weather condition classification result, which includes:
[0023] A plurality of samples are selected from historical weather data and used as a set of generating points in a Euclidean space, and a generating point related Voronoi polygon region and a generating point related Voronoi polygon region are constructed in the Euclidean space, and the inertia between the Voronoi polygon region and the Voronoi polygon region is calculated.
[0024] The centroid of the Voronoi polygon region and the centroid of the Voronoi polygon region are obtained, respectively, the line segment structure connecting the centroid and the centroid is taken as a bridge, and the inertia of the bridge between the Voronoi polygon region and the Voronoi polygon region is calculated based on the inertia .
[0025] The Voronoi polygon region With the Thiessen polygon region Inertia of the bridge Using geometric criteria to measure the Thiessen polygon region With the Thiessen polygon region Bridge affinity;
[0026] A centroid-level bridge affinity matrix is constructed based on bridge affinity, and a spectral clustering algorithm is applied to the bridge affinity matrix to obtain weather condition classification results associated with actual power generation.
[0027] Preferably, a centroid-level bridge affinity matrix is constructed based on bridge affinity, and a spectral clustering algorithm is applied to the bridge affinity matrix to obtain weather condition classification results associated with actual power generation, including:
[0028] A centroid-level bridge affinity matrix is constructed based on bridge affinity. The bridge affinity matrix is used as input to a spectral clustering algorithm, and the normalized Laplace matrix is calculated using the spectral clustering algorithm.
[0029] The eigenvectors corresponding to the smallest eigenvalues within a preset range in the normalized Laplacian matrix are extracted using eigenvalue decomposition techniques to form a low-dimensional feature space.
[0030] By aggregating the Thiessen polygon regions in a low-dimensional feature space, we obtain weather condition classification results that are associated with actual power generation.
[0031] Preferably, a prediction model for photovoltaic power generation under normal conditions is constructed based on weather condition classification results and combined with an input convex long short-term memory neural network; training the prediction model for photovoltaic power generation under normal conditions, using feature variables as input variables and actual power generation as target variables, includes:
[0032] Based on the weather condition classification results, solar irradiance, atmospheric temperature and humidity are used as weather classification factors to construct an objective function that minimizes weather classification.
[0033] A prediction model for photovoltaic power generation under normal conditions is established based on minimizing the objective function of weather classification and combining it with an input convex long short-term memory neural network.
[0034] The model is trained using the feature variables as input variables and the actual power generation as the target variable. The model is divided into a training set and a test set. The model is trained using the training set and at a preset time step. The predictive ability of the model under normal conditions is evaluated after training.
[0035] Preferably, the input convex long short-term memory neural network includes:
[0036] Construct the weight matrices of the input gate, forget gate, and output gate of the input convex long short-term memory neural network, and constrain the weight matrices to be non-negative weight matrices as the first-order input convexity constraint condition in the input convex long short-term memory neural network;
[0037] In the gating unit and candidate state of the input convex long short-term memory neural network, a non-negative diagonal matrix is introduced. At the same time, the activation function in the neuron of the input convex long short-term memory neural network is restricted to a convex and non-decreasing function as a second-order input convexity constraint condition in the input convex long short-term memory neural network.
[0038] Based on a predefined residual connection structure, and by introducing first-level and second-level input convexity constraints, the performance of the input convex long short-term memory neural network is optimized.
[0039] Preferably, the expression for the neuron input to the convex long short-term memory neural network is:
[0040] ;
[0041] ;
[0042] ;
[0043] ;
[0044] ;
[0045] ;
[0046] In the formula, This represents the output of the forget gate. Indicates the output of the input gate. This indicates the output of the output gate. Representing candidate cell states, all are non-negative diagonal matrices. This represents the dependencies in time series data. The input feature information consists of non-negative weight matrices. This indicates the deviation of the forget gate. Indicates the deviation of the input gate. This indicates the deviation of the output gate. Indicates the deviation of the candidate state. This indicates the effect of the activation function on the cell state. Indicates the generation or updating of cell state. Indicates the current time step The output of the forget gate, Indicates the current time step The input gate output, Indicates the current time step The output gate output, Indicates the current time step Candidate memory units, Indicates the current time step The state of the memory unit, Indicates the current time step The input of solar irradiance, temperature, and humidity, Indicates the current time step The output of photovoltaic power generation, Indicates the current time step -1 is the output of photovoltaic power generation.
[0047] Preferably, before generating a prediction model for photovoltaic power generation under fault conditions by performing model parameter transfer on the trained prediction model under normal photovoltaic power generation conditions based on several pre-constructed photovoltaic fault scenarios, the method further includes:
[0048] Several photovoltaic (PV) fault scenarios were constructed, and PV faults of different severity were simulated in the PV fault scenarios to obtain PV fault simulation results. The PV fault scenarios include PV fault scenarios that block a single PV cell, PV fault scenarios that block a row of PV cells, and PV fault scenarios that block a row of PV cells.
[0049] Preferably, based on several pre-constructed photovoltaic fault scenarios, the model parameters of the trained prediction model under normal photovoltaic power generation conditions are transferred to generate a prediction model under photovoltaic power generation fault conditions, including:
[0050] A prediction model for normal photovoltaic power generation is trained in the source domain, and the initial parameters of the prediction model for normal photovoltaic power generation are generated by minimizing the source domain loss function.
[0051] Based on the photovoltaic fault simulation results and combined with the number of samples in the target domain, the prediction model parameters under the normal state of photovoltaic power generation are transferred to the prediction model under the fault state of photovoltaic power generation, while constraining the change amplitude of the model parameters to maintain the similarity with the parameters in the source domain.
[0052] The power output of the prediction model under normal photovoltaic power generation conditions and under photovoltaic power generation failure conditions is compared, and the performance of the prediction model under photovoltaic power generation failure conditions is comprehensively evaluated by combining predefined evaluation indicators.
[0053] (III) Beneficial Effects
[0054] Compared with existing technologies, this invention provides a quantitative diagnosis method for photovoltaic faults based on adaptive clustering algorithms and IC-LSTM neural networks, which has the following advantages:
[0055] (1) The improved adaptive clustering algorithm is generated by combining spectral clustering and vector quantization technology, so that the non-convex clustering problem in large-scale data set can be effectively processed, the accuracy and efficiency of weather classification are improved, and a reliable weather classification basis is provided for the photovoltaic power generation prediction model.
[0056] (2) The IC-LSTM neural network is introduced to solve the non-convexity problem of the traditional neural network, which has advantages in processing sequence data and capturing long-term dependencies, and is suitable for time series prediction of photovoltaic power generation. At the same time, three typical fault scenarios are set, and the parameter fine-tuning technology is combined to transfer the prediction model parameters in the normal state to the prediction model in the fault state, realize the quantitative diagnosis of photovoltaic fault and put forward reasonable fault clearing suggestions, and provide scientific basis for the intelligent operation of photovoltaic system.
[0057] (3) The improved adaptive clustering algorithm and the input convex long short-term memory neural network are combined to realize the accurate quantitative diagnosis of photovoltaic fault, solve the deficiency of traditional method in fault quantization, so as to improve the accuracy and real-time of photovoltaic power generation prediction, and through weather classification, model optimization and parameter fine-tuning, the accuracy and efficiency of fault diagnosis are improved, the fault severity is effectively quantified and reasonable fault clearing suggestions are put forward, so as to improve the power generation efficiency and economy of photovoltaic system. BRIEF DESCRIPTION OF DRAWINGS
[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0059] Figure 1 is a flow chart of the photovoltaic fault quantitative diagnosis method based on adaptive clustering algorithm and IC-LSTM neural network according to the embodiment of the present application;
[0060] Figure 2 is a schematic diagram of the IC-LSTM model in the photovoltaic fault quantitative diagnosis method based on adaptive clustering algorithm and IC-LSTM neural network according to the embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to further illustrate the embodiments, the present application provides drawings, which are part of the disclosure of the present application, mainly used to illustrate the embodiments, and can explain the operating principle of the embodiments in conjunction with the related description of the specification. With reference to these contents, those skilled in the art should understand other possible embodiments and advantages of the present application.
[0062] According to an embodiment of the present application, a photovoltaic fault quantitative diagnosis method based on an adaptive clustering algorithm and an IC-LSTM neural network is provided.
[0063] The present application will be further described in conjunction with the accompanying drawings and specific embodiments, as shown in the drawings, the photovoltaic fault quantitative diagnosis method based on the adaptive clustering algorithm and the IC-LSTM neural network according to the embodiment of the present application, the method comprises: Figure 1
[0064] S1, using Pearson correlation coefficient analysis method to analyze the correlation of multiple variables in the historical operation data, and screening the characteristic variables associated with the actual power generation based on the correlation analysis results.
[0065] Before using the Pearson correlation coefficient analysis method to analyze the correlation of multiple variables in the historical operation data, it further comprises:
[0066] Obtaining the historical operation data and the historical weather data of the photovoltaic power generation system; the historical operation data includes solar irradiance, atmospheric temperature, humidity, wind speed, wind direction and actual power generation data; the historical weather data includes weather type, temperature change and humidity change.
[0067] Using the Pearson correlation coefficient analysis method to analyze the correlation of multiple variables in the historical operation data, and screening the characteristic variables associated with the actual power generation based on the correlation analysis results comprises:
[0068] Calculating the Pearson correlation coefficient between each variable in the historical operation data and the actual power generation, screening the characteristic variables associated with the actual power generation based on the Pearson correlation coefficient, and the characteristic variables associated with the actual power generation include solar irradiance, atmospheric temperature and humidity.
[0069] It should be noted that the historical operation data of the photovoltaic system is obtained, including solar irradiance (SI), atmospheric temperature (TA), humidity (H), wind speed (WS), wind direction (WD) and actual power generation data; at the same time, the historical weather data is obtained, including weather type, temperature change, humidity change and other multi-dimensional data, which is used for weather classification and construction of photovoltaic power generation prediction model. The collected data is preprocessed and the influence factor is analyzed, the Pearson correlation coefficient (Pearson's Product-Moment Correlation Coefficient, Pearson correlation coefficient) analysis method is used to analyze the correlation of multiple variables, the correlation coefficient between different variables and the actual power generation is calculated, and the influence factor with greater correlation with power generation is selected as the input variable of the subsequent prediction model.
[0070] Specifically, the acquired historical operation data is decomposed into a time series and a weather series; the time series contains continuous information in the time dimension, representing short-term fluctuations of photovoltaic power generation; the weather series contains multi-dimensional data such as weather types, temperature changes, humidity changes, and the like, representing the long-term influence of different weather types on photovoltaic power generation, and is used for an improved adaptive clustering algorithm to classify weather conditions, so as to enhance the prediction ability of the model under different weather conditions.
[0071] Pearson correlation coefficient analysis method is used to analyze the correlation of multiple variables, and the correlation coefficients between solar irradiance (SI), atmospheric temperature (TA), humidity (H), wind speed (WS), wind direction (WD) and actual power generation are calculated, and the influence factors with greater correlation with power generation are selected as input variables of the subsequent prediction model, so as to reduce the complexity of the model and improve the prediction accuracy, wherein the Pearson correlation coefficient calculation formula is:
[0072] ;
[0073] In the formula, n represents the number of samples, and i represents the sample index, P represents the actual power generation, P represents the influence factor associated with the actual power generation, including solar irradiance (SI), atmospheric temperature (TA), humidity (H), wind speed (WS) and wind direction (WD), r represents the Pearson correlation coefficient between X and Y, cov(X,Y) represents the covariance of X and Y, std(X) and std(Y) represent the standard deviation of X and Y, respectively.
[0074] By analyzing the daily operation data collected by the photovoltaic system, the correlation between different weather factors and photovoltaic power generation is analyzed, so that solar irradiance (SI), atmospheric temperature (TA) and humidity (H) are selected as the main input variables.
[0075] S2, an improved adaptive clustering algorithm is generated by combining a spectral clustering algorithm and a vector quantization technology, and the weather conditions are classified by using the improved adaptive clustering algorithm, to obtain a weather condition classification result.
[0076] Among them, an improved adaptive clustering algorithm is generated by combining spectral clustering algorithm and vector quantization technology, and the improved adaptive clustering algorithm is used to classify weather conditions, resulting in weather condition classification results including:
[0077] Several samples were selected from historical weather data and used as a group of generating points in Euclidean space. Generating points were then constructed in Euclidean space. Related Thiessen polygon regions and generation point Related Thiessen polygon regions And calculate the Thiessen polygon region. With the Thiessen polygon region inertia between ;
[0078] Obtain the Thiessen polygon regions separately center of mass and the Tyson polygon area center of mass Connecting the centroid With the center of mass The line segment structure serves as a bridge, and is based on inertia. Calculate the Thiessen polygon region With the Thiessen polygon region Inertia of the bridge ;
[0079] Combined with the Thiessen polygonal region With the Thiessen polygon region Inertia of the bridge Using geometric criteria to measure the Thiessen polygon region With the Thiessen polygon region Bridge affinity;
[0080] A centroid-level bridge affinity matrix is constructed based on bridge affinity, and a spectral clustering algorithm is applied to the bridge affinity matrix to obtain weather condition classification results associated with actual power generation.
[0081] Among these methods, a centroid-level bridge affinity matrix is constructed based on bridge affinity, and a spectral clustering algorithm is applied to the bridge affinity matrix to obtain weather condition classification results associated with actual power generation, including:
[0082] A centroid-level bridge affinity matrix is constructed based on bridge affinity. The bridge affinity matrix is used as input to a spectral clustering algorithm, and the normalized Laplace matrix is calculated using the spectral clustering algorithm.
[0083] The eigenvectors corresponding to the smallest eigenvalues within a preset range in the normalized Laplacian matrix are extracted using eigenvalue decomposition techniques to form a low-dimensional feature space.
[0084] The Voronoi polygon regions are aggregated in the low-dimensional feature space to obtain the weather condition classification results associated with the actual power generation.
[0085] It should be noted that by combining the ideas of spectral clustering and vector quantization technology, the weather types with greater correlation with photovoltaic power generation are screened out, specifically including:
[0086] Vector quantization and Voronoi region division are performed, and the sample is defined , where is a set of points in -dimensional Euclidean space, is an element in the set , and is a -dimensional Euclidean space.
[0087] The generating point in is defined as:
[0088] ;
[0089] In the formula, is the distance from the point to the generating point , is the index of other generating points and is not the same as the current generating point, is the index of the current generating point.
[0090] The inertia between two Voronoi regions and Voronoi region is defined as:
[0091] ;
[0092] In the formula, is a sample point, is the square of the distance from the point to the generating point to minimize the distance from the point to the center, , are the generating points of two different Voronoi regions.
[0093] The bridge is defined as a line segment structure connecting the two centroids and , and the inertia of the bridge between is:
[0094] ;
[0095] wherein, denotes the square of the distance between the sampling point and the reference centroid , whose expression is:
[0096] ;
[0097] denotes the relative position of the reference point projected on the segment , whose expression is:
[0098] ;
[0099] wherein the relative position is normalized between 0 and 1.
[0100] After the Voronoi region partitioning, a geometric criterion is used to measure the affinity between regions. The bridge affinity between the centroid and the centroid is defined as:
[0101] ;
[0102] wherein, and denote the indices of two different Voronoi regions, respectively, and 0 when denotes the similarity, denote the midpoints of the Voronoi region and the Voronoi region , respectively, denotes the total number of midpoints of the two regions.
[0103] The relative position of the reference point on the segment is:
[0104] ;
[0105] wherein, denotes the relative position of the reference point projected on the segment , denotes the relative position of the reference point on the segment.
[0106] A spectral clustering algorithm is applied on the constructed affinity graph to obtain the final clustering result. The present application converts the large-scale meteorological data clustering problem into the merging task of a small number of Voronoi regions through vector quantization, and calculates the bridge affinity based on the geometric structure between regions , constructs the affinity matrix of the centroid level , and outputs it as the input of spectral clustering; using the standard spectral clustering process, the normalized Laplacian matrix is calculated to describe the graph structure, the eigenvectors corresponding to the first three smallest eigenvalues are extracted by eigenvalue decomposition to form a low-dimensional feature space , and the Voronoi regions are aggregated into three categories of sunny, cloudy and rainy days in the low-dimensional feature space , realizing the automatic classification of weather.
[0107] The core innovation of the present application is to redefine the similarity measure through vector quantization and bridge affinity, rather than changing the spectral clustering framework itself. The improved adaptive clustering algorithm can effectively process large data sets, significantly improving the accuracy of weather classification while improving the computational efficiency.
[0108] Specifically, the improved adaptive clustering algorithm is used to classify the weather conditions. Generally, common weather conditions can be divided into three categories: sunny, cloudy and rainy. Therefore, k=3 is selected as the optimal value for weather classification. According to the Pearson correlation analysis results, the influence of irradiance on the weather classification result is greater than that of temperature and humidity. When the irradiance is high (normalized value 0.5 to 1), it mainly corresponds to sunny days; when the irradiance is at a medium level (normalized value -0.5 to 0.5), it mainly corresponds to cloudy days; and when the irradiance is low (normalized value -1 to -0.5), it mainly corresponds to rainy days.
[0109] The improved adaptive clustering algorithm is used to classify the weather conditions, and the weather conditions are divided into k types. The algorithm combines spectral clustering and vector quantization technology to divide the data space into Voronoi regions, and then detects the affinity of the region pairs through geometric criteria and applies spectral clustering. It can effectively handle the non-convex clustering problem in large-scale data sets, thereby improving the accuracy and efficiency of weather classification.
[0110] S3, based on the weather condition classification result and combined with the input convex long short-term memory neural network, a prediction model under normal state of photovoltaic power generation is constructed; the feature variables are used as input variables, and the actual power generation is used as target variable, and the prediction model under normal state of photovoltaic power generation is trained.
[0111] Among them, based on the weather condition classification result and combined with the input convex long short-term memory neural network, a prediction model under normal state of photovoltaic power generation is constructed; the feature variables are used as input variables, and the actual power generation is used as target variable, and the prediction model under normal state of photovoltaic power generation is trained.
[0112] Based on the weather condition classification result, the solar irradiance, atmospheric temperature and humidity are taken as weather classification factors to construct a target function of minimizing weather classification; based on the target function of minimizing weather classification and combined with the input convex long short-term memory neural network, a prediction model under normal state of photovoltaic power generation is established; the feature variables are taken as input variables, the actual power generation is taken as target variable, the training set and test set are divided, the prediction model under normal state of photovoltaic power generation is trained through the training set and at a preset time step, and the prediction ability of the prediction model under normal state of photovoltaic power generation is evaluated after the training is completed.
[0113] It should be noted that the improved adaptive clustering algorithm is used to classify the weather conditions, and the corresponding photovoltaic power generation prediction model is established; the weather conditions are divided into types, the solar irradiance (SI), temperature (TA) and humidity (H) are selected as weather classification factors, and a target function J of minimizing weather classification is constructed.
[0114] ;
[0115] In the formula, the sum of the Euclidean distances between the selected three weather classification factors and their mean values is represented by , the input day number is represented by , and the weather type number is represented by . , , respectively represent the solar irradiance, atmospheric temperature and humidity of the th day, , , respectively represent the average values of the solar irradiance, atmospheric temperature and humidity of the th day. By minimizing the target function , the weather conditions are divided into types, thereby providing classification basis for the photovoltaic power generation prediction model under different weather types.
[0116] The input convex long short-term memory neural network comprises: constructing weight matrices of input gates, forget gates and output gates of the input convex long short-term memory neural network, and constraining the weight matrices as non-negative weight matrices to serve as a first-level input convexity constraint condition in the input convex long short-term memory neural network; introducing a non-negative diagonal matrix in a gating unit and a candidate state in the input convex long short-term memory neural network, and limiting an activation function in a neuron of the input convex long short-term memory neural network as a convex and non-decreasing function to serve as a second-level input convexity constraint condition in the input convex long short-term memory neural network, and introducing the first-level input convexity constraint condition and the second-level input convexity constraint condition based on a pre-defined residual connection structure to optimize performance of the input convex long short-term memory neural network.
[0117] It should be noted that, as shown in Figure 2 , based on the weather classification result, an input convex long short-term memory (IC-LSTM) neural network is used to establish a prediction model in a normal state of photovoltaic power generation. The IC-LSTM neural network effectively solves the non-convex optimization problem of a traditional neural network by introducing an input convexity constraint. Compared with the traditional LSTM, the IC-LSTM constructs a convex function model about the input by applying strict mathematical constraints. The core improvements include: all weight matrices (W 、 、 and ) are constrained to be non-negative, which is the mathematical basis for realizing convexity; a non-negative diagonal matrix is introduced in the gating unit and the candidate state ; and the activation functions and are strictly limited to be convex and non-decreasing functions. These constraints collectively guarantee the input convexity of the network, wherein, as shown in Figure 2 , ReLU is an activation function.
[0118] In addition, the IC-LSTM adopts a residual connection structure, so that the output of each layer contains the original input of the layer. According to the mathematical property that the addition of a convex function and a linear function still maintains convexity, the overall convexity is ensured not to be destroyed after multiple transformations. Based on these convexity constraints, the loss function of the IC-LSTM presents good convexity with respect to the model parameters, has a unique global optimal point, so that the optimization algorithm can reliably converge to the global optimal solution, significantly improving the stability, predictability and reproducibility of the training process. The neuron is described as follows:
[0119] ;
[0120] ;
[0121] ;
[0122] ;
[0123] ;
[0124] ;
[0125] wherein, denotes the output of the forget gate, denotes the output of the input gate, denotes the output of the output gate, denotes the candidate cell state, all being non-negative diagonal matrices, for capturing dependencies in time series data, denotes the input feature information, all being non-negative weight matrices, denotes the effect of the activation function on the cell state, denotes the generation or update of the cell state, denotes the bias of the forget gate, denotes the bias of the input gate, denotes the bias of the output gate, denotes the bias of the candidate state, denotes the forget gate output of the current time step , denotes the input gate output of the current time , denotes the output gate output of the current time step , denotes the candidate memory cell of the current time step , denotes the memory cell state of the current time step , and for the neural unit for photovoltaic power generation, denotes the input of the solar irradiance SI, the temperature TA and the humidity H of the current time step , denotes the output of the photovoltaic power generation of the current time step , denotes the output of the photovoltaic power generation of the time step -1.
[0126] Furthermore, the output of the L-layer IC-LSTM is as follows:
[0127] ;
[0128] ;
[0129] wherein, denotes the current output, which combines the hidden state of the LSTM and the current input, and denotes a non-negative weight, and denotes a bias, denotes a convex, non-negative, non-decreasing activation function, denotes a convex, non-decreasing activation function; denotes photovoltaic input data, denotes the final output of the current time step, denotes the output of the current time step combined with the hidden state of the LSTM. Each LSTM layer has a dense layer with the same size as the input to maintain the same size between the input and output of the LSTM layer.
[0130] It should be noted that after weather classification using the adaptive clustering algorithm, a prediction model of photovoltaic power generation under normal state is established in combination with the IC-LSTM neural network according to different weather types; irradiance, temperature and humidity are selected as characteristic variables, and actual power is selected as target variable, a custom IC-LSTM unit is designed to enhance the modeling capability, a three-dimensional input model is constructed and its performance is optimized, and the specific steps include:
[0131] Data preprocessing is performed, the Pandas library is used to select the characteristics (irradiance, temperature and humidity) and target variables (actual power), the model is designed and constructed, the weights of the input gate, the forgetting gate and the output gate of the IC-LSTM unit are set, and the time step is set to 10; model training and evaluation are performed, the training batch size is 2048, the period is 150, and 20% of the data is used for verification; after training is completed, 200 continuous time samples are randomly selected, the predicted value is compared with the actual value, and the prediction accuracy of the model is evaluated.
[0132] S4, based on a plurality of photovoltaic fault scenarios constructed in advance, model parameter migration is performed on the prediction model of photovoltaic power generation under normal state to generate a prediction model of photovoltaic power generation under fault state;
[0133] Among them, based on a plurality of photovoltaic fault scenarios constructed in advance, model parameter migration is performed on the prediction model of photovoltaic power generation under normal state to generate a prediction model of photovoltaic power generation under fault state, which includes:
[0134] A plurality of photovoltaic fault scenarios are constructed, different severity photovoltaic faults are simulated in the photovoltaic fault scenarios, and photovoltaic fault simulation results are obtained; the photovoltaic fault scenarios include a photovoltaic fault scenario of shielding one photovoltaic cell, a photovoltaic fault scenario of shielding one row of photovoltaic cells, and a photovoltaic fault scenario of shielding one row of photovoltaic cells.
[0135] The prediction model in the normal state of photovoltaic power generation is trained on the source domain, and initial parameters of the prediction model in the normal state of photovoltaic power generation are generated by minimizing a source domain loss function; based on a photovoltaic fault simulation result and in combination with a target domain sample quantity, parameters of the prediction model in the normal state of photovoltaic power generation are transferred to a prediction model in a fault state of photovoltaic power generation, while a variation amplitude of model parameters is constrained to keep similarity with source domain parameters; power generated by the prediction model in the normal state of photovoltaic power generation is compared with power generated by the prediction model in the fault state of photovoltaic power generation, and performance of the prediction model in the fault state of photovoltaic power generation is comprehensively evaluated in combination with a predefined evaluation index.
[0136] It should be noted that the photovoltaic power generation prediction model is improved, under the condition of limited fault data, a parameter fine-tuning method is adopted, and parameter and structure migration from the normal state to the fault state is realized. The source domain of the present application is photovoltaic normal operation data with sufficient data, the target domain is photovoltaic fault operation data with scarce data, the tasks of the two domains are both photovoltaic power generation power prediction, the inputs are both meteorological features, and the outputs are power values, but the data distribution is deviated due to fault occurrence. This "consistent task and different distribution" setting belongs to the domain adaptation problem in transfer learning, and parameter fine-tuning is an effective solution in this scenario.
[0137] The specific fine-tuning process includes: training a basic model on the source domain, obtaining initial parameters by minimizing a source domain loss function; then based on a small number of samples The pre-trained model is fine-tuned. In order to suppress overfitting, an L2 regularization term is introduced in the fine-tuning process, the parameter variation amplitude is constrained to keep similarity with the source domain parameters, so that the finally obtained adaptive parameters can better fit the data distribution characteristics of the target domain.
[0138] Among them, three typical photovoltaic fault scenarios are set, including scenario a (shading one photovoltaic cell), scenario b (shading a row of photovoltaic cells) and scenario c (shading a row of photovoltaic cells) to simulate faults of different severity; the parameters of the prediction model in the normal state are transferred to the prediction model in the fault state, and the model is trained and analyzed through parameter fine-tuning; by comparing the fault prediction result with the power generated in the normal state, the root mean square error (MSE), the correlation coefficient (R) and the average deviation rate (MDR) are calculated to evaluate the performance of the fault prediction model, the MSE is used to evaluate the accuracy of the model prediction, the R is used to evaluate the correlation between the actual value and the predicted value, and the MDR is used to compare the performance of different data sets or models; the calculation formula is as follows:
[0139] ;
[0140] ;
[0141] ;
[0142] wherein, denotes the number of samples, and denote the actual output power and the predicted output power of the i-th sampling point, respectively, denote the average value, the maximum value and the minimum value of the actual output power, respectively. If the prediction error exceeds the set threshold value, the model is adjusted in parameters and the training process is repeated until the prediction error meets the accuracy requirement. and denote the average value, the maximum value and the minimum value of the actual output power, respectively. If the prediction error exceeds the set threshold value, the model is adjusted in parameters and the training process is repeated until the prediction error meets the accuracy requirement.
[0143] S5, output the prediction result of the photovoltaic fault through the prediction model in the fault state of the photovoltaic power generation, quantitatively diagnose the severity of the photovoltaic fault, and formulate the photovoltaic fault clearing measures based on the severity of the photovoltaic fault.
[0144] It should be noted that according to the output result of the fault prediction model, the severity of the photovoltaic fault is quantitatively diagnosed, and reasonable fault clearing suggestions are proposed based on the diagnosis result; specifically, by calculating quantitative indexes such as mean deviation rate (MDR), the influence degree of the fault on the photovoltaic power generation is evaluated, and the fault clearing strategy is formulated according to the set MDR threshold value; by optimizing the fault clearing strategy, the power generation efficiency and economy of the photovoltaic system are improved, thereby providing a scientific basis for the intelligent operation and maintenance of the photovoltaic system.
[0145] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A photovoltaic fault quantitative diagnosis method based on an adaptive clustering algorithm and an IC-LSTM neural network, characterized in that, The method comprises: correlation analysis of multiple variables in historical operation data is performed by using a Pearson correlation coefficient analysis method, and characteristic variables associated with actual power generation are screened based on a correlation analysis result; an improved adaptive clustering algorithm is generated by combining a spectral clustering algorithm and a vector quantization technology, and weather conditions are classified by using the improved adaptive clustering algorithm to obtain a weather condition classification result; a prediction model in a normal state of photovoltaic power generation is constructed based on the weather condition classification result and by combining an input convex long short-term memory neural network, the prediction model is trained with the characteristic variables as input variables and the actual power generation as a target variable; a prediction model in a fault state of photovoltaic power generation is generated by performing model parameter migration on the trained prediction model in the normal state of photovoltaic power generation based on a plurality of pre-constructed photovoltaic fault scenarios; a prediction result of photovoltaic fault is output by the prediction model in the fault state of photovoltaic power generation, the severity of the photovoltaic fault is quantitatively diagnosed, and photovoltaic fault clearing measures are formulated based on the severity of the photovoltaic fault; the improved adaptive clustering algorithm is generated by combining the spectral clustering algorithm and the vector quantization technology, and the weather conditions are classified by using the improved adaptive clustering algorithm to obtain the weather condition classification result, which comprises: selecting a number of samples from historical weather data and as a set of generating points in a Euclidean space, constructing the generating points in the Euclidean space a related Voronoi region and the generating points a related Voronoi region , and calculating the inertia between the Voronoi region and the Voronoi region ; Obtain the Thiessen polygon regions separately center of mass and the Tyson polygon area center of mass Connecting the centroid With center of mass The line segment structure serves as a bridge, and is based on inertia. Calculate the Thiessen polygon region With the Thiessen polygon region Inertia of the bridge ; Incorporating a tessellation polygon region Bridge inertia between tessellation polygon regions Bridge inertia between tessellation polygon regions Bridge affinity between tessellation polygon regions Bridge affinity between tessellation polygon regions Bridge affinity between tessellation polygon regions a bridge affinity matrix at a centroid level is constructed based on bridge affinity, and a spectral clustering algorithm is applied to the bridge affinity matrix to obtain a weather condition classification result associated with the actual power generation; the bridge affinity matrix at the centroid level is constructed based on the bridge affinity, the bridge affinity matrix is taken as an input of the spectral clustering algorithm, and a normalized Laplacian matrix is calculated by using the spectral clustering algorithm; a feature vector corresponding to a minimum eigenvalue in a preset range in the normalized Laplacian matrix is extracted by using a feature decomposition technology to form a low-dimensional feature space; a Voronoi polygon region is aggregated in the low-dimensional feature space to obtain the weather condition classification result associated with the actual power generation; the prediction model in the normal state of photovoltaic power generation is constructed based on the weather condition classification result and by combining the input convex long short-term memory neural network, the prediction model is trained with the characteristic variables as input variables and the actual power generation as a target variable, which comprises: based on the weather condition classification result, solar irradiance, atmospheric temperature, and humidity are taken as weather classification factors to construct an objective function for minimizing weather classification; based on the objective function for minimizing weather classification and by combining the input convex long short-term memory neural network, a prediction model in a normal state of photovoltaic power generation is established; the characteristic variables are taken as input variables, the actual power generation is taken as a target variable, a training set and a test set are divided, the prediction model in the normal state of photovoltaic power generation is trained by using the training set and at a preset time step, and the prediction ability of the prediction model in the normal state of photovoltaic power generation is evaluated after the training is completed. before the correlation analysis of multiple variables in historical operation data is performed by using the Pearson correlation coefficient analysis method, the method further comprises:
2. The photovoltaic fault quantitative diagnosis method based on adaptive clustering algorithm and IC-LSTM neural network according to claim 1, characterized in that, The historical operation data and historical weather data of the photovoltaic power generation system are acquired, wherein the historical operation data includes solar irradiance, atmospheric temperature, humidity, wind speed, wind direction and actual power generation data; and the historical weather data includes weather type, temperature change and humidity change. 3.The photovoltaic fault quantitative diagnosis method based on adaptive clustering algorithm and IC-LSTM neural network according to claim 1, characterized in that, The correlation analysis of the plurality of variables in the historical operation data is performed by using the Pearson correlation coefficient analysis method, and the characteristic variables associated with the actual power generation are screened based on the correlation analysis result, which includes: The Pearson correlation coefficient between each variable in the historical operation data and the actual power generation is calculated, and the calculation formula of the Pearson correlation coefficient is: ; wherein represents the number of samples, i represents the sample index, represents the actual generated power, represents the influencing factor associated with the actual generated power , represents the Pearson correlation coefficient between , represents the covariance of , represents the standard deviation of , and respectively represent the mean of ; The characteristic variables associated with the actual power generation are screened based on the Pearson correlation coefficient, and the characteristic variables associated with the actual power generation include solar irradiance, atmospheric temperature and humidity.
4. The photovoltaic fault quantitative diagnosis method based on adaptive clustering algorithm and IC-LSTM neural network according to claim 1, characterized in that, The input convex long short-term memory neural network includes: The weight matrix of the input gate, the forgetting gate and the output gate of the input convex long short-term memory neural network is constructed, and the weight matrix is constrained as a non-negative weight matrix to serve as a first-level input convexity constraint condition in the input convex long short-term memory neural network; A non-negative diagonal matrix is introduced in the gating unit and the candidate state of the input convex long short-term memory neural network, and the activation function in the neuron of the input convex long short-term memory neural network is limited to a convex and non-decreasing function to serve as a second-level input convexity constraint condition in the input convex long short-term memory neural network; Based on the pre-defined residual connection structure, and introducing the first-level input convexity constraint condition and the second-level input convexity constraint condition, the performance of the input convex long short-term memory neural network is optimized.
5. The photovoltaic fault quantitative diagnosis method based on adaptive clustering algorithm and IC-LSTM neural network according to claim 4, characterized in that, The expression of the neuron of the input convex long short-term memory neural network is: ; ; ; ; ; ; In the formula, This represents the output of the forget gate. Indicates the output of the input gate. This indicates the output of the output gate. Representing candidate cell states, all are non-negative diagonal matrices. This represents the dependencies in time series data. The input feature information consists of non-negative weight matrices. This indicates the deviation of the forget gate. Indicates the deviation of the input gate. This indicates the deviation of the output gate. Indicates the deviation of the candidate state. This indicates the effect of the activation function on the cell state. Indicates the generation or updating of cell state. Indicates the current time step The output of the forget gate, Indicates the current time step The input gate output, Indicates the current time step The output gate output, Indicates the current time step Candidate memory units, Indicates the current time step The state of the memory unit, Indicates the current time step The input of solar irradiance, temperature, and humidity, Indicates the current time step The output of photovoltaic power generation, Indicates the current time step -1 is the output of photovoltaic power generation.
6. The photovoltaic fault quantitative diagnosis method based on adaptive clustering algorithm and IC-LSTM neural network according to claim 1, characterized in that, Before the model parameter migration of the trained prediction model in the normal state of the photovoltaic power generation is performed based on the pre-constructed plurality of photovoltaic fault scenarios to generate the prediction model in the fault state of the photovoltaic power generation, the method further includes: A plurality of photovoltaic fault scenarios are constructed, and different severity photovoltaic faults are simulated in the photovoltaic fault scenarios to obtain photovoltaic fault simulation results; The photovoltaic fault scenarios include a photovoltaic fault scenario of shielding one photovoltaic cell, a photovoltaic fault scenario of shielding one row of photovoltaic cells, and a photovoltaic fault scenario of shielding one column of photovoltaic cells.
7. The photovoltaic fault quantitative diagnosis method based on adaptive clustering algorithm and IC-LSTM neural network according to claim 6, characterized in that, The model parameter migration of the trained prediction model in the normal state of the photovoltaic power generation is performed based on the pre-constructed plurality of photovoltaic fault scenarios to generate the prediction model in the fault state of the photovoltaic power generation, which includes: The prediction model in the normal state of the photovoltaic power generation is trained on the source domain, and the initial parameters of the prediction model in the normal state of the photovoltaic power generation are generated by using the minimum source domain loss function; Based on the photovoltaic fault simulation results and in combination with the number of target domain samples, the parameters of the prediction model in the normal state of the photovoltaic power generation are transferred to the prediction model in the fault state of the photovoltaic power generation, while the variation amplitude of the model parameters is constrained to be similar to the source domain parameters; The generated power output by the prediction models in the normal state and the fault state of the photovoltaic power generation is compared, and the performance of the prediction model in the fault state of the photovoltaic power generation is comprehensively evaluated in combination with the pre-defined evaluation index.
Citation Information
Patent Citations
Cuckoo search and BP neural network based fault diagnosis method of photovoltaic assembly
CN108805256A
Photovoltaic power station fault intelligent diagnosis method based on transfer learning
CN112183877A