Multi-feature fusion photovoltaic fault diagnosis method based on Bagging algorithm
Through the combination of Bagging algorithm and convolutional neural network model, a multi-feature fusion photovoltaic fault diagnosis method is constructed, which solves the accuracy and cost of photovoltaic fault diagnosis in the existing technology, and achieves rapid and accurate multi-failure states of the photovoltaic system Diagnosis significantly improves diagnostic accuracy and efficiency.
Patent Information
- Application Number
- CN202411788005.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-12-06
AI Technical Summary
Existing photovoltaic fault diagnosis methods rely on high-cost infrared devices or rely on model accuracy, making it difficult to achieve online diagnosis, and can only diagnose a single fault type, which cannot meet the rapid and accurate detection and diagnosis of multiple fault problems in photovoltaic systems.
The Bagging algorithm is used to construct a multi-feature fusion photovoltaic fault diagnosis method. By collecting electrical and non-electrical data, extracting steady-state and transient features, building a fusion feature sample data set, and using a convolutional neural network model for training, the photovoltaic fault is achieved. Accurate diagnosis of multiple states.
It significantly improves the accuracy of photovoltaic fault diagnosis, can quickly and accurately identify various fault states of the photovoltaic system, reduces dependence on infrared equipment, and improves the reliability and efficiency of diagnosis.
Smart Images

