Photovoltaic string shielding detection method, device and equipment and readable storage medium

By constructing a feature matrix of historical power data of photovoltaic strings, and using kernel density estimation and dynamic time warping clustering function to determine shading, the problem of insufficient power generation efficiency and versatility of existing photovoltaic string shading detection methods is solved, and efficient detection with zero power generation loss is achieved.

CN121786331APending Publication Date: 2026-04-03GOODWE TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing methods for detecting shading in photovoltaic strings affect power generation efficiency and lack universality. Traditional machine learning methods require massive amounts of training data and are prone to misclassification. Physical modeling methods have parameters that are not universally applicable in complex environments.

Method used

By acquiring historical power data of photovoltaic strings, a feature matrix is ​​constructed after preprocessing. The state values ​​of sampling points are determined using kernel density estimation function and dynamic time warping clustering function, and shading is determined by differential calculation.

Benefits of technology

It improves the accuracy and versatility of shading detection without affecting power generation efficiency, avoids the need for massive data annotation and model training, and adapts to data changes at different sites.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121786331A_ABST
    Figure CN121786331A_ABST
Patent Text Reader

Abstract

The invention discloses a photovoltaic string shielding detection method, device and equipment and a readable storage medium, and is applied to the field of photovoltaic power generation, and the method comprises the steps: obtaining the power data of a to-be-detected string in a preset historical time period, and carrying out the preprocessing of the power data, and obtaining the processed power data; aggregating the processed power data to form a feature matrix; based on the feature matrix, determining a state value of each sampling point by using a kernel density estimation function and a dynamic time warping clustering function; and performing differential calculation on the state value of each sampling point, and determining whether the to-be-detected string is shielded or not based on a data result after differential calculation. According to the method, diagnosis can be carried out while deployment is carried out, and data labeling, training and verification do not need to be carried out in advance; power data modeling in a past historical time period is obtained for shielding judgment, and zero power generation loss is achieved; global parameters can be adaptively adjusted based on historical generated power data, extra manual setting of hyper-parameters is not needed, and the method can adapt to data of different strings of different stations.
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, and in particular to a method, apparatus, equipment, and readable storage medium for detecting shading of photovoltaic strings. Background Technology

[0002] Currently, photovoltaic (PV) string shading detection methods generally fall into two categories: those based on traditional machine learning and those based on PV string physical modeling. Traditional machine learning methods require suitable algorithms and massive amounts of training data, and in multi-classification tasks, they are prone to misclassification due to the failure to capture subtle differences in global features, making them difficult to implement and ensuring accuracy. Physical modeling methods are accurate in standard environments, but the complexity of real-world environments leads to non-universal parameters, limiting their practical applications. Furthermore, the aforementioned active-triggered shading detection methods require IV (current-voltage scan) scanning of the PV string, which inevitably impacts power generation efficiency.

[0003] Therefore, how to improve the accuracy and versatility of photovoltaic string shading detection without affecting the power generation efficiency of photovoltaic strings is a technical problem that urgently needs to be solved. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a photovoltaic string shading detection method, apparatus, device and readable storage medium, which solves the problems of existing photovoltaic string shading detection methods affecting power generation efficiency and lacking universality and accuracy.

[0005] To solve the above-mentioned technical problems, the present invention provides a method for detecting shading of photovoltaic strings, comprising:

[0006] The power data of the string to be detected within a preset historical time period is obtained, and the power data is preprocessed to obtain the processed power data.

[0007] The processed power data are aggregated to form a feature matrix; the feature matrix contains the processed power data corresponding to each sampling point of the target string every day.

[0008] Based on the feature matrix, the state value of each sampling point is determined using the kernel density estimation function and the dynamic time warping clustering function.

[0009] The state values ​​of each sampling point are differentially calculated, and the presence or absence of occlusion in the target string is determined based on the data results after differential calculation.

[0010] Optionally, power data of the string to be detected within a preset historical time period is obtained, and the power data is preprocessed to obtain processed power data, including:

[0011] Obtain the full-day power data of the string to be detected within a preset historical time period; the preset historical time period is in months.

[0012] Based on the power filtering principle of from zero to one and from one to zero, the power data for the whole day is filtered to obtain the effective power data for the whole day.

[0013] The effective power data for the whole day is sampled by linear interpolation to obtain sampling point data. The sampling point data is reconstructed by wavelet and the reconstructed data is then filtered by median to obtain the effective power data for the whole day after median filtering.

[0014] The median-filtered all-day effective power data is normalized to obtain the processed power data.

[0015] Optionally, based on the feature matrix, the state value of each sampling point is determined using a kernel density estimation function and a dynamic time warping clustering function, including:

[0016] Based on the feature matrix, the kernel density estimation function is used to determine the first temporal state value of each sampling point of the target string within the preset historical time period; the feature matrix is ​​an N×K dimensional matrix; N represents the total number of days; K represents the total number of sampling points;

