A photovoltaic array fault diagnosis method based on composite model soft voting integration
By constructing a soft voting ensemble method based on a composite model, and combining multiple sub-models to optimize parameters and weight allocation, the problem of model defect superposition in existing photovoltaic array diagnostic methods is solved, improving the accuracy and stability of diagnosis and providing technical support for the efficient operation of photovoltaic arrays.
Patent Information
- Application Number
- CN202411468533.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2044-10-21
AI Technical Summary
In existing AI-based photovoltaic array diagnostic methods, the superposition of defects between machine learning or artificial neural network models affects the reliability of diagnostic results.
A soft-voting ensemble method based on composite models is adopted. By constructing multiple composite sub-models, such as CNN-SVM, CNN-BiGRU and DBN-ELM, and combining soft-voting ensemble algorithm and global optimization algorithm, the model parameters and weight allocation are optimized to form an ensemble diagnostic model.
This improves the accuracy and stability of photovoltaic array fault diagnosis, and enhances the efficient operation and maintenance capabilities of photovoltaic arrays.
Smart Images

Figure CN119442021B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic array fault diagnosis technology, and in particular to a photovoltaic array fault diagnosis method based on composite model soft voting integration. Background Technology
[0002] Photovoltaic power plant fault detection is a photovoltaic operation and management technology. Solar photovoltaic power plants are a key green energy equipment being developed both domestically and internationally. Issues such as the optimization, improvement, and operating costs of photovoltaic power plants severely restrict the development of photovoltaic power generation. Photovoltaic arrays, due to their large footprint and wide distribution, are prone to faults such as "cracked" photovoltaic modules, "aging lines," and "hot spots." Grid-connected inverters are susceptible to faults such as overvoltage, overcurrent, short circuits in power transistors, and open circuits. These factors seriously affect the lifespan of photovoltaic modules and the safe and stable operation of photovoltaic power plants.
[0003] Artificial intelligence is generally used for fault retrieval in photovoltaic arrays. Existing AI-based photovoltaic array diagnostic methods are as follows: First, fault data is collected, processed, and divided into training and test sets. Then, a machine learning or artificial neural network diagnostic model is built and trained using the divided training dataset, with parameter tuning optimized to bring the hyperparameters of the diagnostic model to the optimal value to improve its performance. Finally, the diagnostic performance of the model is verified using the divided test dataset. Finally, the best-performing diagnostic model is put into use. However, in existing technologies, most machine learning or artificial neural network diagnostic models are connected horizontally in series with different modules. While this can compensate for the shortcomings between models, it can also lead to the superposition of the shortcomings between models, affecting the reliability of the diagnostic results. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a photovoltaic array fault diagnosis method based on composite model soft voting integration, which solves the problems existing in the prior art.
[0005] According to an embodiment of the present invention, a photovoltaic array fault diagnosis method based on composite model soft voting integration includes the following steps:
[0006] Acquire several PV curve data when the photovoltaic array is operating normally and when a fault occurs;
[0007] Several PV curve data were preprocessed, and fault type labels and classification were defined to obtain training and test datasets.
[0008] Multiple composite sub-models are constructed, and the composite sub-models are integrated based on the soft voting ensemble algorithm. The hyperparameters of the integrated diagnostic model are determined based on the global optimization algorithm, thus completing the construction of the integrated diagnostic model.
[0009] The training dataset is input into the ensemble diagnostic model for training, resulting in a trained ensemble diagnostic model.
[0010] The test dataset is input into the trained integrated diagnostic model to test and evaluate its performance.
[0011] The photovoltaic array is diagnosed by integrating a diagnostic model to determine the type of photovoltaic array fault.
[0012] As an embodiment of the present invention, acquiring several PV curve data when the photovoltaic array is operating normally and experiencing a fault includes:
[0013] Three photovoltaic (PV) arrays are constructed in parallel using Matlab or Simulink. Each PV array consists of three PV modules. Simulations are then performed to obtain PV curve data for both normal operation and failure scenarios.
[0014] As an embodiment of the present invention, several PV curve data are preprocessed, and fault type labels and segmentation processes are defined to obtain training datasets and test datasets, including:
[0015] The PV curve data were normalized using a linear normalization method, and the calculation formula is as follows:
[0016]
[0017] Where X represents the PV curve data, X min X represents the minimum value of the PV curve data. max X represents the maximum value of the PV curve data. norm The data is after normalization;
[0018] The normalized data is assigned corresponding fault labels, and the data with assigned fault labels is divided according to the preset division rules to obtain the training dataset and the test dataset. The fault labels include: normal operation, open circuit fault, short circuit fault, aging fault, occlusion fault, concurrent occlusion and open circuit fault, concurrent occlusion and aging fault, and concurrent occlusion and short circuit fault.
[0019] As an embodiment of the present invention, multiple composite sub-models are constructed, the composite sub-models are integrated based on a soft voting ensemble algorithm, and the hyperparameters of the integrated diagnostic model are determined based on a global optimization algorithm, thereby completing the construction of the integrated diagnostic model, including:
[0020] Multiple composite sub-models are constructed; among them, the composite sub-models include: CNN-SVM model, CNN-BiGRU model and DBN-ELM model;
[0021] An integrated diagnostic model is obtained by integrating multiple composite sub-models based on a soft voting ensemble algorithm.
[0022] Based on the whale optimization algorithm, the parameters of multiple composite sub-models are optimized and adjusted to determine the parameters of multiple composite sub-models.
[0023] Determine the weight values of multiple composite sub-models in the soft voting ensemble algorithm to complete the construction of the ensemble diagnostic model.
[0024] As an embodiment of the present invention, the test dataset is input into the trained ensemble diagnostic model to test and evaluate its performance, including:
[0025] The test dataset is input into the trained ensemble diagnostic model for testing, and the test results are obtained.
[0026] Accuracy, precision, recall, and F1-Score are calculated based on the test results, using the following formulas:
[0027]
[0028] Among them, T P T represents the number of samples in the test results where the actual positive examples were predicted as positive. N F represents the number of samples in the test results where the true negative examples were predicted as negative. P F represents the number of samples in the test results where a true negative example was predicted as a positive example. N is the number of samples in the test results where a true positive example was predicted as a negative example; A is the accuracy, R is the recall, P is the precision, and F1 is the F1-Score.
[0029] As an embodiment of the present invention, the output layers of the multiple composite sub-models all employ the softmax function to increase the probability of processing the fault types of the diagnosed photovoltaic array.
[0030] As an embodiment of the present invention, during the diagnosis process using an integrated diagnostic model, a soft voting algorithm is used to calculate the weighted average of the probabilities of the fault types output by each composite sub-model according to determined weights, resulting in the final diagnostic probability. The fault type with the highest probability is determined as the sample fault type. The calculation formula is as follows:
[0031]
[0032] E(x)=maxP n (x)
[0033] Where K is the number of composite sub-models, k is the index of the composite sub-model, x is the data index of the photovoltaic array under test, n is the index of the fault type, and ω k P is the weight value assigned to the k-th composite sub-model. kn (x) is the probability that the k-th composite sub-model x is judged as n, P n E(x) is the probability that the integrated diagnostic model judges it as n, and E(x) is the final judgment result of x.
[0034] Compared with existing technologies, this invention has the following advantages: By combining a post-integrated diagnostic model and employing a soft-voting integration algorithm, it cleverly combines multiple composite sub-models with different characteristics, giving full play to the advantages of each model and using multiple composite sub-models to jointly determine the fault diagnosis result, which can improve the accuracy and stability of photovoltaic single fault and concurrent fault diagnosis, providing strong technical support for the efficient operation and maintenance of photovoltaic arrays; at the same time, by optimizing the parameter settings of multiple composite sub-models and the weight allocation settings of soft voting, the model performance is improved. Attached Figure Description
[0035] Figure 1 This is a flowchart illustrating an embodiment of the present invention;
[0036] Figure 2 This is a schematic diagram of a mechanism according to another embodiment of the present invention;
[0037] Figure 3 This is a flowchart illustrating the operation of another embodiment of the present invention. Detailed Implementation
[0038] The technical solutions of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0039] like Figures 1 to 3 As shown in the figure, this invention proposes a photovoltaic array fault diagnosis method based on composite model soft voting integration, including the following steps:
[0040] S1: Obtain several PV curve data when the photovoltaic array is operating normally and when a fault occurs;
[0041] S2: Preprocess several PV curve data, define fault type labels and partition the data to obtain training and test datasets.
[0042] S3: Construct multiple composite sub-models, integrate the composite sub-models based on the soft voting ensemble algorithm, and determine the various hyperparameters of the integrated diagnostic model based on the global optimization algorithm to complete the construction of the integrated diagnostic model;
[0043] S4: Input the training dataset into the ensemble diagnostic model for training to obtain the trained ensemble diagnostic model;
[0044] S7: Input the test dataset into the trained integrated diagnostic model to test and evaluate its performance;
[0045] S6: Diagnose the photovoltaic array using an integrated diagnostic model to determine the type of photovoltaic array fault;
[0046] The working principle of the above technical solution is as follows: In actual use, multiple composite sub-models are integrated by combining a soft voting integration algorithm to obtain an integrated diagnostic model; the parameters of the multiple composite sub-models are determined by combining all optimization algorithms to improve the integration effect.
[0047] The beneficial effects of the above technical solution are as follows: By combining the post-integrated diagnostic model and adopting the soft voting integration algorithm, multiple composite sub-models with different characteristics are cleverly combined. This fully leverages the advantages of each model and uses multiple composite sub-models to jointly determine the fault diagnosis result, which can improve the accuracy and stability of photovoltaic single fault and concurrent fault diagnosis, providing strong technical support for the efficient operation and maintenance of photovoltaic arrays. At the same time, by optimizing the parameter settings of multiple composite sub-models and the weight allocation settings of soft voting, the model performance is improved.
[0048] In one embodiment, acquiring several PV curve data points during normal operation and during malfunction of the photovoltaic array includes:
[0049] Three photovoltaic (PV) arrays are constructed in parallel using Matlab or Simulink. Each PV array consists of three PV modules. Simulations are then performed to obtain PV curve data for both normal operation and failure scenarios.
[0050] The working principle and beneficial effects of the above technical solution are as follows: PV curve data of the photovoltaic array during normal operation or failure is obtained by constructing a photovoltaic array with 3 strings of photovoltaic modules connected in parallel using Matlab / Simulink, each string containing 3 photovoltaic modules, performing simulation, and then collecting the data; the controlled voltage source uses a ramp signal source to continuously scan the output voltage of the photovoltaic array, and the comprehensiveness of the data is increased by setting the irradiance range to 100-1000W / m2 and the temperature range to 0-45℃.
[0051] In one embodiment, several PV curve data are preprocessed, and fault type labels and segmentation are defined to obtain training and testing datasets, including:
[0052] The PV curve data were normalized using a linear normalization method, and the calculation formula is as follows:
[0053]
[0054] Where X represents the PV curve data, Xmin X represents the minimum value of the PV curve data. max X represents the maximum value of the PV curve data. norm The data is after normalization;
[0055] The normalized data is assigned corresponding fault labels, and the data with assigned fault labels is divided according to the preset division rules to obtain the training dataset and the test dataset. The fault labels include: normal operation, open circuit fault, short circuit fault, aging fault, occlusion fault, concurrent occlusion and open circuit fault, concurrent occlusion and aging fault, and concurrent occlusion and short circuit fault.
[0056] The working principle and beneficial effects of the above technical solution are as follows: Fault labeling involves assigning labels from 1 to 8 to different types of data related to eight operating conditions of the photovoltaic array: normal operation, open circuit fault, short circuit fault, aging fault, shading fault, concurrent shading and open circuit fault, concurrent shading and aging fault, and concurrent shading and short circuit fault. The preset division rule is that 70% of the data is used to train the integrated diagnostic model (integrated dataset), and 30% of the data is used to test the performance of the diagnostic model (test dataset). Simultaneously, by using photovoltaic array PV curve data as input parameters, the tedious steps of feature extraction are reduced.
[0057] In one embodiment, multiple composite sub-models are constructed, integrated using a soft voting ensemble algorithm, and the hyperparameters of the integrated diagnostic model are determined using a global optimization algorithm, thus completing the construction of the integrated diagnostic model, including:
[0058] Multiple composite sub-models are constructed; among them, the composite sub-models include: CNN-SVM model, CNN-BiGRU model and DBN-ELM model;
[0059] An integrated diagnostic model is obtained by integrating multiple composite sub-models based on a soft voting ensemble algorithm.
[0060] Based on the whale optimization algorithm, the parameters of multiple composite sub-models are optimized and adjusted to determine the parameters of multiple composite sub-models.
[0061] Determine the weight values of multiple composite sub-models in the soft voting ensemble algorithm, and complete the construction of the ensemble diagnostic model;
[0062] The working principle of the above technical solution:
[0063] like Figures 2 to 3As shown, a CNN-SVM model with composite sub-models is constructed: Convolutional Neural Networks (CNNs) can learn feature representations from data. Through the combination of convolutional layers and pooling layers, they can effectively capture the local structure and patterns of the input data. Support Vector Machines (SVMs) have a relatively simple structure, mainly consisting of a decision function used to replace the softmax classifier in the output layer of a CNN. The combination of the two can better handle diagnostic classification problems, and its formula is as follows:
[0064]
[0065] in, M is the j-th feature map of the l-th convolutional layer. j It is a set of input feature maps. It is the weight. f is the bias term, and f is the activation function.
[0066]
[0067] Among them, P ij It is the max-pooling output, A ij It is a pooled window, d k It is a subset within the window.
[0068]
[0069] Where, α i and It is a Lagrange multiplier, G(x i ,x j ) is the kernel function, and a is the bias term.
[0070]
[0071] in, It is x i Transpose of;
[0072] The CNN-BiGRU model with composite sub-models is constructed as follows: The Bidirectional Gated Recurrent Unit (BiGRU) consists of a forward-gated recurrent unit (GRU) and a backward-gated GRU. It can simultaneously process the forward and backward information of the data and capture long-term dependencies in the data. Combined with CNN, the CNN performs feature extraction, and these feature vector sequences are used as input to BiGRU. After forward and backward propagation and calculation of the hidden state, the final output result is obtained. The CNN formula is the same as (1), and the BiGRU formula is as follows:
[0073] z t =σ(W z ·[h t-1 ,x t ])
[0074] Among them, z t It updates the value of the gate, σ is the sigmoid function, and W... z It is the weight matrix, h t-1 It is the hidden state from the previous moment, x t This is the input at the current moment.
[0075] r t =σ(W r ·[h t-1 ,x t ])
[0076] Where, r t It resets the value of the door, W. r It is a weight matrix.
[0077]
[0078] in, is the candidate hidden state, W is the weight matrix, and * denotes element-wise multiplication.
[0079]
[0080] Among them, h t It is currently in a hidden state.
[0081]
[0082] in, During forward propagation, the hidden state at each time step is calculated sequentially according to the time order to obtain the forward hidden state sequence; During backward propagation, the hidden states at each time step are calculated sequentially in reverse chronological order to obtain the backward hidden state sequence; H t This is the final hidden state;
[0083] The DBN-ELM model, a composite sub-model, is constructed as follows: Deep Belief Networks (DBNs) utilize Stacked Restricted Boltzmann Machines (RBMs) to achieve excellent feature learning and hierarchical representation, enabling the extraction of complex features from large-scale data and making them suitable for handling nonlinear problems. Extreme Learning Machines (ELMs), on the other hand, are known for their efficient training and inference speeds, possessing characteristics such as fast convergence and ease of use. The BP neural network classifier in the traditional DBN model is replaced by an ELM network. The formula is as follows:
[0084]
[0085] In the formula: i is the hidden layer unit, j is the visible layer unit, and w i It is the weight from the (n-1)th hidden layer to the nth hidden layer, b iIt is the bias from the (n-1)th hidden layer to the nth hidden layer, g(x) is the activation function, and H is the bias. n-1 It is the output of the (n-1)th layer, β i These are the output weights from the nth hidden layer to the output layer;
[0086] The parameters of the composite sub-model are optimized using a global optimization algorithm. Global optimization employs the Whale Optimization Algorithm (WOA) to optimize, adjust, and determine the various parameters of the diagnostic model. The WOA algorithm is a heuristic optimization algorithm based on the hunting behavior of whale groups, finding optimal parameters by mimicking how whale groups surround, attack, and search for prey. Its formula is as follows:
[0087] X(t+1)=X * (t)-A·D
[0088] D = |C·X * (t)-X(t)|
[0089] A = 2a·r1-a
[0090] C = 2·r²
[0091] Where t is the current iteration number, X(t+1) is the updated position, and X * (t) is the current optimal position, A and C are coefficient vectors, D is the distance between the whale and the prey, and r1 and r2 are random variables between [0,1].
[0092] X(t+1)=D'·e bl ·cos(2πl)+X * (t)
[0093] D'=|X * (t)-X(t)|
[0094] Where X(t+1) is the spiral update position, D' is the distance between the whale and the prey, b is a constant that defines the spiral shape, and l is a random number in the range [-1, 1].
[0095] X(t+1)=X rand (t)-A·D
[0096] Where X(t+1) represents the whale's search, selecting a random whale to update its position, X rand The location of a whale is randomly selected from the current population; the optimal solution (model parameters) of the diagnostic model is found through the WOA optimization algorithm;
[0097] The beneficial effects of the above technical solution are: improved model performance by setting the parameters of multiple composite sub-models and the weight allocation of soft voting.
[0098] In one embodiment, the test dataset is input into the trained ensemble diagnostic model to test and evaluate its performance, including:
[0099] The test dataset is input into the trained ensemble diagnostic model for testing, and the test results are obtained.
[0100] Accuracy, precision, recall, and F1-Score are calculated based on the test results, using the following formulas:
[0101]
[0102] Among them, T P T represents the number of samples in the test results where the actual positive examples were predicted as positive. N F represents the number of samples in the test results where the true negative examples were predicted as negative. P F represents the number of samples in the test results where a true negative example was predicted as a positive example. N The number of samples in the test results where a true positive example was predicted as a negative example; A is the accuracy, R is the recall, P is the precision, and F1 is the F1-Score.
[0103] The working principle and beneficial effects of the above technical solution are as follows: By collecting data from the integrated diagnostic model and then comparing it, the integrated diagnostic model performs best in all evaluation indicators; the model comparison table is as follows:
[0104] Table 1 Model Comparison Table
[0105]
[0106]
[0107] Among them, true positive examples are elements in the test set whose fault type label is the fault type reflected by the PV curve data, and true negative examples are elements in the test set whose fault type label is not the fault type reflected by the PV curve data. A positive prediction indicates that the integrated diagnostic model predicts the correct result, and a positive prediction indicates that the integrated diagnostic model predicts the wrong result.
[0108] In one embodiment, the output layers of the multiple composite sub-models all employ a softmax function to increase the probability of processing the fault type of the diagnosed photovoltaic array.
[0109] In the diagnostic process using an integrated diagnostic model, a soft voting algorithm is used to calculate the final diagnostic probability by weighting the probabilities of the fault types output by each composite sub-model according to determined weights. The fault type with the highest probability is determined as the sample fault type. The calculation formula is as follows:
[0110]
[0111] E(x) = maxP n (x)
[0112] Where K is the number of composite sub-models, k is the index of the composite sub-model, x is the data index of the photovoltaic array under test, n is the index of the fault type, and ω k P is the weight value assigned to the k-th composite sub-model. kn (x) is the probability that the k-th composite sub-model x is judged as n, P n E(x) is the probability that the integrated diagnostic model judges it as n, and E(x) is the final judgment result of x.
[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for photovoltaic array fault diagnosis based on composite model soft voting ensemble, characterized in that, The method comprises the following steps: Obtaining a plurality of P-V curve data of the photovoltaic array in normal operation and in failure; Preprocessing the plurality of P-V curve data, formulating a fault type label and dividing processing to obtain a training data set and a test data set; Building a plurality of composite sub-models, integrating the composite sub-models based on a soft voting integration algorithm, determining the super parameters of the integrated diagnostic model based on a global optimization algorithm, and completing the building of the integrated diagnostic model; including: building a plurality of composite sub-models; wherein the composite sub-models include: a CNN-SVM model, a CNN-BiGRU model and a DBN-ELM model; integrating the plurality of composite sub-models based on the soft voting integration algorithm to obtain the integrated diagnostic model; optimizing and adjusting the parameters of the plurality of composite sub-models based on the whale optimization algorithm to determine the parameters of the plurality of composite sub-models; determining the weight values of the plurality of composite sub-models in the soft voting integration algorithm to complete the building of the integrated diagnostic model; Inputting the training data set into the integrated diagnostic model for training to obtain a trained integrated diagnostic model; Inputting the test data set into the trained integrated diagnostic model to test and evaluate the performance thereof; Diagnosing the photovoltaic array through the integrated diagnostic model to determine the fault type of the photovoltaic array; During the diagnosis through the integrated diagnostic model, the soft voting algorithm is used to weight and average the probabilities of the fault types output by the plurality of composite sub-models according to the determined weights to obtain the final diagnostic probability, and the sample fault type is determined as the one with the highest probability, and the calculation formula is as follows: E(x) = max P n (x) wherein K is the number of composite models, k is the serial number of the composite model, x is the serial number of the data to be measured of the photovoltaic array, n is the serial number of the fault type, ω k is the weight value assigned to the kth composite model, P kn (x) is the probability of the kth composite model x judging n, P n (x) is the probability of the integrated diagnostic model judging n, and E(x) is the final judgment result of x.
2. The photovoltaic array fault diagnosis method based on composite model soft voting integration according to claim 1, wherein Obtaining a plurality of P-V curve data of the photovoltaic array in normal operation and in failure comprises: Building 3-serial photovoltaic strings in parallel through Matlab or Simulink, with each serial photovoltaic string being a photovoltaic array comprising 3 photovoltaic components, and then simulating to obtain a plurality of P-V curve data of the photovoltaic array in normal operation and in failure.
3. The photovoltaic array fault diagnosis method based on composite model soft voting integration according to claim 1, wherein Preprocessing the plurality of P-V curve data, formulating a fault type label and dividing processing to obtain a training data set and a test data set comprises: Normalizing the plurality of P-V curve data based on a linear normalization method, and the calculation formula is as follows: where X is the P-V curve data, X min is the minimum value of the P-V curve data, X max is the maximum value of the P-V curve data, X norm is the normalized data; Formulating corresponding fault labels for the normalized data, and dividing the data after formulating the fault labels according to a preset division rule to obtain the training data set and the test data set; the fault labels include: normal operation, open circuit fault, short circuit fault, aging fault, shading fault, shading and open circuit concurrent fault, shading and aging concurrent fault, and shading and short circuit concurrent fault.
4. The photovoltaic array fault diagnosis method based on composite model soft voting integration according to claim 1, wherein Inputting the test data set into the trained integrated diagnostic model to test and evaluate the performance thereof comprises: Inputting the test data set into the trained integrated diagnostic model for testing to obtain a test result; Based on the test results, the accuracy, precision, recall and F1-Score are calculated respectively, and the calculation formula is as follows: wherein T P is the number of samples in the test results in which a true positive example is predicted as positive, T N is the number of samples in the test results in which a true negative example is predicted as negative, F P is the number of samples in the test results in which a true negative example is predicted as positive, F N is the number of samples in the test results in which a true positive example is predicted as negative; A is the accuracy, R is the recall, P is the precision, and Fl is the F1-Score.
5. The photovoltaic array fault diagnosis method based on composite model soft voting integration according to claim 1, characterized in that, The output layer of each of the plurality of composite sub-models adopts a softmax function, so as to process the probability of the fault type of the diagnosed photovoltaic array.
Citation Information
Patent Citations
A fault diagnosis method of photovoltaic array based on improved random forest algorithm
CN109039281A
Photovoltaic array fault diagnosis method based on machine learning
CN117150220A