Photovoltaic power generation power prediction method and device and computer readable storage medium

By calculating the correlation coefficient, clustering and weight calculations between meteorological parameters and photovoltaic power generation power, a Bayesian linear regression model is constructed, which solves the problem of the existing photovoltaic power prediction method ignoring the influence of meteorological parameters and improving the accuracy of prediction.

CN119765339AActive Publication Date: 2025-04-04STATE GRID SHANXI MARKETING SERVICE CENT

Patent Information

Application Number
CN202510261814.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-04-04
Estimated Expiration
2045-03-06

AI Technical Summary

Technical Problem

The existing photovoltaic power prediction methods ignore the impact of different meteorological parameters on photovoltaic power generation, resulting in low accuracy of prediction results.

Method used

By collecting meteorological parameters and photovoltaic power generation data at multiple sampling moments, the correlation coefficient between each meteorological parameter and photovoltaic power generation power is calculated, clustering and weight calculations are performed, diagonal weight matrix and Bayesian linear regression model are constructed, and the model parameters are optimized to obtain an accurate photovoltaic power prediction model.

Benefits of technology

It improves the accuracy of photovoltaic power prediction, can capture the relationship between different meteorological parameters and photovoltaic power more accurately, and reduces the impact of abnormal data on the prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119765339A_ABST
    Figure CN119765339A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of photovoltaic power generation, and relates to a photovoltaic power generation power prediction method and device and a computer readable storage medium. Collecting meteorological parameters and photovoltaic power generation powers at a plurality of sampling moments to obtain photovoltaic power generation data sequences at the plurality of sampling moments, and calculating a correlation coefficient between each meteorological parameter and the photovoltaic power generation power; taking the K photovoltaic power generation data sequences as clustering centers, and clustering all the photovoltaic power generation data sequences to obtain K initial photovoltaic power generation data clusters; calculating a local outlier factor and a weight of each photovoltaic power generation data sequence in each initial photovoltaic power generation data cluster; constructing a photovoltaic power generation power prediction probability distribution model based on the weights of all the photovoltaic power generation data sequences and Bayesian linear regression model posterior distribution; the parameters of the photovoltaic power generation power prediction probability distribution model are optimized by using the photovoltaic power generation data sequence, the target photovoltaic power generation power prediction model is obtained, and the accuracy of the photovoltaic power generation power prediction result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of photovoltaic power generation, and in particular to a photovoltaic power generation power prediction method, device and computer-readable storage medium. Background Art

[0002] With the gradual reduction of global dependence on traditional fossil fuels and increasing attention to environmental pollution, clean energy is rapidly emerging and becoming a key pillar in the energy structure. As an easily accessible and environmentally friendly renewable energy, solar energy has won wide recognition and application in the power industry. However, the output power of photovoltaic power generation is easily affected by meteorological conditions and shows significant intermittency and volatility. This instability poses a challenge to the stability and manageability of the power system when photovoltaic power generation is integrated into the power grid on a large scale. Therefore, in order to ensure the stable and safe operation of the power system, it is of great significance to strengthen the accurate prediction of photovoltaic power.

[0003] The traditional photovoltaic power prediction method based on deep learning trains the neural network model by collecting historical photovoltaic power data, so that the neural network model learns the rules in the historical photovoltaic power, thereby predicting the future photovoltaic power. However, since photovoltaic power is often affected by meteorological factors, the photovoltaic power curve under different meteorological conditions has a large difference in shape. For this reason, the photovoltaic power prediction method in the prior art often collects historical photovoltaic power data and its corresponding meteorological parameters. When training the model, the historical photovoltaic power data and meteorological parameters are used as the input of the model, so that the model learns the relationship between photovoltaic power and meteorological conditions, so that the influence of meteorological factors is considered when predicting photovoltaic power, making the prediction result more accurate. However, since different meteorological parameters such as temperature, humidity, radiation intensity, etc. have different influences on photovoltaic power, the method of training the model based on meteorological parameters and historical photovoltaic power data in the prior art ignores this factor and cannot capture the influence of each meteorological parameter on photovoltaic power, resulting in a large error in the prediction result output by the model.

[0004] In summary, the existing photovoltaic power prediction methods ignore the impact of different meteorological parameters on photovoltaic power, resulting in the constructed photovoltaic power prediction model being unable to capture the relationship between different meteorological parameters and photovoltaic power, resulting in low accuracy of the prediction results. Summary of the invention

[0005] To this end, the technical problem to be solved by the present invention is to overcome the problem that the photovoltaic power generation prediction method in the prior art ignores the influence of different meteorological parameters on photovoltaic power generation, resulting in the constructed photovoltaic power generation prediction model being unable to capture the relationship between different meteorological parameters and photovoltaic power generation, thereby making the prediction result less accurate.

