Photovoltaic string fault diagnosis method and system based on improved support vector machine
By combining an improved support vector machine (SVM) with the ECOC encoding matrix and the RBF kernel function, the accuracy and efficiency issues of photovoltaic string composite fault diagnosis are solved, achieving efficient photovoltaic string fault identification and applicable to the accurate diagnosis of multiple types of composite faults.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QINGDAO UNIV
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-12
AI Technical Summary
Existing photovoltaic string fault diagnosis methods are difficult to effectively identify multiple types of composite faults in complex environments, especially traditional methods which lack the ability to diagnose multiple types of composite faults.
An improved support vector machine (SVM) combined with an error correction output code (ECOC) encoding matrix is adopted. By decomposing the multi-classification task into a binary classification sub-task, an ECOC-SVM model is constructed. Fault identification is performed using the characteristic data of the photovoltaic string IV curve, and accurate classification is achieved by combining the RBF kernel function and the weighted loss function.
It has achieved accurate identification of 28 types of photovoltaic string faults, improved diagnostic accuracy, simplified model training time, reduced hardware and operating costs, and is adaptable to diverse component scenarios under complex outdoor conditions.
Smart Images

Figure CN122196709A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of photovoltaic string fault diagnosis technology, specifically relating to a photovoltaic string fault diagnosis method and system based on an improved support vector machine. Background Technology
[0002] Photovoltaic strings are a crucial component of photovoltaic (PV) systems. However, during long-term outdoor operation, PV strings are inevitably affected by various factors such as temperature cycling, irradiance fluctuations, dust accumulation, module aging, and loose wiring. These factors make PV strings highly susceptible to various electrical faults, leading to reduced power generation and potentially inducing safety hazards such as hot spots and localized burnout. Therefore, researching efficient PV fault diagnosis methods is of great significance for improving the operation and maintenance efficiency and system reliability of PV power plants.
[0003] Existing research on photovoltaic string fault diagnosis can be mainly divided into three categories: imaging-based methods, mathematical model-based methods, and data-driven intelligent diagnostic methods. Imaging-based methods, including infrared thermal imaging, ultraviolet fluorescence imaging, photoluminescence, and electroluminescence imaging, accurately detect various faults through image analysis. They can be used to identify fault types such as microcracks in batteries, bypass diode failure, localized overheating, and shading. However, these methods are highly dependent on environmental conditions and imaging equipment, and their coverage of electrical faults without significant optical or temperature rise characteristics is insufficient, making it difficult to meet the intelligent diagnostic needs of large-scale, multi-category complex faults. Mathematical model-based methods utilize mathematical models and threshold concepts to detect photovoltaic system faults. These methods are computationally efficient, but generally require manual analysis to configure reasonable thresholds, and increase model complexity and computational cost when multiple fault classifications are needed. In recent years, intelligent algorithms based on machine learning and deep learning have been widely applied in the field of photovoltaic system fault detection and diagnosis. Random forests (RF), decision trees (DT), k-nearest neighbors (KNN), artificial neural networks (ANN), convolutional neural networks (CNN), fuzzy C-means clustering, probabilistic neural networks (PNN), support vector machines (SVM), and extreme learning machines have been applied to fault diagnosis and have achieved good results.
[0004] Most of the methods mentioned above focus on single faults or a small number of simple compound faults. However, due to the complexity of the photovoltaic system's operating environment, various types of compound faults often occur. To address these issues, this invention proposes a photovoltaic string fault diagnosis method and system based on an improved support vector machine. Summary of the Invention
[0005] The purpose of this invention is to address the problem of complex composite faults of various types in complex photovoltaic (PV) system operating environments. This invention proposes a PV string fault diagnosis method and system based on an improved support vector machine (SVM). The ECOC-SVM-based PV string fault diagnosis model decomposes the multi-classification task into several binary classification sub-tasks, improving the robustness of the overall classifier through the redundant structure of the encoding matrix, while effectively mitigating feature overlap between complex categories. Combined with the robust boundary decision capability of SVM, ECOC-SVM constitutes a highly reliable framework suitable for high-dimensional complex classification tasks, enabling accurate identification of 28 types of single and composite faults.
[0006] To achieve the technical objectives, the present invention adopts the following technical solution:
[0007] A photovoltaic string fault diagnosis method based on an improved support vector machine is characterized by the following steps:
[0008] Step S1: Add labels based on actual fault results to obtain IV characteristic curve data of various strings under different operating conditions, forming the original fault sample set;
[0009] Step S2: Extract fault characteristic data based on the IV curve of the photovoltaic string, and normalize all characteristic data;
[0010] Step S3: Divide the feature data into training and test sets, use the fault feature vectors from the training set as input to the model, and use ECOC encoding to obtain the optimized SVM fault diagnosis model; where ECOC represents error correction output encoding; SVM represents support vector machine.
[0011] Step S4: Use the test set data to perform fault diagnosis and determine the diagnosis result through a multi-classification algorithm.
[0012] Furthermore, the normalization of the feature data in step S2 specifically involves:
[0013] The formula for normalizing the IV curve of a photovoltaic string includes the short-circuit current ratio C1, the open-circuit voltage ratio C2, the series resistance ratio C3, the fill factor C4, and the difference between the first and last currents of the normalized interval C5. Its feature extraction method is as follows:
[0014] The equation for calculating the short-circuit current ratio C1 is expressed as follows:
[0015]
[0016] Among them, short-circuit current Obtain directly from IV data. This represents the short-circuit current under standard operating conditions of the photovoltaic string.
[0017] The equation for calculating the open-circuit voltage ratio C2 is expressed as follows:
[0018]
[0019] Among them, short-circuit current Obtain directly from IV data. This represents the open-circuit voltage of the photovoltaic string under normal operating standard conditions;
[0020] The equation for calculating the series resistance ratio C3 is expressed as follows:
[0021]
[0022]
[0023] in, Indicates series resistance. This represents the series resistance of a photovoltaic string under normal operating standard conditions;
[0024] The formula for calculating the fill factor FF is expressed as follows:
[0025]
[0026] in, This indicates the maximum output power corresponding to the IV curve of the photovoltaic string;
[0027] The equation for calculating the normalized interval current difference C5 is expressed as follows:
[0028]
[0029]
[0030]
[0031]
[0032] in, , , This represents three consecutive points on the IV curve, forming a detection line. This indicates that on this detection line... The current at that point, Indicates in Detecting current on a straight line and the current on the IV curve deviation, This indicates the maximum value of the deviation. and minimum value The difference between them, k represents the threshold measured in the standardized threshold determination experiment, k=1.5.
[0033] Furthermore, the ECOC-SVM fault diagnosis framework generated in step S3 is specifically as follows:
[0034] The preprocessed data from step S2 is then used for model generation and cross-validation. Model generation specifically includes:
[0035] Solving for the classification hyperplane in a nonlinearly separable primordial sample space is equivalent to solving the following convex quadratic programming problem:
[0036]
[0037] in, The normal vector representing the direction of the hyperplane; This represents the offset between the hyperplane and the origin. This represents the fault feature vector to be classified; Indicates the type of fault to be classified; represents the slack variable used to relax constraints, allowing some data sample points to extend beyond the classification plane; C represents the non-negative penalty factor used to constrain... Ensure the accuracy of the classification;
[0038] The convex quadratic programming problem in the above equation can be solved by introducing the Lagrange function form, specifically expressed as:
[0039]
[0040] in, Indicates the first Lagrange multipliers corresponding to each training sample; Indicates the first Lagrange multipliers corresponding to each training sample; Indicates the first The feature vectors of each training sample Indicates the first The class labels of the training samples;
[0041] A kernel function is introduced to map the training samples in the original space to a high-dimensional space, thereby obtaining accurate fault classification results. RBF is selected as the kernel function for the string fault diagnosis SVM model, and its expression is as follows:
[0042]
[0043] in, This represents the adjustable RBF kernel width;
[0044] The final decision function for string composite fault diagnosis based on SVM is as follows:
[0045] .
[0046] Furthermore, the optimized SVM fault diagnosis model obtained in step S3 using ECOC encoding is specifically as follows:
[0047] A multi-class classification model based on error correction output code (ECOC) is adopted. The ECOC method decomposes the multi-class problem into multiple binary sub-problems and constructs an encoding matrix to achieve inter-class distinction, thereby improving the robustness and generalization performance of classification.
[0048] SVM is a typical binary classification algorithm. The diagnosis of composite faults in photovoltaic strings is a multi-classification problem. Before training the SVM model, an SVM multi-classification method based on ECOC1-v-1 encoding is used to effectively classify different types of faults in photovoltaic strings, solve the multi-classification problem of SVM, and realize the identification of multiple fault types in photovoltaic strings.
[0049] When there are n types of faults in the photovoltaic string, it is necessary to Each SVM classifier is trained independently to improve fault classification efficiency.
[0050] Furthermore, the effective classification of different types of faults in photovoltaic strings specifically includes:
[0051] In the 28 photovoltaic fault scenarios, an SVM binary classifier needs to be built for every two scenarios, for a total of [number] classes to be constructed. One classifier;
[0052] During the first Class and the When classifying classes, the first element in the encoding matrix... line and number The elements of each row are set to +1 and -1 respectively, and the elements of the remaining rows are all 0; thus, a 28-row, 378-column encoding matrix is obtained, denoted as ;
[0053] For the encoding matrix Each column in the matrix is transformed into a binary classification problem; the training samples for each SVM classifier are generated based on this encoding matrix. In the i-th column, the samples corresponding to +1 and -1 represent the two types of faults that need to be classified into two categories. We extract features from these samples using the feature extraction method presented in this paper to train the i-th SVM classifier, denoted as […]. Other samples encoded as 0 are ignored.
[0054] In this way, 378 SVM binary classifiers are trained sequentially using their corresponding training samples, ultimately resulting in an ensemble learning classifier. After the model is trained, the depthwise convolutional features of the test sample images are input into ECOC-SVM;
[0055] For a test sample X, the 378 SVM binary classifiers will independently output their decision results, constructing a vector matrix. .
[0056] Furthermore, the multi-classification algorithm in step S4 is specifically as follows:
[0057] For n types of fault labels, generate A binary classifier is used, employing a decoding strategy based on a weighted loss function. The weighted loss is calculated on the encoded vectors of different categories, and the category with the minimum total loss is selected as the final photovoltaic fault classification result.
[0058] A photovoltaic string composite fault diagnosis system based on an improved support vector machine, the system consisting of a construction module and an identification module:
[0059] The module is configured to acquire IV data of faulty photovoltaic strings and extract feature information from the constructed voltage-current curves to complete feature extraction; and to construct the ECOC-SVM fault diagnosis framework.
[0060] The identification module inputs the feature information of the extracted voltage-current curves into the constructed module for fault diagnosis and outputs the classification results.
[0061] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the photovoltaic string fault diagnosis method based on an improved support vector machine as described in any one of claims 1-7.
[0062] An electronic device includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program to implement the steps of the photovoltaic string fault diagnosis method based on an improved support vector machine as described in any one of claims 1-7.
[0063] A computer program product includes software code, wherein the program in the software code performs the steps of the photovoltaic string fault diagnosis method based on the improved support vector machine as described in any one of claims 1-7.
[0064] Compared with existing technologies, it has the following beneficial effects:
[0065] 1) The photovoltaic string fault diagnosis method and system proposed in this invention based on improved support vector machine calculates feature data such as open-circuit voltage, short-circuit current, series resistance, fill factor, and current difference between the first and last ends of the interval through IV curve. The feature data is preprocessed, and the training set of the feature data is input into the model to train the ECOC-SVM multi-class fault diagnosis framework. The test set is input into the trained model, and a decoding strategy based on weighted loss function is adopted. Finally, the category with the minimum total loss is selected as the final classification result. The accuracy is high and the method is easy to implement.
[0066] 2) The photovoltaic string fault diagnosis method and system proposed in this invention, based on an improved support vector machine, can cover the differences in fault information of different photovoltaic modules by extracting and normalizing five types of core features of IV curves such as short-circuit current ratio, adapting to diverse module scenarios under complex outdoor working conditions, and avoiding diagnostic bias caused by single features.
[0067] 3) The photovoltaic string fault diagnosis method and system proposed in this invention based on improved support vector machine adopts 1v1 ECOC encoding to construct a multi-classification framework composed of 378 SVM binary classifiers. The classifiers support parallel training, which greatly shortens the model training time. Combined with RBF kernel function to map high-dimensional feature space, it improves the fitting ability of nonlinear fault modes.
[0068] 4) The photovoltaic string fault diagnosis method and system proposed in this invention, based on an improved support vector machine, combined with a weighted loss function decoding strategy, achieves accurate identification of 28 single and compound faults, solves the problem of insufficient ability of existing methods to diagnose multi-category compound faults, and significantly improves the diagnostic accuracy compared with traditional data-driven methods.
[0069] 5) The photovoltaic string fault diagnosis method and system based on the improved support vector machine proposed in this invention has a simple and easy-to-integrate intelligent diagnosis system; the implementation form of computer-readable storage medium and electronic equipment can be directly deployed on the photovoltaic power station operation and maintenance terminal or cloud platform, reducing the hardware and operation costs of technology implementation and helping to quickly realize real-time fault diagnosis and handling. Attached Figure Description
[0070] Figure 1 This is a flowchart of the fault diagnosis process of the present invention;
[0071] Figure 2 This is a schematic diagram illustrating the principle of the 1v1 encoding strategy of the present invention;
[0072] Figure 3 This is a schematic diagram of the ECOC-SVM fault diagnosis framework of the present invention;
[0073] Figure 4 This invention is based on a weighted loss function decoding strategy;
[0074] Figure 5 This is a structural block diagram of the intelligent diagnostic system for composite faults in photovoltaic strings based on an improved support vector machine, according to the present invention. Detailed Implementation
[0075] The present invention is described below based on embodiments, but the invention is not limited to these embodiments. In the detailed description of the invention below, certain specific details are described in detail. Those skilled in the art can fully understand the invention even without these detailed descriptions. To avoid obscuring the essence of the invention, well-known methods, processes, flows, elements, and circuits are not described in detail. To make the objectives, technical solutions, and advantages of the invention clearer, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention.
[0076] Example 1
[0077] Embodiment 1 of this invention introduces an intelligent diagnosis method for photovoltaic string faults based on an improved support vector machine.
[0078] like Figure 1 As shown, the intelligent fault diagnosis method for photovoltaic strings based on improved support vector machines includes the following steps:
[0079] Step S1: Add labels based on actual fault results to obtain IV characteristic curve data of various strings under different operating conditions, forming the original fault sample set.
[0080] Step S2: Extract fault characteristic data based on the IV curve of the photovoltaic string and normalize all characteristic data.
[0081] The normalization of feature data in step S2 specifically involves:
[0082] The formula for normalizing the IV curve of a photovoltaic string includes the short-circuit current ratio C1, the open-circuit voltage ratio C2, the series resistance ratio C3, the fill factor C4, and the difference between the first and last currents of the normalized interval C5. Its feature extraction method is as follows:
[0083] The equation for calculating the short-circuit current ratio C1 is expressed as follows:
[0084]
[0085] Among them, short-circuit current Obtain directly from IV data. This represents the short-circuit current under standard operating conditions of the photovoltaic string.
[0086] The equation for calculating the open-circuit voltage ratio C2 is expressed as follows:
[0087]
[0088] Among them, short-circuit current Obtain directly from IV data. This represents the open-circuit voltage of the photovoltaic string under normal operating standard conditions;
[0089] The equation for calculating the series resistance ratio C3 is expressed as follows:
[0090]
[0091]
[0092] in, Indicates series resistance. This represents the series resistance of a photovoltaic string under normal operating standard conditions;
[0093] The formula for calculating the fill factor FF is expressed as follows:
[0094]
[0095] in, This indicates the maximum output power corresponding to the IV curve of the photovoltaic string;
[0096] The equation for calculating the normalized interval current difference C5 is expressed as follows:
[0097]
[0098]
[0099]
[0100]
[0101] in, , , This represents three consecutive points on the IV curve, forming a detection line. This indicates that on this detection line... The current at that point, Indicates in Detecting current on a straight line and the current on the IV curve deviation, This indicates the maximum value of the deviation. and minimum value The difference between them, k represents the threshold measured in the standardized threshold determination experiment, k=1.5.
[0102] Step S3: Generate the ECOC-SVM model based on the preprocessed data from step S2, such as... Figure 2 As shown, the specific steps include:
[0103] Solving for the classification hyperplane in a nonlinearly separable primordial sample space is equivalent to solving the following convex quadratic programming problem:
[0104]
[0105] in, The normal vector representing the direction of the hyperplane; This represents the offset between the hyperplane and the origin. This represents the fault feature vector to be classified; Indicates the type of fault to be classified; represents the slack variable used to relax constraints, allowing some data sample points to extend beyond the classification plane; C represents the non-negative penalty factor used to constrain... Ensure the accuracy of the classification;
[0106] The convex quadratic programming problem in the above equation can be solved by introducing the Lagrange function form, specifically expressed as:
[0107]
[0108] in, Indicates the first Lagrange multipliers corresponding to each training sample; Indicates the first Lagrange multipliers corresponding to each training sample; Indicates the first The feature vectors of each training sample Indicates the first The class labels of the training samples;
[0109] A kernel function is introduced to map the training samples in the original space to a high-dimensional space, thereby obtaining accurate fault classification results. RBF is selected as the kernel function for the string fault diagnosis SVM model, and its expression is as follows:
[0110]
[0111] in, This represents the adjustable RBF kernel width;
[0112] The final decision function for string composite fault diagnosis based on SVM is as follows:
[0113] .
[0114] Furthermore, such as Figure 3The diagram shows the ECOC-SVM fault diagnosis framework. This invention uses a support vector machine multi-class classification model based on error correction output code ECOC. The ECOC method decomposes the multi-class problem into multiple binary sub-problems and constructs an encoding matrix to achieve inter-class distinction, which can effectively improve the robustness and generalization performance of classification.
[0115] Since SVM is a typical binary classification algorithm, while the diagnosis of complex faults in photovoltaic strings is a multi-class classification problem, the multi-class classification problem of SVM needs to be solved before training the SVM model to achieve the identification of various fault types in photovoltaic strings. To achieve the identification of multiple fault types in photovoltaic strings, this invention employs an SVM multi-class classification method based on ECOC1-v-1 encoding to effectively classify different types of faults in photovoltaic strings. The specific encoding method is as follows: Figure 4 As shown, the white, black, and gray positions correspond to the symbols +1, -1, and 0, respectively; when there are n types of faults in the photovoltaic string, it is necessary to... Each SVM classifier can be trained independently, improving fault classification efficiency.
[0116] Furthermore, for each of the 28 photovoltaic fault scenarios, an SVM binary classifier needs to be built for every two scenarios, requiring a total of [number] classes to be constructed. The classifier; in the process of the first classifier; Class and the When classifying classes, the first element in the encoding matrix... line and number The elements of each row are set to +1 and -1 respectively, and the elements of the remaining rows are all 0. This results in a 28-row, 378-column encoding matrix, denoted as . ;
[0117] For the encoding matrix Each column in the matrix is transformed into a binary classification problem; the training samples for each SVM classifier are generated based on this encoding matrix. In the i-th column, the samples corresponding to +1 and -1 represent the two types of faults that need to be classified into two categories. We extract features from these samples using the feature extraction method presented in this paper to train the i-th SVM classifier, denoted as […]. Other samples encoded as 0 are ignored.
[0118] In this way, 378 SVM binary classifiers are trained sequentially using their corresponding training samples, ultimately resulting in an ensemble learning classifier. After the model is trained, the depthwise convolutional features of the test sample images are input into ECOC-SVM;
[0119] For a test sample X, the 378 SVM binary classifiers will independently output their decision results, constructing a vector matrix. .
[0120] Step S4: Fault diagnosis is performed using the multi-ECOC-SVM classification method, employing a decoding strategy based on a weighted loss function. The decoding strategy is as follows: Figure 4 As shown, its core idea is to calculate a weighted loss on the encoding vectors of different classes based on the output confidence of each binary classifier, that is, to calculate... With encoding matrix The weighted loss function is applied to each row, and the class with the minimum total loss is selected as the final classification result.
[0121] Example 2
[0122] Embodiment 2 of the present invention introduces a photovoltaic string fault diagnosis system based on an improved support vector machine.
[0123] like Figure 5 The photovoltaic string fault diagnosis system based on the improved support vector machine shown includes:
[0124] The module is configured to acquire IV data of faulty photovoltaic strings and extract feature information from the constructed voltage-current curves to complete feature extraction; and to construct the ECOC-SVM fault diagnosis framework.
[0125] The identification module inputs the feature information of the extracted voltage-current curves into the constructed module for fault diagnosis and outputs the classification results.
[0126] The detailed steps are the same as those of the photovoltaic string fault diagnosis method based on the improved support vector machine provided in Example 1, and will not be repeated here.
[0127] Example 3
[0128] Embodiment 3 of the present invention provides a computer-readable storage medium.
[0129] A computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps in the photovoltaic string fault diagnosis method based on an improved support vector machine as described in Embodiment 1 of the present invention.
[0130] The detailed steps are the same as those of the photovoltaic string fault diagnosis method based on the improved support vector machine provided in Example 1, and will not be repeated here.
[0131] Example 4
[0132] Embodiment 4 of the present invention provides an electronic device.
[0133] An electronic device includes a memory, a processor, and a program stored in the memory and running on the processor. When the processor executes the program, it implements the steps in the photovoltaic string fault diagnosis method based on an improved support vector machine as described in Embodiment 1 of the present invention.
[0134] The detailed steps are the same as those of the photovoltaic string fault diagnosis method based on the improved support vector machine provided in Example 1, and will not be repeated here.
[0135] Example 5
[0136] Embodiment 5 of the present invention provides a computer program product.
[0137] A computer program product includes software code, wherein the program in the software code performs the steps of the photovoltaic string fault diagnosis method based on the improved support vector machine as described in Embodiment 1 of the present invention.
[0138] The detailed steps are the same as those of the photovoltaic string fault diagnosis method based on the improved support vector machine provided in Example 1, and will not be repeated here.
[0139] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0140] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0141] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0142] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0143] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0144] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
[0145] The above description is merely a preferred embodiment of this practice and is not intended to limit the scope of this practice. Various modifications and variations can be made to this practice by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of this practice should be included within the protection scope of this practice.
Claims
1. A photovoltaic string fault diagnosis method based on an improved support vector machine, characterized in that, Includes the following steps: Step S1: Add labels based on actual fault results to obtain IV characteristic curve data of various strings under different operating conditions, forming the original fault sample set; Step S2: Extract fault characteristic data based on the IV curve of the photovoltaic string, and normalize all characteristic data; Step S3: Divide the feature data into training set and test set, use the fault feature vector of the training set as the input of the model, and use ECOC encoding to obtain the optimized SVM fault diagnosis model. Where ECOC stands for Error Correction Output Code; SVM stands for Support Vector Machine; Step S4: Use the test set data to perform fault diagnosis and determine the diagnosis result through a multi-classification algorithm.
2. The photovoltaic string fault diagnosis method based on improved support vector machine according to claim 1, characterized in that, The normalization of feature data in step S2 specifically involves: The formula for normalizing the IV curve of a photovoltaic string includes the short-circuit current ratio C1, the open-circuit voltage ratio C2, the series resistance ratio C3, the fill factor C4, and the difference between the first and last currents of the normalized interval C5. Its feature extraction method is as follows: The equation for calculating the short-circuit current ratio C1 is expressed as follows: Among them, short-circuit current Obtain directly from IV data. This represents the short-circuit current under standard operating conditions of the photovoltaic string. The equation for calculating the open-circuit voltage ratio C2 is expressed as follows: Among them, short-circuit current Obtain directly from IV data. This represents the open-circuit voltage of the photovoltaic string under normal operating standard conditions; The equation for calculating the series resistance ratio C3 is expressed as follows: in, Indicates series resistance. This represents the series resistance of a photovoltaic string under normal operating standard conditions; The formula for calculating the fill factor FF is expressed as follows: in, This indicates the maximum output power corresponding to the IV curve of the photovoltaic string; The equation for calculating the normalized interval current difference C5 is expressed as follows: in, , , This represents three consecutive points on the IV curve, forming a detection line. This indicates that on this detection line... The current at that point, Indicates in Detecting current on a straight line and the current on the IV curve deviation, This indicates the maximum value of the deviation. and minimum value The difference between them, k represents the threshold measured in the standardized threshold determination experiment, k=1.
5.
3. The photovoltaic string fault diagnosis method based on improved support vector machine according to claim 1, characterized in that, The ECOC-SVM fault diagnosis framework generated in step S3 is specifically as follows: The preprocessed data from step S2 is then used for model generation and cross-validation. Model generation specifically includes: Solving for the classification hyperplane in a nonlinearly separable primordial sample space is equivalent to solving the following convex quadratic programming problem: in, The normal vector representing the direction of the hyperplane; This represents the offset between the hyperplane and the origin. This represents the fault feature vector to be classified; Indicates the type of fault to be classified; represents the slack variable used to relax constraints, allowing some data sample points to extend beyond the classification plane; C represents the non-negative penalty factor used to constrain... Ensure the accuracy of the classification; The convex quadratic programming problem in the above equation can be solved by introducing the Lagrange function form, specifically expressed as: in, Indicates the first Lagrange multipliers corresponding to each training sample; Indicates the first Lagrange multipliers corresponding to each training sample; Indicates the first The feature vectors of each training sample Indicates the first The class labels of the training samples; A kernel function is introduced to map the training samples in the original space to a high-dimensional space, thereby obtaining accurate fault classification results. RBF is selected as the kernel function for the string fault diagnosis SVM model, and its expression is as follows: in, This represents the adjustable RBF kernel width; The final decision function for string composite fault diagnosis based on SVM is as follows: 。 4. The photovoltaic string fault diagnosis method based on improved support vector machine according to claim 1, characterized in that, The optimized SVM fault diagnosis model obtained in step S3 using ECOC encoding is specifically as follows: A multi-class classification model based on error correction output code (ECOC) is adopted. The ECOC method decomposes the multi-class problem into multiple binary sub-problems and constructs an encoding matrix to achieve inter-class distinction, thereby improving the robustness and generalization performance of classification. SVM is a typical binary classification algorithm. The diagnosis of composite faults in photovoltaic strings is a multi-classification problem. Before training the SVM model, an SVM multi-classification method based on ECOC1-v-1 encoding is used to effectively classify different types of faults in photovoltaic strings, solve the multi-classification problem of SVM, and realize the identification of multiple fault types in photovoltaic strings. When there are n types of faults in the photovoltaic string, it is necessary to Each SVM classifier is trained independently to improve fault classification efficiency.
5. The photovoltaic string fault diagnosis method based on improved support vector machine according to claim 4, characterized in that, The effective classification of different types of faults in photovoltaic strings specifically includes: In the 28 photovoltaic fault scenarios, an SVM binary classifier needs to be built for every two scenarios, totaling [number] classes to be constructed. One classifier; During the first Class and the When classifying classes, the first element in the encoding matrix... Line and number The elements of each row are set to +1 and -1 respectively, and the elements of the remaining rows are all 0; thus, a 28-row, 378-column encoding matrix is obtained, denoted as ; For the encoding matrix Each column in the matrix is transformed into a binary classification problem; the training samples for each SVM classifier are generated based on this encoding matrix. In the i-th column, the samples corresponding to +1 and -1 represent the two types of faults that need to be classified into two categories. Features are extracted from these samples using the feature extraction method presented in this paper to train the i-th column. There are n SVM classifiers, denoted as _n_SVM classifiers. Other samples encoded as 0 are ignored; In this way, 378 SVM binary classifiers are trained sequentially using their corresponding training samples, ultimately resulting in an ensemble learning classifier. After the model training is completed, the depth convolution features of the test sample images are input into ECOC-SVM; For a test sample X, the 378 SVM binary classifiers will independently output their decision results, constructing a vector matrix. .
6. The photovoltaic string fault diagnosis method based on improved support vector machine according to claim 1, characterized in that, The multi-classification algorithm in step S4 is as follows: For n types of fault labels, generate A binary classifier is used, employing a decoding strategy based on a weighted loss function. The weighted loss is calculated on the encoded vectors of different categories, and the category with the minimum total loss is selected as the final photovoltaic fault classification result.
7. A photovoltaic string fault diagnosis system based on an improved support vector machine, characterized in that, The system is applied to a photovoltaic string fault diagnosis method based on an improved support vector machine as described in any one of claims 1 to 6, and the system consists of a construction module and an identification module. The module is configured to acquire IV data of faulty photovoltaic strings and extract feature information from the constructed voltage-current curves to complete feature extraction; and to construct the ECOC-SVM fault diagnosis framework. The identification module inputs the feature information of the extracted voltage-current curves into the constructed module for fault diagnosis and outputs the classification results.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the photovoltaic string fault diagnosis method based on the improved support vector machine as described in any one of claims 1-7.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the program, it implements the steps of the photovoltaic string fault diagnosis method based on the improved support vector machine model as described in any one of claims 1-7.
10. A computer program product, comprising software code, characterized in that, The program in the software code performs the steps of the photovoltaic string fault diagnosis method based on the improved support vector machine model as described in any one of claims 1-7.