Photovoltaic system fault arc detection method with Adaboost fused with multiple classifiers
Technical Field
The invention belongs to the technical field of photovoltaic electrical fault detection, and relates to a method for detecting a fault arc of a photovoltaic system by using a machine learning composite model of Adaboost.
Background
Solar energy has the characteristics of cleanness and safety, and becomes the renewable energy source with the fastest scale development. The photovoltaic power station is usually built in regions unsuitable for living, such as barren mountains, barren lands, deserts, mudflats and the like, the photovoltaic system of the photovoltaic power station is equivalent to a direct current power supply system, and because the direct current end of the photovoltaic power station has high output voltage, the direct current end can have poor contact or oxidation corrosion and other phenomena of electronic components at any position, and the formed gaps are easy to generate electric arcs. According to the volt-ampere characteristics of the photovoltaic cell panel, once an electric arc is generated, stable combustion is easily formed, the voltage is further increased, the temperature of the electric arc is suddenly increased, and nearby combustible substances and conductors are combusted, so that the safety of a power supply and a circuit is endangered, even a fire disaster is caused, and property loss and even casualty accidents are caused. Although most of the faults of the photovoltaic power station are attributed to direct-current side fault arcs, the existing protection device only can protect the faults caused by circuit overcurrent, and cannot detect the arcs, so that the power generation efficiency of the photovoltaic power station is reduced, and potential safety hazards such as fire disasters exist.
The development of a fault arc detection technology is important for ensuring the safe, reliable and economic operation of a photovoltaic system, the technology generally detects the occurrence of fault arcs in a circuit according to arc characteristics and actively generates an output fault signal, so that a sectionalizer is started to protect the circuit, the main function of the technology is to prevent harmful electric shock or fire caused by the fault arcs, the technology is an important means for effectively avoiding component damage and economic loss caused by the fault arcs, and meanwhile, the system operation parameters are automatically obtained and faults are identified under the condition of eliminating human intervention monitoring, so that the number of times of human maintenance is reduced, the technology is an important way for improving the operation performance of the system, and the intelligent operation degree of the system is favorably improved.
Chinese patent CN112180312A discloses a current sensor composite fault diagnosis method, which inputs a current sensor sample to be detected into a combined model, the combined model extracts the fault characteristics of the sample to be detected by using optimized parameters and diagnoses the fault characteristics, and the method extracts the fault characteristics from the angles of a plurality of time domain characteristic values and avoids the omission of fault information; the dependence on an accurate physical model is low; the method can more accurately diagnose gain faults, bias faults and composite faults of the gain faults and the bias faults in the current sensor, but the method cannot distinguish fault arcs from arc-like working conditions. The method for detecting the fault arc of the photovoltaic system by fusing the machine learning and the multiple time-frequency characteristics, disclosed by the Chinese patent CN107086855A, can be used for accurately identifying multiple fault arc forms in the grid-connected photovoltaic system by fusing the multiple effective time-frequency characteristics, quickening the action of the fault arc and simultaneously ensuring that multiple arc working conditions are not mistakenly operated. However, the patent only uses a single hidden Markov model, and the misjudgment rate is high. The photovoltaic system fault arc detection method based on the adaptive kernel function and the instantaneous frequency estimation disclosed by the chinese patent CN109560770A judges the state of the photovoltaic system in the current period by extracting a plurality of characteristic values and inputting the extracted characteristic values to a trained naive bayesian model, and can ensure that the fault arc in the photovoltaic system is not mistakenly operated under various arc-like working conditions while accurately identifying the fault arc by using a plurality of effective time-frequency characteristics. However, the patent requires manual qualitative and quantitative analysis of the characteristic quantity to achieve a high accuracy rate, and when the environment changes, the accuracy rate may change accordingly.
The Adaboost algorithm can be easily fused with a new model and is easy to modify, and aiming at more accurate detection methods and detection models which may appear in the future, the method for fusing the multiple classifiers is relatively universal and can be used for fusing a new high-precision model with extremely low code quantity, so that the precision of the fused model is gradually optimized along with the updating of the sub-models and the fused model is better at the lowest cost. However, the current fault arc detection method focuses more on the selection of the early-stage detection features, and an Adaboost fusion multi-classifier model for detecting the fault arc of the photovoltaic system is not found in published reports.
Disclosure of Invention
The invention provides a photovoltaic system fault arc detection method with Adaboost fused with multiple classifiers, aiming at solving the problem of accurate, reliable and rapid identification of fault arcs and arc-like working conditions in a grid-connected photovoltaic system.
In order to achieve the purpose, the invention adopts the following technical scheme:
the photovoltaic system fault arc detection method comprises the following steps:
sampling an electric quantity detection signal of the photovoltaic system, quantizing the characteristics of the sampling signal in the current time window, inputting the quantized signal into an Adaboost fusion multi-classifier model, and judging the real-time state of the photovoltaic system according to the output of the Adaboost fusion multi-classifier model; if the Adaboost fusion multi-classifier model outputs values corresponding to the fault arc events in continuous K time windows, judging that the fault arc occurs in the photovoltaic system; otherwise, judging that the photovoltaic system operates normally.
Preferably, the Adaboost fusion multi-classifier model includes a plurality of trained sub-models serving as classifiers (the number of the sub-models may be changed according to actual detection algorithm requirements), feature quantity calculation is performed according to photovoltaic system current detection signal sampling data, values of the calculated feature quantity are respectively input into corresponding trained sub-models, judgment results output by the sub-models are input into the trained Adaboost model for fusion calculation, and high-level or low-level output for indicating the state of the photovoltaic system is obtained.
Preferably, the sub-model adopts a supervised learning mode or a semi-supervised learning mode.
Preferably, the Adaboost fusion multi-classifier model comprises classifiers supporting a vector machine model, a random forest model and a decision tree model in three supervised learning modes.
Preferably, the two kernel function types of the support vector machine model are radial and basic, the parameter C is 38-44, and the gamma parameter of the kernel function is 2-3; the number of subtrees of the random forest model is 1000-1500; the maximum depth of the decision tree model is 40-60, and the number of leaf nodes is 2.
Preferably, in the training of the Adaboost fusion multi-classifier model, the iterative model adopted by Adaboost is neural network NN, wherein the number of neurons is 128-256, the forgetting rate is 0.15-0.4, the number of output neurons is 2, and the iteration number is 500-1000.
Preferably, in the training of the Adaboost fusion multi-classifier model, the feature quantity of the system output current signals under different arc and fault arc conditions is calculated, the value of the calculated feature quantity is used as a learning sample of the Adaboost fusion multi-classifier model, and a training set and a test set are generated by using the learning sample.
Preferably, the training set and the test set are obtained by adopting a k-fold cross validation method, and the value of k is 3-7.
Preferably, data used for training the Adaboost fusion multi-classifier model is 1/2-2/3 of sample capacity, the rest sample data is used for model detection, the value of the sample capacity is 10000-200000000, and the Adaboost model is trained fully in a short time.
Preferably, the value of K is 4-12.
The invention has the beneficial effects that:
the photovoltaic system fault arc detection method with the Adaboost fused with the multiple classifiers can more sensitively identify the fault arc in the photovoltaic system, and particularly can achieve higher sensitivity by the method with the multiple classifiers fused under the condition that the change of the signal to be detected is not obvious, and can effectively detect the fault arc which cannot be detected under a single classifier model.
The method can quickly identify the fault arc in the photovoltaic system, the problem that most classifier models need long input is solved, and the whole system can receive the intermediate signal from the sub-models earlier by fusing the multiple classifiers, so that the possible fault arc can be reflected more quickly, and the corresponding fault branch under the working condition of action fault arc is accelerated.
The method can more accurately identify the fault arc in the photovoltaic system, under the condition that a plurality of fault arcs are similar to similar arcs, the possibility of misjudgment is reduced to the minimum by the method of fusing the multiple classifiers, the misjudgment which is easy to occur under a single classifier model can be effectively avoided, the condition that the multiple kinds of arcs do not generate misoperation is ensured, and the capability of safe and stable operation of the direct-current photovoltaic system is improved.
The method effectively solves the problem of class imbalance, effectively improves the data processing efficiency and improves the identification capability of complex fault electric arcs; meanwhile, the method can better adapt to critical data and improve the anti-interference capability of the algorithm.
The beneficial effects of the above aspects also show that the method can be used for reliably and rapidly acting various fault arc working conditions.
In addition, the photovoltaic system fault arc detection method allows a model structure to be edited rapidly under the condition of not modifying a source code, the model structure is compounded into a machine learning model through a reasonable compounding mode, the effect of the whole model is better, and the accurate identification of fault arc and arc-like working conditions can be realized by changing learning sample data and applying the learning sample data to the direct current photovoltaic system under different inverter loads.
The invention further obtains the technical effects that:
1) the method aims at the detection of the direct current photovoltaic fault arc, and learning is carried out by adopting a supervised or semi-supervised learning mode, such as three submodels of a support vector machine, a random forest and a decision tree, according to the learning accuracy and the convergence rate of a classifier. Aiming at the fact that various fault arcs can be generated in an actual photovoltaic system and different detection signals are generated, Adaboost is combined with a plurality of classifiers, the accuracy of fault arc working condition detection is greatly improved, the problem of movement rejection caused by the unknown fault arc working conditions is solved, and the safety threat of the fault arcs to the operation of the direct current photovoltaic system and personal property is effectively prevented.
2) The method does not need prior knowledge of weak classifiers (support vector machines, random forests and decision trees), the classification precision of the finally obtained strong classifier depends on all the weak classifiers, and the method can remarkably improve the learning precision no matter the method is applied to analog data or real data.
3) According to the method, the upper limit of the error rate of weak classifiers (support vector machines, random forests and decision trees) in the sub-models does not need to be known in advance, the classification precision of the finally obtained composite model depends on the classification precision of all the weak classifiers, the capacity of the classifiers can be deeply excavated, the assumed error rate can be adaptively adjusted according to the feedback of the weak classifiers, and the execution efficiency is high.
4) In order to distinguish and distinguish the fault arc from the arc-like working condition, the standard for cutting off the fault arc is that the Adaboost models in continuous K periods all output high levels, and the selection of the K value can realize the quick cutting off of the fault arc and the simultaneous cutting off of the arc-like working condition without error action.
Drawings
Fig. 1 is a schematic block diagram of a method for detecting a fault arc in a photovoltaic system.
FIG. 2a is a flow chart of Adaboost fusion multi-classifier model training.
Fig. 2b is a flowchart of a photovoltaic system fault arc detection method.
Fig. 3a is an output current signal of a fault arc of a dc photovoltaic system.
Fig. 3b is a system state real-time judgment output signal for performing fault arc detection of the dc photovoltaic system by using the support vector machine model.
FIG. 3c is a system state real-time judgment output signal for applying a random forest model for fault arc detection of a DC photovoltaic system.
Fig. 3d is a system state real-time judgment output signal for performing fault arc detection of the dc photovoltaic system by applying the decision tree model.
Fig. 3e is a system state real-time judgment output signal for performing fault arc detection of the direct current photovoltaic system by applying the Adaboost fusion multi-classifier model of the present invention.
Fig. 4a is an output current signal of an arc-like of a dc photovoltaic system.
Fig. 4b is a system state real-time judgment output signal for performing fault arc detection of the dc photovoltaic system by using the support vector machine model.
Fig. 4c is a system state real-time judgment output signal for performing dc photovoltaic system fault arc detection using a random forest model.
Fig. 4d is a system state real-time judgment output signal for performing fault arc detection of the dc photovoltaic system by applying the decision tree model.
Fig. 4e is a system state real-time judgment output signal for performing fault arc detection on the dc photovoltaic system by applying the Adaboost fusion multi-classifier model of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. The examples are given solely for the purpose of illustration and are not intended to limit the scope of the invention.
Referring to fig. 1, the principle of the photovoltaic system fault arc detection method of the present invention is as follows: firstly, current signals are sampled in real time for detection signals (current signals are obtained) with the fault arc characteristics of a direct current photovoltaic system under different arc types and fault arc working conditions, time domain average value, variance, skewness and kurtosis are carried out on the sampled signals, short-time Fourier transform and wavelet transform calculation of a time frequency domain are carried out, corresponding characteristic vector groups are extracted and obtained, the characteristic vector groups and working condition labels are used as training learning samples of three submodels (a support vector machine, a random forest and a decision tree) and an Adaboost model, and after the learning of the three submodels and the Adaboost model is finished (the Adaboost fusion multi-classifier model is obtained), a plurality of fault arc characteristics can be fused to identify correct state judgment results (arc types, fault arcs or normal) for system sampled signals input into a time window. When whether a fault arc occurs in the grid-connected photovoltaic system is actually detected, only the system current in a time window to be identified needs to be sampled in real time, a series of characteristic calculations are carried out, a plurality of characteristic values are obtained, the characteristic values are input into a trained Adaboost fusion multi-classifier model, and identification is carried out through output values. The Adaboost fusion multi-classifier model can output 0/1 judgment results of whether fault arcs occur in the direct-current photovoltaic system in real time, 1 (corresponding to high level) is output when the system is judged to have the fault arcs, and 0 (corresponding to low level) is output when the system is judged to be in normal operation. And judging the fault arc removal signal triggering condition only when the Adaboost fusion multi-classifier model outputs 1, otherwise, judging that the direct-current photovoltaic system normally operates, and directly judging the fault arc of the direct-current photovoltaic system in the next time window, so that the improvement of the photovoltaic fault arc detection algorithm on the fault arc detection speed is facilitated. If the Adaboost fusion multi-classifier model continuously outputs a plurality of 1 in the detection period of a plurality of continuous time windows, and if only one low-level 0 output exists before one detection period of the set output 1 is not reached, the system state at the moment is considered to be caused by the interference of the arc-like working condition instead of the real fault arc working condition, and no cut-off signal is sent out. When high levels are output in a given period, the system is confirmed to generate fault arcs, the triggering condition for cutting off the fault arcs is met, the detection algorithm can send out a signal for cutting off a fault arc branch, and the direct-current photovoltaic system is protected from being damaged by the working condition of the fault arcs.
Referring to fig. 2a, an Adaboost fusion multi-classifier model adopts a fusion type learning method, and the statistical law and the core characteristics of the fault arc of the direct current photovoltaic system, which is reflected by a characteristic layer and is different from the similar arc, can be mastered only after sample learning, and then the fault arc can be used for identifying the fault arc of the grid-connected photovoltaic system.
Firstly, acquiring a required output current signal of a direct current photovoltaic system, performing a series of characteristic quantity calculations to obtain values of a plurality of characteristic quantities, using the values as learning samples of an Adaboost fusion multi-classifier model, and generating a training set and a test set by using the learning samples (i.e. splitting the learning samples into slice sets, dividing each slice set into subsets to form a subset array, and selecting the training set and the test set line by line in the subset array). The specific training and testing process of the Adaboost fusion multi-classifier model is as follows:
1) carrying out feature calculation on the photovoltaic system current data obtained by sampling, and averagely splitting feature calculation results into k slice sets according to the number of samples;
2) dividing each slice set into k subsets according to the number of samples to form a k multiplied by k subset array, selecting the subset with the same column sequence number as the row sequence number in each row of the subset array as a test set, and using the rest subsets of the row as a training set;
3) selecting three algorithms of a support vector machine, a random forest and a decision tree, sequentially learning a training set of each row of the subset array to obtain 3 xk models, inputting a test set of each row of the subset array into a corresponding model, splicing test results of the same algorithm into a column, and splicing to obtain three columns of test results;
4) and inputting the three rows of test results into an Adaboost model for training and learning, and obtaining the influence of the three algorithms on the system state judgment result according to the accuracy of the classifier.
In the training process of the Adaboost fusion multi-classifier model, a slice set is obtained by adopting a k-fold cross validation method, a data set is divided into k piles by a non-repeated sampling technology, one pile is selected as a test set, the other k-1 pile is selected as a training set, the steps are repeated for k times, and the training set selected each time is different; and finding out a super parameter value which enables the generalization performance of the model to be optimal based on a model tuning analysis method.
In order to put into use the Adaboost fusion multi-classifier model as soon as possible, the learning training speed of the Adaboost fusion multi-classifier model needs to be increased, the learning training process is carried out until the training precision can accurately distinguish the fault state from the normal state by giving a certain training precision standard, and therefore when the state of the model cannot be distinguished after multiple times of training, the learning training process of the Adaboost fusion multi-classifier model needs to be finished under the condition that the initialization parameter is set to be acceptable in the training precision. For a large number of obtained multi-eigenvalue sample sets under the working conditions of grid-connected photovoltaic system fault arcs and arc-like, the sample capacity is 15000, 1/2-2/3 of the sample capacity is taken for data used for Adaboost fusion multi-classifier model learning, and the rest sample data is used for model testing, so that the detection effect of the provided photovoltaic system fault arc detection algorithm is determined.
The optimal hyperparameter value of the Adaboost fusion multi-classifier model is as follows: two kernel function types of the support vector machine model are radial and basic, the parameter C is set to be 42.2243, and the gamma parameter of the kernel function is 2.639; the number of subtrees of the random forest model is 1000; the maximum depth of the decision tree model is 50, and the number of leaf nodes is 2; an iterative model adopted by Adaboost is a neural network NN, wherein the number of neurons is 128, the forgetting rate is 0.23, the number of output neurons is 2, the iteration number is 500, and the iterative model has high accuracy and high convergence rate.
With reference to fig. 2b, the steps of the method for detecting the fault arc of the direct current photovoltaic system with the Adaboost fusion multi-classifier according to the present invention are specifically described:
the parameter setting process comprises the steps of setting the sampling frequency f (for example, the value is 0.5-3MHz) of the current signal of the detection signal device, the number N of time window points (for example, the value is 4000-. During the operation of the direct current photovoltaic system, sampling the output current signals of the grid-connected photovoltaic system point by frequency f, and setting the time window length TsAnalyzing the current signal, calculating the characteristic quantity of the current sampling signal in one analysis period to obtain the value of the required characteristic quantity, and turning to the step to detect the signal.
And step two, detecting the characteristic quantity by adopting a support vector machine, a random forest and a decision tree model, outputting a sub-model classification result, combining the sub-model classification result into a three-dimensional array, and turning to the step three to perform fusion processing on the three-dimensional array.
Inputting the three-dimensional array into a trained Adaboost model, fusing the three-dimensional array in a machine learning mode, and judging whether a fault arc exists according to an output value of the trained Adaboost model, wherein 0 is output by the Adaboost model to represent that the direct current photovoltaic system in the time window is in a normal operation state, 1 is output to represent that the fault arc possibly occurs in the direct current photovoltaic system in the time window, and the step four is carried out to specifically judge.
Step four, preliminarily judging the running state of the direct current photovoltaic system at the moment according to the output value of the trained Adaboost model, if 0 is output, judging that the direct current photovoltaic system in the time window is in a normal running state, and returning to the step one to detect the state of the output current signal of the direct current photovoltaic system in the next time window; if the output is 1, judging that the direct current photovoltaic system possibly generates the fault arc in the time window, and further judging and confirming whether the fault arc occurs through the following standards: whether the period of the continuous output 1 reaches the period number triggering standard for cutting off the fault arc or not is judged, if the period reaches the triggering standard (namely the continuous K time window outputs 1, and K is 5), the fault arc is determined to occur in the direct current photovoltaic system, and a fault arc branch cutting off signal is sent out; if the trigger standard is not met, judging that insufficient continuous 1 outputs are formed under the arc-like working condition of the direct current photovoltaic system, and returning to the step I to detect the state of the output current signal of the direct current photovoltaic system in the next time window.
The detection model (Adaboost fusion multi-classifier model) provided by the invention has stronger fault arc identification capability, avoids the misoperation of a direct-current fault arc detection device caused by accidental factors, and reduces the loss caused by the misjudgment of the model to cut off branches. The photovoltaic system fault arc detection method is applied to a direct current photovoltaic system, and the identification effect of fault arcs and similar arcs in the photovoltaic system fault arc detection method is shown as follows.
As shown in fig. 3a, the output current detection signal of the dc photovoltaic system is obtained at a sampling frequency f of 200 kHz. Before 5.4s, the direct current photovoltaic system is in a normal operation state, and the output current of the direct current photovoltaic system is 18A. After 5.4s, the direct current photovoltaic system breaks down, and the output current of the corresponding direct current photovoltaic system rapidly drops.
As shown in fig. 4a, the output current detection signal of the dc photovoltaic system is obtained at a sampling frequency f of 200 kHz. Before 1.1s, the direct current photovoltaic system is not started, and the current is zero. And starting the system, and climbing the current every 4.7s until the current increment is 2.7A until the normal working current output by the direct current photovoltaic system is 18A.
Through feature calculation, the system state is judged in real time by applying three models, namely a support vector machine, a random forest and a decision tree, and the result shows that misjudgment conditions exist in real-time judgment of the three models on fault arcs and arc-like arcs (shown in figures 3 b-3 d and 4 b-4 d). And the real-time judgment results of the three models are input into the trained Adaboost model for judgment, so that the detection algorithm can give correct low-level indication in the face of normal working current and give correct high-level indication in the face of all fault-state current signals, as shown in FIGS. 3e and 4 e. As can be seen from the results shown in fig. 3e and 4e, the photovoltaic system fault arc detection method of the present invention can give correct low level indication for normal starting current and correct high level indication for all fault state current signals, so that the detection method can accurately distinguish fault arc and arc-like working conditions in the dc photovoltaic system, avoid malfunction of the dc fault arc detection device caused by accidental factors, and reduce loss caused by misjudgment of the model to cut off the branch.
In a word, by combining the identification of the fault arc form in the direct current photovoltaic system and the identification result of the arc-like working condition by the photovoltaic system fault arc detection method, the detection method provided by the invention is proved to be capable of accurately distinguishing the fault arc and various arc-like working conditions in the direct current photovoltaic system.