[0006] In order to solve the above technical problems, the present invention provides a photovoltaic power prediction method, comprising: Collect meteorological parameters and photovoltaic power generation at multiple sampling times to obtain photovoltaic power generation data sequences at multiple sampling times; calculate the correlation coefficient between each meteorological parameter and photovoltaic power generation based on all photovoltaic power generation data sequences; Taking K photovoltaic power generation data sequences as cluster centers, and based on the correlation coefficient between each meteorological parameter and photovoltaic power generation power, calculating the Euclidean distance between each photovoltaic power generation data sequence and each cluster center, so as to cluster all photovoltaic power generation data sequences and obtain K initial photovoltaic power generation data clusters; Calculate the local outlier factor of each photovoltaic power generation data sequence in each initial photovoltaic power generation data cluster, and calculate the weight of each photovoltaic power generation data sequence based on the local outlier factor of each photovoltaic power generation data sequence; Based on the weights of all photovoltaic power generation data sequences, a diagonal weight matrix is ​​constructed; based on the diagonal weight matrix and the posterior distribution of the Bayesian linear regression model, a photovoltaic power generation power prediction probability distribution model is constructed; The multiple photovoltaic power generation data sequences are input into the photovoltaic power generation power prediction probability distribution model, and the parameters of the photovoltaic power generation power prediction probability distribution model are optimized to obtain a target photovoltaic power generation power prediction model.

[0007] Preferably, the calculation formula of the correlation coefficient between each meteorological parameter and photovoltaic power generation power is expressed as: , in, Indicates The correlation coefficient between various meteorological parameters and photovoltaic power generation; Indicates In the photovoltaic power generation data series Meteorological parameters; Indicates the first The mean value of meteorological parameters; Indicates The photovoltaic power generation power in the photovoltaic power generation data series; Represents the mean value of photovoltaic power generation in all photovoltaic power generation data series; Represents the number of photovoltaic power generation data series; , Indicates the type of meteorological parameters.

[0008] Preferably, the calculation formula of the Euclidean distance between each photovoltaic power generation data sequence and each cluster center is expressed as: , in, Indicates Photovoltaic power generation data series With the kth cluster center The Euclidean distance of Indicates The correlation coefficient between various meteorological parameters and photovoltaic power generation; Indicates Photovoltaic power generation data series Middle Meteorological parameters; represents the kth cluster center Middle Meteorological parameters; , Indicates the type of meteorological parameters.

[0009] Preferably, after obtaining K initial photovoltaic power generation data clusters, the method further includes: Based on the class centers of K initial photovoltaic power generation data clusters, K new cluster centers are obtained; Based on the K new cluster centers, all photovoltaic power generation data sequences are re-clustered to obtain K new photovoltaic power generation data clusters, and it is determined whether the K new photovoltaic power generation data clusters are the same as the K initial photovoltaic power generation data clusters; If the K new photovoltaic power generation data clusters are different from the K initial photovoltaic power generation data clusters, the class centers of the K new photovoltaic power generation data clusters are used as K new clustering centers, and all photovoltaic power generation data sequences are clustered again until the K photovoltaic power generation data clusters obtained by clustering are the same as the K new photovoltaic power generation data clusters.

[0010] Preferably, calculating the local outlier factor of each photovoltaic power generation data sequence in each initial photovoltaic power generation data cluster, and calculating the weight of each photovoltaic power generation data sequence based on the local outlier factor of each photovoltaic power generation data sequence includes: For each photovoltaic power generation data sequence in each initial photovoltaic power generation data cluster, the kth photovoltaic power generation data sequence in the initial photovoltaic power generation data cluster that is closest to the photovoltaic power generation data sequence is used as the target photovoltaic power generation data sequence, and the distance between the photovoltaic power generation data sequence and the target photovoltaic power generation data sequence is used as the K-neighbor distance of the photovoltaic power generation data sequence; Acquire a photovoltaic power generation data sequence in the initial photovoltaic power generation data cluster whose distance to the photovoltaic power generation data sequence is less than the K-neighbor distance, to obtain a photovoltaic power generation data sequence set; The maximum value of the K-neighboring distance of the photovoltaic power generation data sequence and the K-neighboring distance of the target photovoltaic power generation data sequence is used as the reachable distance of the photovoltaic power generation data sequence; Calculating the local reachability density of the photovoltaic power generation data sequence based on the reachable distance of the photovoltaic power generation data sequence and the photovoltaic power generation data sequence set; Calculating a local outlier factor of the photovoltaic power generation data sequence based on the local reachable density of the photovoltaic power generation data sequence; The local outlier factor of the photovoltaic power generation data sequence is mapped based on the preset coefficient to obtain the weight of the photovoltaic power generation data sequence.

[0011] Preferably, the calculation formula for the local reachable density of the photovoltaic power generation data sequence is: , in, Represents photovoltaic power generation data series The local reachable density of Represents the photovoltaic power generation data series The k-neighborhood of photovoltaic power generation data sequence As the center of the circle, with photovoltaic power generation data series The K-neighbor distance of is the neighborhood of radius; Represents photovoltaic power generation data series The reachable distance; The calculation formula of the local outlier factor of the photovoltaic power generation data series is expressed as: , in, Represents the local outlier factor of the photovoltaic power generation data series; Represents photovoltaic power generation data series The local reachable density of The calculation formula of the weight of the photovoltaic power generation data series is expressed as: , in, Indicates The weight of each photovoltaic power generation data series; Indicates the preset coefficient.

