A photovoltaic module fault diagnosis method, electronic equipment and storage medium

CN122527892APending Publication Date: 2026-08-07ACREL CO LTD +2
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ACREL CO LTD
Filing Date
2026-03-30
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0009]本发明的目的就是为了克服上述现有技术存在的缺陷而提供一种光伏组件故障诊断方法、电子设备及存储介质,能够有效应对传统方法标注成本高、特征提取局限和类被不平衡等问题,诊断准确率提升,显著提升光伏预测性维护的效率与可靠性

Benefits of technology

1)本发明通过特征迁移方法将开源数据集和目标设备数据集映射到统一的归一化特征空间,实现跨设备应用,无需对目标设备数据进行人工标注,数据标注成本降低至零,解决了传统方法数据标注工作量大、应用成本高的问题;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122527892A_ABST
    Figure CN122527892A_ABST
Patent Text Reader

Abstract

The application relates to a photovoltaic module fault diagnosis method, an electronic device and a storage medium, the method comprising the following steps: mapping the operation data set and the target equipment data set to a unified normalized feature space through a feature migration method, wherein the feature migration method is based on normalization processing of electrical parameters and meteorological parameters based on standard test condition parameters; a classification model based on a gradient boosting decision tree LightGBM is constructed, a loss function for category imbalance is used to optimize the classification model, and an improved myxomycete algorithm ISMA is used to optimize parameters of the classification model, so that an ISMA-LightGBM model is obtained; the normalized features of the operation data set are used to train the ISMA-LightGBM model; and the normalized features of the target equipment data set are classified by using the trained ISMA-LightGBM model, and a fault type identification result is output. Compared with the prior art, the application has the advantages of improved diagnosis accuracy, significantly improved efficiency and reliability of photovoltaic predictive maintenance and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of photovoltaic power generation technology and artificial intelligence, and in particular to a method for diagnosing photovoltaic module faults, electronic equipment, and storage medium. Background Technology

[0002] As the core component of a photovoltaic power generation system, the operating status of photovoltaic modules directly affects the power generation efficiency and economic benefits of photovoltaic power plants. With the rapid development of the photovoltaic industry, photovoltaic module fault diagnosis technology has become an important part of predictive maintenance of photovoltaic systems. Accurate and timely diagnosis of photovoltaic module faults is of great significance for maintaining the long-term reliable power generation of photovoltaic systems.

[0003] Currently, photovoltaic module fault diagnosis technologies are mainly divided into two categories: one is a visual imaging method based on infrared thermal imaging and image data, and the other is a method based on electrical characteristic parameter analysis.

[0004] A search revealed Chinese patent publication CN114239481A, which discloses a photovoltaic array fault diagnosis method based on XGBoost. This method establishes an equivalent circuit model of the photovoltaic module, analyzes the influence of light intensity and temperature on the internal parameters of the photovoltaic module, obtains the current-voltage characteristic curve, constructs fault feature quantities, and establishes a photovoltaic array fault dataset for training a fault diagnosis model based on the XGBoost algorithm. However, this method requires establishing an independent training dataset for each target device, resulting in a large workload for data annotation and high application costs. Furthermore, when dealing with imbalanced data, this method pays insufficient attention to the minority of fault types, leading to low accuracy in identifying rare fault types.

[0005] Chinese Patent Publication No. CN114938202A discloses a method for diagnosing potential-induced degradation faults in photovoltaic modules. This method utilizes irradiance and temperature data acquired by a photovoltaic intelligent platform, calculates theoretical and measured voltage and current time series, filters and normalizes the data, calculates skewness coefficients, and obtains fault characteristic quantities. A BP neural network fault diagnosis model is then used to diagnose whether the photovoltaic module exhibits potential-induced degradation faults. However, this method only diagnoses a single fault type, limiting its diagnostic scope. Furthermore, updating the fault characterization data is time-consuming, resulting in poor real-time performance, and the delay hinders the timely detection of critical faults.

[0006] Chinese Patent Publication No. CN115208315A discloses a photovoltaic intelligent fault diagnosis method based on multiple fault feature values. This method obtains current-voltage data from the IV curve of the photovoltaic module by scanning it with a photovoltaic inverter. The data undergoes preprocessing and further processing to obtain five fault feature values: equivalent thermal voltage, IV curve inflection point factor, maximum power point factor, equivalent series resistance, and fill factor. These fault feature values ​​are then normalized before fault diagnosis. However, this method has a relatively fixed feature extraction method, and the features lack sufficient sensitivity to faults. When dealing with photovoltaic modules of different specifications, the feature extraction parameters need to be readjusted, resulting in poor versatility.

