Photovoltaic array fault diagnosis method, device and equipment based on support vector machine

Through the support vector machine-based photovoltaic array fault diagnosis method, the problem of inability to realize online real-time diagnosis, high cost and poor accuracy in the prior art is solved, and efficient and accurate photovoltaic array fault diagnosis is achieved.

CN119884998APending Publication Date: 2025-04-25XIAMEN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411753199.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing photovoltaic array fault diagnosis methods cannot achieve online real-time diagnosis, which is expensive, and has poor accuracy and generalization.

Method used

Using a support vector machine (SVM)-based method, a photovoltaic array fault data is obtained, and a data repair process is performed, multiple preselected kernel functions are constructed and a SVM-based fault diagnosis model is constructed using two rounds of optimization methods.

Benefits of technology

Real-time diagnosis of photovoltaic array faults is realized, cost reduction, and diagnosis accuracy and generalization are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884998A_ABST
    Figure CN119884998A_ABST
Patent Text Reader

Abstract

The invention provides a photovoltaic array fault diagnosis method, device and equipment based on a support vector machine, and relates to the technical field of equipment health monitoring. The method comprises the following steps: acquiring photovoltaic array fault data; performing classification and data restoration processing on the fault data to obtain a fault training data set; adopting a plurality of pre-selected kernel functions, and using a two-round optimization method to construct a fault diagnosis model based on an SVM (Support Vector Machine); when the model is constructed, taking the highest fault diagnosis precision as a target, and selecting a final kernel function model and parameters by using a two-round optimization method; then training and optimization testing are carried out on the fault diagnosis model to obtain a trained SVM photovoltaic fault diagnosis model; and inputting the preprocessed fault data into the trained SVM photovoltaic fault diagnosis model, and outputting a photovoltaic array fault diagnosis classification result. According to the method, real-time diagnosis can be carried out without stopping equipment, additional equipment does not need to be added, and the cost is low; compared with a traditional artificial intelligence algorithm, generalization is high, and diagnosis accuracy is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of equipment health monitoring, and in particular to a photovoltaic array fault diagnosis method, device and equipment based on a support vector machine. Background Art

[0002] In recent years, new energy sources have developed rapidly, especially photovoltaic power generation, which has developed rapidly due to its advantages of low power generation cost and reduced photovoltaic module cost. However, because photovoltaic arrays are exposed to the outdoors all year round, various forms of failures occur, such as aging, hot spots, shadows, short circuits and open circuits. These failures will reduce the efficiency of photovoltaic power generation, shorten the service life, and in severe cases, cause fires. Therefore, fault detection of photovoltaic arrays is one of the key technologies for photovoltaic power generation.

[0003] Photovoltaic array fault diagnosis mainly includes traditional diagnostic methods, model-based diagnostic methods and artificial intelligence-based diagnostic methods. The earth capacitance method and time domain reflectometry method in the traditional diagnostic methods require the photovoltaic array to be shut down for detection, and cannot be diagnosed online in real time; the infrared imaging method requires the addition of additional equipment, which is costly; the accuracy of fault detection in the model-based diagnostic method depends on the accuracy of the photovoltaic array model, but it is actually difficult to establish an accurate model of a large-scale photovoltaic array; the accuracy and generalization of the fault diagnosis method based on artificial intelligence are poor, and it is impossible to accurately predict the fault of the photovoltaic array.

[0004] In view of this, the applicant filed this application after studying the existing technology. Summary of the invention

[0005] The present invention aims to provide a photovoltaic array fault diagnosis method, device, equipment and medium based on support vector machine to solve the shortcomings of existing methods such as inability to diagnose online in real time, high cost, poor accuracy and generalization.

[0006] In order to solve the above technical problems, the present invention is implemented through the following technical solutions:

[0007] A photovoltaic array fault diagnosis method based on support vector machine, comprising:

[0008] S1, obtain photovoltaic array fault data;

[0009] S2, after classifying and repairing the photovoltaic array fault data, obtaining a fault training data set;

[0010] S3, using multiple pre-selected kernel functions and using a two-round optimization method to build a fault diagnosis model based on SVM; wherein the two-round optimization method is:

[0011] The first round of optimization: with the goal of achieving the highest fault diagnosis accuracy, a large step size optimization pre-selection is performed on various types of kernel functions within a wide range of parameters to obtain a certain kernel function type;

[0012] The second round of optimization: Based on the kernel function type determined in the first round of optimization, within a small parameter range, a small step size is used to optimize the kernel function to obtain the determined kernel function parameters, thereby obtaining the final kernel function, which is the fault diagnosis model based on SVM.