[0012] Preferably, the photovoltaic power generation power prediction probability distribution model is expressed as: , , in, represents the photovoltaic power generation power prediction probability distribution model; Represents the photovoltaic power generation power prediction value output by the photovoltaic power generation power prediction probability distribution model; represents the meteorological parameters input into the photovoltaic power prediction probability distribution model; Represents meteorological parameters in photovoltaic power generation data series; Represents the photovoltaic power generation power in the photovoltaic power generation power data sequence; express and The covariance matrix of express and The covariance matrix of express and The covariance matrix of express and The covariance matrix of represents the diagonal weight matrix; The noise representing the photovoltaic power generation; Represents the identity matrix.

[0013] Preferably, after the plurality of photovoltaic power generation data sequences are input into the photovoltaic power generation power prediction probability distribution model, the parameters of the photovoltaic power generation power prediction probability distribution model are optimized using a genetic algorithm.

[0014] The present invention also provides a photovoltaic power generation power prediction device, comprising: The data acquisition and correlation coefficient calculation module is used to collect meteorological parameters and photovoltaic power generation at multiple sampling times to obtain photovoltaic power generation data sequences at multiple sampling times; based on all photovoltaic power generation data sequences, the correlation coefficient between each meteorological parameter and photovoltaic power generation is calculated; A clustering module is used to take K photovoltaic power generation data sequences as cluster centers, and based on the correlation coefficient between each meteorological parameter and photovoltaic power generation power, calculate the Euclidean distance between each photovoltaic power generation data sequence and each cluster center, so as to cluster all photovoltaic power generation data sequences and obtain K initial photovoltaic power generation data clusters; A weight calculation module is used to calculate the local outlier factor of each photovoltaic power generation data sequence in each initial photovoltaic power generation data cluster, and calculate the weight of each photovoltaic power generation data sequence based on the local outlier factor of each photovoltaic power generation data sequence; A model building module is used to build a diagonal weight matrix based on the weights of all photovoltaic power generation data sequences; and to build a photovoltaic power generation power prediction probability distribution model based on the diagonal weight matrix and the posterior distribution of the Bayesian linear regression model; The parameter optimization and model acquisition module is used to input the multiple photovoltaic power generation data sequences into the photovoltaic power generation power prediction probability distribution model, optimize the parameters of the photovoltaic power generation power prediction probability distribution model, and obtain a target photovoltaic power generation power prediction model.

[0015] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned photovoltaic power generation power prediction method are implemented.

[0016] The photovoltaic power prediction method provided in the present application first calculates the correlation coefficient between each meteorological parameter and the photovoltaic power based on the photovoltaic power at multiple sampling moments and multiple meteorological parameters, and mines the linear relationship between different meteorological parameters and the photovoltaic power by calculating the correlation coefficient, so as to obtain the influence degree of each meteorological parameter on the photovoltaic power; based on the correlation coefficient between each meteorological parameter and the photovoltaic power, all photovoltaic power generation data sequences are clustered to obtain K initial photovoltaic power generation data clusters, and the photovoltaic power generation data sequences belonging to the same meteorological type are clustered into one data cluster by adopting the feature weight K-means clustering method to cluster the photovoltaic power generation data sequences; due to the influence of factors such as data acquisition equipment or environment, some photovoltaic power generation data are abnormal, that is, some photovoltaic power generation power and its meteorological parameters cannot be completely corresponding or coupled, therefore, the local outlier factor algorithm is used to calculate the local outlier factor of the photovoltaic power generation data sequence in the data cluster of each meteorological type, so as to judge the photovoltaic The coupling degree between photovoltaic power generation power and meteorological parameters in the power generation data sequence is determined to determine whether the photovoltaic power generation data sequence is abnormal and assign corresponding weights to it; based on the weights of all photovoltaic power generation data sequences and the posterior distribution of the Bayesian linear regression model, a photovoltaic power generation power prediction probability distribution model is constructed, and finally, the parameters of the photovoltaic power generation power prediction probability distribution model are optimized using multiple photovoltaic power generation data sequences to obtain a target photovoltaic power generation power prediction model; the present application fully considers the influence of different meteorological parameters on photovoltaic power generation, clusters photovoltaic power generation data sequences corresponding to different meteorological parameter types, combines the local outlier factor algorithm with the Gaussian process regression model, and assigns corresponding weight values ​​to each photovoltaic power generation data sequence, so that the model can not only learn the correlation between different meteorological parameters and photovoltaic power generation, but also reduce the influence of abnormal data that does not match photovoltaic power generation power with meteorological parameters on the model prediction results, thereby greatly improving the accuracy of photovoltaic power generation power prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein: Figure 1 Flow chart of the photovoltaic power generation prediction method provided for this application; Figure 2 This is a schematic diagram of the structure of the photovoltaic power prediction device provided in this application. DETAILED DESCRIPTION

[0018] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.