[0007] Furthermore, while visual imaging-based methods can intuitively display the surface condition of photovoltaic modules, their diagnostic accuracy is highly dependent on image quality. When images are affected by noise, occlusion, or blurring, the accuracy of the diagnostic results will be significantly reduced. At the same time, the high cost of image acquisition equipment and the requirement for professional operation limit the widespread application of this method.

[0008] Therefore, a new photovoltaic module fault diagnosis technology solution is needed that can reduce data annotation costs, improve cross-device adaptability, enhance the accuracy of rare fault type identification, and improve the real-time performance and reliability of fault diagnosis to meet the actual needs of predictive maintenance of photovoltaic systems. Summary of the Invention

[0009] The purpose of this invention is to overcome the shortcomings of the existing technology by providing a photovoltaic module fault diagnosis method, electronic device and storage medium, which can effectively address the problems of high annotation cost, limited feature extraction and class imbalance in traditional methods, improve diagnostic accuracy and significantly improve the efficiency and reliability of photovoltaic predictive maintenance.

[0010] The objective of this invention can be achieved through the following technical solutions: According to one aspect of the present invention, a method for diagnosing photovoltaic module faults is provided, the method comprising: The running dataset and the target device dataset are mapped to a unified normalized feature space through a feature transfer method, wherein the feature transfer method is to normalize electrical parameters and meteorological parameters based on standard test condition parameters. A classification model based on gradient boosting decision tree LightGBM is constructed, and the classification model is optimized using a loss function for class imbalance. At the same time, the parameters of the classification model are optimized using the improved slime mold algorithm ISMA, resulting in the ISMA-LightGBM model. The ISMA-LightGBM model is trained using the normalized features of the running dataset; The trained ISMA-LightGBM model is used to classify faults based on the normalized features of the target device dataset, and the fault type identification results are output.

[0011] As a preferred technical solution, the feature transfer method specifically includes: Obtain the open-circuit voltage of the photovoltaic module's electrical parameters. Short circuit current Optimal operating current Optimal operating voltage ISC temperature coefficient VOC temperature coefficient ; The normalized characteristics are calculated based on the electrical and meteorological parameters, and the normalized characteristics include: Normalized current Normalized voltage Normalized power Fill factor Multi-peak detection indicator Temperature compensation current Temperature compensation voltage Irradiance compensation power in and These are the operating current and operating voltage, respectively. Irradiance, For temperature, This is the maximum power.

[0012] As a preferred technical solution, the loss function for class imbalance is specifically as follows: in For cross-entropy loss, For hyperparameters, The predicted probability of the true class. One-hot encoding of the real label. For the first Predicted probability of class When the model has a high confidence level in the true class, the value tends to 0, and vice versa. Simultaneously, label smoothing technology is used to alleviate the class imbalance problem, expressed as follows: , in For smoothing coefficients, This represents the number of categories.

[0013] As a preferred technical solution, the improved slime mold algorithm ISMA achieves accurate fault diagnosis by optimizing the parameters of the LightGBM model, specifically including: The algorithm is improved by introducing a dynamic exploration factor. In the early stages of iteration, the original step size is maintained to promote global exploration, while in the later stages, the step size is halved to focus on fine-grained local search. The position update parameter expression is as follows: in To explore the decay factor, The convergence factor is This represents the current iteration number. This represents the maximum number of iterations.

[0014] As a preferred technical solution, the improved slime mold algorithm ISMA further includes dynamically allocating weights based on fitness values, with superior individuals receiving positive enhancement weights and inferior individuals receiving negative inhibition weights, and the weight calculation... The expression is: in , , For the first The fitness value of each individual For population size, It is a random number.

[0015] As a preferred technical solution, the improved slime mold algorithm ISMA further includes a Rebooting Mechanism (ROBL) based on reverse learning. When an individual's fitness has not improved for a long period, it is mapped to the central region of the search space for position reconstruction. The reconstruction formula is as follows: in For robustness control parameters, For random disturbance factors, To search for the geometric center of space, These are the upper and lower limits of the search space; The improved slime mold algorithm ISMA further includes dynamic mutation probability, maintaining a high mutation rate in the early stages to promote global exploration, and gradually reducing it in the later stages to focus on local development. The calculation formula is: in Basic mutation probability; The improved slime mold algorithm ISMA further includes a dynamic boundary shrinkage factor, which adaptively reduces the boundary treatment intensity as the iteration process progresses. The formula for calculating the dynamic shrinkage factor v is as follows: Where k is the boundary constraint constant; The improved slime mold algorithm ISMA further includes an elite retention strategy, which involves applying a small perturbation to the top-ranked elite individuals and then re-evaluating them. The perturbation formula is as follows: in is the perturbation coefficient, which is triggered once every 5 generations, and N(0,1) is a standard normal distribution random number.