[0013] S4, training and optimizing the fault diagnosis model according to the fault training data set to obtain a trained SVM photovoltaic fault diagnosis model;

[0014] S5, input the preprocessed fault data into the trained SVM photovoltaic fault diagnosis model and output the photovoltaic array fault diagnosis classification results.

[0015] Preferably, when classifying the photovoltaic array fault data, a k-means clustering algorithm is used to automatically divide the fault data under each fault category into k groups. The Euclidean distance formula of the clustering algorithm is:

[0016]

[0017] Among them, d(X i ,X j ) represents the fault data vector X i , X j The Euclidean distance, X i , X j Respectively represent the i-th and j-th fault data vectors, x ik represents the i-th fault data of the k-th group, x jk represents the jth fault data of the kth group; H represents the number of fault categories.

[0018] Preferably, when performing data repair processing on the classified fault data, a similar substitution method is adopted, and the steps are as follows:

[0019] According to the missing data in the photovoltaic array fault data, the most similar fault data is found to obtain similar fault data;

[0020] The similar fault data is used to replace the missing data to obtain the repaired fault data. The repair formula is:

[0021]

[0022] Among them, x′ mn represents the data after the mth fault data of the nth group is replaced, x inrepresents the i-th data of the n-th group of similar fault data, m≤k;

[0023] The repaired fault data is normalized, and the normalization formula is:

[0024]

[0025] Among them, P n represents the normalized data of the nth fault data vector; X n represents the nth fault data vector; X max , X min Represent the maximum and minimum values ​​in the fault data respectively.

[0026] Preferably, the plurality of pre-selected kernel functions include several of a linear kernel function, a polynomial kernel function, a radial basis kernel function and an exponential kernel function, and the corresponding function formulas are respectively:

[0027] f1=X T Y+c1;

[0028] f2=(σ2X T Y+c2) d ;

[0029] f3=exp(-σ3||xy|| 2 );

[0030] f4=exp(-σ4||xy||);

[0031] Among them, f1, f2, f3, and f4 are linear kernel function, polynomial kernel function, radial basis kernel function, and exponential kernel function respectively; X and Y represent input variables respectively; ∥xy∥ represents the Euclidean distance between input data x and y;

[0032] X T is the slope parameter of the linear kernel function, and c1 is the intercept parameter of the linear kernel function;

[0033] σ2 is the coefficient parameter of the polynomial kernel function, c2 is the intercept parameter of the polynomial kernel function, and d is the power parameter of the polynomial kernel function;

[0034] σ3 is the standard deviation parameter of the radial basis kernel function;

[0035] σ4 is the power parameter of the exponential kernel function.

[0036] Preferably, the specific steps of the two-round optimization method are:

[0037] Set the initial value of each pre-selected kernel function parameter, the first round parameter range, and the first round parameter step size to perform the first round of optimization;

[0038] According to the initial parameter value and the first round parameter step length, with the highest fault diagnosis accuracy of the kernel function as the goal, a kernel function with the highest fault diagnosis accuracy is obtained, that is, the determined kernel function; at this time, the parameters of the determined kernel function are not optimal;

[0039] Setting a second round parameter range and a second round parameter step size to perform a second round of optimization; wherein the second round parameter range is smaller than the first round parameter range; and the second round parameter step size is smaller than the first round parameter step size;

[0040] According to the initial parameter value and the determined kernel function, the second round parameter step length is optimized within the second round parameter range to obtain the determined kernel function and kernel function parameters, that is, the constructed SVM-based fault diagnosis model, the model formula is:

[0041]

[0042] Among them, X in represents the input vector, represents the i-th data in the input vector; N represents the total number of fault data samples; α i Represents X in The corresponding weights; express The corresponding weights; represents the kernel function, which is the type of kernel function obtained by the first step of optimization; b represents the parameters of the model.

[0043] Preferably, the fault diagnosis model is a multi-classifier model. During training, the multi-classification problem is first converted into a number of binary classification problems, that is, a multi-classifier composed of a combination of multiple binary classifier support vector machines (SVMs). The conversion formula is:

[0044]

[0045] Where M is the number of SVM classifiers and H is the number of fault categories.

[0046] The present invention also provides a photovoltaic array fault diagnosis device based on a support vector machine, comprising:

[0047] An acquisition unit, used for acquiring photovoltaic array fault data;

[0048] A data processing unit, used to classify and repair the photovoltaic array fault data to obtain a fault training data set;