[0019] See also Figure 1 , Figure 1 The photovoltaic power generation prediction method provided in this application is a flow chart, and the method specifically includes: S10: collecting meteorological parameters and photovoltaic power generation at multiple sampling times to obtain photovoltaic power generation data sequences at multiple sampling times; and calculating the correlation coefficient between each meteorological parameter and photovoltaic power generation based on all photovoltaic power generation data sequences; Specifically, meteorological parameters include temperature, humidity, radiation intensity, and brightness; S20: taking K photovoltaic power generation data sequences as cluster centers, and calculating the Euclidean distance between each photovoltaic power generation data sequence and each cluster center based on the correlation coefficient between each meteorological parameter and photovoltaic power generation power, thereby clustering all photovoltaic power generation data sequences to obtain K initial photovoltaic power generation data clusters; S30: calculating the local outlier factor of each photovoltaic power generation data sequence in each initial photovoltaic power generation data cluster, and calculating the weight of each photovoltaic power generation data sequence based on the local outlier factor of each photovoltaic power generation data sequence; S40: construct a diagonal weight matrix based on the weights of all photovoltaic power generation data sequences; construct a photovoltaic power generation power prediction probability distribution model based on the diagonal weight matrix and the posterior distribution of the Bayesian linear regression model; S50: inputting a plurality of photovoltaic power generation data sequences into a photovoltaic power generation power prediction probability distribution model, optimizing parameters of the photovoltaic power generation power prediction probability distribution model, and obtaining a target photovoltaic power generation power prediction model.

[0020] The photovoltaic power prediction method provided in the present application first calculates the correlation coefficient between each meteorological parameter and the photovoltaic power based on the photovoltaic power at multiple sampling moments and multiple meteorological parameters, and mines the linear relationship between different meteorological parameters and the photovoltaic power by calculating the correlation coefficient, so as to obtain the influence degree of each meteorological parameter on the photovoltaic power; based on the correlation coefficient between each meteorological parameter and the photovoltaic power, all photovoltaic power generation data sequences are clustered to obtain K initial photovoltaic power generation data clusters, and the photovoltaic power generation data sequences belonging to the same meteorological type are clustered into one data cluster by adopting the feature weight K-means clustering method to cluster the photovoltaic power generation data sequences; due to the influence of factors such as data acquisition equipment or environment, some photovoltaic power generation data are abnormal, that is, some photovoltaic power generation power and its meteorological parameters cannot be completely corresponding or coupled, therefore, the local outlier factor algorithm is used to calculate the local outlier factor of the photovoltaic power generation data sequence in the data cluster of each meteorological type, so as to judge the photovoltaic The coupling degree between photovoltaic power generation power and meteorological parameters in the power generation data sequence is determined to determine whether the photovoltaic power generation data sequence is abnormal and assign corresponding weights to it; based on the weights of all photovoltaic power generation data sequences and the posterior distribution of the Bayesian linear regression model, a photovoltaic power generation power prediction probability distribution model is constructed, and finally, the parameters of the photovoltaic power generation power prediction probability distribution model are optimized using multiple photovoltaic power generation data sequences to obtain a target photovoltaic power generation power prediction model; the present application fully considers the influence of different meteorological parameters on photovoltaic power generation, clusters photovoltaic power generation data sequences corresponding to different meteorological parameter types, combines the local outlier factor algorithm with the Gaussian process regression model, and assigns corresponding weight values ​​to each photovoltaic power generation data sequence, so that the model can not only learn the correlation between different meteorological parameters and photovoltaic power generation, but also reduce the influence of abnormal data that does not match photovoltaic power generation power with meteorological parameters on the model prediction results, thereby greatly improving the accuracy of photovoltaic power generation power prediction results.

[0021] Since the power generation capacity is the result of the combined influence of various factors during the operation of photovoltaic panels, it is necessary to consider the influence of various meteorological factors. At the same time, the photovoltaic power curves under different meteorological parameters have large differences in shape, and the prediction accuracy of the model obtained by training with data under different parameters is also different. Therefore, the embodiment of the present application calculates the correlation coefficient between various meteorological parameters and photovoltaic power generation capacity.

[0022] Specifically, this embodiment quantifies the linear relationship between different meteorological parameters and photovoltaic power generation through the Pearson correlation coefficient, and its specific calculation formula is expressed as: , in, Indicates The correlation coefficient between various meteorological parameters and photovoltaic power generation; Indicates In the photovoltaic power generation data series Meteorological parameters; Indicates the first The mean value of meteorological parameters; Indicates The photovoltaic power generation power in the photovoltaic power generation data series; Represents the mean value of photovoltaic power generation in all photovoltaic power generation data series; Represents the number of photovoltaic power generation data series; , Indicates the type of meteorological parameters.

[0023] Furthermore, after calculating the correlation coefficients between various meteorological parameters and photovoltaic power generation, the power generation data series is classified by feature weight K-means clustering, aiming to identify different meteorological types and more accurately capture the impact of meteorological factors on photovoltaic power generation, thereby providing a more reliable basis for the prediction of photovoltaic power generation.

[0024] K-means clustering is a clustering algorithm based on sample set partitioning. Its basic idea is to divide data points into K clusters so that the sum of distances between each data point and the center of its cluster is minimized. This method can efficiently process large data sets. This application combines the results of correlation analysis with traditional K-means clustering to form feature weighted K-means clustering. On the basis of the traditional K-means clustering algorithm, the concept of feature weights is added to handle situations where different features may have different importance to the clustering results.