[0016] As a preferred technical solution, this method uses accuracy, unweighted average recall (UAR), and Matthews correlation coefficient (MCC) as model evaluation metrics. , , , in For true listing, As a true counterexample, It is a false positive. This is a false counterexample. Fault category, For the first A true example of the class, For the first A false counterexample of the class, where the range of values ​​for MCC is: .

[0017] As a preferred technical solution, the parameters for optimizing the classification model include a learning rate of 0.3, a leaf node count of 63, and a loss weight coefficient of 0.1.

[0018] According to a second aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described thereon.

[0019] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.

[0020] Compared with the prior art, the present invention has the following advantages: 1) This invention maps open-source datasets and target device datasets to a unified normalized feature space through feature transfer, enabling cross-device applications without the need for manual annotation of target device data, reducing data annotation costs to zero and solving the problems of large workload and high application costs in traditional methods. 2) This invention adopts normalized feature engineering based on physical principles to construct 8 normalized features with clear physical meanings. The features are highly sensitive to faults, eliminate the equipment differences of photovoltaic modules of different specifications, and have strong versatility. 3) This invention uses multiple loss functions (PolyLoss) and label smoothing techniques to address the class imbalance problem, assigning higher weights to rare samples, which significantly improves the accuracy of identifying rare fault types and effectively solves the problem that traditional methods do not pay enough attention to the minority of fault types. 4) This invention uses the improved slime mold algorithm ISMA to optimize the classification model parameters. By introducing dynamic exploration factors, fitness weighting mechanisms, reverse learning-based restart mechanisms ROBL, dynamic mutation probabilities, dynamic boundary shrinkage factors, and elite retention strategies, it significantly enhances global search capabilities and convergence stability, avoids getting trapped in local optima, and achieves better model performance. 5) The method of this invention has a clear process, a high degree of automation, can effectively meet the fault diagnosis needs of various photovoltaic modules, has good real-time performance, strong engineering feasibility, and good practical value and promotion prospects. Attached Figure Description

[0021] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a flowchart of the feature transfer method of the present invention; Figure 3 This is a flowchart of the ISMA optimization algorithm of the present invention. Detailed Implementation

[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0023] The terms used in this embodiment are defined as follows: Normalized feature refers to the feature value after normalization relative to the standard test condition parameters; Class imbalance refers to the phenomenon that the number of samples of different fault categories in the training dataset varies greatly; Accuracy refers to the proportion of samples correctly classified by the model to the total number of samples; Unweighted average recall (UAR) refers to the arithmetic mean of the recall rates of each category; Matthews correlation coefficient (MCC) refers to the model performance evaluation index that comprehensively considers true positives, true negatives, false positives, and false negatives, and its value ranges from -1 to +1. The closer the value is to 1, the better the model performance.

[0024] The meanings of the labels in the attached diagram are as follows: Figure 1 This is a flowchart illustrating the photovoltaic module fault diagnosis method of the present invention, including steps S1 to S6; Figure 2 This is a flowchart illustrating the feature transfer method of the present invention, showing the complete process from obtaining the electrical parameters of the photovoltaic module to calculating the normalized features; Figure 3 This is a flowchart illustrating the improved slime mold algorithm ISMA of the present invention, showing the complete process of algorithm initialization, iterative optimization, and optimization strategy triggering.

[0025] Example 1 This embodiment provides a photovoltaic module fault diagnosis method based on feature transfer and multiple loss functions, such as... Figure 1 As shown, the method includes the following steps: Step S1: Obtain the labeled open-source dataset. The open-source dataset is tested under standard STC (irradiance 1000W / m²) conditions. 2 The dataset was collected under conditions of 25°C temperature and AM1.5 atmospheric quality, containing 1,373,798 samples covering 5 fault categories. The electrical parameters in the open-source dataset include operating voltage (V) and operating current (I), the meteorological parameters include irradiance (G) and temperature (T), and the fault labels include normal, short circuit, degradation, open circuit, and shade.