[0049] The model building unit is used to adopt multiple pre-selected kernel functions and use a two-round optimization method to build a fault diagnosis model based on SVM; wherein the two-round optimization method is:

[0050] The first round of optimization: with the goal of achieving the highest fault diagnosis accuracy, a large step size optimization pre-selection is performed on various types of kernel functions within a wide range of parameters to obtain a certain kernel function type;

[0051] The second round of optimization: Based on the kernel function type determined in the first round of optimization, within a small parameter range, a small step size is used to optimize the kernel function to obtain the determined kernel function parameters, thereby obtaining the final kernel function, which is the fault diagnosis model based on SVM.

[0052] A model training unit, used to train and optimize the fault diagnosis model according to the fault training data set to obtain a trained SVM photovoltaic fault diagnosis model;

[0053] The result output unit is used to input the preprocessed fault data into the trained SVM photovoltaic fault diagnosis model and output the photovoltaic array fault diagnosis classification results.

[0054] The present invention also provides a photovoltaic array fault diagnosis device based on a support vector machine, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement a photovoltaic array fault diagnosis method based on a support vector machine as described above.

[0055] The present invention also provides a computer-readable storage medium, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a device where the computer-readable storage medium is located, a photovoltaic array fault diagnosis method based on a support vector machine as described above is implemented.

[0056] In summary, compared with the prior art, the present invention has the following beneficial effects:

[0057] The present invention uses a kernel function-based SVM to transform nonlinear problems into linear classification problems, so as to avoid the shortcomings of over-learning, under-learning and biased optimization in BP neural networks, and solve the problem that the number of nodes in the middle layer of BP neural networks cannot be reasonably selected. When constructing a fault diagnosis model based on SVM, the goal is to maximize the fault diagnosis accuracy, and a two-round optimization method is used to select the final kernel function model and parameters, which effectively improves the accuracy of the model diagnosis classification.

[0058] The trained fault diagnosis model can be used to classify fault diagnosis of photovoltaic array data acquired in real time. Compared with traditional diagnosis methods, the present invention does not require equipment shutdown, can perform real-time diagnosis, and does not require additional equipment, which is low-cost; compared with traditional artificial intelligence algorithms such as BP neural networks, it has strong generalization and high diagnostic accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0060] Figure 1 A schematic diagram of a photovoltaic array fault diagnosis method based on a support vector machine provided in Embodiment 1 of the present invention.

[0061] Figure 2 This is a sensitivity characteristic curve diagram of different parameters to different faults provided in the first embodiment of the present invention.

[0062] Figure 3 This is a structural diagram of the SVM-based fault diagnosis model provided in Example 1 of the present invention.

[0063] Figure 4 A schematic diagram of a photovoltaic array fault diagnosis device based on a support vector machine provided in Embodiment 2 of the present invention.

[0064] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the invention claimed for protection, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0066] Embodiment 1

[0067] Photovoltaic array fault diagnosis mainly includes traditional diagnostic methods, model-based diagnostic methods and artificial intelligence-based diagnostic methods. Traditional diagnostic methods include earth capacitance method, time domain reflection method, infrared imaging method, etc. The earth capacitance method can locate open circuit faults by testing the ground capacitance between each node of the photovoltaic module. The time domain reflection method locates the fault by analyzing the return signal (waveform and return duration) of the pulse injected into the photovoltaic module. Both methods require the photovoltaic array to be in a shutdown state and cannot be monitored in real time. The infrared imaging method detects the hot spots of the photovoltaic array based on the temperature difference characteristics of the surface of the solar panel, which can detect the faults of the photovoltaic array in real time. However, these methods require the installation of additional equipment in the photovoltaic array, which is costly.

[0068] The model-based diagnostic method requires modeling of the PV array to analyze and calculate the fault type and location of the PV array. This method can accurately detect PV array faults without additional equipment, but it requires extracting photovoltaic parameters to model the PV array, and the accuracy of fault detection depends on the accuracy of the PV array model. However, it is actually difficult to establish an accurate model of a large-scale PV array.

[0069] The fault diagnosis method based on artificial intelligence is to use big data and deep learning technology to detect the faults of photovoltaic arrays. At present, the back propagation (BP) neural network is widely used for detection. Due to the uncertainty of the number of nodes in the hidden layer, the BP neural network is prone to the shortcomings of local learning, overfitting learning, and underfitting learning. Therefore, the accuracy and generalization of the diagnosis algorithm based on the BP neural network are poor, and it is impossible to accurately predict the faults of photovoltaic arrays.

