A photovoltaic array fault diagnosis method considering incorrect training set labels
By combining confidence learning with distributed robust logistic regression algorithms, the training data set was cleaned and a photovoltaic array fault diagnosis model was established, which solved the problem of decreased diagnostic accuracy caused by incorrect labels in the training set and achieved higher fault diagnosis accuracy.
Patent Information
- Application Number
- CN202310498124.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-05
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2043-05-05
AI Technical Summary
Existing photovoltaic array fault diagnosis methods fail to effectively handle incorrectly labeled samples in the training set, resulting in a decrease in the accuracy of the diagnosis results.
The confidence learning algorithm is used to clean the training data set and remove most of the data samples with incorrect labels. A photovoltaic array fault diagnosis model is established based on the distributed robust logistic regression algorithm to enhance the robustness of the model.
When the training set contains incorrect labels, the accuracy of photovoltaic array fault diagnosis is significantly improved, and it can effectively diagnose faults of various types and degrees.
Smart Images

Figure CN116522244B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of photovoltaic technology, and in particular to a photovoltaic array fault diagnosis method that takes into account the situation where training set labels are incorrect. Background Art
[0002] Solar energy boasts the advantages of being clean, pollution-free, and renewable. In recent years, photovoltaic power generation has gained increasing attention worldwide, with global installed capacity rapidly increasing. However, PV arrays, which mostly operate in harsh outdoor environments, are prone to array failures, resulting in economic losses and even endangering grid security. Therefore, developing accurate PV array fault diagnosis methods is of practical significance.
[0003] Although various artificial intelligence approaches have been proposed to address photovoltaic fault diagnosis, these methods generally fail to consider the possibility of mislabeled samples in the training set. In practice, there are two common approaches to obtaining training sets: one is to use historical data from photovoltaic platforms. Misoperation of protective devices on these platforms can lead to mislabeling in these historical data sets; the other is to obtain training sets experimentally. Human error and other factors can lead to mislabeling in the collected data sets. These technical and human factors make mislabeling difficult to avoid in practice, severely impacting the effectiveness of established fault diagnosis models and reducing the accuracy of diagnostic results. Therefore, further research is needed into photovoltaic array fault diagnosis methods that consider mislabeling in the training set. Summary of the Invention
[0004] The object of the present invention is to provide a photovoltaic array fault diagnosis method that takes into account the situation where the training set labels are incorrect, so as to solve the problems raised in the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A photovoltaic array fault diagnosis method considering the case where training set labels are incorrect includes the following steps:
[0007] (1) Based on the confidence learning algorithm, the training data set is cleaned to remove most of the data samples with incorrect labels;
[0008] (2) Based on the robust logistic regression algorithm, a photovoltaic array fault diagnosis model that is robust to label errors is established to achieve accurate diagnosis of photovoltaic array faults.
[0009] As a further embodiment of the present invention, step (1) comprises:
[0010] Data cleaning method: Using the confidence learning method, it is divided into three steps: estimating the joint distribution of noise labels and true labels; finding and cleaning incorrectly labeled samples; and establishing a training set based on the cleaned data.
[0011] First, cross-validate the data set samples, calculate the probability P[n][j] that the nth sample belongs to the jth category, and calculate the average probability t[j] under each category j as the confidence threshold, which is expressed as:
[0012]
[0013] Where: is the set of all samples with label j in the dataset; for The number of samples included in .
[0014] Compute count matrix The meaning of the elements is the label in the dataset But there is a large enough probability that y * The number of samples is expressed as:
[0015]
[0016] Where: is the number of samples whose original label is i but whose probability of belonging to category j is greater than the threshold t[j]; is the jth element in the i-th row of the counting matrix.
[0017] In order to make the total count the same as the total number of samples in the original data set, the count matrix is calibrated. The calculation method is:
[0018]
[0019] Where: is the jth element in the i-th row of the calibrated matrix.
[0020] Based on the calibrated count matrix, the joint distribution matrix of the original data labels and the true labels is calculated as follows:
[0021]
[0022] After obtaining the joint distribution matrix, the following methods are used to clean the data:
[0023] ① Select samples whose label categories corresponding to the maximum probability in P[n][j] are inconsistent with the original labels for filtering;
[0024] ②Select and construct the counting matrix In the process, samples entering the off-diagonal line are filtered;
[0025] ③For each category i in the original data set, select Filter the samples and arrange them in order of probability from low to high;
[0026] ④For the off-diagonal elements of the counting matrix The corresponding samples are selected Elements are filtered and sorted according to the maximum interval of P[n][j]-P[n][i];
[0027] ⑤Comprehensive cleaning methods ③ and ④, that is, take their intersection.
[0028] After cleaning the original data set, the remaining data is used for model training.
[0029] As a further embodiment of the present invention, step (2) comprises:
[0030] The training set is divided into multiple binary classification data sets. For each binary classification data set, a photovoltaic array fault diagnosis model is established based on the robust logistic regression algorithm.
[0031] Logistic regression is expressed as:
[0032]
[0033] Where x is the feature vector of PV array fault diagnosis; y is a binary label, y∈{1,-1}; Prob(y|x) is the conditional probability that the sample output is label y under the condition that the sample input is x; ω is the undetermined regression parameter vector; b is an undetermined constant.
[0034] For N known samples, in order to obtain the maximum likelihood estimate of logistic regression, solve the following optimization problem:
[0035]
[0036] Where: x i 、y i are the input and output of the i-th sample respectively, l is the loss function, and its expression is:
[0037] l(x,y)=ln{1+exp[-y(ω T x+b)]} (7)
[0038] In order to enhance the robustness of the logistic regression model, the distributionally robust optimization algorithm is introduced. The goal of distributionally robust optimization is to find the minimum expected cost in the worst case. The optimization problem is expressed as:
[0039]
[0040] Where: is a fuzzy set consisting of a series of probability distributions; for A probability distribution in
[0041] fuzzy sets The true distribution of the sample should be included with high confidence, and the fuzzy set is constructed based on the Wasserstein distance distributed and The Wasserstein distance between is defined as:
[0042]
[0043] Where: Ξ is the distribution and The space where they are located; ξ1 and ξ2 are and The samples in ; d(ξ1,ξ2) is a distance measure in Ξ space; Π is based on the marginal distribution and The joint distribution of ξ1 and ξ2, the meaning of Wasserstein distance is to distribute Move to Distribution The minimum cost required, where the cost of moving one unit from ξ1 to ξ2 is d(ξ1,ξ2).
[0044] Constructing fuzzy sets based on Wasserstein distance The optimization problem is now expressed as:
[0045]
[0046] Where: is the empirical distribution of known samples; For all with The set of distributions whose Wasserstein distance between them does not exceed ε, that is,
[0047] Formula (10) is the distributionally robust logistic regression problem to be solved. It can be reformulated as a tractable convex programming problem. First, the distance between two points in the sample space is defined as:
[0048]
[0049] Where: d((x1,y1),(x2,y2)) is the distance between samples (x1,y1) and (x2,y2); ||·|| is The space is an arbitrary norm; κ is a positive constant that indicates the relative importance between sample feature mismatch and label uncertainty.
[0050] Based on this distance definition, the distribution robust logistic regression problem can be reformulated as:
[0051]
[0052] Where: β is the coefficient vector composed of ω and b, that is, β = [ω, b]; λ and s i These are all parameters to be determined that are introduced into this solvable optimization problem.
[0053] By solving the optimization problem (12), the coefficient vector β is obtained and substituted into the logistic regression binary classification expression. All binary classification models constitute the final multi-classification model for photovoltaic array fault diagnosis, which is used for photovoltaic array fault diagnosis.
[0054] Compared with the prior art, the present invention has the following beneficial effects:
[0055] The method of the present invention can effectively diagnose photovoltaic array faults of various types and degrees when the training set contains erroneous label data, thereby improving the accuracy of the diagnosis results. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 is a flow chart of the method of the present invention;
[0057] Figure 2 The photovoltaic array simulation model and fault condition diagram provided by the present invention;
[0058] Figure 3 Schematic diagram of different shadow modes provided by the present invention. DETAILED DESCRIPTION
[0059] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiment is only one embodiment of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0060] This example builds a Figure 1 A 4×3 scale photovoltaic array simulation model. The parameters of the photovoltaic modules in the simulation model are shown in the following table:
[0061] Table 1 Parameters of photovoltaic modules in simulation model
[0062]
[0063] Consider the four common faults in photovoltaic arrays: short circuit, open circuit, aging, and partial shadow. A total of 11 operating conditions are selected as research objects. The various operating conditions and their corresponding labels are shown in Table 2. The labels represent different fault types. The short circuit, open circuit, and aging fault conditions are set as follows: Figure 1As shown in the figure, the open circuit fault only considers the case where one branch is open. There are two different aging faults: slight aging, aging resistance 3Ω; severe aging, aging resistance 10Ω. There are 5 types of shadow patterns, such as Figure 2 As shown, among them: ① a single component is short-circuited; ② two components are short-circuited; ③ a branch is open; ④ the component is slightly aged Rdel = 3Ω; ⑤ the component is severely aged Rde2 = 10Ω; each component is connected in parallel with a bypass diode (not shown in the figure).
[0064] Figure 2 The numbers in the figure represent the transmittance of the shadow, reflecting the severity of the shadow. Among them, mode 1 is that the illumination of a single component is reduced to 70%; mode 2 is that the illumination of three components in the same string is reduced to 70%; mode 3 is that the illumination of one component in each string is reduced to 70%; mode 4 is that the illumination of three components in the same string is reduced to 40%, and the illumination of three components in another string is reduced to 70%; mode 5 is that the illumination of one component in each string is reduced to 70%, and the illumination of another component is reduced to 40%. For each working condition, set G∈[300W / m 2 ,1100W / m 2 ], T∈[298K,348K], interval 20W / m 2 , 10K to simulate the output characteristic curve, and a total of 11×245=2706 volt-ampere characteristic curves and corresponding PV curves were collected.
[0065] Table 2 Operating conditions and corresponding labels
[0066] Operating conditions Label Operating conditions Label Normal operation 0 Shadow Mode 1 4 A component short circuit 1 Shadow Mode 2 4 Two components short-circuited 1 Shadow Mode 3 4 A branch road opened 2 Shadow Mode 4 4 Slight aging (3Ω) 3 Shadow Mode 5 4 Severe aging (10Ω) 3
[0067] 12 fault diagnosis features are selected, the first five of which are I SC 、U OC , I m 、U m And the number of local maximum power points, recorded as F1 to F5. 10 is calculated as follows:
[0068]
[0069]
[0070]
[0071]
[0072]
[0073] Where: F6-F 10 All can be passed I SC 、U OC , I m、U m Calculated. F6 represents the slope of the line between the maximum power point and the open circuit point on the volt-ampere characteristic curve; F7 and F8 represent I m 、U m with I SC 、U OC The proportional relationship; F9 is called the filling factor; F 10 Mainly used to diagnose minor short-circuit faults.
[0074] F 11 and F 12 are G and T when collecting photovoltaic curves.
[0075] Based on the above process, a dataset of 2706 samples was established and labeled according to specific fault types. 70% of the samples in the dataset were randomly selected as the training set, and the remaining samples were used as the test set. A portion of the samples in the training set were randomly selected and mislabeled to simulate the situation in which the training set labels are incorrect in real applications.
[0076] The present invention proposes a photovoltaic array fault diagnosis method that takes into account the situation where the training set labels are incorrect, comprising the following steps:
[0077] Step (1):
[0078] Data cleaning method: Using the confidence learning method, it is divided into three steps: estimating the joint distribution of noise labels and true labels; finding and cleaning incorrectly labeled samples; and establishing a training set based on the cleaned data.
[0079] First, cross-validate the data set samples, calculate the probability P[n][j] that the nth sample belongs to the jth category, and calculate the average probability t[j] under each category j as the confidence threshold, which is expressed as:
[0080]
[0081] Where: is the set of all samples with label j in the dataset; for The number of samples included in .
[0082] Compute count matrix The meaning of the elements is the label in the dataset But there is a large enough probability that y * The number of samples is expressed as:
[0083]
[0084] Where: is the number of samples whose original label is i but whose probability of belonging to category j is greater than the threshold t[j]; is the jth element in the i-th row of the counting matrix.
[0085] In order to make the total count the same as the total number of samples in the original data set, the count matrix is calibrated. The calculation method is:
[0086]
[0087] Where: is the jth element in the i-th row of the calibrated matrix.
[0088] Based on the calibrated count matrix, the joint distribution matrix of the original data labels and the true labels is calculated as follows:
[0089]
[0090] After obtaining the joint distribution matrix, the following methods are used to clean the data:
[0091] ① Select samples whose label categories corresponding to the maximum probability in P[n][j] are inconsistent with the original labels for filtering;
[0092] ②Select and construct the counting matrix In the process, samples entering the off-diagonal line are filtered;
[0093] ③For each category i in the original data set, select Filter the samples and arrange them in order of probability from low to high;
[0094] ④For the off-diagonal elements of the counting matrix The corresponding samples are selected Elements are filtered and sorted according to the maximum interval of P[n][j]-P[n][i];
[0095] ⑤Comprehensive cleaning methods ③ and ④, that is, take their intersection.
[0096] After cleaning the original data set, the remaining data is used for model training.
[0097] Define the error label removal rate, the overall data removal rate, and the ratio of error labels in the remaining data to evaluate the effect of step 1:
[0098]
[0099] Where: R clean is the error label elimination rate, which indicates the degree to which the error label samples in the original data set are eliminated after data cleaning; N clean is the number of incorrectly labeled samples in the removed data; Nwrong is the number of all incorrectly labeled samples in the training set; R loss is the overall data elimination rate, which indicates the degree of sample loss in the original data set after data cleaning; N loss is the total number of samples removed; N data is the total number of training set samples; R wrong It is the proportion of incorrectly labeled samples in the remaining data after data cleaning, which reflects the quality of the samples in the new data set.
[0100] To avoid the influence of randomness in the selection of training sets and the setting of error labels, 10 experiments were conducted for each error label ratio, and the experimental results were averaged. The data cleaning effects under different error label ratios are shown in Table 3:
[0101] Table 3. Training set cleaning results under different error label ratios
[0102] Wrong label ratio / % <![CDATA[R clean / %]]> <![CDATA[R loss / %]]> <![CDATA[R wrong / %]]> 5 100.00 5.92 0 10 98.93 12.58 0.12 15 97.27 24.29 0.54 20 95.76 35.86 1.32 25 90.89 48.83 4.45
[0103] It can be seen that after the data cleaning of confidence learning, the proportion of incorrect labels in the remaining training set has decreased significantly compared with the original training set.
[0104] Step (2):
[0105] The training set is divided into multiple binary classification data sets. For each binary classification data set, a photovoltaic array fault diagnosis model is established based on the robust logistic regression algorithm.
[0106] Logistic regression is expressed as:
[0107]
[0108] Where x is the feature vector of PV array fault diagnosis; y is a binary label, y∈{1,-1}; Prob(y|x) is the conditional probability that the sample output is label y under the condition that the sample input is x; ω is the undetermined regression parameter vector; b is an undetermined constant.
[0109] For N known samples, in order to obtain the maximum likelihood estimate of logistic regression, solve the following optimization problem:
[0110]
[0111] Where: x i 、y i are the input and output of the i-th sample respectively, l is the loss function, and its expression is:
[0112] l(x,y)=ln{1+exp[-y(ω T x+b)]} (7)
[0113] In order to enhance the robustness of the logistic regression model, the distributionally robust optimization algorithm is introduced. The goal of distributionally robust optimization is to find the minimum expected cost in the worst case. The optimization problem is expressed as:
[0114]
[0115] Where: is a fuzzy set consisting of a series of probability distributions; for A probability distribution in
[0116] fuzzy sets The true distribution of the sample should be included with high confidence, and the fuzzy set is constructed based on the Wasserstein distance distributed and The Wasserstein distance between is defined as:
[0117]
[0118] Where: Ξ is the distribution and The space where they are located; ξ1 and ξ2 are and The samples in ; d(ξ1,ξ2) is a distance measure in Ξ space; Π is based on the marginal distribution and The joint distribution of ξ1 and ξ2, the meaning of Wasserstein distance is to distribute Move to Distribution The minimum cost required, where the cost of moving one unit from ξ1 to ξ2 is d(ξ1,ξ2).
[0119] Constructing fuzzy sets based on Wasserstein distance The optimization problem is now expressed as:
[0120]
[0121] Where: is the empirical distribution of known samples; For all with The set of distributions whose Wasserstein distance between them does not exceed ε, that is,
[0122] Formula (10) is the distributionally robust logistic regression problem to be solved. It can be reformulated as a tractable convex programming problem. First, the distance between two points in the sample space is defined as:
[0123]
[0124] Where: d((x1,y1),(x2,y2)) is the distance between samples (x1,y1) and (x2,y2); ||·|| is The space is an arbitrary norm; κ is a positive constant that indicates the relative importance between sample feature mismatch and label uncertainty.
[0125] Based on this distance definition, the distribution robust logistic regression problem can be reformulated as:
[0126]
[0127] Where: β is the coefficient vector composed of ω and b, that is, β = [ω, b]; λ and s i These are all parameters to be determined that are introduced into this solvable optimization problem.
[0128] By solving the optimization problem (12), the coefficient vector β is obtained and substituted into the logistic regression binary classification expression. All binary classification models constitute the final multi-classification model for photovoltaic array fault diagnosis, which is used for photovoltaic array fault diagnosis.
[0129] To verify the effectiveness of the proposed PV array fault diagnosis method, the proposed CL+DRLR method and the comparison method were tested 10 times under different error label ratios ranging from 5% to 25%. Their average accuracy is shown in Table 4:
[0130] Table 4 Average accuracy of each method under different error label ratios
[0131]
[0132] As shown in the table, at every error label ratio, the average diagnostic accuracy of the CL+LR and CL+DRLR methods is significantly higher than that of the LR and DRLR algorithms. This indicates that for training sets containing incorrect labels, the confidence learning data cleaning step can significantly improve the accuracy of subsequent fault diagnosis. Table 4 shows that when the error label ratio is 5%, after data cleaning, there are no incorrectly labeled samples in the dataset. At this point, the average diagnostic accuracy of the CL+DRLR and CL+LR methods is very close. At other error label ratios, the average diagnostic accuracy of the DRLR and CL+DRLR methods is higher than that of the LR and CL+LR methods, respectively. This indicates that the DRLR algorithm is more robust than the LR algorithm for training sets containing incorrect labels. In summary, the proposed method has good practical application value.
[0133] This embodiment is only one case of application of the method. Under other photovoltaic array scales or parameters, the method of the present invention can be used to accurately diagnose faults involving photovoltaic arrays.
[0134] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be encompassed therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.
[0135] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that those skilled in the art can understand.
Claims
1. A photovoltaic array fault diagnosis method considering the situation where the training set labels are incorrect, characterized in that: The following steps are involved: (1) Based on the confidence learning algorithm, the training data set is cleaned to remove most of the data samples with incorrect labels; (2) Based on the robust logistic regression algorithm, a photovoltaic array fault diagnosis model that is robust to label errors is established to achieve accurate diagnosis of photovoltaic array faults; The step (1) comprises the following steps: Data cleaning method: Using the confidence learning method, it is divided into three steps: estimating the joint distribution of noise labels and true labels; finding and cleaning samples with incorrect labels; and establishing a training set based on the cleaned data. First, cross-validate the data set samples and calculate the n The samples belong to j The probability of each category P[ n ][ j ], calculate each category j The average probability of t [ j ] is used as the confidence threshold, and its expression is: (1) Where: The label in the dataset is j The set of all samples of ; for The number of samples included in ; Compute count matrix , where the elements mean the labels in the dataset are But there is a sufficiently large probability that The number of samples is expressed as: (2) Where: The original label is i , but it belongs to the category j The probability is greater than the threshold t [ j ] the number of samples; The counting matrix i The first j elements; In order to make the total count the same as the total number of samples in the original data set, the count matrix is calibrated. The calculation method is: (3) Where: is the matrix after calibration i The first j elements; Based on the calibrated count matrix, the joint distribution matrix of the original data labels and the true labels is calculated as follows: (4) After obtaining the joint distribution matrix, the following methods are used to clean the data: ①Select P [ n ][ j ] filter out samples whose label categories corresponding to the maximum probability are inconsistent with the original labels; ②Select and construct the counting matrix In the process, samples entering the off-diagonal line are filtered; ③For each category in the original data set i , select Filter the samples and arrange them in order of probability from low to high; ④For the off-diagonal elements of the counting matrix The corresponding samples are selected elements and filter them by P [ n ][ j ]- P [ n ][ i ] Sort by the largest interval; ⑤Combined cleaning methods ③ and ④, i.e. taking their intersection; After cleaning the original data set, the remaining data is used for model training.
2. A photovoltaic array fault diagnosis method considering the situation where the training set labels are incorrect according to claim 1, characterized in that: The step (2) includes the following steps: The training set is divided into multiple binary classification data sets. For each binary classification data set, a photovoltaic array fault diagnosis model is established based on the distributed robust logistic regression algorithm. Logistic regression is expressed as: (5) Where: x is the characteristic vector for PV array fault diagnosis; y is a binary label, ;Prob( y | x ) is the sample input x Under the condition of y The conditional probability of ω is the regression parameter vector to be determined; b is an undetermined constant; for N Given known samples, to obtain the maximum likelihood estimate of logistic regression, solve the following optimization problem: (6) Where: xi 、 yi Respectively i The input and output of samples, l is the loss function, and its expression is: (7) In order to enhance the robustness of the logistic regression model, the distributionally robust optimization algorithm is introduced. The goal of distributionally robust optimization is to find the minimum expected cost in the worst case. The optimization problem is expressed as: (8) Where: is a fuzzy set consisting of a series of probability distributions; for A probability distribution in fuzzy sets The true distribution of the sample should be included with high confidence, and the fuzzy set is constructed based on the Wasserstein distance ,distributed and The Wasserstein distance between is defined as: (9) Where: For distribution and The space where you are located; and They are and Samples in for A measure of distance in space; Based on marginal distribution and of and The meaning of Wasserstein distance is to distribute Move to Distribution The minimum cost required to move a unit from Move to The cost is ; Constructing fuzzy sets based on Wasserstein distance , then the optimization problem is expressed as: (10) Where: is the empirical distribution of known samples; For all with The Wasserstein distance between ε The set of distributions of ; Formula (10) is the distributionally robust logistic regression problem to be solved. It can be reformulated as a tractable convex programming problem. First, the distance between two points in the sample space is defined as: (11) Where: For samples and the distance between them; for Arbitrary paradigm of space; is a positive constant, indicating the relative importance between sample feature mismatch and label uncertainty; Based on this distance definition, the distribution robust logistic regression problem can be reformulated as: (12) Where: β for ω and b The coefficient vector to be determined is composed of ; λ and si are all parameters to be determined introduced in this solvable optimization problem; By solving the optimization problem (12), we get the coefficient vector β , substituted into the logistic regression binary classification expression, all binary classification models constitute the final multi-classification model for photovoltaic array fault diagnosis, which is used for photovoltaic array fault diagnosis.
Citation Information
Patent Citations
Sample generation method and device, electronic equipment and storage medium
CN115859099A