[0026] The sample distribution for each fault category in the open-source dataset is as follows: Normal category: 1,162,931 samples (84.7%), Short circuit category: 5,999 samples (0.4%), Degraded category: 10,371 samples (0.8%), Open circuit category: 6,024 samples (0.4%), and Shaded category: 188,473 samples (13.7%). The data distribution reveals a severe class imbalance in the open-source dataset. The Normal category accounts for 84.7%, while the three rare fault categories—Short circuit, Degraded, and Open circuit—account for only 0.4%, 0.8%, and 0.4% respectively, totaling 1.6%. This class imbalance leads to traditional machine learning models paying insufficient attention to rare fault types, resulting in low identification accuracy.

[0027] Step S2: Map the open-source dataset and the target device dataset to a unified normalized feature space using feature transfer methods. For example... Figure 2 As shown, the feature transfer method first obtains the electrical parameters of the photovoltaic module, including open-circuit voltage V_oc, short-circuit current I_sc, optimal operating current I_m, optimal operating voltage V_m, short-circuit current temperature coefficient α, and open-circuit voltage temperature coefficient β. These electrical parameters serve as the baseline parameters for normalized features, used to eliminate equipment differences between photovoltaic modules of different specifications.

[0028] Based on the electrical parameters (operating voltage V, operating current I) and meteorological parameters (irradiance G, temperature T) from the open-source dataset and the target device dataset, combined with the electrical parameters of the photovoltaic module, eight normalized features F1 to F8 are calculated. The formula for calculating the normalized features is as follows: Normalized current This reflects the ratio of the operating current to the short-circuit current, and its value ranges from 0 to 1. Normalized voltage This reflects the ratio of the operating voltage to the open-circuit voltage, and its value ranges from 0 to 1. Normalized power This reflects the ratio of operating power to maximum power, and its value ranges from 0 to 1. Fill factor This value reflects the power conversion efficiency of photovoltaic modules, ranging from 0 to 1. The closer the value is to 1, the higher the conversion efficiency. Multi-peak detection indicator This is used to detect whether there are multiple peaks in the IV curve. Multi-peak phenomenon is usually caused by local shadowing or component aging. Temperature compensation current To eliminate the influence of temperature on short-circuit current, α is the temperature coefficient of short-circuit current, with units of 1 / ℃; Temperature compensation voltage To eliminate the effect of temperature on open-circuit voltage, β is the temperature coefficient of open-circuit voltage, with units of 1 / ℃; Irradiance compensation power To eliminate the influence of irradiance on output power, P m G represents the maximum power, and G represents the irradiance, measured in W / m². 2 .

[0029] All eight normalized features have clear physical meanings, reflecting the operating status of photovoltaic modules from dimensions such as current, voltage, power, efficiency, multi-peak detection, temperature compensation, and irradiance compensation. Normalization eliminates equipment differences between photovoltaic modules of different specifications, allowing models trained on open-source datasets to be directly applied to target devices without requiring manual annotation of the target device data, thus reducing data annotation costs.

[0030] Step S3: Construct a classification model based on the gradient boosting decision tree LightGBM, and optimize the model using multiple loss functions (PolyLoss) and an improved slime mold algorithm (ISMA). The LightGBM model is an ensemble learning method based on gradient boosting decision trees (GBDT). It progressively adds weak learners (decision trees) through a forward distribution algorithm. The goal of each weak learner is to minimize the loss function, expressed as: Each weak learner It's a decision tree, added step-by-step using a forward distribution algorithm: The goal is to make the loss function minimize; The expression for the multiple loss function PolyLoss is as follows: ,in The cross-entropy loss is ε, where ε is a hyperparameter and p is a cross-entropy loss. t The predicted probability of the true class. Cross-entropy loss. The calculation formula is , where y c For the one-hot encoding of the real label, p c Let be the predicted probability for class c. The polynomial penalty term in PolyLoss. When the model has high confidence in the true class (p_t is close to 1), the penalty tends to 0, and when the confidence is low (p_t is close to 0), the penalty increases, thus giving higher weight to rare samples and alleviating the class imbalance problem.

[0031] Furthermore, label smoothing technology is employed to alleviate the category imbalance problem. The label smoothing formula is as follows: , where y is the true label, α is the smoothing coefficient, and C is the number of classes; label smoothing technology softens hard labels (0 or 1) into continuous values ​​between 0 and 1, avoiding overfitting of the model to the training data and improving the model's generalization ability. In this embodiment, the smoothing coefficient α is set to 0.1, and the number of classes C is 5.