[0070] Embodiment 1 of the present invention provides a photovoltaic array fault diagnosis method based on a support vector machine, which can be implemented by a photovoltaic array fault diagnosis device based on a support vector machine (hereinafter referred to as a fault diagnosis device), and in particular, executed by one or more processors in the fault diagnosis device.

[0071] like Figure 1 As shown, a photovoltaic array fault diagnosis method based on support vector machine includes steps S1 to S5.

[0072] S1, obtain photovoltaic array fault data.

[0073] First, before obtaining the photovoltaic array fault data, the fault type is analyzed and determined to select the parameters of the photovoltaic array fault data. In this embodiment, the fault types of the photovoltaic array mainly include aging, hot spots, shadows, short circuits and open circuits, and aging, hot spots, shadows and other faults are essentially manifested as insufficient light. Other photovoltaic array fault types can also be selected according to actual conditions. Therefore, as shown in Table 1, the faults of the photovoltaic array are mainly summarized into three categories: insufficient light, open circuit and short circuit.

[0074] Table 1. Main fault types of photovoltaic arrays

[0075]

[0076]

[0077] The electrical parameters of the photovoltaic array mainly include two categories: DC parameters and AC parameters. The AC parameters are easily contaminated by noise and have poor accuracy, so they are not suitable for identifying different types of faults. The DC parameters directly collect the output of the photovoltaic array. The fault of the photovoltaic array will directly reflect the change of the DC electrical quantity. Among them, the DC parameters mainly include short-circuit current (I sc ), open circuit voltage (U oc )、Maximum power current (I m )、Maximum power voltage (U m ) and maximum power (P m ).

[0078] like Figure 2 As shown in the figure, the sensitivity of different parameters to different faults. As can be seen from the figure, the current and voltage of the photovoltaic array can most directly reflect the changes in the working environment of the photovoltaic array, while the maximum power is not very sensitive to different faults. Therefore, the short-circuit current (I sc ), open circuit voltage (U oc )、Maximum power current (I m )、Maximum power voltage(U m ) as the input parameter for PV array fault diagnosis.

[0079] S2, after classifying and repairing the photovoltaic array fault data, a fault training data set is obtained.

[0080] In this embodiment, after the fault sample data is collected, a 3×4 photovoltaic array is constructed, and different faults (such as insufficient light, open circuit, and short circuit) are randomly set. The four parameters of the photovoltaic array, namely, short-circuit current, open circuit voltage, maximum power current, and maximum power voltage, are detected, and the samples are marked. The marking results are shown in Table 2.

[0081] Table 2. Sample data labeling table

[0082]

[0083]

[0084] In Table 2, mark 1 represents no fault, mark 2 represents insufficient light fault, mark 3 represents open circuit fault, and mark 4 represents short circuit fault. The total number of samples N and the proportion of each type of sample data K are selected according to the actual situation. For the convenience of explanation, the present invention sets N=100, K1=K2=K3=K4=K=25%.

[0085] Then, a classification method is used to classify the collected photovoltaic array fault data. In this embodiment, the classification algorithm can be a k-means clustering algorithm, or other existing classification algorithms, such as Bayesian classification, decision tree, etc., which will not be described in detail here.

[0086] The fault data set is divided into four categories according to no fault, insufficient light, open circuit, and short circuit. The fault data under each fault category is automatically divided into k groups. The Euclidean distance formula of the clustering algorithm is:

[0087]

[0088] Among them, d(X i ,X j ) represents the fault data vector X i , X j The Euclidean distance, X i , X j Respectively represent the i-th and j-th fault data vectors, x ik represents the i-th fault data of the k-th group, x jk represents the jth fault data of the kth group; H represents the number of fault categories. In this embodiment, H=4, that is, four types of samples.

[0089] Then, the similar substitution method is used to repair the classified fault data. The data under each fault category is divided into k groups of 4-dimensional vectors. If the nth data of the mth group is abnormal, the repair formula is:

[0090]

[0091] Among them, x′ mn represents the data after the mth fault data of the nth group is replaced, x in represents the ith data of the nth group in the similar fault data, m≤k, and k represents the number of groups into which the fault data under each fault category are classified.

[0092] In this embodiment, other data repair methods may also be used to repair data, such as a mean value repair method, etc., which are not limited here.

[0093] The repaired fault data is then normalized, and the normalization formula is:

[0094]

[0095] Among them, P n represents the normalized data of the nth fault data vector; X n represents the nth fault data vector; X max , X min Represent the maximum and minimum values ​​in the fault data respectively.