Figure CN119249369A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a multi-feature fusion photovoltaic fault diagnosis method based on a Bagging algorithm, and belongs to the technical field of smart power and power grid. Background Art
[0002] As photovoltaic power generation develops rapidly, its operational safety issues have become increasingly prominent. Photovoltaic power stations are generally built outdoors with abundant sunlight and are greatly affected by natural conditions. Photovoltaic power stations operate in harsh natural environments and are prone to component aging, partial shading, open circuits and short circuits. These problems seriously affect the health of the photovoltaic system, the overall operation of the photovoltaic power station and the power generation efficiency. If the fault is not handled in time, it is very easy to cause the photovoltaic panels and combiner boxes to burn, causing economic losses and threatening the safety of personnel in the station. Therefore, it is crucial to quickly detect whether the photovoltaic system has a fault and accurately diagnose the fault type for the safe and reliable operation of the photovoltaic power supply system.
[0003] Existing photovoltaic fault diagnosis methods generally include infrared image diagnosis, mathematical model diagnosis, and artificial intelligence diagnosis. Based on the principle of infrared imaging, a method for automatically detecting photovoltaic hot spots is proposed, which improves the automation level of hot spot fault diagnosis. However, this method is overly dependent on the precision of infrared equipment and is easily affected by the external environment. It is costly and can only diagnose a single fault type. Photovoltaic power station fault diagnosis is realized based on the mathematical model diagnosis method. This method only needs to provide photovoltaic operation data and does not rely on expensive infrared detection equipment. However, the diagnostic effect depends on the accuracy of the model and is difficult to apply online.
[0004] Therefore, a multi-feature fusion photovoltaic fault diagnosis method based on Bagging algorithm is needed to solve the above problems. Summary of the invention
[0005] Purpose of the invention: In view of the problems existing in the prior art, the present invention provides a photovoltaic fault diagnosis method based on a multi-feature fusion Bagging algorithm.
[0006] A multi-feature fusion photovoltaic fault diagnosis method based on Bagging algorithm.
[0007] The following steps are involved: Step 1: Sample data collection: Collect electrical data and non-electrical data of the distributed photovoltaic system in normal and fault states to obtain a sample data set; Step 2: construct a fusion feature sample data set: extract the transient characteristics and steady-state characteristics of the distributed photovoltaic system from the sample data set in step 1, and associate them with the corresponding non-electrical data to obtain fusion features; Specifically, each set of transient characteristics, steady-state characteristics and corresponding non-electrical data is taken as a fused feature sample data set to obtain a fused feature sample data set; each sample data in the fused feature sample data set is a data set; Step 3: construct a photovoltaic fault diagnosis model based on the Bagging algorithm, divide the fusion feature sample data set into a training set and a test set, and use the training set to train the photovoltaic fault diagnosis model; Step 4: Use the test set to test the photovoltaic fault diagnosis model. When the accuracy reaches the target threshold P, the training is completed, otherwise return to step 3; Step 5, photovoltaic fault diagnosis: collect electrical data and non-electrical data of the distributed photovoltaic system to be diagnosed, extract fusion features and perform photovoltaic fault diagnosis through photovoltaic fault diagnosis model training.
[0008] Furthermore, the normal and fault conditions in step 1 include normal, short circuit, open circuit, aging and shadowing, the electrical data include the current I, voltage V, output power P and photovoltaic cell temperature T of each photovoltaic string, and the non-electrical data include the operating time , Ambient temperature , ambient humidity H and irradiance E.
[0009] Furthermore, the steady-state characteristics in step 2 include output power P, output current I, voltage V, output power mean , output current average , voltage mean , the absolute value of the power difference before and after the fault occurs , the absolute value of the output current difference before and after the fault occurs The absolute value of the voltage difference before and after the fault occurs ; The transient characteristics in step 2 include transient time , Transient power variation coefficient , Transient current variation coefficient and transient voltage variation coefficient .
[0010] Furthermore, the transient time , Transient power variation coefficient , Transient current variation coefficient and transient voltage variation coefficient It is expressed by the following formula: , in, is the transient time, is the transient power variation coefficient, is the transient current variation coefficient, is the transient voltage variation coefficient; is the transient start time, is the transient end time; It is the maximum value of output power change during transient process; It is the maximum value of the current change during the transient process; It is the maximum value of voltage change during transient process; is the absolute value of the power difference before and after the fault occurs, is the absolute value of the output current difference before and after the fault occurs, It is the absolute value of the voltage difference before and after the fault occurs.
[0011] Furthermore, the fused feature sample data set described in step 3 is divided into a training set and a test set in a ratio of 7:3.
[0012] Furthermore, the fault diagnosis model in step three includes multiple convolutional neural networks, and the multiple convolutional neural networks are aggregated through a Bagging algorithm.
[0013] Furthermore, the convolutional neural network includes a first basic residual block, a second basic residual block, a first bidirectional LSTM module, a second bidirectional LSTM module, a first conversion module and a first fully connected layer module. The first basic residual block and the second basic residual block each include a convolutional layer, a layer normalization processing module and an activation layer connected in sequence, The first basic residual block and the second basic residual block are respectively connected to the first bidirectional LSTM module and the second bidirectional LSTM module through a reshaping module; The first basic residual block, the second basic residual block and the first conversion module are connected in sequence, and the first bidirectional LSTM module, the second bidirectional LSTM module and the first conversion module are connected in sequence; The first fully connected layer is connected to the first conversion module.
[0014] Furthermore, it includes a third basic residual block, a fourth basic residual block, a fifth basic residual block, a channel attention module, a second conversion module and a second fully connected layer module which are connected in sequence, and the third basic residual block, the fourth basic residual block and the fifth basic residual block all include a convolutional layer, a layer normalization processing module and an activation layer which are connected in sequence.
[0015] Furthermore, the parameters of the convolution layer are k=3, c=64, where k is the size of the convolution kernel and c is the number of output channels of the convolution layer; the activation function of the activation layer is the LeakyReLU function.
[0016] Furthermore, the target threshold value P in step 4 is 90%.
[0017] Beneficial effect: The multi-feature fusion photovoltaic fault diagnosis method based on the Bagging algorithm of the present invention constructs a fusion feature library by constructing the steady-state characteristics and transient characteristics of photovoltaic faults, combining the electrical data and non-electrical data of photovoltaic faults, and further constructs a photovoltaic fault prediction model based on the Bagging algorithm. After completing the training and testing of the model, fault diagnosis is performed through the fusion characteristics of the electrical data and non-electrical data of the photovoltaic system, and the diagnostic accuracy is significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a flow chart of the multi-feature fusion photovoltaic fault diagnosis method based on Bagging algorithm of the present invention; Figure 2 Schematic diagram of the structure of the basic residual block; Figure 3 This is a schematic diagram of the structure of a convolutional neural network model based on the basic residual block; Figure 4 This is a schematic diagram of the structure of the convolutional neural network model 2 built based on the basic residual block; Figure 5 This is the implementation flow chart of the Bagging algorithm. DETAILED DESCRIPTION
[0019] The preferred embodiments of the present invention will be described below in conjunction with the accompanying drawings to more clearly and completely illustrate the technical solutions of the present invention.
[0020] See also Figure 1 As shown, the photovoltaic fault diagnosis method based on the multi-feature fusion based on the Bagging algorithm of the present invention includes the following steps: Step S1, collecting sample data of photovoltaic normal and fault status, specifically: Collect 100-400 groups of sample data of photovoltaic normal and fault status to form a sample data set, where the photovoltaic normal and fault status include: normal, short circuit, open circuit, aging and shadow occlusion; each group of sample data includes electrical data and non-electrical data. The electrical data includes the current I, voltage V, output power P and photovoltaic cell temperature T of each photovoltaic string, and the non-electrical data includes the operating time T s 、Ambient temperature T h , ambient humidity H and irradiance E; Step S2, constructing a fusion feature library, which includes steady-state features, transient features, and non-electrical features, specifically: Step S21: Steady-state characteristics include output power P, output current I, voltage V, output power mean P j, output current average I j , the voltage mean Vj, the absolute value of the power difference before and after the fault occurs ΔP, the absolute value of the output current difference before and after the fault occurs ΔI, and the absolute value of the voltage difference before and after the fault occurs ΔV; Step S22: Transient characteristics include transient time ΔT, transient power variation coefficient k P , Transient current variation coefficient k I , and transient voltage variation coefficient k V ; , Among them, T et is the transient start time, T st is the transient end time; ΔP peak is the maximum value of the output power change during the transient process; ΔI peak is the maximum value of the current change during the transient process; ΔV peak It is the maximum value of voltage change during transient process; Step S23: Non-electrical data including operation time T s 、Ambient temperature T h , ambient humidity H and irradiance E; Step S24: for the five states of photovoltaic power, namely, normal, short circuit, open circuit, aging and shadow, feature selection is performed based on mutual information and recursive feature elimination methods, and the optimal feature combination that can maximize the model performance is obtained by adding or removing specific feature variables; , In the formula, represents the probability of X=x occurring, is the joint probability of the two appearing at the same time, X represents one of the five states, Y represents the characteristic parameter, Indicates the strength of the relationship between the feature parameter and the state.
[0021] During operation, The relationship strength close to 0 is low. In this application, the relationship between each state and each characteristic parameter is calculated. Value, eliminating the strength of the relationship with each state Characteristic parameters ≤0.3.
[0022] For the five states of photovoltaics, namely normal, short circuit, open circuit, aging and shadowing, the electrical characteristics and non-electrical characteristics with strong relationship strength with each state are different. The judgment of each state does not require all of the above-mentioned feature parameters. Taking multiple feature parameters with strong relationship strength for each state can reduce the amount of data used.
[0023] Step S3, sample data processing, specifically: Step S31: Processing the sample data according to steady-state characteristics, transient characteristics and non-electrical characteristics, the sequence length of the sample data is 100-600, and the feature dimension is 13; Step S32: label the sample data with row vectors, where the first column is the label of the data name; the second column uses numbers to represent the photovoltaic status type, where: 1 is normal, 2 is short circuit, 3 is open circuit, 4 is aged, and 5 is shadowed; Step S33: normalize the sample data to normalize the sample data of the same type between (-1, 1). Suppose the sample data is ,The maximum and minimum value normalization calculation formula used here is as follows: , in: is the normalized data, and are the maximum and minimum values in the sample data, and are the right and left endpoints of the normalized interval of the sample data; Step S34: Divide the normalized sample data into a training set and a test set in a ratio of 7:3; Step S4, constructing a photovoltaic fault prediction model based on the Bagging algorithm, specifically: Step S41: construct at least two convolutional neural network models; Step S42: In the convolutional neural network model, the convolution layer parameters are set to k=3, c=64; where k is the size of the convolution kernel, and c is the number of output channels of the convolution layer; Step S43: in the neural network model, setting the activation function of the activation layer to the LeakyReLU function; Step S44: Based on the Bagging algorithm, a photovoltaic fault diagnosis model is constructed by using the constructed convolutional neural network model. Step S5, photovoltaic fault diagnosis model training, specifically: Step S51: randomly extract sample data from the training set obtained in step S3 and put it into a new training data set sub-D i , where i = the number of convolutional neural network models; Step S52: Given two data sets D 1 and D 2 , size is m,m S is the number of identical samples in the two data sets, D 1 and D 2 The overlap ratio is:
[0024] Set the threshold R TLimit the overlap ratio of each subset, R T ≤5%: Step S53: Using the training data set D i Conduct photovoltaic fault diagnosis model training; Step S6: Use the data of the test set to test the photovoltaic fault diagnosis model, set the target accuracy threshold P of the photovoltaic fault diagnosis model to ≥ 90%, and complete the training if the performance target threshold is reached, otherwise return to step S5; Step S7, photovoltaic fault diagnosis, specifically: The photovoltaic fault diagnosis model is used to input the data to be diagnosed, and the load category is determined according to the position of the maximum value in the output vector. The final output is 1, 2, 3, 4, and 5, where 1 represents normal, 2 represents short circuit, 3 represents open circuit, 4 represents aging, and 5 represents shadow.
[0025] The specific construction method of the convolutional neural network model in step S41 is: The method for constructing a convolutional neural network model 1 includes the following steps: Step 1: Construct a basic residual block, such as Figure 2 As shown, specifically: Step 11: Set the convolution layer and set the parameters to k=3, c=64; where k is the size of the convolution kernel and c is the number of output channels of the convolution layer; Step 12: Set up the layer normalization processing module (LayerNormalization), which is used to calculate the mean and variance of each sample in the feature dimension and perform normalization operations on them so that the output of each sample has a similar scale, which helps to reduce the variation of different samples in the feature dimension and improve the robustness and generalization ability of the model; Step 13: Set the activation function of the activation layer to the LeakyReLU function; Step 2: Build a neural network model based on the basic residual block in step 1, such as Figure 3 As shown, it includes two basic residual blocks, two bidirectional LSTM modules, a conversion module and a fully connected layer module; wherein the two basic residual blocks are basic residual block 1 and basic residual block 2 (Baseblock1, Baseblock2); The two basic residual blocks are connected in sequence and are respectively connected to the two bidirectional LSTM modules through the reshaping module. The reshaping module performs a reshape operation to rearrange and expand the multidimensional array of the basic residual block; Two bidirectional LSTM modules are connected in sequence. The parameters of the first bidirectional LSTM module are set to N=128 (BidirectionalLSTM, N=128), and the parameters of the second bidirectional LSTM module are set to N=256 (BidirectionalLSTM, N=256), where N is the number of hidden units in each bidirectional LSTM module. The conversion module performs the Falten operation, which is used to expand a multidimensional array into one dimension without changing the order of the elements; The fully connected layer module is used to perform linear transformation on the input data and generate output through the activation function. The parameter is set to n=1, where n is the number of output nodes.
[0026] The construction method of the convolutional neural network model 2 includes the following steps: Step S1: Construct a basic residual block, such as Figure 2 As shown, specifically: Step S11: Set the convolution layer, and set the parameters to k=3, c=64; where k is the size of the convolution kernel, and c is the number of output channels of the convolution layer; Step S12: Setting a layer normalization processing module (LayerNormalization) to calculate the mean and variance of each sample in the feature dimension and perform normalization operation on them so that the output of each sample has a similar scale, which helps to reduce the variation of different samples in the feature dimension and improve the robustness and generalization ability of the model; Step S13: setting the activation function of the activation layer to the LeakyReLU function; Step S2: Construct a neural network model based on the basic residual block of step S1, such as Figure 4 As shown, it includes five basic residual blocks, a channel attention module, a conversion module and a fully connected layer module connected in sequence; wherein the five basic residual blocks are: basic residual block 1, basic residual block 2, basic residual block 3 (Baseblock1, Baseblock2, Baseblock3); The channel attention module (Channelattention) is used to weight different channel features at the channel scale; The conversion module performs the Falten operation, which is used to expand a multidimensional array into one dimension without changing the order of the elements; The fully connected layer module is used to perform linear transformation on the input data and generate output through the activation function. The parameter is set to n=N, where n is the number of output nodes, N=3; The implementation method of the Bagging algorithm in step S44 is as follows: Figure 5 As shown: (1) Establish training subsets: Generate multiple subsample sets from the original data set by sampling with replacement (i.e., bootstrap sampling); (2) Model training: A model is trained independently on each sub-sample set. These models can be trained on either of the two models (the models are repeatable). (3) Result summary: The final prediction result is determined by a voting mechanism (majority vote); specifically: Specifically, for a Bagging set containing M models, for a new input x, its output y can be expressed as the average or voting result of all model outputs: , In the formula, Represents the prediction result of the mth model for the input x.
[0027] The multi-feature fusion photovoltaic fault diagnosis method based on the Bagging algorithm of the present invention constructs a fusion feature library by constructing steady-state features and transient features of photovoltaic faults, combining electrical data and non-electrical data of photovoltaic faults, and further constructs a photovoltaic fault prediction model based on the Bagging algorithm. After completing the training and testing of the model, fault diagnosis is performed through the fusion features of the electrical data and non-electrical data of the photovoltaic system, and the diagnostic accuracy is significantly improved.
[0028] The present invention performs feature selection based on mutual information and recursive feature elimination respectively, obtains the optimal feature combination that can maximize the model performance by adding or removing specific feature variables, and selects different fusion features for the five states of normal, short circuit, open circuit, aging and shadow occlusion of photovoltaics, thereby reducing the amount of data required for model training and diagnosis, and further improving the performance of the model.
Claims
1. A multi-feature fusion photovoltaic fault diagnosis method based on Bagging algorithm, It is characterized in that The following steps are involved: Step 1: Sample data collection: Collect electrical data and non-electrical data of the distributed photovoltaic system in normal and fault states to obtain a sample data set; Step 2: construct a fusion feature sample data set: extract the transient characteristics and steady-state characteristics of the distributed photovoltaic system from the sample data set in step 1, and associate them with the corresponding non-electrical data to obtain fusion features; Step 3: construct a photovoltaic fault diagnosis model based on the Bagging algorithm, divide the fusion feature sample data set into a training set and a test set, and use the training set to train the photovoltaic fault diagnosis model; Step 4: Use the test set to test the photovoltaic fault diagnosis model. When the accuracy reaches the target threshold P, the training is completed, otherwise return to step 3; Step 5, photovoltaic fault diagnosis: collect electrical data and non-electrical data of the distributed photovoltaic system to be diagnosed, extract fusion features and perform photovoltaic fault diagnosis through photovoltaic fault diagnosis model training.
2. The multi-feature fusion photovoltaic fault diagnosis method based on the Bagging algorithm according to claim 1 is characterized in that: The normal and fault conditions in step 1 include normal, short circuit, open circuit, aging and shadowing. The electrical data include the current I, voltage V, output power P and photovoltaic cell temperature T of each photovoltaic string. The non-electrical data include the operation time I , Ambient temperature , ambient humidity H and irradiance E.
3. The multi-feature fusion photovoltaic fault diagnosis method based on Bagging algorithm according to claim 1 is characterized in that: The steady-state characteristics in step 2 include output power P, output current I, voltage V, and output power mean , output current average , voltage mean , the absolute value of the power difference before and after the fault occurs , the absolute value of the output current difference before and after the fault occurs The absolute value of the voltage difference before and after the fault occurs ; The transient characteristics in step 2 include transient time , Transient power variation coefficient , Transient current variation coefficient and transient voltage variation coefficient .
4. The multi-feature fusion photovoltaic fault diagnosis method based on Bagging algorithm as claimed in claim 3 is characterized in that: The transient time , Transient power variation coefficient , Transient current variation coefficient and transient voltage variation coefficient It is expressed by the following formula: , in, is the transient time, is the transient power variation coefficient, is the transient current variation coefficient, is the transient voltage variation coefficient; is the transient start time, is the transient end time; It is the maximum value of output power change during transient process; It is the maximum value of the current change during the transient process; It is the maximum value of voltage change during transient process; is the absolute value of the power difference before and after the fault occurs, is the absolute value of the output current difference before and after the fault occurs, It is the absolute value of the voltage difference before and after the fault occurs.
5. The multi-feature fusion photovoltaic fault diagnosis method based on Bagging algorithm according to claim 1 is characterized in that: The fused feature sample data set described in step 3 is divided into a training set and a test set in a ratio of 7:
3.
6. The multi-feature fusion photovoltaic fault diagnosis method based on Bagging algorithm according to claim 1 is characterized in that: The fault diagnosis model in step three includes multiple convolutional neural networks, and the multiple convolutional neural networks are integrated through the Bagging algorithm.
7. The multi-feature fusion photovoltaic fault diagnosis method based on Bagging algorithm as claimed in claim 6, characterized in that: The convolutional neural network includes a first basic residual block, a second basic residual block, a first bidirectional LSTM module, a second bidirectional LSTM module, a first conversion module and a first fully connected layer module. The first basic residual block and the second basic residual block each include a convolutional layer, a layer normalization processing module and an activation layer connected in sequence, The first basic residual block and the second basic residual block are respectively connected to the first bidirectional LSTM module and the second bidirectional LSTM module through a reshaping module; The first basic residual block, the second basic residual block and the first conversion module are connected in sequence, and the first bidirectional LSTM module, the second bidirectional LSTM module and the first conversion module are connected in sequence; The first fully connected layer is connected to the first conversion module.
8. The multi-feature fusion photovoltaic fault diagnosis method based on Bagging algorithm as claimed in claim 6, characterized in that: It includes a third basic residual block, a fourth basic residual block, a fifth basic residual block, a channel attention module, a second conversion module and a second fully connected layer module which are connected in sequence. The third basic residual block, the fourth basic residual block and the fifth basic residual block all include a convolutional layer, a layer normalization processing module and an activation layer which are connected in sequence.
9. The multi-feature fusion photovoltaic fault diagnosis method based on Bagging algorithm according to claim 7 or 8, characterized in that: The parameters of the convolution layer are k=3, c=64, where k is the size of the convolution kernel and c is the number of output channels of the convolution layer; the activation function of the activation layer is the LeakyReLU function.
10. The multi-feature fusion photovoltaic fault diagnosis method based on Bagging algorithm according to claim 1, characterized in that: The target threshold value P in step 4 is 90%.
Citation Information
Patent Citations
IV characteristic and deep residual network-based photovoltaic array fault diagnosis method
CN109873610A
Photovoltaic power station inverter fault diagnosis method based on random forest model
CN113922756A
Photovoltaic output anomaly detection method and device, computer equipment and storage medium
CN116722542A
Transient voltage stability evaluation method and system based on deep neural network
CN118748396A
Photovoltaic array fault diagnosis method based on composite information
US20210135625A1