[0032] like Figure 3 As shown, the improved slime mold algorithm ISMA is used to optimize the parameters of the LightGBM model, including the learning rate lr, the number of leaf nodes num_leaves, and the loss weight coefficient epsilon. The ISMA algorithm is an optimization algorithm that introduces multiple improvement strategies on the basis of the standard slime mold algorithm SMA, including dynamic exploration factor, fitness weighting mechanism, back-learning-based restart mechanism ROBL, dynamic mutation probability, dynamic boundary shrinkage factor, and elite retention strategy.

[0033] The execution flow of the ISMA algorithm is as follows: First, initialize the population, with a population size N set to 50. Each individual represents a set of model parameters (lr, num_leaves, epsilon), and the individual's position is randomly initialized within the parameter search space. The parameter search space is defined as follows: the learning rate lr ranges from 0.01 to 0.5, the number of leaf nodes num_leaves ranges from 10 to 100, and the loss weight coefficient epsilon ranges from 0.01 to 0.5. The maximum number of iterations T_max is set to 100.

[0034] In each iteration, the fitness value of each individual is first calculated, and the fitness value is defined as the accuracy of the model on the validation set. Then, the individuals are ranked according to their fitness values, with higher fitness values ​​indicating better model performance.

[0035] Dynamic exploration factor mechanism: in the early stage of iteration ( Maintaining the original step size promotes global exploration, especially in the later stages of iteration. The step size is halved to focus on a local fine-grained search. The formula for calculating the decay factor 'a' is as follows: The formula for calculating the convergence factor b is: , where t is the current iteration number, and the exploration decay factor a and convergence factor b both decrease as the iteration number increases, realizing the adaptive switching from global exploration to local development.

[0036] Fitness-weighted mechanism: Weights are dynamically allocated based on fitness values. Top-performing individuals (top 50%) receive positive enhancement weights, while bottom-performing individuals (bottom 50%) receive negative inhibition weights. The weight calculation formula is as follows: .

[0037] in The maximum fitness value in the population. This is the minimum fitness value in the population. Let be the fitness value of the i-th individual, and r be a random number between 0 and 1. The fitness weighting mechanism makes the search direction of excellent individuals have a stronger guiding effect on the population, thus accelerating convergence.

[0038] Rebooting mechanism based on reverse learning (ROBL): When individual fitness does not improve over a long period of time ( and Where γ is the threshold parameter (set to 0.7), the individual is mapped to the central region of the search space for location reconstruction. The location reconstruction formula is: Where δ is the robustness control parameter (set to 0.1), and r is a random disturbance factor that follows a normal distribution with a mean of 1 and a standard deviation of 0.5. To search for the geometric center of space, These are the upper and lower bounds of the search space, X. i Let be the position of the i-th individual. The ROBL mechanism utilizes a back-learning strategy to enhance the algorithm's ability to escape local optima.

[0039] Dynamic mutation probability: Maintain a high mutation rate in the early stages to promote global exploration, and gradually reduce it in the later stages to focus on local development. The calculation formula is in The base mutation probability is set to 0.3. When a random number r is generated, the mutation method is to randomly reinitialize the position within the search space. In the later stages of iteration ( The mutation method involves applying a small perturbation near the current optimal solution. The dynamic mutation probability mechanism achieves an adaptive balance between exploration and development capabilities.

[0040] Dynamic Boundary Contraction Factor: Traditional methods use hard boundary correction (individuals that exceed the boundary are directly pulled back to the boundary). This algorithm introduces a dynamic contraction factor. This allows the boundary treatment intensity to adaptively decrease during the iteration process. The boundary constraint constant k is set to 0.5. The boundary treatment formula is: in These are the boundary constraint constants. It is a random number. As a dynamic shrinkage factor, the dynamic boundary shrinkage factor maintains a strong exploratory ability in the early stage of iteration and effectively suppresses boundary oscillations in the later stage of iteration, thereby improving convergence stability.

[0041] Elite retention strategy: Re-evaluate the top-ranked elite individuals (top 10%) after applying a small perturbation, the perturbation formula is as follows: Where N(0,1) is a standard normally distributed random number. The elite preservation strategy is triggered once every 5 generations. This strategy both protects the diversity of high-quality genes and avoids premature convergence.

[0042] Through the above-mentioned multiple improvement strategies, the ISMA algorithm has significantly improved in terms of global search capability and convergence stability compared with the standard slime mold algorithm SMA.

[0043] Step S4: Train the ISMA-LightGBM model using normalized features from the open-source dataset. Divide the open-source dataset into training and validation sets in an 8:2 ratio. The training set contains 1,099,038 samples, and the validation set contains 274,760 samples. During training, the LightGBM model takes an 8-dimensional normalized feature vector (F1 to F8) as input and outputs predicted probabilities for five classes. The loss function is PolyLoss, and the loss weight coefficient epsilon is optimized using the ISMA algorithm. Gradient descent is used for model training, and the learning rate lr and the number of leaf nodes num_leaves are optimized using the ISMA algorithm. Training continues until the accuracy on the validation set no longer improves or the maximum number of iterations (set to 500 epochs) is reached.

[0044] A comparison of model parameters before and after ISMA algorithm optimization: Before optimization, the learning rate (lr) was 0.1, the number of leaf nodes (num_leaves) was 31, and the loss weight coefficient (epsilon) was 0.5; after ISMA optimization, the learning rate (lr) was 0.3, the number of leaf nodes (num_leaves) was 63, and the loss weight coefficient (epsilon) was 0.1. The ISMA algorithm improved the model's convergence speed by optimizing the learning rate from 0.1 to 0.3; enhanced the model's fitting ability by optimizing the number of leaf nodes from 31 to 63; and made the PolyLoss algorithm's focus on rare samples more reasonable by optimizing the loss weight coefficient from 0.5 to 0.1. The optimized parameter configuration achieved higher accuracy on the validation set.

[0045] Step S5: Use the trained ISMA-LightGBM model to classify faults using the normalized features of the target equipment dataset. The target equipment dataset contains electrical data (operating voltage V, operating current I) and meteorological data (irradiance G, temperature T) collected on-site by the target equipment, but does not contain fault labels. First, calculate the 8-dimensional normalized feature vector (F1 to F8) of the target equipment dataset according to the method in Step S2. Then, input the normalized features into the trained ISMA-LightGBM model. The model outputs the predicted probabilities of 5 categories, and the category with the highest probability is selected as the prediction result.

[0046] Accuracy, unweighted average recall (UAR), and Matthews correlation coefficient (MCC) were used as model evaluation metrics. The formula for calculating accuracy is as follows: Where TP represents true positives (the number of samples predicted as positive by the model and actually labeled as positive), TN represents true negatives (the number of samples predicted as negative by the model and actually labeled as negative), FP represents false positives (the number of samples predicted as positive by the model but actually labeled as negative), and FN represents false negatives (the number of samples predicted as negative by the model but actually labeled as positive). Accuracy reflects the proportion of samples correctly classified by the model out of the total number of samples.

[0047] The formula for calculating the unweighted average recall (UAR) is as follows: Where K is the number of fault categories (K=5), TP_k is the true positive of the k-th category, and FN_k is the false negative of the k-th category. The unweighted average recall rate is an arithmetic average of the recall rates of each category, which avoids the impact of class imbalance on the evaluation results and can more objectively reflect the model's ability to identify each category.

[0048] The formula for calculating the Matthews correlation coefficient (MCC) is as follows: MCC comprehensively considers four metrics: true positives, true negatives, false positives, and false negatives, with values ​​ranging from -1 to +1. A value closer to 1 indicates better model performance, a value closer to -1 indicates worse model performance, and a value of 0 indicates that the model's prediction is indistinguishable from random guessing. MCC is suitable for evaluating models on imbalanced datasets.

[0049] The ISMA-LightGBM model achieved the following evaluation metrics on the validation set: Accuracy of 0.946, Unweighted Average Recall (UAR) of 0.823, and Matthews Correlation Coefficient (MCC) of 0.871. The accuracy of 94.6% indicates that the model correctly classified 94.6% of the total samples. The unweighted average recall of 82.3% demonstrates the model's high recognition ability across all classes (including rare fault classes), effectively addressing the class imbalance problem. The Matthews Correlation Coefficient of 0.871 (close to 1) indicates a high degree of consistency between the model's predictions and the true labels, demonstrating excellent model performance.

[0050] Step S6: Output the fault diagnosis results for the target device. The fault diagnosis results include the predicted fault category (normal, short circuit, degradation, open circuit, shadow) and the corresponding prediction probability. The prediction probability reflects the model's confidence in the prediction results; a higher probability indicates a higher confidence level.

[0051] This embodiment maps the open-source dataset and the target device dataset to a unified normalized feature space using a feature transfer method, enabling cross-device application without requiring manual annotation of the target device data, reducing data annotation costs to zero. By employing multiple loss functions (PolyLoss) and label smoothing techniques to address class imbalance, and assigning higher weights to rare samples, the accuracy of rare fault type identification is significantly improved. Furthermore, by using an improved ISMA algorithm to optimize model parameters, the global search capability and convergence stability are significantly enhanced, avoiding getting trapped in local optima.

[0052] This embodiment can also be implemented as a system. The photovoltaic module fault diagnosis system includes a data acquisition unit, a feature transfer unit, a model training unit, a fault identification unit, a model optimization unit, and an evaluation unit. The data acquisition unit is used to acquire photovoltaic module operating data, including electrical parameters (operating voltage V, operating current I) and meteorological parameters (irradiance G, temperature T). The feature transfer unit is used to map the operating data to a normalized feature space, normalize the electrical and meteorological parameters based on standard test condition parameters, and calculate eight normalized features F1 to F8. The model training unit is used to train a classification model based on the normalized features. The classification model adopts the LightGBM model based on gradient boosting decision trees, and the loss function adopts PolyLoss for class imbalance, assigning higher weights to rare samples. The fault identification unit is used to classify the target device using the trained classification model and output the fault type identification result. The model optimization unit is used to optimize the parameters of the classification model (learning rate lr, number of leaf nodes num_leaves, loss weight coefficient epsilon) using the improved ISMA algorithm, and enhances the global search capability by dynamically adjusting the search strategy. The evaluation unit is used to calculate model evaluation metrics, including accuracy, unweighted average recall (UAR), and Matthews correlation coefficient (MCC).

[0053] Comparative Example 1 Comparative Example 1 employs traditional photovoltaic module fault diagnosis methods, without feature transfer, PolyLoss loss function, label smoothing techniques, or the improved ISMA algorithm to optimize model parameters. Traditional methods directly use the raw electrical and meteorological data of the target equipment as model input, requiring manual annotation of the target equipment data to obtain fault labels. The labeled target equipment data is then used to train the LightGBM model. Model training uses the standard cross-entropy loss function without weighting rare samples. Model parameters (learning rate lr, number of leaf nodes num_leaves) use default values ​​and are not optimized.

[0054] Performance comparison between the method of this invention (Example 1) and the traditional method (Comparative Example 1): Regarding data annotation requirements, the traditional method requires extensive manual annotation of target device data, while the method of this invention eliminates the need for such annotation, reducing data annotation costs to zero. Regarding cross-device adaptability, the traditional method requires retraining the model for each target device, while the method of this invention achieves cross-device application through feature transfer, significantly improving versatility. Regarding rare fault identification accuracy, the traditional method has low accuracy in identifying rare fault types such as short circuits, degradation, and open circuits (due to class imbalance), while the method of this invention significantly improves the accuracy of rare fault type identification by weighting rare samples using multiple loss functions. Regarding model convergence stability, the traditional method is prone to getting trapped in local optima (due to unoptimized parameters), while the method of this invention optimizes parameters using the ISMA algorithm, significantly improving convergence stability.

[0055] In summary, this invention effectively solves the problems of high data annotation costs, poor cross-device adaptability, large limitations in feature extraction, low rare fault identification rate due to class imbalance, and insufficient model parameter optimization in traditional photovoltaic module fault diagnosis methods by combining feature transfer methods, multiple loss functions, and improved slime mold algorithm. It significantly improves the accuracy and robustness of photovoltaic module fault diagnosis and has good engineering practical value and promotion prospects.

[0056] Furthermore, embodiments of the present invention also provide an electronic device including a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) or loaded from a storage unit into a random access memory (RAM). The RAM may also store various programs and data required for device operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0057] Multiple components in the device are connected to the I / O interface, including: input units such as keyboards and mice; output units such as various types of displays and speakers; storage units such as disks and optical discs; and communication units such as network interface cards (NICs), modems, and wireless transceivers. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0058] The processing unit executes the various methods and processes described above, such as methods S1 to S6. For example, in some embodiments, methods S1 to S6 may be implemented as computer software programs tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of methods S1 to S6 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute methods S1 to S6 by any other suitable means (e.g., by means of firmware).