[0096] S3, adopts multiple pre-selected kernel functions and uses a two-round optimization method to build a SVM-based fault diagnosis model.

[0097] Support vector machine (SVM) is widely used in the field of fault diagnosis and has a solid theoretical foundation. It can not only solve linear classification problems, but also solve nonlinear classification problems. It can avoid the shortcomings of over-learning, under-learning and biased optimization in BP neural network and has stronger generalization ability.

[0098] Since photovoltaic array fault diagnosis is a nonlinear multi-classification problem, this paper uses SVM based on kernel function to transform the nonlinear problem into a linear classification problem. Figure 3 The structure of the fault diagnosis model based on SVM is shown in Figure 1. The kernel function is used for nonlinear transformation, which can automatically adjust the middle layer. Therefore, the fault diagnosis algorithm based on SVM can solve the problem that the number of nodes in the middle layer of the BP neural network cannot be reasonably selected.

[0099] The parameter optimization of SVM mainly includes the selection of kernel function and the determination of parameter optimization. Therefore, a two-round optimization method is used to construct a fault diagnosis model based on SVM.

[0100] In order to save computing time and improve training efficiency, the kernel function is first roughly selected, and among multiple pre-selected kernel functions, a most suitable kernel function type is selected as the fault diagnosis model. The pre-selected kernel function includes several of the linear kernel function, the polynomial kernel function, the radial basis kernel function and the exponential kernel function. In this embodiment, the linear kernel function, the polynomial kernel function, the radial basis kernel function and the exponential kernel function are selected as the initial kernel function for rough selection, and several of them can also be selected, or other kernel functions such as the Sigmoid kernel function, the Basel kernel function, etc. are used, which are not limited by the present invention. Then, the corresponding function formulas are respectively:

[0101] f1=X T Y+c1;

[0102] f2=(σ2X T Y+c2) d ;

[0103] f3=exp(-σ3||xy|| 2 );

[0104] f4=exp(-σ4||xy||);

[0105] Among them, f1, f2, f3, and f4 are linear kernel function, polynomial kernel function, radial basis kernel function, and exponential kernel function respectively; X and Y represent two input vectors respectively; ∥xy∥ represents the Euclidean distance between input data x and y;

[0106] X T is the slope parameter of the linear kernel function, and c1 is the intercept parameter of the linear kernel function;

[0107] σ2 is the coefficient parameter of the polynomial kernel function, c2 is the intercept parameter of the polynomial kernel function, and d is the power parameter of the polynomial kernel function;

[0108] σ3 is the standard deviation parameter of the radial basis kernel function;

[0109] σ4 is the power parameter of the exponential kernel function.

[0110] Then the parameters are optimized, which is divided into two rounds. The first round of optimization determines the kernel function type, and the second round of optimization determines the specific parameters.

[0111] The first round of optimization: With the highest fault diagnosis accuracy as the goal, multiple types of kernel functions are pre-selected with large step size optimization within a wide range of parameters to obtain a certain kernel function type.

[0112] Table 3. Parameter settings of the four kernel functions

[0113]

[0114]

[0115] According to the initial parameter values ​​and optimization step lengths shown in Table 3, the kernel function with the highest fault diagnosis accuracy is selected as the final kernel function. Since the optimization step length in the first round of optimization is large, the convergence speed will be fast and the time consumption will be short. Although the obtained parameters are not optimal, they are sufficient for the selection of kernel functions.

[0116] The second round of optimization: Based on the kernel function type determined in the first round of optimization, within a small parameter range, a small step size is used to optimize the determined kernel function to obtain the determined kernel function parameters, thereby obtaining the final kernel function, which is the constructed SVM-based fault diagnosis model.

[0117] In this embodiment, the kernel function and parameters obtained in the first round of optimization are used as the starting point of the second round of optimization, the optimization step size is changed to 0.01, and refined optimization is performed to obtain the final accurate kernel function parameters, that is, the constructed SVM-based fault diagnosis model. The model formula is:

[0118]

[0119] Among them, X in represents the input vector, represents the i-th data in the input vector; N represents the total number of fault data samples; α i Represents X in The corresponding weights; express The corresponding weights; represents the kernel function, which is the type of kernel function obtained by the first step optimization; b represents the parameters of the model, Represents the *th data in the input vector,

[0120] S4, training and optimizing the fault diagnosis model according to the fault training data set to obtain a trained SVM photovoltaic fault diagnosis model.