[0017] Based on the feature matrix, the second temporal state value of each sampling point of the string to be detected within the preset historical time period is determined using the dynamic time warping clustering function.

[0018] The state value of each sampling point is calculated by using a weighted summation method based on the first time-series state value and the second time-series state value.

[0019] Optionally, based on the feature matrix, the kernel density estimation function is used to determine the first temporal state value of each sampling point of the string to be detected within the preset historical time period, including:

[0020] Based on the feature matrix, the kernel density estimation function is used to calculate... The kernel density estimate; the kernel density estimation function formula includes:

[0021] = ;

[0022] , ;

[0023] ;

[0024] in, This represents the processed power data of the k-th sampling point; All are intermediate quantities; The standard deviation is the sample standard deviation. express The kernel density estimate;

[0025] The first temporal state value of each sampling point of the string to be detected within the preset historical time period is determined based on the kernel density estimate.

[0026] Optionally, determining the first temporal state value of each sampling point of the string to be detected within the preset historical time period based on the kernel density estimate includes:

[0027] The maximum and minimum values ​​are selected from the processed power data at the k-th sampling point to obtain the data range.

[0028] The processed power data corresponding to the maximum kernel density estimate within the data range is used as the first time-series state value of the kth sampling point.

[0029] Optionally, based on the feature matrix, the second temporal state value of each sampling point of the string to be detected within the preset historical time period is determined using the dynamic time warping clustering function, including:

[0030] The data in the feature matrix are transformed into time series to obtain various time series.

[0031] For any two of the time series, a local distance matrix is ​​constructed using the square of the Euclidean distance as the local distance for a single sampling point;

[0032] Based on the local distance matrix, a cumulative distance matrix is ​​calculated according to a preset rule, and a dynamic time rule distance is calculated based on the cumulative distance matrix.

[0033] A preset number of initial cluster centers are randomly selected, and the clustering objective is to minimize the sum of the dynamic time rule distances from all samples to their corresponding cluster centers; the samples are the processed power data corresponding to the sampling points.

[0034] Based on the clustering objective and the initial cluster centers, iteratively repeat the cluster assignment and cluster center update steps until convergence;

[0035] The number of samples contained in each cluster is counted, and the cluster with the largest number of samples is selected as the master cluster. The centroid of the master cluster is used as the second time-series state value of each sampling point.

[0036] Optionally, differential calculation is performed on the state values ​​of each sampling point, and the presence or absence of occlusion in the target string is determined based on the data results after differential calculation, including:

[0037] The state values ​​of each sampling point are calculated using first-order difference. The interquartile range is used to determine whether there are outliers in the data after first-order difference that deviate from the boundary.

[0038] If it exists, it is determined that the string to be detected is obstructed within the preset historical segment;

[0039] If not, it is determined that the string to be detected is not obstructed within the preset historical time period.

[0040] The present invention also provides a photovoltaic string shading device, comprising:

[0041] The data acquisition module is used to acquire the power data of the string to be detected within a preset historical time period, and to preprocess the power data to obtain processed power data.

[0042] An aggregation module is used to aggregate the processed power data to form a feature matrix; the feature matrix contains the processed power data corresponding to each sampling point of the target string every day.

[0043] The state value determination module is used to determine the state value of each sampling point based on the feature matrix, using the kernel density estimation function and the dynamic time warping clustering function.

[0044] The occlusion detection module is used to perform differential calculation on the state values ​​of each sampling point, and determine whether the string to be detected is occluded based on the data results after differential calculation.

[0045] The present invention also provides a photovoltaic string shading device, comprising:

[0046] Memory, used to store computer programs;

[0047] A processor is used to implement the photovoltaic string shading detection method as described above when executing the computer program.

[0048] The present invention also provides a computer-readable storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the photovoltaic string shading detection method described above.

[0049] As can be seen, this invention obtains power data of the target photovoltaic string within a preset historical time period, preprocesses the power data to obtain processed power data, aggregates the processed power data to form a feature matrix, and includes processed power data corresponding to each sampling point of the target string each day. Based on the feature matrix, the state value of each sampling point is determined using a kernel density estimation function and a dynamic time warping clustering function. The state values ​​of each sampling point are differentially calculated, and the presence of shading in the target string is determined based on the results of the differential calculation. Common active-triggered photovoltaic string shading detection methods often require massive amounts of pre-labeled data, training, and validation. This method, however, can be deployed and diagnosed immediately without the need for pre-labeled data, training, and validation. Furthermore, active-triggered photovoltaic string shading detection methods require obtaining IV scan data of the string, which can affect power generation efficiency during diagnosis. This method, however, is a zero-power-loss method, which uses power data from past historical time periods for modeling and judgment. Furthermore, most active triggering photovoltaic string shading detection methods are based on machine learning algorithms. After training and parameter tuning, these methods often cannot adapt to data from other power plants. In contrast, this method can adaptively adjust global parameters based on historical power generation data, without the need for manual hyperparameter setting, and can adapt to data from different power plants and different strings.

