Fault identification model training method and device for photovoltaic array
By building and optimizing a decision tree model and dynamically updating the photovoltaic array fault identification model, the low efficiency problem of traditional methods is solved, efficient and accurate fault identification is achieved, and the intelligent operation and maintenance of photovoltaic power stations are supported.
Patent Information
- Application Number
- CN202510782243.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-09-26
AI Technical Summary
Traditional photovoltaic array fault identification methods are inefficient and difficult to accurately identify early hidden faults in a timely manner, which leads to the expansion of faults and affects the efficiency of power stations.
By collecting key parameter data of photovoltaic arrays and constructing a decision tree model after preprocessing, the model branches are optimized using training sets and test sets, the optimization parameters and random number library range are adjusted, and the fault identification model is dynamically updated.
It improves the accuracy and timeliness of fault identification, provides technical support for intelligent operation and maintenance of photovoltaic power stations, reduces the impact of environmental interference, and improves the speed and accuracy of model training.
Smart Images

Figure CN120705652A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of photovoltaic fault identification, and in particular to a photovoltaic array fault identification model method and device. Background Art
[0002] The growing energy crisis and environmental pollution have prompted countries to increase the implementation and promotion of renewable energy. Photovoltaic power generation technology, with its unique power generation characteristics, has achieved widespread development and application. However, due to the large number of components in a photovoltaic array, the probability of various failures is high. If not promptly addressed, these failures can lead to serious accidents and damage, affecting the profitability of the entire power plant and causing significant economic losses. Therefore, effective measures must be taken to promptly detect failures to ensure reliable and stable system operation.
[0003] Currently, traditional fault identification methods, which commonly rely on regular manual inspections, suffer from inefficiencies and delayed responses. Especially when faced with early-stage hidden faults, traditional methods often fail to identify them promptly and accurately, leading to escalation of the fault. Summary of the Invention
[0004] The present application provides a photovoltaic array fault identification model training method and device, which can improve the accuracy and timeliness of fault identification and provide reliable technical support for the intelligent operation and maintenance of photovoltaic power stations.
[0005] A first aspect of the present application provides a photovoltaic array fault identification model training method, comprising:
[0006] Collecting key parameter data of the photovoltaic array, using the key parameter data as fault characteristic data, and preprocessing the fault characteristic data;
[0007] Constructing a sample set based on the preprocessed fault feature data, and dividing the sample set into a training set and a test set;
[0008] Building an initial fault identification model; wherein the initial fault identification model includes several branches, each branch is in a parallel relationship, each branch is a decision tree model, and the branch depth value, the minimum number of samples at the node, and the number of feature splitting samples of the decision tree model are all set in the random number library;
[0009] For each branch in the initial fault identification model, use the training set to train each branch, use the test set to test the trained branch, output the test results, and optimize the trained branch based on the test results and first preset optimization parameters to obtain a first fault identification model;
[0010] determining an average similarity of all branches in the first fault identification model, and optimizing the branches in the first fault identification model based on the average similarity and a second preset optimization parameter to obtain a second fault identification model;
[0011] The test set is input into the second fault identification model, and the test result of the second fault identification model is obtained through the output results of all branches in the second fault identification model. Based on the test result of the second fault identification model, the range of the first preset optimization parameter, the second preset optimization parameter or the random number library is adjusted to retrain the second fault identification model as the initial fault identification model.
[0012] A second aspect of the present application provides a photovoltaic array fault identification method, comprising:
[0013] Collecting target key parameter data in the photovoltaic array, using the target key parameter data as target fault characteristic data, and preprocessing the target fault characteristic data;
[0014] The pre-processed target fault feature data is input into a fault identification model, and the corresponding fault type is output; wherein, the fault identification model is trained using the training method provided in the embodiment of the present application.
[0015] A third aspect of the present application provides a photovoltaic array fault identification model training device, comprising:
[0016] A first acquisition and preprocessing module acquires key parameter data from the photovoltaic array, uses the key parameter data as fault characteristic data, and preprocesses the fault characteristic data;
[0017] A sample set construction module constructs a sample set according to the preprocessed fault feature data and divides the sample set into a training set and a test set;
[0018] A model building module is used to build an initial fault identification model; wherein the initial fault identification model includes a plurality of branches, each branch is in a parallel relationship, each branch is a decision tree model, and the branch depth of the decision tree model, the minimum number of samples at the node, and the number of feature splitting samples are all set in the random number library;
[0019] a first optimization module, configured to train each branch in the initial fault identification model using the training set, test the trained branch using the test set, output a test result, and optimize the trained branch based on the test result and a first preset optimization parameter to obtain a first fault identification model;
[0020] a second optimization module, configured to determine an average similarity of all branches in the first fault identification model, and optimize the branches in the first fault identification model based on the average similarity and a second preset optimization parameter to obtain a second fault identification model;
[0021] An adjustment module is used to input the test set into the second fault identification model, obtain the test result of the second fault identification model through the output results of all branches in the second fault identification model, and adjust the range of the first preset optimization parameter, the second preset optimization parameter or the random number library based on the test result of the second fault identification model to retrain the second fault identification model as the initial fault identification model.
[0022] A fourth aspect of the present application provides a photovoltaic array fault identification device, comprising:
[0023] a second acquisition and preprocessing module, configured to acquire target key parameter data from the photovoltaic array, use the target key parameter data as target fault characteristic data, and preprocess the target fault characteristic data;
[0024] The fault identification module is used to input the pre-processed target fault feature data into the fault identification model and output the corresponding fault type; wherein, the fault identification model is trained by the training method provided in the embodiment of the present application.
[0025] A fifth aspect of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method provided in the embodiment of the present application is implemented.
[0026] In summary, this application optimizes the branches as described above and adjusts the range of the first preset optimization parameters, the second preset optimization parameters and the random number library to retrain the model, so that the model can be continuously and dynamically updated, maintaining the best fault identification performance, improving the accuracy and timeliness of fault identification, and providing reliable technical support for the intelligent operation and maintenance of photovoltaic power stations. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 This is a flow chart of a photovoltaic array fault identification model training method provided in an embodiment of the present application;
[0028] Figure 2 is a flowchart of constructing a first fault identification model provided by an embodiment of the present application;
[0029] Figure 3 This is a flowchart of optimizing all branches in a first fault identification model based on average similarity and a second preset optimization parameter, provided by an embodiment of the present application;
[0030] Figure 4 This is a flow chart of a photovoltaic array fault identification method provided in an embodiment of the present application;
[0031] Figure 5 This is a schematic structural diagram of a photovoltaic array fault identification model training device provided in an embodiment of the present application;
[0032] Figure 6 This is a structural block diagram of a photovoltaic array fault identification device provided in an embodiment of the present application;
[0033] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] The present application will be further described in detail below with reference to the accompanying drawings.
[0035] The photovoltaic array fault identification model training method of the present application can be executed by a photovoltaic array fault identification training device, which can be implemented by software and / or hardware and can be configured in electronic equipment such as a computer.
[0036] like Figure 1 As shown, the fault identification model training method of this application includes:
[0037] S110: collecting key parameter data of the photovoltaic array, using the key parameter data as fault characteristic data, and preprocessing the fault characteristic data.
[0038] In this application, key parameter data include voltage data, current data and power data; among them, key parameter data can be used as extracted fault feature data. Under normal circumstances, photovoltaic array faults can be divided into four types, namely: short circuit faults, open circuit faults, shading faults and aging faults. These faults will cause the output power of the photovoltaic array to be damaged. Therefore, timely detection of these faults is of great significance to the energy generation efficiency.
[0039] For example, for an open circuit fault, when an open circuit fault occurs in a photovoltaic array, the output current of the string where the open circuit photovoltaic module is located is 0; the open circuit voltage increases to the maximum value: V oc ≈N*V occ , where V oc is the open circuit voltage, N is the number of photovoltaic cells in series, V occ is the open circuit voltage of each battery; the short circuit current disappears, that is, I sc =0, etc.
[0040] For short-circuit faults, the output current of the short-circuited string is abnormal; the voltage of the short-circuited component is 0; the open-circuit voltage disappears, etc.
[0041] For shading failure, 1. Hot spot effect: P d =(I un -I sh )*V re , where P d represents the dissipated power, I un Indicates the normal battery string current, I sh is the blocked battery string current, V re is the reverse bias voltage; 2. Temperature rise model: Where ΔT represents the temperature change of the component, t is the shielding time, and C is the thermal capacity of the battery; 3. Changes in open circuit voltage: Where n is the diode ideality factor, k is the Boltzmann constant, T is the absolute temperature, q is the electron charge, and A sh is the area to be blocked, A to is the total area.
[0042] For aging failures, under the same environmental factors, the power generation capacity has decreased significantly compared with historical data.
[0043] Through the analysis of the above faults, it is found that when a fault occurs in the photovoltaic array, the key parameter data in the photovoltaic array will change. Therefore, it is necessary to extract the key parameter data as fault feature data, so that a fault feature library can be established. When a fault occurs, the corresponding change results of the current, voltage, power and other data on the bus will be obtained.
[0044] Preprocessing the fault characteristic data includes: collecting environmental data, and performing environmental compensation on the fault characteristic data based on the environmental data; the environmental data includes light data and ambient temperature data. Light and ambient temperature will, in most cases, affect data such as power in the photovoltaic array. To introduce less data when training the fault identification model, the effects of light and ambient temperature on parameters such as power are compensated for by applying them to voltage or current data. For example, the collected current data is normalized under standard conditions, and the collected voltage data is temperature-coefficient compensated to obtain compensated voltage data. This eliminates the effects of light and temperature on parameters such as current, voltage, and power, further highlighting the fault characteristics. Light and ambient temperature data do not need to be introduced during the training of the fault identification model, which can reduce computation and increase training speed.
[0045] Preprocessing fault signature data can also include performing noise reduction on the collected fault signature data. Specifically, a sliding window technique is used to calculate the mean of current data, and a low-pass filter is applied to voltage waveform data. This method can suppress sensor errors and high-frequency noise caused by transient shadows, achieving dynamic noise suppression. Preprocessing fault signature data can also include processing abnormal data and missing data. Processing abnormal data can specifically include repairing out-of-limit abnormal data such as voltage, current, and power. If voltage data exceeds the limit, it is replaced with the theoretical value; if current data exceeds the limit, it is replaced with the median within the sliding window; if power data exceeds the limit, the out-of-limit power data is directly eliminated. Processing missing data can specifically include: if short-term random data is missing, such as due to transient sensor failure, interpolation can be used to directly fill in the missing value by taking the average of the data on both sides; if there is no power generation data (voltage, current, and power data) at night, the data area is marked as invalid.
[0046] Therefore, by compensating the fault feature data with environmental data, the impact of the environment can be reduced, and real faults and environmental interference can be effectively distinguished during the subsequent use of the model. It can also reduce the data in the model training process and improve the model training speed. By reducing the noise of the fault feature data, processing abnormal data in the fault feature data, and processing missing data, the model training accuracy can be improved.
[0047] S120: Constructing a sample set according to the preprocessed fault feature data, and dividing the sample set into a training set and a test set.
[0048] Specifically, the pre-processed fault feature data is marked with the corresponding fault type and used as samples to construct a sample set. The data structure of the samples in the sample set is T = [I, V, P, y i ], where I is current data, V is voltage data, P is power data, y i Represents the corresponding fault type, i = 1, 2, 3, 4, 5, representing open circuit, short circuit, shade, aging, and normal conditions, respectively. 80% of the samples are randomly selected from the sample set as the training set, and 20% of the data is used as the test set.
[0049] S130: Build an initial fault identification model; wherein, the initial fault identification model includes several branches, each branch is in a parallel relationship, each branch is a decision tree model, and the branch depth value of the decision tree model, the minimum number of samples at the node, and the number of feature split samples are all set in the random number library.
[0050] The initial fault identification model includes several branches, each of which is a decision tree model. Initially, the number of branches Q needs to be fixed, and the branch depth value d max , the minimum number of samples at the node m leaves , the number of feature split samples m splits Initialization is performed to obtain the initial fault identification model. Among them, the branch depth value d max , the minimum number of samples at the node m leaves , the number of feature split samples m splits are all random positive integers. max , m leaves , m splits ∈Ran(θ min ,θ max ), where θ min ,θ max are the upper and lower limits of the preset parameter range, and Ran(·) is the random number library, that is, the database of random numbers.
[0051] S140: For each branch in the initial fault identification model, use the training set to train each branch, use the test set to test the trained branch, output the test results, and optimize the trained branch based on the test results and the first preset optimization parameters to obtain a first fault identification model.
[0052] The test result obtained by testing the trained branches using the test set is the fault identification result, specifically the fault type corresponding to each sample in the test set. The first preset optimization parameter includes a first accuracy threshold and a first similarity threshold.
[0053] Optimizing the trained branches can be as follows: for each branch in the initial fault identification model, the trained branches are tested, and the identification accuracy of the branch can be obtained through the test results. First, the identification accuracy is compared with the first accuracy threshold to determine whether the branch is eliminated. If the identification accuracy of the branch is less than the first accuracy threshold, the branch is eliminated and a new branch is established; if the identification accuracy of the branch is greater than the first accuracy threshold, it is necessary to calculate the similarity between the branch and the historically eliminated branches, as well as the similarity between the branch and the currently passed branch. If the similarity is greater than the first similarity threshold, the branch is eliminated and a new branch is established. For the newly established branches, the new branches need to be retrained and tested until the new branches meet the requirements. Among them, the specific process of optimizing the trained branches using the test results of the trained branches and the first preset optimization parameters can also be referred to in the subsequent introduction.
[0054] The calculation formula for the recognition accuracy is as follows:
[0055]
[0056] Among them, A i is the recognition accuracy of the i-th branch, D test is the data in all test sets, x is D test A data in Q i (x) is the i-th branch of the input data x, y is the fault type corresponding to the data, and Π(·) is the indicator function, which means that a correct classification is counted as 1 and an incorrect classification is counted as 0.
[0057] S150: Determine an average similarity of all branches in the first fault identification model, and optimize the branches in the first fault identification model based on the average similarity and a second preset optimization parameter to obtain a second fault identification model.
[0058] The second preset optimization parameter includes a second similarity threshold. Specifically, the optimization of the branches in the first fault identification model may be as follows: if the average similarity of all branches in the first fault identification model is greater than the second similarity threshold, indicating that all branches in the first fault identification model are highly similar, then the branch with the greatest influence is selected from all branches of the first fault identification model, the branch is eliminated, and a new branch is determined to replace the eliminated branch. The new branch is trained and tested until the average similarity of all branches in the first fault identification model is less than or equal to the second similarity threshold, thereby obtaining the second fault identification model.
[0059] Therefore, by optimizing all branches through the average similarity of all branches in the first fault identification and the second preset optimization parameter, it is possible to effectively avoid the situation where the similarity of each branch is high, thereby improving the identification accuracy of the model.
[0060] S160: Input the test set into the second fault identification model, obtain the test result of the second fault identification model through the output results of all branches in the second fault identification model, and adjust the range of the first preset optimization parameter, the second preset optimization parameter or the random number library based on the test result of the second fault identification model to retrain the second fault identification model as the initial fault identification model.
[0061] The output results of all branches of the second fault identification model can be understood as the fault identification results of all branches, and the test results of the second fault identification model can be understood as the fault identification results of the second fault identification model, that is, the fault type. Exemplarily, if the fault types output by all branches of the second fault identification model are target fault types and exceed a preset number, then the test results of the second fault identification model are the target fault type.
[0062] The fault identification accuracy can be calculated based on the test results of the second fault identification model. If the fault identification accuracy of the second fault identification model does not meet the requirements, the range of the first preset optimization parameter, the second preset optimization parameter or the random number library can be adjusted to retrain the model. During the retraining process, the model parameters can be continuously adjusted to achieve dynamic updating of the fault identification model, thereby maintaining better fault identification performance.
[0063] The present application uses key parameter data in a photovoltaic array as fault feature data, preprocesses the fault feature data, constructs a sample set based on the preprocessed fault feature data, and divides the sample set into a training set and a test set; builds an initial fault identification model, and the parameter values in the initial fault identification model are all set in a random number library; for each branch in the initial fault identification model, the training set is used for training, and the trained branch is tested with the test set, and the test results are output. The trained branch is optimized by the test results and the first preset optimization parameter to obtain a first fault identification model; the average similarity of all branches in the first fault identification model and the second preset optimization parameter are used to obtain a first fault identification model. Assume that the optimization parameters are used to optimize the branches in the first fault identification model to obtain the second fault identification model, that is, the present application optimizes the trained branches individually, and after the branches are optimized individually to obtain the first fault identification model, optimizes the branches again by the average similarity of all branches and the second preset optimization parameters, which can significantly improve the identification accuracy of the model; by using the test set to test the second fault identification model, and adjusting the first preset optimization parameters, the second preset optimization parameters and the range of the random number library according to the test results of the second fault identification model to retrain the model, the model can be continuously and dynamically updated, and the model parameters can be continuously adjusted to maintain the best fault identification performance. In summary, the present application optimizes the branches as described above and adjusts the first preset optimization parameters, the second preset optimization parameters and the range of the random number library to retrain the model, which can continuously and dynamically update the model, maintain the best fault identification performance, improve the accuracy and timeliness of fault identification, and provide reliable technical support for the intelligent operation and maintenance of photovoltaic power stations.
[0064] Figure 2 The flowchart of "for each branch in the initial fault identification model, using the training set to train each branch, using the test set to test the trained branch, outputting the test result, and optimizing the trained branch based on the test result and the first preset optimization parameter to obtain the first fault identification model" is as follows: Figure 2 As shown, the method includes:
[0065] S210: Select one branch from the branches of the initial fault identification model in sequence as the current initial branch.
[0066] S220: Using the training set to train the current initial branch to obtain a current branch, and using the test set to test the current branch to obtain a test result of the current branch.
[0067] S230: Determine the fault identification accuracy of the current branch based on the test result of the current branch.
[0068] S240: If the fault identification accuracy of the current branch is less than or equal to a first accuracy threshold, the current branch is eliminated.
[0069] S250: When the fault identification accuracy of the current branch is greater than the first accuracy threshold, if the similarity between the current branch and the current passing branch is greater than the first similarity threshold, the current branch is eliminated. The current passing branch is a branch that has been trained with the training set and has not been eliminated.
[0070] S260: When the fault identification accuracy of the current branch is greater than the first accuracy threshold, and if the similarity between the current branch and the historically eliminated branch is greater than the first similarity threshold, the current branch is eliminated.
[0071] If the fault identification accuracy of the current branch is greater than the first accuracy threshold, and the similarity between the current branch and the historically eliminated branch is less than or equal to the first similarity threshold, and the similarity between the current branch and the currently passed branch is less than or equal to the first similarity threshold, then at the current stage, it is determined that the branch will not be eliminated.
[0072] The similarity is determined based on the following formula:
[0073]
[0074] Among them, Q i and Q j are the i-th branch and the j-th branch respectively; among them, F i and F j Q i and Q j The branch depth value used, the minimum number of samples at the node, and the feature set formed by the number of feature split samples;
[0075] S270: Determine a new branch and use the new branch as the current initial branch, and return to step S220.
[0076] S280: Determine whether the current branch is currently eliminated.
[0077] If yes, return to S270; if no, execute S280.
[0078] S290: Determine whether all branches in the initial fault identification model have been selected.
[0079] If not, return to S210. If yes, execute S291.
[0080] S291: Obtain the first fault identification model.
[0081] Therefore, by first optimizing the branches by the recognition accuracy and then further optimizing the branches by the similarity, the recognition performance of the branches can be improved and the efficiency of branch optimization can also be improved.
[0082] Figure 3 It is a flow chart for optimizing all branches in the first fault identification model based on the average similarity and the second preset optimization parameter, such as Figure 3 As shown, the method includes:
[0083] S310: If the average similarity is greater than a second similarity threshold, for each branch of the first fault identification model, calculate the similarity between each branch and other branches.
[0084] The similarity between each branch and other branches can be understood as calculating the similarity between each branch and any one of the other branches individually, and calculating the sum of the similarities between each branch and other branches.
[0085] The average similarity is determined based on the following formula:
[0086]
[0087] in, is the average similarity, and Q is the number of branches.
[0088] S320: If the sum of the similarities between the target branch and other branches is the largest, the target branch is eliminated.
[0089] If the sum of similarities between a branch and other branches is large, it means that the branch has a high similarity with other branches. Therefore, the target branch with the largest sum of similarities with other branches can be eliminated.
[0090] S330: Determine a new branch and use the new branch as the current initial branch, and return to the step of training the current initial branch using the training set until the average similarity is less than or equal to the second similarity threshold.
[0091] Therefore, the branches are optimized by the average similarity of all branches, which further improves the fault identification accuracy of the model.
[0092] Adjusting the first preset optimization parameter, the second preset optimization parameter or the range of the random number library based on the test result of the second fault identification model includes: determining the recognition accuracy of the second fault identification model based on the test result of the second fault identification model; if the recognition accuracy of the second fault identification model is less than the second accuracy threshold, adjusting the first accuracy threshold, the first similarity threshold, the second similarity threshold and the range of the random number library. Specifically, if the recognition accuracy of the second fault identification model is less than the second accuracy threshold, total Less than the second accuracy threshold Parameters throughout the training process need to be adjusted, such as the first accuracy threshold a, the first similarity threshold, the second similarity threshold β, and the range of the random number library Ran(·). The first accuracy threshold significantly impacts the classification accuracy of the fault identification results. While appropriately increasing the first accuracy threshold can improve the model's final identification accuracy, an excessively high first accuracy threshold can cause the model to become redundant. A high second similarity threshold may generate branches with high similarity. Lowering the second similarity threshold can increase branch diversity, allowing for the training of a wider range of models within the sample range. The range of the random number library should be set in a comprehensive manner taking into account the first accuracy threshold and the second similarity threshold. A high first accuracy threshold and a low second similarity threshold, combined with a narrow random number library range, can lead to branch redundancy, resulting in high similarity among randomly generated branches. A high first similarity threshold may also generate branches with high similarity. Lowering the first similarity threshold can increase branch diversity.
[0093] Furthermore, the application may also include the following steps:
[0094] S411: Collect key parameter data and environmental data in the photovoltaic array, use the key parameter data as fault characteristic data, and perform environmental compensation on the fault characteristic data based on the environmental data; wherein the fault characteristic data includes voltage data, current data, and power data; and the environmental data includes light data and ambient temperature data.
[0095] S412: Construct a sample set based on the preprocessed fault feature data, and divide the sample set into a training set and a test set.
[0096] S413: Build an initial fault identification model; wherein, the initial fault identification model includes several branches, each branch is in a parallel relationship, each branch is a decision tree model, and the branch depth value of the decision tree model, the minimum number of samples at the node, and the number of feature split samples are all set in the random number library.
[0097] S414: Select one branch from the branches of the initial fault identification model in sequence as the current initial branch.
[0098] S415: Using the training set to train the current initial branch to obtain a current branch, and using the test set to test the current branch to obtain a test result of the current branch.
[0099] S416: Determine the fault identification accuracy of the current branch based on the test result of the current branch.
[0100] S417: If the fault identification accuracy of the current branch is less than or equal to a first accuracy threshold, the current branch is eliminated.
[0101] S418: If the fault identification accuracy of the current branch is greater than the first accuracy threshold, and if the similarity between the current branch and the currently passing branch is greater than the first similarity threshold, the current branch is eliminated. The currently passing branch is a branch that has been trained with the training set and has not been eliminated.
[0102] S419: When the fault identification accuracy of the current branch is greater than the first accuracy threshold, and if the similarity between the current branch and the historically eliminated branch is greater than the first similarity threshold, the current branch is eliminated.
[0103] S420: Determine a new branch and use the new branch as the current initial branch, and return to step S415.
[0104] S421: Determine whether the current branch is currently eliminated.
[0105] If yes, return to S420; if no, execute S422.
[0106] S422: Determine whether all branches in the initial fault identification model have been selected.
[0107] If not, return to S414; if so, execute S423.
[0108] S423: Obtain the first fault identification model.
[0109] S424: Determine the average similarity of all branches in the first fault identification model.
[0110] S425: Determine whether the average similarity is less than or equal to a second similarity threshold.
[0111] If not, execute S426; if so, execute S429.
[0112] S426: For each branch of the first fault identification model, calculate the similarity between each branch and other branches.
[0113] S427: If the sum of the similarities between the target branch and other branches is the largest, the target branch is eliminated.
[0114] S428: Determine a new branch and use the new branch as the current initial branch, and return to S415.
[0115] S429: Obtain a second fault identification model.
[0116] S430: Input the test set into the second fault identification model, obtain the test result of the second fault identification model through the output results of all branches in the second fault identification model, determine the recognition accuracy of the second fault identification model based on the test result of the second fault identification model, if the recognition accuracy of the second fault identification model is less than the second accuracy threshold, adjust the first accuracy threshold, the first similarity threshold, the second similarity threshold and the range of the random number library to retrain the second fault identification model as the initial fault identification model.
[0117] It should be noted that during the training process, the maximum number of iterations can be set to avoid falling into redundant loops.
[0118] In the related technical solutions, the automatic alarm system based on fixed thresholds realizes fault identification, but it is difficult to cope with complex and changeable environmental interference, and false alarms and missed alarms often occur.
[0119] This application compensates fault characteristic data through environmental data, which can reduce the impact of the environment on fault characteristic data, effectively distinguish real faults from environmental interference, and reduce the misjudgment rate. During the use of the model, it can adapt to environmental changes in different seasons and different climatic conditions. It can also reduce the data in the model training process and improve the model training speed; by optimizing the branches and adjusting the threshold and random data for model retraining, the model can be continuously and dynamically updated to maintain the best fault identification performance, improve the accuracy and timeliness of fault identification, and provide reliable technical support for the intelligent operation and maintenance of photovoltaic power stations.
[0120] Furthermore, the present application may also include adding the local slope of the current data and the voltage data to the fault feature data to update the sample set if the fault identification accuracy of the retrained second fault identification model does not meet the preset conditions. For example, if the fault identification accuracy of the second fault identification model after retraining is less than the second accuracy threshold It is necessary to add new data to the fault feature data, such as the local slope of current data and voltage data, to update the sample set, and use the updated sample set to train and test the model, so as to obtain a fault identification model that meets the requirements.
[0121] Figure 4 This is a flow chart of a photovoltaic array fault identification method. The method can be performed by a photovoltaic array fault identification device, which can be implemented by software and / or hardware and configured in a low-voltage circuit breaker. Optionally, the low-voltage circuit breaker can be a non-intrusive low-voltage circuit breaker.
[0122] like Figure 4 As shown, the technical solutions provided by this application include:
[0123] S441: collecting target key parameter data in the photovoltaic array, and pre-processing the target key parameter data as target fault feature data.
[0124] S442: Input the pre-processed target fault feature data into the fault identification model and output the corresponding fault type. The fault identification model is obtained by training through the training method provided in the embodiment of the present application. The fault identification model is the final fault identification model. The final fault identification model is embedded in the low-voltage circuit breaker, and the fault is identified by the low-voltage circuit breaker. If a fault is identified, the circuit can be disconnected by the low-voltage circuit breaker. The low-voltage circuit breaker is set on the photovoltaic array, and multiple photovoltaic panels in the photovoltaic array may share one low-voltage circuit breaker.
[0125] This application obtains a fault identification model by optimizing branches and retraining the model by adjusting thresholds and random number libraries. Through this fault identification model, the accuracy and timeliness of fault identification can be improved, providing reliable technical support for the intelligent operation and maintenance of photovoltaic power stations.
[0126] Figure 5 This is a schematic diagram of the structure of a photovoltaic array fault identification model training device provided by this application, such as Figure 5 As shown, the device includes:
[0127] The first acquisition and preprocessing module 510 acquires key parameter data of the photovoltaic array, uses the key parameter data as fault characteristic data, and preprocesses the fault characteristic data;
[0128] A sample set construction module 520 constructs a sample set according to the preprocessed fault feature data and divides the sample set into a training set and a test set;
[0129] Model building module 530, for building an initial fault identification model; wherein the initial fault identification model includes a plurality of branches, each branch being in a parallel relationship, each branch being a decision tree model, and the branch depth of the decision tree model, the minimum number of samples at the node, and the number of feature splitting samples are all set in the random number library;
[0130] a first optimization module 540 configured to train each branch in the initial fault identification model using the training set, test the trained branch using the test set, output a test result, and optimize the trained branch based on the test result and a first preset optimization parameter to obtain a first fault identification model;
[0131] A second optimization module 550 is configured to determine an average similarity of all branches in the first fault identification model, and optimize the branches in the first fault identification model based on the average similarity and a second preset optimization parameter to obtain a second fault identification model;
[0132] An adjustment module 560 is used to input the test set into the second fault identification model, obtain the test results of the second fault identification model through the output results of all branches in the second fault identification model, and adjust the first preset optimization parameter, the second preset optimization parameter or the range of the random number library based on the test results of the second fault identification model to retrain the second fault identification model as the initial fault identification model.
[0133] In an optional embodiment, for each branch in the initial fault identification model, each branch is trained using the training set, and the trained branch is tested using the test set, test results are output, and the trained branch is optimized based on the test results and first preset optimization parameters to obtain a first fault identification model, including:
[0134] Selecting one branch from the branches of the initial fault identification model in sequence as a current initial branch, training the current initial branch using the training set to obtain a current branch, and testing the current branch using the test set to obtain a test result of the current branch;
[0135] Determining a fault identification accuracy rate of the current branch based on a test result of the current branch;
[0136] If the fault identification accuracy of the current branch is less than or equal to the first accuracy threshold, the current branch is eliminated;
[0137] When the fault identification accuracy of the current branch is greater than the first accuracy threshold, if the similarity between the current branch and the current passing branch is greater than the first similarity threshold, the current branch is eliminated; wherein the current passing branch is a branch that has been trained with the training set and has not been eliminated at present;
[0138] When the fault identification accuracy of the current branch is greater than the first accuracy threshold, if the similarity between the current branch and the historically eliminated branch is greater than the first similarity threshold, the current branch is eliminated;
[0139] Determine a new branch and use the new branch as the current initial branch, and return to the step of training the current initial branch using the training set until the current branch is not eliminated;
[0140] If all branches in the initial fault identification model have not been selected, returning to the step of sequentially selecting one branch from the branches of the initial fault identification model as the current initial branch;
[0141] If all branches in the initial fault identification model are selected, the first fault identification model is obtained.
[0142] In an optional embodiment, the optimizing all branches in the first fault identification model based on the average similarity and the second preset optimization parameter includes:
[0143] If the average similarity is greater than a second similarity threshold, for each branch of the first fault identification model, calculating the similarity between each branch and other branches;
[0144] If the sum of the similarities between the target branch and other branches is the largest, the target branch is eliminated;
[0145] A new branch is determined and the new branch is used as the current initial branch, and the step of training the current initial branch using the training set is returned to, until the average similarity is less than or equal to the second similarity threshold.
[0146] In an optional embodiment, adjusting the first preset optimization parameter, the second preset optimization parameter, or the range of the random number library based on the test result of the second fault identification model includes:
[0147] determining an identification accuracy of the second fault identification model based on a test result of the second fault identification model;
[0148] If the recognition accuracy of the second fault identification model is less than a second accuracy threshold, adjusting the first accuracy threshold, the first similarity threshold, the second similarity threshold, and the range of the random number library;
[0149] The similarity is determined based on the following formula:
[0150]
[0151] Among them, Q iand Q j are the i-th branch and the j-th branch respectively; among them, F i and F j Q i and Q j The branch depth value used, the minimum number of samples at the node, and the feature set formed by the number of feature split samples;
[0152] The average similarity is determined based on the following formula:
[0153]
[0154] in, is the average similarity, and Q is the number of branches.
[0155] In an optional embodiment, preprocessing the fault characteristic data includes:
[0156] collecting environmental data, and performing environmental compensation on the fault characteristic data based on the environmental data;
[0157] The fault characteristic data includes voltage data, current data and power data; and the environmental data includes illumination data and ambient temperature data.
[0158] In an optional embodiment, the system further includes a sample set updating module, configured to:
[0159] If the fault identification accuracy of the retrained second fault identification model does not meet the preset conditions, the local slopes of the current data and the voltage data are added to the fault feature data to update the sample set.
[0160] Figure 6 This is the structural diagram of the photovoltaic array fault identification device, such as Figure 6 As shown, the device comprises:
[0161] The second acquisition and preprocessing module 610 is used to acquire target key parameter data in the photovoltaic array, use the target key parameter data as target fault characteristic data, and preprocess the target fault characteristic data;
[0162] The fault identification module 620 is used to input the pre-processed target fault feature data into the fault identification model and output the corresponding fault type.
[0163] like Figure 7 As shown, an embodiment of the present application provides an electronic device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.
[0164] Memory 113, for storing computer programs;
[0165] In one embodiment of the present application, the processor 111 is configured to execute a program stored in the memory 113 to implement the method provided by any of the aforementioned method embodiments, including:
[0166] Collecting key parameter data of the photovoltaic array, using the key parameter data as fault characteristic data, and preprocessing the fault characteristic data;
[0167] Constructing a sample set based on the preprocessed fault feature data, and dividing the sample set into a training set and a test set;
[0168] Building an initial fault identification model; wherein the initial fault identification model includes several branches, each branch is in a parallel relationship, each branch is a decision tree model, and the branch depth value, the minimum number of samples at the node, and the number of feature splitting samples of the decision tree model are all set in the random number library;
[0169] For each branch in the initial fault identification model, use the training set to train each branch, use the test set to test the trained branch, output the test results, and optimize the trained branch based on the test results and first preset optimization parameters to obtain a first fault identification model;
[0170] determining an average similarity of all branches in the first fault identification model, and optimizing the branches in the first fault identification model based on the average similarity and a second preset optimization parameter to obtain a second fault identification model;
[0171] The test set is input into the second fault identification model, and the test result of the second fault identification model is obtained through the output results of all branches in the second fault identification model. Based on the test result of the second fault identification model, the range of the first preset optimization parameter, the second preset optimization parameter or the random number library is adjusted to retrain the second fault identification model as the initial fault identification model.
[0172] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method provided in any of the aforementioned method embodiments are implemented.
[0173] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0174] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, or of course, by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the relevant technology, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiment.
[0175] The above embodiments are provided for illustrative purposes only and are not intended to limit the scope of implementation. Those skilled in the art will appreciate that other variations or modifications based on the above descriptions are possible. It is not necessary and impossible to provide an exhaustive list of all implementations. Obvious variations or modifications arising therefrom remain within the scope of protection of this application.
Claims
1. A photovoltaic array fault identification model training method, characterized in that: include: Collecting key parameter data of the photovoltaic array, using the key parameter data as fault characteristic data, and preprocessing the fault characteristic data; Constructing a sample set based on the preprocessed fault feature data, and dividing the sample set into a training set and a test set; Building an initial fault identification model; wherein the initial fault identification model includes several branches, each branch is in a parallel relationship, each branch is a decision tree model, and the branch depth value, the minimum number of samples at the node, and the number of feature splitting samples of the decision tree model are all set in the random number library; For each branch in the initial fault identification model, use the training set to train each branch, use the test set to test the trained branch, output the test results, and optimize the trained branch based on the test results and first preset optimization parameters to obtain a first fault identification model; determining an average similarity of all branches in the first fault identification model, and optimizing the branches in the first fault identification model based on the average similarity and a second preset optimization parameter to obtain a second fault identification model; The test set is input into the second fault identification model, and the test result of the second fault identification model is obtained through the output results of all branches in the second fault identification model. Based on the test result of the second fault identification model, the range of the first preset optimization parameter, the second preset optimization parameter or the random number library is adjusted to retrain the second fault identification model as the initial fault identification model.
2. The method according to claim 1, characterized in that For each branch in the initial fault identification model, each branch is trained using the training set, and the trained branch is tested using the test set, a test result is output, and the trained branch is optimized based on the test result and a first preset optimization parameter to obtain a first fault identification model, including: Selecting one branch from the branches of the initial fault identification model in sequence as a current initial branch, training the current initial branch using the training set to obtain a current branch, and testing the current branch using the test set to obtain a test result of the current branch; Determining a fault identification accuracy rate of the current branch based on a test result of the current branch; If the fault identification accuracy of the current branch is less than or equal to the first accuracy threshold, the current branch is eliminated; When the fault identification accuracy of the current branch is greater than the first accuracy threshold, if the similarity between the current branch and the current passing branch is greater than the first similarity threshold, the current branch is eliminated; wherein the current passing branch is a branch that has been trained with the training set and has not been eliminated at present; When the fault identification accuracy of the current branch is greater than the first accuracy threshold, if the similarity between the current branch and the historically eliminated branch is greater than the first similarity threshold, the current branch is eliminated; Determine a new branch and use the new branch as the current initial branch, and return to the step of training the current initial branch using the training set until the current branch is not eliminated; If all branches in the initial fault identification model have not been selected, returning to the step of sequentially selecting one branch from the branches of the initial fault identification model as the current initial branch; If all branches in the initial fault identification model are selected, the first fault identification model is obtained.
3. The method according to claim 2, characterized in that The optimizing all branches in the first fault identification model based on the average similarity and the second preset optimization parameter includes: If the average similarity is greater than a second similarity threshold, for each branch of the first fault identification model, calculating the similarity between each branch and other branches; If the sum of the similarities between the target branch and other branches is the largest, the target branch is eliminated; A new branch is determined and the new branch is used as the current initial branch, and the step of training the current initial branch using the training set is returned to, until the average similarity is less than or equal to the second similarity threshold.
4. The method according to claim 3, characterized in that The adjusting the first preset optimization parameter, the second preset optimization parameter, or the range of the random number library based on the test result of the second fault identification model includes: determining an identification accuracy of the second fault identification model based on a test result of the second fault identification model; If the recognition accuracy of the second fault identification model is less than a second accuracy threshold, adjusting the first accuracy threshold, the first similarity threshold, the second similarity threshold, and the range of the random number library; The similarity is determined based on the following formula: Among them, Q i and Q j are the i-th branch and the j-th branch respectively; among them, F i and F j Q i and Q j The branch depth value used, the minimum number of samples at the node, and the feature set formed by the number of feature split samples; The average similarity is determined based on the following formula: in, is the average similarity, and Q is the number of branches.
5. The method according to claim 1, wherein Preprocessing the fault characteristic data includes: collecting environmental data, and performing environmental compensation on the fault characteristic data based on the environmental data; The fault characteristic data includes voltage data, current data and power data; the environmental data includes light data and ambient temperature data.
6. The method according to claim 5, characterized in that Also includes: If the fault identification accuracy of the retrained second fault identification model does not meet the preset conditions, the local slopes of the current data and the voltage data are added to the fault feature data to update the sample set.
7. A photovoltaic array fault identification method, characterized in that: include: Collecting target key parameter data in the photovoltaic array, using the target key parameter data as target fault characteristic data, and preprocessing the target fault characteristic data; The pre-processed target fault feature data is input into a fault identification model, and the corresponding fault type is output; wherein the fault identification model is trained by the method according to any one of claims 1 to 6.
8. A photovoltaic array fault identification model training device, characterized in that: include: A first acquisition and preprocessing module acquires key parameter data from the photovoltaic array, uses the key parameter data as fault characteristic data, and preprocesses the fault characteristic data; A sample set construction module constructs a sample set according to the preprocessed fault feature data and divides the sample set into a training set and a test set; A model building module is used to build an initial fault identification model; wherein the initial fault identification model includes a plurality of branches, each branch is in a parallel relationship, each branch is a decision tree model, and the branch depth of the decision tree model, the minimum number of samples at the node, and the number of feature splitting samples are all set in the random number library; a first optimization module, configured to train each branch in the initial fault identification model using the training set, test the trained branch using the test set, output a test result, and optimize the trained branch based on the test result and a first preset optimization parameter to obtain a first fault identification model; a second optimization module, configured to determine an average similarity of all branches in the first fault identification model, and optimize the branches in the first fault identification model based on the average similarity and a second preset optimization parameter to obtain a second fault identification model; An adjustment module is used to input the test set into the second fault identification model, obtain the test result of the second fault identification model through the output results of all branches in the second fault identification model, and adjust the range of the first preset optimization parameter, the second preset optimization parameter or the random number library based on the test result of the second fault identification model to retrain the second fault identification model as the initial fault identification model.
9. A photovoltaic array fault identification device, characterized in that: include: a second acquisition and preprocessing module, configured to acquire target key parameter data from the photovoltaic array, use the target key parameter data as target fault characteristic data, and preprocess the target fault characteristic data; A fault identification module is used to input the preprocessed target fault feature data into a fault identification model and output the corresponding fault type; wherein the fault identification model is trained by the method described in any one of claims 1 to 6.
10. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.