[0121] In this embodiment, since SVM is a typical binary classification algorithm, and photovoltaic array fault diagnosis is a multi-classification problem (four-classification in this embodiment), the multi-classification problem of SVM needs to be solved before training the SVM model. The present invention proposes a one-to-one solution, that is, converting the four-classification problem into M binary classification problems.

[0122]

[0123] Wherein, M is the number of SVM classifiers, and H represents the number of fault categories, which is set to 4 in this embodiment.

[0124] Table 4. Multi-classification conversion to binary classification

[0125]

[0126] Then, the parameters obtained from the second round of parameter optimization are used as the parameters of the fault diagnosis model, and the preprocessed fault data is divided into a training group and a test group. The model is trained using the data in the training group, and then the trained model is tested using the data in the test group. If the test accuracy reaches the preset standard, the model training is successful and can be used for fault diagnosis classification prediction.

[0127] S5, input the preprocessed fault data into the trained SVM photovoltaic fault diagnosis model and output the photovoltaic array fault diagnosis classification results.

[0128] In this embodiment, photovoltaic DC parameter data is collected to calculate the short-circuit current (I sc ), open circuit voltage (U oc )、Maximum power current (I m )、Maximum power voltage(U m) and other parameters are input into the trained SVM photovoltaic fault diagnosis model of the present invention. If the output result is 1, it is diagnosed as no fault; if the output result is 2, it is diagnosed as insufficient light; if the output result is 3, it is diagnosed as an open circuit fault; if the output result is 4, it is diagnosed as a short circuit fault.

[0129] In summary, compared with the prior art, the present invention has the following beneficial effects:

[0130] The present invention uses a kernel function-based SVM to transform nonlinear problems into linear classification problems, so as to avoid the shortcomings of over-learning, under-learning and biased optimization in BP neural networks, and solve the problem that the number of nodes in the middle layer of BP neural networks cannot be reasonably selected. When constructing a fault diagnosis model based on SVM, the goal is to maximize the fault diagnosis accuracy, and a two-round optimization method is used to select the final kernel function model and parameters, which effectively improves the accuracy of the model diagnosis classification.

[0131] The trained fault diagnosis model can be used to classify fault diagnosis of photovoltaic array data acquired in real time. Compared with traditional diagnosis methods, the present invention does not require equipment shutdown, can perform real-time diagnosis, and does not require additional equipment, which is low-cost; compared with traditional artificial intelligence algorithms such as BP neural networks, it has strong generalization and high diagnostic accuracy.

[0132] Embodiment 2

[0133] like Figure 4 As shown, the second embodiment of the present invention further provides a photovoltaic array fault diagnosis device based on a support vector machine, comprising:

[0134] An acquisition unit, used for acquiring photovoltaic array fault data;

[0135] A data processing unit, used to classify and repair the photovoltaic array fault data to obtain a fault training data set;

[0136] The model building unit is used to adopt multiple pre-selected kernel functions and use a two-round optimization method to build a fault diagnosis model based on SVM; wherein the two-round optimization method is:

[0137] The first round of optimization: with the goal of achieving the highest fault diagnosis accuracy, a large step size optimization pre-selection is performed on various types of kernel functions within a wide range of parameters to obtain a certain kernel function type;

[0138] The second round of optimization: Based on the kernel function type determined in the first round of optimization, within a small parameter range, a small step size is used to optimize the kernel function to obtain the determined kernel function parameters, thereby obtaining the final kernel function, which is the fault diagnosis model based on SVM.

[0139] A model training unit, used to train and optimize the fault diagnosis model according to the fault training data set to obtain a trained SVM photovoltaic fault diagnosis model;

[0140] The result output unit is used to input the preprocessed fault data into the trained SVM photovoltaic fault diagnosis model and output the photovoltaic array fault diagnosis classification results.

[0141] Embodiment 3

[0142] The third embodiment of the present invention also provides a photovoltaic array fault diagnosis device based on a support vector machine, which includes a memory and a processor, wherein a computer program is stored in the memory, and the computer program can be executed by the processor to implement the photovoltaic array fault diagnosis method based on the support vector machine as described above.

[0143] Embodiment 4

[0144] The fourth embodiment of the present invention further provides a computer-readable storage medium, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a device where the computer-readable storage medium is located, the photovoltaic array fault diagnosis method based on a support vector machine as described above is implemented.

[0145] In several embodiments provided in the embodiments of the present invention, it should be understood that the disclosed apparatus and method can also be implemented in other ways. The apparatus and method embodiments described above are merely schematic. For example, the flowcharts in the accompanying drawings show the possible architecture, functions and operations of the apparatus, method and computer program product according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0146] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0147] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention is essentially or partly contributed to the prior art or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, an electronic device, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk. It should be noted that, in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such a process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.