[0050] In addition, the present invention also provides a photovoltaic string shading detection device, equipment and readable storage medium, which also have the above-mentioned beneficial effects. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0052] Figure 1 A flowchart of a photovoltaic string shading detection method provided in an embodiment of the present invention;

[0053] Figure 2 A flowchart illustrating a preprocessing method provided in an embodiment of the present invention;

[0054] Figure 3 A flowchart illustrating an occlusion detection method provided in an embodiment of the present invention;

[0055] Figure 4 An example diagram illustrating the visualization result of a feature matrix provided in an embodiment of the present invention;

[0056] Figure 5An example visualization of a detection result provided in an embodiment of the present invention;

[0057] Figure 6 This is a schematic diagram of the structure of a photovoltaic string shading detection device provided in an embodiment of the present invention;

[0058] Figure 7 This is a schematic diagram of a photovoltaic string shading detection device provided in an embodiment of the present invention. Detailed Implementation

[0059] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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 embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0060] With the development of new energy sources in recent years, large-scale photovoltaic (PV) power plants have been rapidly expanded. The optimization of PV power plant power generation efficiency has received continuous attention. Timely diagnosis of shading in PV strings and arrays plays a crucial role in optimizing PV power plant power generation efficiency. However, because PV arrays and power plants are installed and operate in harsh outdoor environments, and there may be long-term shading of PV strings by trees, weeds, and other foreign objects, this significantly affects the electrical characteristics of the PV array, thereby impacting the power generation efficiency of the PV power plant. Currently, most PV shading detection methods are active-triggered shading diagnosis methods, one based on traditional machine learning and the other on PV string physical modeling. Traditional machine learning methods not only require selecting appropriate machine learning algorithms and acquiring massive amounts of training data, but the models often misclassify in multi-class detection tasks because they fail to learn the subtle differences in the global features of the dataset, thus creating a significant bottleneck for algorithm implementation. Fault classification methods based on PV string physical modeling often achieve relatively accurate results in standard environments, but real-world environments are complex and variable. These physical modeling parameters are easily affected by different environments, often resulting in parameters adjusted for one power plant becoming unsuitable for another. Meanwhile, actively triggered shading detection requires IV scanning of the photovoltaic strings, as it inevitably affects power generation efficiency.

[0061] Therefore, to avoid the impact of photovoltaic string shading detection on the power generation of photovoltaic power plants, this invention provides a photovoltaic string shading detection method with zero power generation loss. Compared with traditional active-triggered photovoltaic string shading detection methods, this method not only has the advantage of zero power generation loss (i.e., it will not affect the power generation of the power plant during the diagnosis process), but also does not require massive amounts of data for pre-training and verification. Furthermore, it can alert maintenance personnel to potential long-term shading from trees, weeds, and other fixed objects, thereby improving the power generation efficiency of the photovoltaic power plant.

[0062] Please refer to the details. Figure 1 , Figure 1 A flowchart illustrating a photovoltaic string shading detection method provided in an embodiment of the present invention. The method may include:

[0063] S101: Obtain the power data of the string to be detected within a preset historical time period, preprocess the power data, and obtain the processed power data.

[0064] The execution subject in this embodiment is a terminal. This embodiment does not limit the type of terminal, as long as it can perform the operation of the photovoltaic string shading detection method. This embodiment does not limit the historical time period. The string to be detected in this embodiment is the string of inverters, and its number can be one or more. For example, in an actual photovoltaic power station, three months of historical inverter operating power data are obtained. That is, assuming the photovoltaic power station has 5 inverters, each inverter has 18 strings, and each month is calculated as 30 days, a total of 8100 power data points are obtained. This embodiment does not specifically limit the preprocessing; for example, it can be normalization processing; or it can be noise reduction processing.

[0065] Furthermore, the aforementioned acquisition of power data of the target string within a preset historical time period, and preprocessing of the power data to obtain processed power data, may include: acquiring the full-day power data of the target string within the preset historical time period; the preset historical time period is in months; filtering the full-day power data based on the power selection principles of starting from zero and ending with zero to obtain full-day effective power data; performing linear interpolation sampling on the full-day effective power data to obtain sampling point data; performing wavelet reconstruction on the sampling point data; and performing median filtering on the wavelet-reconstructed data to obtain median-filtered full-day effective power data; and normalizing the median-filtered full-day effective power data to obtain processed power data.

[0066] For a better understanding of this section, please refer to [link / reference]. Figure 2 . Figure 2This is a flowchart illustrating a preprocessing method provided in an embodiment of the present invention. First, time-series power data is acquired from the DC side of the photovoltaic diagnostic platform. All-day power data is selected, with a sampling period of 15 minutes per sampling. Effective power data (power greater than zero) is filtered based on a principle of starting from zero and then reverting to zero. The effective power data is then linearly interpolated to obtain K (e.g., 600) sampling points. Next, wavelet reconstruction is performed on the sampled data to filter out abnormal signals. Then, median filtering is applied to the reconstructed wavelet data to filter out transition points, resulting in median-filtered effective power data for the entire day. Furthermore, to reduce the impact of differences in power distribution among different strings on subsequent diagnostics, the maximum power point for each string of each inverter over a historical time period (e.g., three months) is recorded. Then, all median-filtered effective power data for the entire day is divided by its corresponding maximum power point, normalizing all power data to the range [0, 1] to obtain the final processed power data.