[0059] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0060] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0061] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0062] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for diagnosing photovoltaic module faults, characterized in that, The method includes: The running dataset and the target device dataset are mapped to a unified normalized feature space through a feature transfer method, wherein the feature transfer method is to normalize electrical parameters and meteorological parameters based on standard test condition parameters. A classification model based on gradient boosting decision tree LightGBM is constructed, and the classification model is optimized using a loss function for class imbalance. At the same time, the parameters of the classification model are optimized using the improved slime mold algorithm ISMA, resulting in the ISMA-LightGBM model. The ISMA-LightGBM model is trained using the normalized features of the running dataset; The trained ISMA-LightGBM model is used to classify faults based on the normalized features of the target device dataset, and the fault type identification results are output.

2. The photovoltaic module fault diagnosis method according to claim 1, characterized in that, The feature transfer method specifically includes: Obtain the open-circuit voltage of the photovoltaic module's electrical parameters. Short circuit current Optimal operating current Optimal operating voltage ISC temperature coefficient VOC temperature coefficient ; The normalized characteristics are calculated based on the electrical and meteorological parameters, and the normalized characteristics include: Normalized current Normalized voltage Normalized power Fill factor Multi-peak detection indicator Temperature compensation current Temperature compensation voltage Irradiance compensation power in and These are the operating current and operating voltage, respectively. Irradiance, For temperature, This is the maximum power.