[0148] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0149] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0150] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0151] The "first\second" mentioned in the embodiments is only to distinguish similar objects, and does not represent a specific order for the objects. It is understandable that the "first\second" can be interchanged with the specific order or sequence where permitted. It should be understood that the objects distinguished by "first\second" can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than those illustrated or described herein.

[0152] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A photovoltaic array fault diagnosis method based on support vector machine, characterized in that: include: S1, obtain photovoltaic array fault data; S2, after classifying and repairing the photovoltaic array fault data, obtaining a fault training data set; S3, using multiple pre-selected kernel functions and using a two-round optimization method to build a fault diagnosis model based on SVM; wherein the two-round optimization method is: The first round of optimization: with the goal of achieving the highest fault diagnosis accuracy, a large step size optimization pre-selection is performed on various types of kernel functions within a wide range of parameters to obtain a certain kernel function type; The second round of optimization: Based on the kernel function type determined in the first round of optimization, within a small parameter range, a small step size is used to optimize the determined kernel function to obtain the determined kernel function parameters, thereby obtaining the final kernel function, which is the constructed SVM-based fault diagnosis model; S4, training and optimizing the fault diagnosis model according to the fault training data set to obtain a trained SVM photovoltaic fault diagnosis model; S5, input the preprocessed fault data into the trained SVM photovoltaic fault diagnosis model and output the photovoltaic array fault diagnosis classification results.

2. A photovoltaic array fault diagnosis method based on support vector machine according to claim 1, characterized in that ,When classifying the photovoltaic array fault data, the k-means clustering algorithm is used to ,automatically divide the fault data under each fault category into k groups. ,The Euclidean distance formula of the clustering algorithm is : Among them, d(X i ,X j ) represents the fault data vector X i , X j The Euclidean distance, X i , X j Respectively represent the i-th and j-th fault data vectors, x ik represents the i-th fault data of the k-th group, x jk represents the jth fault data of the kth group; H represents the number of fault categories.

3. A photovoltaic array fault diagnosis method based on support vector machine according to claim 1, characterized in that ,When performing data repair processing on the classified fault data, a similar ,substitution method is adopted, and the steps are as follows: According to the missing data in the photovoltaic array fault data, the most similar fault data is found to obtain similar fault data; The similar fault data is used to replace the missing data to obtain the repaired fault data. The repair formula is: Among them, x′ mn represents the data after the mth fault data of the nth group is replaced, x in represents the i-th data of the n-th group of similar fault data, m≤k; The repaired fault data is normalized, and the normalization formula is: Among them, P n represents the normalized data of the nth fault data vector; X n represents the nth fault data vector; X max , X min Represent the maximum and minimum values ​​in the fault data respectively.

4. A photovoltaic array fault diagnosis method based on support vector machine according to claim 1, characterized in that ,Multiple pre-selected kernel functions include linear kernel functions, polynomial kernel functions, radial basis kernel functions and exponential kernel functions, and the corresponding function formulas are: f1=X T Y+c1; f2=(σ2X T Y+c2) d ; f3=exp(-σ3||x-y|| 2 ); f4=exp(-σ4||xy||); Among them, f1, f2, f3, and f4 are linear kernel function, polynomial kernel function, radial basis kernel function, and exponential kernel function respectively; X and Y represent input variables respectively; ∥xy∥ represents the Euclidean distance between input data x and y; X T is the slope parameter of the linear kernel function, and c1 is the intercept parameter of the linear kernel function; σ2 is the coefficient parameter of the polynomial kernel function, c2 is the intercept parameter of the polynomial kernel function, and d is the power parameter of the polynomial kernel function; σ3 is the standard deviation parameter of the radial basis kernel function; σ4 is the power parameter of the exponential kernel function.