[0067] S102: Aggregate the processed power data to form a feature matrix; the feature matrix contains the processed power data corresponding to each sampling point of the string to be detected each day.

[0068] In this embodiment, the processed power data of each target string over a historical time period are aggregated to form a feature matrix. That is, assuming that the dimension of the processed power data of the i-th target string for each day is [1, K], its processed power data is denoted as... , So the first The dimension of the feature matrix of each string to be detected is , recorded as The formula expression is:

[0069] .

[0070] For example, the original assumption is that the photovoltaic power station has 5 inverters, each with 18 strings, thus forming a 90-dimensional [N, K] feature matrix. The visualization results are as follows... Figure 4 As shown, Figure 4 This is an example diagram illustrating the visualization result of a feature matrix provided in an embodiment of the present invention. For the first... For the feature matrix of a string to be detected, there are K sampling points per day (e.g., 600), and each sampling point has 90 (representing the total number of strings to be detected) processed power data.

[0071] S103: Based on the feature matrix, the state value of each sampling point is determined using the kernel density estimation function and the dynamic time warping clustering function.

[0072] This embodiment leverages the advantages of kernel density estimation to accurately obtain the most likely state for each sampling point, and the advantages of dynamic time warping clustering to reduce the disturbance caused by time sampling errors to the state values ​​of each sampling point, thereby achieving a smoothing effect on the state values. For example, kernel density estimation and dynamic time warping-kmeans clustering weighted estimation are performed on the state values ​​of each sampling point. Finally, the i-th string to be detected forms a [1, K]-dimensional diagnostic matrix, the significance of which lies in the fact that the state value of each sampling point in this string represents an inherent pattern in the historical time period. The power station has a total of 90 strings to be detected, ultimately forming 90 [1, K]-dimensional diagnostic matrices, each composed of state values.

[0073] Furthermore, the above-mentioned determination of the state value of each sampling point based on the feature matrix, using the kernel density estimation function and the dynamic time warping clustering function, may include: determining the first temporal state value of each sampling point of the string to be detected within a preset historical time period based on the feature matrix and using the kernel density estimation function; the feature matrix is ​​an N×K dimensional matrix; N represents the total number of days; K represents the total number of sampling points; determining the second temporal state value of each sampling point of the string to be detected within a preset historical time period based on the feature matrix and using the dynamic time warping clustering function; and calculating the state value of each sampling point using a weighted summation method based on the first and second temporal state values.

[0074] In this embodiment, the kernel density estimation function is used to infer the distribution pattern of the overall data through the local features of the samples, thereby selecting the most likely target value. Furthermore, it combines Dynamic Time Warping (DTW) distance and clustering algorithms (such as K-means) to address the problems of inconsistent time series lengths or rhythm shifts, achieving grouping of similar time series patterns and extraction of core features. Finally, the state values ​​obtained from both methods are comprehensively analyzed to determine the temporal state value of each sampling point. Then, the temporal state values ​​from the kernel density estimation function and the DTW-K-means clustering function are weighted. For example, the weight of the kernel density estimation function is 0.6, and the weight of the DTW-K-means clustering function is 0.4, ultimately yielding the state value of each sampling point.

[0075] Furthermore, the above-mentioned determination of the first temporal state value of each sampling point of the string to be detected within the preset historical time period based on the feature matrix and using the kernel density estimation function may include: calculating the kernel density estimation function based on the feature matrix. The kernel density estimate; the kernel density estimation function formula includes:

[0076] = ;

[0077] , ;

[0078] ;

[0079] in, This represents the processed power data of the k-th sampling point; in the formula... All are intermediate quantities; The standard deviation is the sample standard deviation. express The kernel density estimate;

[0080] The first temporal state value of each sampling point in the target string within a preset historical time period is determined based on the kernel density estimate.

[0081] For example, assume that the processed power data of the kth sampling point is The processed power data of the kth sampling point. By inserting it into the kernel density estimation function, the following calculation is obtained. kernel density estimate Therefore, based on the kernel density estimate, the first temporal state value of each sampling point of the string to be detected within the preset historical time period is determined.

[0082] Furthermore, the above-mentioned determination of the first temporal state value of each sampling point of the string to be detected within the preset historical time period based on the kernel density estimate may include: selecting the maximum and minimum values ​​in the processed power data of the k-th sampling point to obtain the data range; and taking the processed power data corresponding to the maximum kernel density estimate within the data range as the first temporal state value of the k-th sampling point.