[0025] Specifically, the present application forms a weighted Euclidean distance by weighting the traditional Euclidean distance, so that the weather types can be divided more accurately. Optionally, before weighting, the features can be standardized to eliminate the influence of different dimensions and numerical ranges.

[0026] Specifically, the calculation formula of the Euclidean distance between each photovoltaic power generation data series and each cluster center is expressed as: , in, Indicates Photovoltaic power generation data series With the kth cluster center The Euclidean distance of Indicates The correlation coefficient between various meteorological parameters and photovoltaic power generation; Indicates Photovoltaic power generation data series Middle Meteorological parameters; represents the kth cluster center Middle Meteorological parameters; , Indicates the type of meteorological parameters.

[0027] Optionally, in some embodiments of the present application, in order to make the clustering result more accurate, after obtaining K initial photovoltaic power generation data clusters, the following steps are further included: Based on the class centers of K initial photovoltaic power generation data clusters, K new cluster centers are obtained; Based on the K new cluster centers, all photovoltaic power generation data sequences are re-clustered to obtain K new photovoltaic power generation data clusters, and it is determined whether the K new photovoltaic power generation data clusters are the same as the K initial photovoltaic power generation data clusters; If the K new photovoltaic power generation data clusters are different from the K initial photovoltaic power generation data clusters, the class centers of the K new photovoltaic power generation data clusters are used as K new clustering centers, and all photovoltaic power generation data sequences are clustered again until the K photovoltaic power generation data clusters obtained by clustering are the same as the K new photovoltaic power generation data clusters.

[0028] In the process of photovoltaic power generation, data collection and transmission, human operational errors and environmental factors such as electromagnetic interference and excessive temperature may affect the normal operation of the data collection equipment. The communication delay between the data collection equipment and the data center causes data lag, and the photovoltaic power generation power and meteorological data cannot be completely matched or coupled. Therefore, it is necessary to process the abnormal photovoltaic power generation data sequence. However, the reduction of the data set will simultaneously lead to a reduction in model training. Therefore, this application adopts a weighted approach to reduce the weight of the abnormal photovoltaic power generation data sequence, thereby improving the prediction accuracy without affecting the data volume.

[0029] Specifically, the Local Outlier Factor (LOF) algorithm is an unsupervised anomaly detection algorithm based on data point density. It identifies outliers by comparing the local density difference between data points and their surrounding neighbors, and considers samples whose local density is significantly lower than that of their neighboring points as anomalies. The algorithm calculates a local outlier factor for each data point and observes whether the LOF value deviates significantly from 1 to determine whether a point is an outlier. If the LOF value is much higher than 1, the data point is likely to be an abnormal data point. If the LOF value is close to 1, the data point is generally considered to be a normal data point.

[0030] It can be seen from the principle of LOF algorithm that the key to detecting whether the data value is abnormal is to calculate the LOF value. Therefore, the local outlier factor of each photovoltaic power generation data sequence in each initial photovoltaic power generation data cluster is calculated. Based on the local outlier factor of each photovoltaic power generation data sequence, the weight of each photovoltaic power generation data sequence is calculated, including: For each photovoltaic power generation data sequence in each initial photovoltaic power generation data cluster, the kth photovoltaic power generation data sequence in the initial photovoltaic power generation data cluster that is closest to the photovoltaic power generation data sequence is used as the target photovoltaic power generation data sequence, and the distance between the photovoltaic power generation data sequence and the target photovoltaic power generation data sequence is used as the K-neighbor distance of the photovoltaic power generation data sequence; Acquire a photovoltaic power generation data sequence in the initial photovoltaic power generation data cluster whose distance to the photovoltaic power generation data sequence is less than the K-neighbor distance, to obtain a photovoltaic power generation data sequence set; The maximum value of the K-neighboring distance of the photovoltaic power generation data sequence and the K-neighboring distance of the target photovoltaic power generation data sequence is used as the reachable distance of the photovoltaic power generation data sequence; Calculating the local reachability density of the photovoltaic power generation data sequence based on the reachable distance of the photovoltaic power generation data sequence and the photovoltaic power generation data sequence set; Specifically, the local reachable density measures the average value of the reciprocal of the distance between the photovoltaic power generation data sequence and other data in its neighborhood. If the distance between the photovoltaic power generation data sequence and the data in its neighborhood is short, its local reachable density will be higher. On the contrary, if these distances are long, the local reachable density of the photovoltaic power generation data sequence is low, indicating that the photovoltaic power generation data sequence may be abnormal data. The calculation formula of the local reachable density of the photovoltaic power generation data sequence is: , in, Represents photovoltaic power generation data series The local reachable density of Represents the photovoltaic power generation data series The k-neighborhood of photovoltaic power generation data sequence As the center of the circle, with photovoltaic power generation data series The K-neighbor distance of is the neighborhood of radius; Represents photovoltaic power generation data series The reachable distance; Calculating a local outlier factor based on the local reachable density of the photovoltaic power generation data sequence; Specifically, the calculation formula of the local outlier factor of the photovoltaic power generation data series is expressed as: , in, Represents the local outlier factor of the photovoltaic power generation data series; Represents photovoltaic power generation data series The local reachable density of When the LOF value is close to 1, it means that the density of the photovoltaic power generation data sequence is similar to that of its neighboring points, and it may belong to the same cluster as these neighboring points. If the LOF value is less than 1, it means that the photovoltaic power generation data sequence is located in a relatively dense area, so it may be a normal data and a larger weight should be set. If the LOF value is greater than 1, it usually means that the photovoltaic power generation data sequence is abnormal data and a smaller weight should be set. Mapping the local outlier factor of the photovoltaic power generation data sequence based on the preset coefficient to obtain the weight of the photovoltaic power generation data sequence; Specifically, the calculation formula of the weight of the photovoltaic power generation data series is expressed as: , in, Indicates The weight of each photovoltaic power generation data series; Indicates the preset coefficient; By adjusting the value of the preset coefficient, the local anomaly factor can be mapped to a specific numerical range, allowing a more accurate measurement of the relative density of the photovoltaic power generation data series and the surrounding neighboring points, and more effective identification of abnormal data and allocation of weights.