3. The photovoltaic module fault diagnosis method according to claim 1, characterized in that, The loss function for class imbalance is as follows: in For cross-entropy loss, For hyperparameters, The predicted probability of the true class. One-hot encoding of the real label. For the first Predicted probability of class When the model has a high confidence level in the true class, the value tends to 0, and vice versa. Simultaneously, label smoothing technology is used to alleviate the class imbalance problem, expressed as follows: , in For smoothing coefficients, This represents the number of categories.

4. The photovoltaic module fault diagnosis method according to claim 1, characterized in that, The improved slime mold algorithm ISMA achieves accurate fault diagnosis by optimizing the parameters of the LightGBM model, specifically including: The algorithm is improved by introducing a dynamic exploration factor. In the early stages of iteration, the original step size is maintained to promote global exploration, while in the later stages, the step size is halved to focus on fine-grained local search. The position update parameter expression is as follows: in To explore the decay factor, The convergence factor is This represents the current iteration number. This represents the maximum number of iterations.

5. A photovoltaic module fault diagnosis method according to claim 4, characterized in that, The improved slime mold algorithm ISMA further includes dynamically allocating weights based on fitness values, with superior individuals receiving positive enhancement weights and weaker individuals receiving negative inhibition weights. The weight calculation... The expression is: in , , For the first The fitness value of each individual For population size, It is a random number.