[0083] In this embodiment, the maximum and minimum values ​​are selected from the processed power data at the k-th sampling point. Within this data range, a preset number (e.g., 100) of equally spaced points are generated. Within this data range, the maximum value of the kernel density estimate is found, which is taken as the most likely state value of the k-th sampling point. By traversing the k sampling points, the most likely temporal state value of the string to be detected within the preset historical time period calculated by the kernel density estimation function can be obtained, which is the first temporal state value.

[0084] Furthermore, the above-mentioned determination of the second temporal state value of each sampling point of the target string within a preset historical time period using a dynamic time warping clustering function based on the feature matrix may include: performing time series transformation on each data in the feature matrix to obtain each time series; constructing a local distance matrix for any two time series, using the square of the Euclidean distance as the local distance of a single sampling point; calculating a cumulative distance matrix based on the local distance matrix according to preset rules, and calculating a dynamic time rule distance based on the cumulative distance matrix; randomly selecting a preset number of initial cluster centers, with the clustering objective being to minimize the sum of the dynamic time rule distances from all samples to the corresponding cluster centers; the samples being the processed power data corresponding to the sampling points; iteratively repeating the cluster allocation and cluster center update steps until convergence based on the clustering objective and the initial cluster centers; counting the number of samples contained in each cluster, selecting the cluster with the largest number of samples as the master cluster, and using the centroid of the master cluster as the second temporal state value of each sampling point.

[0085] To better understand the above content, please refer to the following example:

[0086] 600 sampling points per day, 90 strings to be detected, with a preset historical time period of 90 days. The data in the feature matrix are transformed into time series data using the following formula:

[0087] ;

[0088] ;

[0089] For any two sequences Between distance:

[0090] ;

[0091] ;

[0092] Calculate the local distance matrix:

[0093] ;

[0094] Calculate the cumulative distance matrix, i.e., the formula for calculating the cumulative distance matrix corresponding to the preset rules:

[0095] ;

[0096] Boundary conditions ,final Distance (i.e., dynamic time-rule distance):

[0097] ;

[0098] For any two calculate Distance, randomly select 6 initial cluster centers, The (dynamic time-warped clustering function) aims to minimize the following objective function:

[0099] ;

[0100] in, Represents the number of clusters, It is the a-th cluster. It is the center of the a-th cluster.

[0101] Iterative update process:

[0102] ;

[0103] Each time series is assigned to the nearest cluster center:

[0104] ;

[0105] .

[0106] in, This refers to the DBA (DTW Barycentric Averaging) algorithm.

[0107] Cluster identification and intrinsic pattern extraction: ;in Cluster Size (number of samples). Final intrinsic pattern extraction: That is, the centroid of the largest cluster, and the centroid of the main cluster is used as the second temporal state value of each sampling point.

[0108] S104: Perform differential calculation on the state values ​​of each sampling point, and determine whether there is occlusion in the string to be detected based on the data results after differential calculation.

[0109] This embodiment does not impose specific limitations on the difference calculation, as long as it can find outliers. For example, it can be a first-order difference, or it can be a second-order difference.

[0110] Furthermore, the above-mentioned differential calculation of the state values ​​of each sampling point, and the determination of whether the target string has occlusion based on the data results after differential calculation, may include: performing first-order differential calculation on the state values ​​of each sampling point, and using the quartile rule to determine whether there are outliers with offset boundaries in the data after first-order differential calculation; if so, it is determined that the target string has occlusion within a preset historical period; if not, it is determined that the target string does not have occlusion within the preset historical time period.

[0111] You can refer to this. Figure 3 , Figure 3 This is a flowchart illustrating an occlusion detection method provided in an embodiment of the present invention. In this embodiment, the state values ​​of each sampling point of each string to be detected are calculated using first-order difference. The quartile rule is then used to determine whether there are outliers deviating from the boundary in the data after first-order difference. If outliers exist, it is considered that the string to be detected is affected by fixed tree occlusion within a preset historical time period, impacting power generation efficiency. If no outliers exist, it is considered that the string to be detected does not have a data occlusion problem within the preset historical time period. The visualization results are as follows: Figure 5 As shown, Figure 5 This is a visualization example of a detection result provided by an embodiment of the present invention. The red curve is the visualized diagnostic matrix, the blue curve is the visualization result of the first-order difference calculation (data after first-order difference), and the green dots are the anomalies found by the quartile rule, i.e., the detection is fixed tree occlusion.

[0112] The photovoltaic string shading detection method provided in this embodiment of the invention proceeds as follows: S101: Obtain the power data of the string to be detected within a preset historical time period, and preprocess the power data to obtain processed power data; S102: Aggregate the processed power data to form a feature matrix; the feature matrix contains the processed power data corresponding to each sampling point of the string to be detected each day; S103: Based on the feature matrix, use the kernel density estimation function and dynamic time warping clustering function to determine the state value of each sampling point; S104: Perform differential calculation on the state values ​​of each sampling point, and determine whether the string to be detected is shading based on the data results after differential calculation. Common active-triggered photovoltaic string shading detection methods often require massive amounts of data for pre-labeling, training, and validation, while this method can be deployed and diagnosed immediately without the need for pre-labeling, training, and validation. Furthermore, active-triggered photovoltaic string shading detection methods require obtaining the string's IV scan data, which can affect power generation efficiency during diagnosis. This method, however, is a zero-power-loss method, that is, it obtains power data from past historical time periods to model and make judgments. Furthermore, most active triggering photovoltaic string shading detection methods are based on machine learning algorithms. After training and parameter tuning, these methods often cannot adapt to data from other power plants. In contrast, this method can adaptively adjust global parameters based on historical power generation data, without the need for manual hyperparameter setting, and can adapt to data from different power plants and different strings.