[0031] Furthermore, Gaussian Process Regression (GPR) is a flexible non-parametric statistical method that uses prior information to predict states in a Bayesian statistical framework and can estimate the posterior distribution. It can not only provide the predicted mean, but also output the predicted variance and confidence interval, so that the prediction results can express the corresponding uncertainty.

[0032] The local anomaly factor weighted Gaussian process regression model constructed in this application integrates the local outlier factor algorithm and the Gaussian process regression model. The model analyzes each data in the historical data set and evaluates its degree of anomaly. For data with a higher degree of anomaly, the model assigns a lower weight to it, thereby reducing the impact of this data on the overall prediction results during the prediction process.

[0033] Specifically, the diagonal weight matrix constructed based on the weights of all photovoltaic power generation data sequences is expressed as: , Furthermore, the weighted Gaussian process is an improvement of Bayesian linear regression, similar to the traditional Gaussian process regression. When constructing a photovoltaic power prediction model, the basic form of the model can be set as follows:

[0034] in, represents a linear mapping function; Represents the weight vector; if the output of the model is noisy , then the weight transformation function can be expressed as: , Combining the weight transformation function and the posterior distribution of the Bayesian linear regression model, the probability distribution of the prediction result obtained by the posterior integral can be expressed as: , in, ; represents the covariance matrix of the prior distribution; represents the inverse matrix of the covariance matrix of the prior distribution; Furthermore, the probability distribution expression of the prediction result is: , The joint distribution of photovoltaic power generation data and predicted data probability distribution is: , Furthermore, the photovoltaic power generation power prediction probability distribution model is expressed as: , , in, represents the photovoltaic power generation power prediction probability distribution model; Represents the photovoltaic power generation power prediction value output by the photovoltaic power generation power prediction probability distribution model; represents the meteorological parameters input into the photovoltaic power prediction probability distribution model; Represents meteorological parameters in photovoltaic power generation data series; Represents the photovoltaic power generation power in the photovoltaic power generation power data sequence; express and The covariance matrix of express and The covariance matrix of express and The covariance matrix of express and The covariance matrix of represents the diagonal weight matrix; The noise representing the photovoltaic power generation; Represents the identity matrix.

[0035] In the Gaussian process regression model, the kernel function directly determines the accuracy of the model prediction, and the hyperparameters, as an important part of the kernel function, their changes will directly change the prediction results. In previous Gaussian process regression models, common hyperparameter optimization methods include maximum likelihood estimation (MLE) and conjugate gradient method. The former is based on the principle of empirical risk minimization. It achieves maximization by constructing a likelihood function consisting of samples and unknown parameters. At this time, the probability of the sample appearing is the largest, thereby obtaining the hyperparameters corresponding to the model. The conjugate gradient method introduces conjugation on the basis of the steepest descent method, creates a set of conjugate directions, and searches along these directions until the optimal point of the objective function is found. This method speeds up the convergence speed and eliminates the jitter phenomenon of the steepest descent. However, the conjugate gradient method is a deterministic optimization algorithm that is very sensitive to the initial value and is prone to falling into the local optimal solution. Therefore, a genetic algorithm is used in the embodiment of the present application to optimize the hyperparameters of the model. The genetic algorithm is a search algorithm that simulates the principles of natural selection and genetics, and is usually used to solve optimization and search problems. It can perform global searches in parallel along multiple routes in the solution space, has good global optimization capabilities, and prevents entering local optimality. At the same time, the crossover and mutation operations of the genetic algorithm can be executed in parallel to improve the efficiency of the algorithm.