5. A photovoltaic array fault diagnosis method based on support vector machine according to claim 4, characterized in that ,The specific steps of the two-round optimization method are: Set the initial value of each pre-selected kernel function parameter, the first round parameter range, and the first round parameter step size to perform the first round of optimization; According to the initial parameter value and the first round parameter step length, with the highest fault diagnosis accuracy of the kernel function as the goal, a kernel function with the highest fault diagnosis accuracy is obtained, that is, the determined kernel function; at this time, the parameters of the determined kernel function are not optimal; Setting a second round parameter range and a second round parameter step size to perform a second round of optimization; wherein the second round parameter range is smaller than the first round parameter range; and the second round parameter step size is smaller than the first round parameter step size; According to the initial parameter value and the determined kernel function, the second round parameter step length is optimized within the second round parameter range to obtain the determined kernel function and kernel function parameters, that is, the constructed SVM-based fault diagnosis model, the model formula is: Among them, X in represents the input vector, represents the i-th data in the input vector; N represents the total number of fault data samples; α i Represents X in The corresponding weights; express The corresponding weights; represents the kernel function, which is the type of kernel function obtained by the first step of optimization; b represents the parameters of the model.

6. A photovoltaic array fault diagnosis method based on support vector machine according to claim 1, characterized in that ,The fault diagnosis model is a multi-classifier model. During training, the multi-classification problem is first converted into several binary classification problems, that is, a multi-classifier composed of multiple binary classifier support vector machine SVM, and the conversion formula is: Where M is the number of SVM classifiers and H is the number of fault categories.

7. A photovoltaic array fault diagnosis device based on support vector machine, characterized in that: include: An acquisition unit, used for acquiring photovoltaic array fault data; A data processing unit, used to classify and repair the photovoltaic array fault data to obtain a fault training data set; The model building unit is used to adopt multiple pre-selected kernel functions and use a two-round optimization method to build a fault diagnosis model based on SVM; wherein the two-round optimization method is: The first round of optimization: with the goal of achieving the highest fault diagnosis accuracy, a large step size optimization pre-selection is performed on various types of kernel functions within a wide range of parameters to obtain a certain kernel function type; The second round of optimization: Based on the kernel function type determined in the first round of optimization, within a small parameter range, a small step size is used to optimize the determined kernel function to obtain the determined kernel function parameters, thereby obtaining the final kernel function, which is the constructed SVM-based fault diagnosis model; A model training unit, used to train and optimize the fault diagnosis model according to the fault training data set to obtain a trained SVM photovoltaic fault diagnosis model; The result output unit is used to input the preprocessed fault data into the trained SVM photovoltaic fault diagnosis model and output the photovoltaic array fault diagnosis classification results.

8. A photovoltaic array fault diagnosis device based on support vector machine according to claim 7, characterized in that ,Multiple pre-selected kernel functions include linear kernel functions, polynomial kernel functions, radial basis kernel functions and exponential kernel functions, and the corresponding function formulas are: f1=X T Y+c1; f2=(σ2X T Y+c2) d ; f3=exp(-σ3||x-y|| 2 ); f4=exp(-σ4||xy||); Among them, f1, f2, f3, and f4 are linear kernel function, polynomial kernel function, radial basis kernel function, and exponential kernel function respectively; X and Y represent input variables respectively; ∥xy∥ represents the Euclidean distance between input data x and y; X T is the slope parameter of the linear kernel function, and c1 is the intercept parameter of the linear kernel function; σ2 is the coefficient parameter of the polynomial kernel function, c2 is the intercept parameter of the polynomial kernel function, and d is the power parameter of the polynomial kernel function; σ3 is the standard deviation parameter of the radial basis kernel function; σ4 is the power parameter of the exponential kernel function.

9. A photovoltaic array fault diagnosis device based on support vector machine according to claim 8, characterized in that ,The specific steps of the two-round optimization method are: Set the initial value of each pre-selected kernel function parameter, the first round parameter range, and the first round parameter step size to perform the first round of optimization; According to the initial parameter value and the first round parameter step length, with the highest fault diagnosis accuracy of the kernel function as the goal, a kernel function with the highest fault diagnosis accuracy is obtained, that is, the determined kernel function; at this time, the parameters of the determined kernel function are not optimal; Setting a second round parameter range and a second round parameter step size to perform a second round of optimization; wherein the second round parameter range is smaller than the first round parameter range; and the second round parameter step size is smaller than the first round parameter step size; According to the initial parameter value and the determined kernel function, the second round parameter step length is optimized within the second round parameter range to obtain the determined kernel function and kernel function parameters, that is, the constructed SVM-based fault diagnosis model, the model formula is: Among them, X in represents the input vector, represents the i-th data in the input vector; N represents the total number of fault data samples; α i Represents X in The corresponding weights; express The corresponding weights; represents the kernel function, which is the type of kernel function obtained by the first step of optimization; b represents the parameters of the model.

10. A photovoltaic array fault diagnosis device based on support vector machine, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement a photovoltaic array fault diagnosis method based on a support vector machine as described in any one of claims 1 to 6.