[0113] The photovoltaic string shading detection device provided in the embodiments of the present invention is described below. The photovoltaic string shading detection device described below and the photovoltaic string shading detection method described above can be referred to in correspondence with each other.

[0114] Please refer to the details. Figure 7 , Figure 7A schematic diagram of a photovoltaic string shading detection device provided in an embodiment of the present invention may include:

[0115] The data acquisition module 100 is used to acquire the power data of the string to be detected within a preset historical time period, and to preprocess the power data to obtain processed power data.

[0116] The aggregation module 200 is used to aggregate the processed power data to form a feature matrix; the feature matrix contains the processed power data corresponding to each sampling point of the target string every day.

[0117] The state value determination module 300 is used to determine the state value of each sampling point based on the feature matrix, using the kernel density estimation function and the dynamic time warping clustering function.

[0118] The occlusion judgment module 400 is used to perform differential calculation on the state values ​​of each sampling point, and determine whether the target string is occluded based on the data results after differential calculation.

[0119] Based on the above embodiments, the data acquisition module 100 may include:

[0120] The acquisition unit is used to acquire the power data of the string to be detected throughout the day within a preset historical time period; the preset historical time period is in months.

[0121] The filtering unit is used to filter the all-day power data based on the filtering principles of power from zero to one and from one to zero, so as to obtain the effective power data for the whole day.

[0122] The filtering unit is used to perform linear interpolation sampling on the all-day effective power data to obtain sampling point data, perform wavelet reconstruction on the sampling point data, and perform median filtering on the wavelet reconstructed data to obtain median-filtered all-day effective power data.

[0123] The normalization unit is used to normalize the median-filtered all-day effective power data to obtain the processed power data.

[0124] Based on the above embodiments, the state value determination module 300 may include:

[0125] The first temporal state value determination unit is used to determine the first temporal state value of each sampling point of the target string within the preset historical time period based on the feature matrix and using the kernel density estimation function; the feature matrix is ​​an N×K dimensional matrix; N represents the total number of days; K represents the total number of sampling points;

[0126] The second temporal state value determination unit is used to determine the second temporal state value of each sampling point of the string to be detected within the preset historical time period based on the feature matrix and using the dynamic time warping clustering function.

[0127] The weighted calculation unit is used to calculate the state value of each sampling point based on the first time-series state value and the second time-series state value using a weighted summation method.

[0128] Based on the above embodiments, the first timing state value determination unit may include:

[0129] Estimation subunits are used to calculate, based on the feature matrix, the kernel density estimation function. The kernel density estimate; the kernel density estimation function formula includes:

[0130] = ;

[0131] , ;

[0132] ;

[0133] in, This represents the processed power data of the k-th sampling point; All are intermediate quantities; The standard deviation is the sample standard deviation. express The kernel density estimate;

[0134] A determination subunit is used to determine the first temporal state value of each sampling point of the string to be detected within the preset historical time period based on the kernel density estimate.

[0135] Based on the above embodiments, determining the subunit may include:

[0136] The range determination subunit is used to select the maximum and minimum values ​​in the processed power data at the k-th sampling point to obtain the data range.

[0137] The first time-series state value determination subunit is used to take the processed power data corresponding to the maximum kernel density estimate in the data range as the first time-series state value of the kth sampling point.

[0138] Based on the above embodiments, the second timing state value determination unit may include:

[0139] The time series transformation subunit is used to transform the data in the feature matrix into time series to obtain various time series.

[0140] The local distance matrix construction sub-unit is used to construct a local distance matrix for any two of the time series, with the square of the Euclidean distance as the local distance of a single sampling point;

[0141] The dynamic time-rule distance calculation subunit is used to calculate the cumulative distance matrix based on the local distance matrix according to a preset rule, and to calculate the dynamic time-rule distance based on the cumulative distance matrix.

[0142] The clustering parameter setting subunit is used to randomly select a preset number of initial cluster centers. The clustering objective is to minimize the sum of the dynamic time rule distances from all samples to their corresponding cluster centers. The samples are the processed power data corresponding to the sampling points.

[0143] The clustering subunit is used to iteratively repeat the cluster assignment and cluster center update steps until convergence, based on the clustering objective and the initial cluster centers.

[0144] The second time-series state value determination subunit is used to count the number of samples contained in each cluster, select the cluster with the largest number of samples as the master cluster, and use the centroid of the master cluster as the second time-series state value of each sampling point.