[0036] Based on the photovoltaic power prediction method provided in the above embodiment, the embodiment of the present application also provides a photovoltaic power prediction device, such as Figure 2 As shown, the device specifically includes: The data acquisition and correlation coefficient calculation module 10 is used to collect meteorological parameters and photovoltaic power generation at multiple sampling times to obtain photovoltaic power generation data sequences at multiple sampling times; based on all photovoltaic power generation data sequences, the correlation coefficient between each meteorological parameter and photovoltaic power generation is calculated; The clustering module 20 is used to take K photovoltaic power generation data sequences as cluster centers, and calculate the Euclidean distance between each photovoltaic power generation data sequence and each cluster center based on the correlation coefficient between each meteorological parameter and photovoltaic power generation power, so as to cluster all photovoltaic power generation data sequences and obtain K initial photovoltaic power generation data clusters; A weight calculation module 30 is used to calculate the local outlier factor of each photovoltaic power generation data sequence in each initial photovoltaic power generation data cluster, and calculate the weight of each photovoltaic power generation data sequence based on the local outlier factor of each photovoltaic power generation data sequence; The model building module 40 is used to build a diagonal weight matrix based on the weights of all photovoltaic power generation data sequences; and to build a photovoltaic power generation power prediction probability distribution model based on the diagonal weight matrix and the posterior distribution of the Bayesian linear regression model; The parameter optimization and model acquisition module 50 is used to input the multiple photovoltaic power generation data sequences into the photovoltaic power generation power prediction probability distribution model, optimize the parameters of the photovoltaic power generation power prediction probability distribution model, and obtain a target photovoltaic power generation power prediction model.

[0037] This embodiment further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned photovoltaic power generation prediction method are implemented.

[0038] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0039] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0040] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0041] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1The steps for the functions specified in one or more boxes.

[0042] Obviously, the above embodiments are merely examples for the purpose of clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.

Claims

1. A photovoltaic power generation power prediction method, characterized in that: include: Collect meteorological parameters and photovoltaic power generation at multiple sampling times to obtain photovoltaic power generation data sequences at multiple sampling times; calculate the correlation coefficient between each meteorological parameter and photovoltaic power generation based on all photovoltaic power generation data sequences; Taking K photovoltaic power generation data sequences as cluster centers, and based on the correlation coefficient between each meteorological parameter and photovoltaic power generation power, calculating the Euclidean distance between each photovoltaic power generation data sequence and each cluster center, so as to cluster all photovoltaic power generation data sequences and obtain K initial photovoltaic power generation data clusters; Calculate the local outlier factor of each photovoltaic power generation data sequence in each initial photovoltaic power generation data cluster, and calculate the weight of each photovoltaic power generation data sequence based on the local outlier factor of each photovoltaic power generation data sequence; Based on the weights of all photovoltaic power generation data sequences, a diagonal weight matrix is ​​constructed; based on the diagonal weight matrix and the posterior distribution of the Bayesian linear regression model, a photovoltaic power generation power prediction probability distribution model is constructed; The multiple photovoltaic power generation data sequences are input into the photovoltaic power generation power prediction probability distribution model, and the parameters of the photovoltaic power generation power prediction probability distribution model are optimized to obtain a target photovoltaic power generation power prediction model.

2. The photovoltaic power generation prediction method according to claim 1, characterized in that: The calculation formula of the correlation coefficient between each meteorological parameter and photovoltaic power generation is expressed as: , in, Indicates The correlation coefficient between various meteorological parameters and photovoltaic power generation; Indicates In the photovoltaic power generation data series Meteorological parameters; Indicates the first The mean value of meteorological parameters; Indicates The photovoltaic power generation power in the photovoltaic power generation data series; Represents the mean value of photovoltaic power generation in all photovoltaic power generation data series; Represents the number of photovoltaic power generation data series; , Indicates the type of meteorological parameters.

3. The photovoltaic power generation prediction method according to claim 1, characterized in that: The calculation formula of the Euclidean distance between each photovoltaic power generation data series and each cluster center is expressed as: , in, Indicates Photovoltaic power generation data series With the kth cluster center The Euclidean distance of Indicates The correlation coefficient between various meteorological parameters and photovoltaic power generation; Indicates Photovoltaic power generation data series Middle Meteorological parameters; represents the kth cluster center Middle Meteorological parameters; , Indicates the type of meteorological parameters.

4. The photovoltaic power generation prediction method according to claim 1, characterized in that: After obtaining K initial photovoltaic power generation data clusters, it also includes: Based on the class centers of K initial photovoltaic power generation data clusters, K new cluster centers are obtained; Based on the K new cluster centers, all photovoltaic power generation data sequences are re-clustered to obtain K new photovoltaic power generation data clusters, and it is determined whether the K new photovoltaic power generation data clusters are the same as the K initial photovoltaic power generation data clusters; If the K new photovoltaic power generation data clusters are different from the K initial photovoltaic power generation data clusters, the class centers of the K new photovoltaic power generation data clusters are used as K new clustering centers, and all photovoltaic power generation data sequences are clustered again until the K photovoltaic power generation data clusters obtained by clustering are the same as the K new photovoltaic power generation data clusters.