6. The photovoltaic module fault diagnosis method according to claim 5, characterized in that, The improved slime mold algorithm ISMA further includes a Rebooting mechanism (ROBL) based on reverse learning. When an individual's fitness has not improved for a long time, it is mapped to the central region of the search space for position reconstruction. The reconstruction formula is as follows: in For robustness control parameters, For random disturbance factors, To search for the geometric center of space, These are the upper and lower limits of the search space; The improved slime mold algorithm ISMA further includes dynamic mutation probability, maintaining a high mutation rate in the early stages to promote global exploration, and gradually reducing it in the later stages to focus on local development. The calculation formula is: in Basic mutation probability; The improved slime mold algorithm ISMA further includes a dynamic boundary shrinkage factor, which adaptively reduces the boundary treatment intensity as the iteration process progresses. The formula for calculating the dynamic shrinkage factor v is as follows: Where k is the boundary constraint constant; The improved slime mold algorithm ISMA further includes an elite retention strategy, which involves applying a small perturbation to the top-ranked elite individuals and then re-evaluating them. The perturbation formula is as follows: in is the perturbation coefficient, which is triggered once every 5 generations, and N(0,1) is a standard normal distribution random number.

7. The photovoltaic module fault diagnosis method according to claim 1, characterized in that, This method uses accuracy, unweighted average recall (UAR), and Matthews correlation coefficient (MCC) as model evaluation metrics. , , , in For true listing, As a true counterexample, It is a false positive. This is a false counterexample. Fault category, For the first A true example of the class, For the first A false counterexample of the class, where the value range of MCC is... .

8. The photovoltaic module fault diagnosis method according to claim 1, characterized in that, The parameters for optimizing the classification model include a learning rate of 0.3, a leaf node count of 63, and a loss weight coefficient of 0.

1.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 8.

10. 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 method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Photovoltaic array fault diagnosis method based on XGBoost

    CN114239481A

  • A method for diagnosing potential-induced degradation faults in photovoltaic modules

    CN114938202A

  • Photovoltaic intelligent fault diagnosis method based on multiple fault characteristic values

    CN115208315A