[0145] Based on the above embodiments, the occlusion determination module 400 may include:

[0146] The outlier detection unit is used to perform first-order difference calculation on the state values ​​of each sampling point and use the interquartile range rule to determine whether there are outliers that deviate from the boundary in the data after first-order difference.

[0147] The first result unit is used to determine, if present, that the string to be detected is occluded within the preset historical segment;

[0148] The second result unit is used to determine that the string to be detected does not have any occlusion within the preset historical time period if it does not exist.

[0149] It should be noted that the order of the modules and units in the aforementioned photovoltaic string shading detection device can be changed without affecting the logic.

[0150] The photovoltaic string shading detection device provided in this embodiment of the invention comprises a data acquisition module 100, used to acquire power data of the string to be detected within a preset historical time period, and preprocess the power data to obtain processed power data; an aggregation module 200, used to aggregate the processed power data to form a feature matrix; the feature matrix contains processed power data corresponding to each sampling point of the string to be detected each day; a state value determination module 300, used to determine the state value of each sampling point based on the feature matrix, using a kernel density estimation function and a dynamic time warping clustering function; and a shading judgment module 400, used to perform differential calculation on the state values ​​of each sampling point, and determine whether the string to be detected is shaded based on the data results after differential calculation. Common active-triggered photovoltaic string shading detection devices often require massive amounts of data for pre-labeling, training, and verification, while this device can be deployed and diagnosed immediately without the need for pre-labeling, training, and verification. Meanwhile, active-triggered photovoltaic string shading detection devices require acquiring IV scan data of the strings, which can impact power generation efficiency during diagnosis. This device, however, employs a zero-power-loss method, modeling and judging based on historical power data over a given period. Furthermore, most active-triggered photovoltaic string shading detection devices are built on machine learning algorithms, and after model training and parameter tuning, they often cannot adapt to data from other sites. This device, however, can adaptively adjust global parameters based on historical power generation data, eliminating the need for manual hyperparameter settings and enabling it to adapt to data from different strings at different sites.

[0151] The photovoltaic string shading detection device provided in the embodiments of the present invention is described below. The photovoltaic string shading detection device described below and the photovoltaic string shading detection method described above can be referred to in correspondence with each other.

[0152] Please refer to Figure 6 , Figure 6 A schematic diagram of a photovoltaic string shading detection device provided in an embodiment of the present invention may include:

[0153] Memory 10 is used to store computer programs;

[0154] The processor 20 is used to execute computer programs to implement the photovoltaic string shading detection method described above.

[0155] The memory 10, processor 20, and communication interface 31 all communicate with each other through the communication bus 32.

[0156] In this embodiment of the invention, the memory 10 is used to store one or more programs. The programs may include program code, which includes computer operation instructions. In this embodiment of the invention, the memory 10 may store programs for implementing the following functions:

[0157] The power data of the string to be detected is obtained within a preset historical time period. The power data is preprocessed to obtain the processed power data.

[0158] The processed power data are aggregated to form a feature matrix; the feature matrix contains the processed power data corresponding to each sampling point of the string to be detected each day.

[0159] Based on the feature matrix, the state value of each sampling point is determined using the kernel density estimation function and the dynamic time warping clustering function;

[0160] The state values ​​of each sampling point are differentially calculated, and the presence of occlusion in the target string is determined based on the data results after differential calculation.

[0161] In one possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; and the data storage area may store data created during use.

[0162] Furthermore, memory 10 may include read-only memory and random access memory, providing instructions and data to the processor. A portion of the memory may also include NVRAM. The memory stores operating systems and operating instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and handling hardware-based tasks.

[0163] Processor 20 can be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field-programmable gate array, or other programmable logic device. Processor 20 can be a microprocessor or any conventional processor. Processor 20 can call programs stored in memory 10.

[0164] Communication interface 31 can be an interface for the communication module, used to connect with other devices or systems.

[0165] Of course, it should be noted that, Figure 7 The structure shown does not constitute a limitation on the photovoltaic string shading detection device in the embodiments of the present invention. In practical applications, the photovoltaic string shading detection device may include more than Figure 7 More or fewer components as shown, or combinations of certain components.

[0166] The readable storage medium provided in the embodiments of the present invention is described below. The readable storage medium described below can be referred to in correspondence with the photovoltaic string shading detection method described above.

[0167] The present invention also provides a readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the photovoltaic string shading detection method described above.

[0168] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0169] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0170] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0171] Finally, it should be noted that in this document, relationships such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0172] The foregoing has provided a detailed description of a photovoltaic string shading detection method, apparatus, device, and computer-readable storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for detecting shading in photovoltaic strings, characterized in that, include: The power data of the string to be detected within a preset historical time period is obtained, and the power data is preprocessed to obtain the processed power data. The processed power data is aggregated to form a feature matrix; The feature matrix contains the processed power data corresponding to each sampling point of the string to be detected each day. Based on the feature matrix, the state value of each sampling point is determined using the kernel density estimation function and the dynamic time warping clustering function. The state values ​​of each sampling point are differentially calculated, and the presence or absence of occlusion in the target string is determined based on the data results after differential calculation.