5. The photovoltaic power generation prediction method according to claim 1, characterized in that: Calculate the local outlier factor of each photovoltaic power generation data sequence in each initial photovoltaic power generation data cluster. Based on the local outlier factor of each photovoltaic power generation data sequence, calculate the weight of each photovoltaic power generation data sequence including: For each photovoltaic power generation data sequence in each initial photovoltaic power generation data cluster, the kth photovoltaic power generation data sequence in the initial photovoltaic power generation data cluster that is closest to the photovoltaic power generation data sequence is used as the target photovoltaic power generation data sequence, and the distance between the photovoltaic power generation data sequence and the target photovoltaic power generation data sequence is used as the K-neighbor distance of the photovoltaic power generation data sequence; Acquire a photovoltaic power generation data sequence in the initial photovoltaic power generation data cluster whose distance to the photovoltaic power generation data sequence is less than the K-neighbor distance, to obtain a photovoltaic power generation data sequence set; The maximum value of the K-neighboring distance of the photovoltaic power generation data sequence and the K-neighboring distance of the target photovoltaic power generation data sequence is used as the reachable distance of the photovoltaic power generation data sequence; Calculating the local reachability density of the photovoltaic power generation data sequence based on the reachable distance of the photovoltaic power generation data sequence and the photovoltaic power generation data sequence set; Calculating a local outlier factor of the photovoltaic power generation data sequence based on the local reachable density of the photovoltaic power generation data sequence; The local outlier factor of the photovoltaic power generation data sequence is mapped based on the preset coefficient to obtain the weight of the photovoltaic power generation data sequence.

6. The photovoltaic power generation prediction method according to claim 5, characterized in that: The calculation formula of the local reachable density of the photovoltaic power generation data series is: , in, Represents photovoltaic power generation data series The local reachable density of Represents the photovoltaic power generation data series The k-neighborhood of photovoltaic power generation data sequence As the center of the circle, with photovoltaic power generation data series The K-neighbor distance of is the neighborhood of radius; Represents photovoltaic power generation data series The reachable distance; The calculation formula of the local outlier factor of the photovoltaic power generation data series is expressed as: , in, Represents the local outlier factor of the photovoltaic power generation data series; Represents photovoltaic power generation data series The local reachable density of The calculation formula of the weight of the photovoltaic power generation data series is expressed as: , in, Indicates The weight of each photovoltaic power generation data series; Indicates the preset coefficient.

7. The photovoltaic power generation prediction method according to claim 1, characterized in that: The photovoltaic power generation power prediction probability distribution model is expressed as: , , in, represents the photovoltaic power generation power prediction probability distribution model; Represents the photovoltaic power generation power prediction value output by the photovoltaic power generation power prediction probability distribution model; represents the meteorological parameters input into the photovoltaic power prediction probability distribution model; Represents meteorological parameters in photovoltaic power generation data series; Represents the photovoltaic power generation power in the photovoltaic power generation power data sequence; express and The covariance matrix of express and The covariance matrix of express and The covariance matrix of express and The covariance matrix of represents the diagonal weight matrix; The noise representing the photovoltaic power generation; Represents the identity matrix.

8. The photovoltaic power generation prediction method according to claim 1, characterized in that: After the plurality of photovoltaic power generation data sequences are input into the photovoltaic power generation power prediction probability distribution model, the parameters of the photovoltaic power generation power prediction probability distribution model are optimized using a genetic algorithm.

9. A photovoltaic power generation power prediction device, characterized in that: include: The data acquisition and correlation coefficient calculation module is used to collect meteorological parameters and photovoltaic power generation at multiple sampling times to obtain photovoltaic power generation data sequences at multiple sampling times; based on all photovoltaic power generation data sequences, the correlation coefficient between each meteorological parameter and photovoltaic power generation is calculated; A clustering module is used to take K photovoltaic power generation data sequences as cluster centers, and based on the correlation coefficient between each meteorological parameter and photovoltaic power generation power, calculate the Euclidean distance between each photovoltaic power generation data sequence and each cluster center, so as to cluster all photovoltaic power generation data sequences and obtain K initial photovoltaic power generation data clusters; A weight calculation module is used to calculate the local outlier factor of each photovoltaic power generation data sequence in each initial photovoltaic power generation data cluster, and calculate the weight of each photovoltaic power generation data sequence based on the local outlier factor of each photovoltaic power generation data sequence; A model building module is used to build a diagonal weight matrix based on the weights of all photovoltaic power generation data sequences; and to build a photovoltaic power generation power prediction probability distribution model based on the diagonal weight matrix and the posterior distribution of the Bayesian linear regression model; The parameter optimization and model acquisition module is used to input the multiple photovoltaic power generation data sequences into the photovoltaic power generation power prediction probability distribution model, optimize the parameters of the photovoltaic power generation power prediction probability distribution model, and obtain a target photovoltaic power generation power prediction model.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the photovoltaic power generation prediction method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Distributed photovoltaic abnormal data detection method based on periodic optimal path comparison

    CN118551323A

  • Method for predicting long-term power in photovoltaic system and computing equipment

    CN118899845A

  • Distributed photovoltaic power prediction method, device, equipment, medium and product

    CN119340995A

Cited By

  • Energy storage system energy management method based on demand response

    CN120546037A

  • Regional power grid power transmission loss simulation method and system

    CN122225416A