2. The photovoltaic string shading detection method according to claim 1, characterized in that, The power data of the string to be detected within a preset historical time period is obtained, and the power data is preprocessed to obtain processed power data, including: Obtain the full-day power data of the string to be detected within a preset historical time period; the preset historical time period is in months. Based on the power filtering principle of from zero to one and from one to zero, the power data for the whole day is filtered to obtain the effective power data for the whole day. The effective power data for the whole day is sampled by linear interpolation to obtain sampling point data. The sampling point data is reconstructed by wavelet and the reconstructed data is then filtered by median to obtain the effective power data for the whole day after median filtering. The median-filtered all-day effective power data is normalized to obtain the processed power data.

3. The photovoltaic string shading detection method according to claim 1, characterized in that, Based on the feature matrix, the state values ​​of each sampling point are determined using the kernel density estimation function and the dynamic time warping clustering function, including: Based on the feature matrix, the kernel density estimation function is used to determine the first temporal state value of each sampling point of the target string within the preset historical time period; the feature matrix is ​​an N×K dimensional matrix; N represents the total number of days; K represents the total number of sampling points; Based on the feature matrix, the second temporal state value of each sampling point of the string to be detected within the preset historical time period is determined using the dynamic time warping clustering function. The state value of each sampling point is calculated by using a weighted summation method based on the first time-series state value and the second time-series state value.

4. The photovoltaic string shading detection method according to claim 3, characterized in that, Based on the feature matrix, the kernel density estimation function is used to determine the first temporal state value of each sampling point of the string to be detected within the preset historical time period, including: Based on the feature matrix, the kernel density estimation function is used to calculate... The kernel density estimate; the kernel density estimation function formula includes: = ; , ; ; in, This represents the processed power data of the k-th sampling point; All are intermediate quantities; The standard deviation is the sample standard deviation. express The kernel density estimate; The first temporal state value of each sampling point of the string to be detected within the preset historical time period is determined based on the kernel density estimate.

5. The photovoltaic string shading detection method according to claim 4, characterized in that, Determining the first temporal state value of each sampling point of the target string within the preset historical time period based on the kernel density estimate includes: The maximum and minimum values ​​are selected from the processed power data at the k-th sampling point to obtain the data range. The processed power data corresponding to the maximum kernel density estimate within the data range is used as the first time-series state value of the kth sampling point.

6. The photovoltaic string shading detection method according to claim 3, characterized in that, Based on the feature matrix, the second temporal state value of each sampling point of the string to be detected within the preset historical time period is determined using the dynamic time warping clustering function, including: The data in the feature matrix are transformed into time series to obtain various time series. For any two of the time series, a local distance matrix is ​​constructed using the square of the Euclidean distance as the local distance for a single sampling point; Based on the local distance matrix, a cumulative distance matrix is ​​calculated according to a preset rule, and a dynamic time rule distance is calculated based on the cumulative distance matrix. A preset number of initial cluster centers are randomly selected, and the clustering objective is to minimize the sum of the dynamic time rule distances from all samples to their corresponding cluster centers; the samples are the processed power data corresponding to the sampling points. Based on the clustering objective and the initial cluster centers, iteratively repeat the cluster assignment and cluster center update steps until convergence; The number of samples contained in each cluster is counted, and the cluster with the largest number of samples is selected as the master cluster. The centroid of the master cluster is used as the second time-series state value of each sampling point.

7. The photovoltaic string shading detection method according to claim 1, characterized in that, The state values ​​of each sampling point are differentially calculated, and the presence of occlusion in the target string is determined based on the results of the differential calculation, including: The state values ​​of each sampling point are calculated using first-order difference. The interquartile range is used to determine whether there are outliers in the data after first-order difference that deviate from the boundary. If it exists, it is determined that the string to be detected is obstructed within the preset historical segment; If not, it is determined that the string to be detected is not obstructed within the preset historical time period.

8. A photovoltaic string shading device, characterized in that, include: The data acquisition module is used to acquire the power data of the string to be detected within a preset historical time period, and to preprocess the power data to obtain processed power data. The aggregation module is used to aggregate the processed power data to form a feature matrix; The feature matrix contains the processed power data corresponding to each sampling point of the string to be detected each day. The state value determination module is used to determine the state value of each sampling point based on the feature matrix, using the kernel density estimation function and the dynamic time warping clustering function. The occlusion detection module is used to perform differential calculation on the state values ​​of each sampling point, and determine whether the string to be detected is occluded based on the data results after differential calculation.

9. A photovoltaic string shading device, characterized in that, include: Memory, used to store computer programs; A processor is configured to implement the photovoltaic string shading detection method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when loaded and executed by a processor, implement the photovoltaic string shading detection method as described in any one of claims 1 to 7.