A distributed photovoltaic cluster power prediction method, system, device and medium
Patent Information
- Application Number
- CN202611499230.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-24
- Publication Date
- 2026-10-30
AI Technical Summary
基于融合数据构建站点关系权重矩阵;
本发明提供的一种分布式光伏集群功率预测方法,基于张量理论将多源数据映射到统一高维空间,通过张量分解及重构捕捉数据间的内在关联,有效解决了分布式光伏数据标准不一、缺失率高的难题,显著提升了数据融合效率与数据质量;对气象特征数据进行空间细化,并结合梯度提升树误差修正模型与MC-Dropout模型,实现了气象预测不确定性的有效量化,为光伏功率预测提供了可靠的不确定性先验信息,有效降低了多云及极端天气条件下的预测误差;功率预测模型充分挖掘了多站点间的空间相关性与时空传播特性;采用模型无关元学习策略对功率预测模型进行训练,实现了新站点的快速适应,提升了预测模型的泛化能力和工程实用性。
Smart Images

Figure CN123018804A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power system technology, specifically relating to a method, system, device, and medium for predicting the power of a distributed photovoltaic cluster. Background Technology
[0002] Virtual power plants (VPPs), as an effective organizational form for integrating distributed energy resources to participate in electricity market operations, have received widespread attention globally in recent years. Meanwhile, distributed photovoltaic (PV) power, due to its abundant resources and flexible deployment, has become an important component of VPPs. Accurate and reliable distributed PV power forecasting is a key technological foundation for VPPs to formulate power generation plans, participate in market bidding, and ensure supply-demand balance.
[0003] The main methods for predicting the power of distributed photovoltaic clusters in VPP include physical models, statistical models, and machine learning methods. However, although each method has its own focus, they all show the following degree of inadequacy in adaptability when dealing with the complex prediction needs of VPP multi-site, multi-scale, and multi-source heterogeneous data: (1) The standards of multi-source heterogeneous data are inconsistent, and the missing rate is as high as 15%-30%; (2) The spatial resolution of meteorological data is low and the update is slow, and the uncertainty lacks effective quantification, which doubles the prediction error of cloudy weather; (3) Existing methods for multi-site prediction mostly adopt the method of independent modeling and re-aggregation, ignoring the spatial correlation between sites; (4) New sites need to be retrained, and the cycle is as long as several months, resulting in insufficient model generalization ability and online adaptability. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, system, device and medium for predicting the power of distributed photovoltaic clusters, thereby improving the accuracy and reliability of prediction as well as the adaptability and generalization ability of the model.
[0005] This invention provides the following technical solution: In the first aspect, a method for predicting the power of a distributed photovoltaic cluster is provided, including: constructing a third-order tensor based on historical power generation data, meteorological characteristic data and geographic information data of each site in the cluster, and obtaining fused data after tensor decomposition and reconstruction of the third-order tensor; Construct a site relationship weight matrix based on fused data; Spatial refinement of meteorological feature data in fused data yields high-resolution meteorological feature data, and error correction of high-resolution meteorological feature data is performed using a pre-trained gradient boosting tree error correction model. The high-resolution meteorological feature data after error correction is input into the pre-acquired MC-Dropout model to obtain the meteorological forecast mean and the meteorological forecast variance. The station relationship weight matrix, high-resolution meteorological feature data, historical power generation data from the fused data, and the mean and variance of meteorological forecasts are input into a pre-trained power prediction model. The power prediction model concatenates and performs linear transformation on the high-resolution meteorological feature data, historical power generation data from the fused data, and the mean and variance of meteorological forecasts to obtain the initial features of each station. Based on the updated adjacency matrix, the initial features of each station are aggregated to obtain the spatial features of each station. Features are extracted from the historical power generation data in the fused data to obtain the temporal features of each station. The spatial and temporal features of each station are fused, and the fused features are mapped to the power prediction results of each station. The updated adjacency matrix is obtained by updating the station relationship weight matrix as the initial adjacency matrix.
[0006] As an optional technical solution of the present invention, the step of constructing a third-order tensor based on pre-acquired historical power generation data, meteorological characteristic data, and geographic information data of each station in the cluster, and obtaining fused data after tensor decomposition and reconstruction of the third-order tensor includes: After synchronizing and interpolating the historical power generation data, meteorological characteristic data, and geographic information data of each station, a third-order tensor including time dimension, station dimension, and feature dimension is constructed. The tensor decomposition employs Tucker decomposition, decomposing the third-order tensor into a core tensor and factor matrices representing the time dimension, site dimension, and feature dimension, and then reconstructing it as follows: ; in, Represents the reconstructed tensor. Represents the core tensor. , and These represent factor matrices for the time dimension, site dimension, and feature dimension, respectively. , and These represent the products of the first, second, and third modules, respectively. For missing positions in the third-order tensor, the corresponding values of the reconstructed tensor are used to fill in the missing positions. The filled third-order tensor is then used as the fused data, which includes historical power generation data, meteorological feature data, and geographic information data.
[0007] As an optional technical solution of the present invention, the step of constructing a site relationship weight matrix based on fused data includes: Geographic distance similarity, meteorological similarity, and power sequence correlation are calculated separately and expressed as follows: ; ; ; in, Indicates the first The site and the Geographical distance similarity between sites Indicates the first The site and the Weather similarity between stations Indicates the first The site and the Power sequence correlation of each site This indicates the number of calculations using the Haversine formula. The site and the spherical distance between stations Indicates the first distance bandwidth parameter. Represents an exponential function. Indicates the first The average meteorological characteristic data of each station, Indicates the first The mean of meteorological characteristic data of each station, where ||·|2 represents the L2 norm. Indicates the first Historical power sequence of each station Indicates the first Historical power sequence of each station Describing covariance, Indicates the first Standard deviation of the historical power series of each site Indicates the first Standard deviation of the historical power series of each station; Construct a site relationship weight matrix, represented as follows: ; in, The site relationship weight matrix represents the first... The site and the The element corresponding to each site Weights representing geographical distance similarity. The weights representing meteorological similarity The weights represent the correlation of power sequences.
[0008] As an optional technical solution of the present invention, the step of spatially refining the meteorological feature data in the fused data to obtain high-resolution meteorological feature data, and correcting the error of the high-resolution meteorological feature data using a pre-trained gradient boosting tree error correction model, includes: Meteorological feature data and geographic information data from the fused data are input into a pre-constructed geographic weighted convolutional neural network model for spatial refinement. The geographic weighted convolutional neural network model includes a geographic feature encoding layer, a geographic weighted convolutional layer, a multi-scale convolutional layer, and an upsampling layer. The geographic feature encoding layer extracts geographic features from the geographic information data. The geographic weighted convolutional layer adjusts geographic distance weights based on the geographic features and aggregates the meteorological feature data based on the adjusted geographic distance weights to obtain aggregated features. The multi-scale convolutional layer extracts meteorological features at different spatial scales from the aggregated features. The upsampling layer restores the meteorological features at different spatial scales to the target resolution, obtaining high-resolution meteorological feature data. The convolution kernel weights adjusted based on geographic features are represented as follows: ; in, Indicating the first of the meteorological characteristic data Geographic distance weights of grid points Indicating the first of the meteorological characteristic data The Euclidean distance between each grid point and the target high-resolution grid point Indicates the second distance bandwidth parameter; High-resolution meteorological feature data is input into the gradient boosting tree error correction model to obtain the prediction error value. The high-resolution meteorological feature data after error correction is represented as follows: ; in, In high-resolution meteorological feature data, the first Error correction value for each grid point In high-resolution meteorological feature data, the first Predicted values for each grid point In high-resolution meteorological feature data, the first The prediction error value for each grid point.
[0009] As an optional technical solution of the present invention, the step of inputting the error-corrected high-resolution meteorological feature data into a pre-acquired MC-Dropout model to obtain the meteorological forecast mean and the meteorological forecast variance includes: The high-resolution meteorological feature data after error correction is input into the MC-Dropout model. Dropout activation is maintained during the inference phase, and M forward propagation samplings are performed to obtain the meteorological forecast mean and variance, as follows: ; ; in, Indicates the number of Monte Carlo samples. Indicates the first Meteorological element predictions obtained from the second forward propagation This represents the average of weather forecasts. This represents the variance of weather forecasts. Indicates the first The prediction accuracy parameter corresponding to each sampling.
[0010] As an optional technical solution of the present invention, the power prediction model includes a node feature embedding layer, a graph structure learning module, a graph attention layer, a temporal Transformer layer, a spatiotemporal feature fusion layer, and a prediction output layer; The node feature embedding layer splices and linearly transforms the high-resolution meteorological feature data, historical power generation data, meteorological forecast mean, and meteorological forecast variance of the same site to obtain the initial features of the site. During the training process of the power prediction model, the graph structure learning module uses the site relationship weight matrix as the initial adjacency matrix and updates the adjacency matrix, as shown below: ; ; in, Indicates the first The site and the The site was updated at [time]. The adjacency matrix, Indicates the first The site and the Before the site was updated, at that time The adjacency matrix, Indicates the first The site and the Each station at time Meteorological similarity Indicates the first The site and the Each station at time Power sequence correlation, Indicates the first The site and the Each station at time The connection score, Weighting coefficients representing meteorological similarity. Weighting coefficients representing the correlation of power series. The reinforcement step size represents the connection strength. This indicates the step size for weakening the connection strength. Indicates the threshold for enhancing connectivity. This represents the threshold for weakening connections; The graph attention layer aggregates the initial features of each station based on the updated adjacency matrix. When the preset maximum number of iterations is reached, the result of the last iteration is used as the spatial feature of each station, represented as: ; ; ; in, Indicates the first After the nth iteration Spatial characteristics of each site This represents the activation function. Indicates the first The neighbor set of each site, Indicates the first The site and the Attention coefficient between sites Indicates the first The weight matrix of the next iteration. Indicates the first After the nth iteration Spatial characteristics of each site This represents a vector concatenation operation. This represents a leaky ReLU activation function. The parameter vector representing the attention mechanism. Indicates transpose. Indicates the first The initial characteristics of each site Indicates the first The initial characteristics of each site Represents a linear transformation matrix; The time Transformer layer extracts features from the historical power generation data in the fused data, maps the historical power generation data into a vector through linear embedding, and then performs location encoding to obtain the time features of each station. The spatiotemporal feature fusion layer fuses the spatial and temporal features of each station; The prediction output layer maps the fused features to the power prediction results for each site.
[0011] As an optional technical solution of the present invention, the training process of the power prediction model adopts a model-independent meta-learning strategy, including: For prediction tasks of existing sites, including support sets and query sets, for each site's prediction task, gradient updates are performed on its support set based on the current global model parameters to obtain task-specific parameters; the task-specific parameters are evaluated on the corresponding query set, and the global model parameters are updated through stochastic gradient descent with the goal of minimizing the overall loss of each prediction task to obtain the model initialization parameters. Historical power generation data and corresponding meteorological feature data are extracted from the fused data and error-corrected high-resolution meteorological features of the new site. Gradient updates are performed based on the model initialization parameters to obtain a power prediction model suitable for the new site.
[0012] In a second aspect, a distributed photovoltaic cluster power prediction system is provided to implement the steps of the distributed photovoltaic cluster power prediction method described in the first aspect, including: The data preprocessing module is used to construct a third-order tensor based on the historical power generation data, meteorological characteristic data and geographic information data of each station in the cluster that have been acquired in advance. After tensor decomposition and reconstruction of the third-order tensor, the fused data is obtained. The weight matrix construction module is used to construct a site relationship weight matrix based on fused data; The error correction module is used to spatially refine the meteorological feature data in the fused data to obtain high-resolution meteorological feature data, and to correct the error of the high-resolution meteorological feature data through a pre-trained gradient boosting tree error correction model. The weather forecast module is used to input the error-corrected high-resolution meteorological feature data into the pre-acquired MC-Dropout model to obtain the weather forecast mean and weather forecast variance. The power prediction module is used to input the site relationship weight matrix, high-resolution meteorological feature data, historical power generation data from the fused data, and the mean and variance of meteorological forecasts into a pre-trained power prediction model. The power prediction model concatenates and linearly transforms the high-resolution meteorological feature data, historical power generation data from the fused data, and the mean and variance of meteorological forecasts to obtain the initial features of each site. Based on the updated adjacency matrix, the initial features of each site are aggregated to obtain the spatial features of each site. Features are extracted from the historical power generation data in the fused data to obtain the temporal features of each site. The spatial and temporal features of each site are fused, and the fused features are mapped to the power prediction results of each site. The updated adjacency matrix is obtained by updating the site relationship weight matrix as the initial adjacency matrix.
[0013] Thirdly, a distributed photovoltaic cluster power prediction device is provided, comprising a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the method described in the first aspect.
[0014] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the steps of the method described in the first aspect.
[0015] Compared with the prior art, the beneficial effects of the present invention are: This invention provides a distributed photovoltaic (PV) cluster power prediction method. Based on tensor theory, it maps multi-source data to a unified high-dimensional space. By capturing the intrinsic correlations between data through tensor decomposition and reconstruction, it effectively solves the problems of inconsistent data standards and high missing rates in distributed PV data, significantly improving data fusion efficiency and data quality. Spatially refining meteorological feature data and combining a gradient boosting tree error correction model and an MC-Dropout model, it effectively quantifies the uncertainty of meteorological forecasts, providing reliable prior information on uncertainties for PV power prediction and effectively reducing prediction errors under cloudy and extreme weather conditions. The power prediction model fully explores the spatial correlation and spatiotemporal propagation characteristics among multiple sites. The model-independent meta-learning strategy is used to train the power prediction model, enabling rapid adaptation to new sites and improving the generalization ability and engineering practicality of the prediction model. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating a distributed photovoltaic cluster power prediction method according to an embodiment of the present invention. Detailed Implementation
[0017] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0018] Example 1
[0019] This embodiment provides a method for predicting the power of a distributed photovoltaic cluster. For example... Figure 1 As shown, the specific steps include the following: Step 1: Construct a third-order tensor based on the historical power generation data, meteorological characteristic data and geographic information data of each site in the cluster that have been acquired in advance. After tensor decomposition and reconstruction of the third-order tensor, the fused data is obtained.
[0020] After synchronizing and interpolating the historical power generation data, meteorological characteristic data, and geographic information data of each station, a third-order tensor including time dimension, station dimension, and characteristic dimension is constructed. Among them, using standard UTC time as the reference, linear interpolation or cubic spline interpolation methods are used to uniformly interpolate the historical power generation data, meteorological characteristic data, and geographic information data onto the same time grid, thus completing the registration of multi-source heterogeneous data in the time dimension.
[0021] Furthermore, meteorological characteristic data includes weather forecast data and meteorological observation data.
[0022] Tensor decomposition employs Tucker decomposition, decomposing the third-order tensor into a core tensor and factor matrices representing the time, site, and feature dimensions, and then reconstructing it as follows: ; ; in, Represents a third-order tensor. Represents the reconstructed tensor. Represents the core tensor. , and These represent factor matrices for the time dimension, site dimension, and feature dimension, respectively. , and These represent the products of the first, second, and third modules, respectively.
[0023] The Tucker ranks are R1, R2, and R3, which determine the size of the compressed core tensor, i.e., the number of potential factors retained in each dimension. In this embodiment, R1=20, R2=10, and R3=15.
[0024] For the observed positions in the original third-order tensor, the original values are retained; for the missing positions in the third-order tensor, the values of the corresponding positions in the reconstructed tensor are used to fill in the missing positions. The filled third-order tensor is used as the fused data, which includes historical power generation data, meteorological feature data, and geographic information data.
[0025] Tensor decomposition can also be performed using CP decomposition (Candecomp / Parafac decomposition).
[0026] In this reconstruction process, data fusion and missing value repair are two sides of the same mathematical operation. Multi-source heterogeneous data are mapped to a unified core tensor space through a shared factor matrix. This core tensor integrates the collaborative change patterns across all dimensions. This means that data in one dimension, such as meteorological data from a particular station, can influence the estimation results of missing values in other dimensions through the interaction of the core tensor.
[0027] Step 2: Construct a site relationship weight matrix based on the fused data.
[0028] Before constructing the site relationship weight matrix, it is necessary to remove outlier data from the fused data. Specifically, the fused data is divided into several sample data along the time dimension. Each sample data is input into a pre-trained deep autoencoder to obtain the reconstruction error. If the reconstruction error is greater than a preset error threshold, the current sample data is determined to be outlier and is removed.
[0029] In this embodiment, the encoder structure of the deep autoencoder is input→256→128→64, and the decoder structure is 64→128→256→output. The activation function is ReLU, and the loss function is mean squared error. During anomaly detection, the 95th percentile of the reconstruction error of the validation set is used as a preset error threshold. Samples with reconstruction errors greater than this threshold are judged as anomalies and removed.
[0030] Based on the fused data after removing outliers, the correlation strength between stations is comprehensively measured from three dimensions: geographical distance, meteorological similarity, and power sequence correlation. Specifically, geographical distance similarity, meteorological similarity, and power sequence correlation are calculated and expressed as follows: ; ; ; in, Indicates the first The site and the Geographical distance similarity between sites Indicates the first The site and the Weather similarity between stations Indicates the first The site and the Power sequence correlation of each site This indicates the number of calculations using the Haversine formula. The site and the spherical distance between stations Indicates the first distance bandwidth parameter. Represents an exponential function. Indicates the first The average meteorological characteristic data of each station, Indicates the first The mean of meteorological characteristic data of each station, where ||·|2 represents the L2 norm. Indicates the first Historical power sequence of each station Indicates the first Historical power sequence of each station Describing covariance, Indicates the first Standard deviation of the historical power series of each site Indicates the first The standard deviation of the historical power series of each site.
[0031] Construct a site relationship weight matrix, represented as follows: ; in, The site relationship weight matrix represents the first... The site and the The element corresponding to each site Weights representing geographical distance similarity. The weights representing meteorological similarity The weights representing the correlation of the power sequence are α+β+γ=1. In this embodiment, α is 0.3, β is 0.4, and γ is 0.3.
[0032] Step 3: Spatially refine the meteorological feature data in the fused data to obtain high-resolution meteorological feature data, and correct the errors in the high-resolution meteorological feature data using a pre-trained gradient boosting tree error correction model.
[0033] Meteorological feature data and geographic information data from the fused data are input into a pre-constructed geographic weighted convolutional neural network model (GW-CNN) for spatial refinement. The geographic weighted convolutional neural network model includes a geographic feature encoding layer, a geographic weighted convolutional layer, a multi-scale convolutional layer, and an upsampling layer. The geographic feature encoding layer is used to extract geographic features from the geographic information data; the geographic weighted convolutional layer is used to adjust the geographic distance weights according to the geographic features, and aggregate the meteorological feature data based on the adjusted geographic distance weights to obtain aggregated features; the multi-scale convolutional layer is used to extract meteorological features at different spatial scales from the aggregated features; and the upsampling layer is used to restore the meteorological features at different spatial scales to the target resolution to obtain high-resolution meteorological feature data.
[0034] In this embodiment, the geographic feature encoding layer of the geographic weighted convolutional neural network model uses a 3-layer MLP to output 64-dimensional geographic features; the geographic weighted convolutional layer uses a 3×3 convolutional kernel to output 64 channels, and the kernel weights are adjusted based on geographic distance weights; the multi-scale convolutional layer uses dilated convolutions with dilation rates of 1, 2, and 4, each outputting 64 channels, and the multi-scale features are concatenated and fused; the upsampling layer uses bilinear interpolation to restore the features to a target resolution of 1km. During training, the Adam optimizer is used with a learning rate of 0.001 and the loss function is mean squared error.
[0035] The convolution kernel weights adjusted based on geographic features are represented as follows: ; in, Indicating the first of the meteorological characteristic data Geographic distance weights of grid points Indicating the first of the meteorological characteristic data The Euclidean distance between each grid point and the target high-resolution grid point This represents the second distance bandwidth parameter.
[0036] In this embodiment, the spatial resolution of the low-resolution grid of meteorological feature data in the fused data is 5km-10km. The geographically weighted convolutional neural network maps the low-resolution meteorological feature data to a target resolution grid with a target resolution of 1km. The high-resolution meteorological feature data includes weather forecast data and meteorological observation data.
[0037] Using high-resolution meteorological feature data as the correction target, a gradient boosting tree error correction model is used to correct the forecast values of each grid point point by point, in order to eliminate systematic biases and random errors in numerical weather prediction. In this embodiment, the gradient boosting tree error correction model adopts the XGBoost model, with a classification and regression tree as the base learner, 200 trees, a maximum depth of 6, a learning rate of 0.05, a subsampling ratio of 0.8, a column sampling ratio of 0.8, and a loss function of mean squared error.
[0038] The training process of the gradient boosting tree error correction model includes: acquiring weather forecast data and meteorological observation data of several known stations at historical times, calculating historical prediction error sequences, and establishing the mapping relationship between errors and multiple factors such as time, season, weather type, and geographical location.
[0039] High-resolution meteorological feature data is input into the gradient boosting tree error correction model to obtain the prediction error value. The high-resolution meteorological feature data after error correction is represented as follows: ; in, In high-resolution meteorological feature data, the first Error correction value for each grid point In high-resolution meteorological feature data, the first Predicted values for each grid point In high-resolution meteorological feature data, the first The prediction error value for each grid point.
[0040] Step 4: Input the error-corrected high-resolution meteorological feature data into the pre-acquired MC-Dropout model to obtain the meteorological forecast mean and the meteorological forecast variance.
[0041] The high-resolution meteorological feature data after error correction is input into the MC-Dropout model. Dropout activation is maintained during the inference phase, and M forward propagation samplings are performed. Each forward propagation sampling yields a different prediction result. Based on the distribution of the prediction results, the meteorological prediction mean and variance are obtained, expressed as follows: ; ; in, Indicates the number of Monte Carlo samples. Indicates the first Meteorological element predictions obtained from the second forward propagation This represents the average of weather forecasts. This represents the variance of weather forecasts. Indicates the first The prediction accuracy parameter corresponds to each sampling. The first term in the weather prediction variance represents model uncertainty, and the second term represents random uncertainty.
[0042] In this embodiment, the MC-Dropout model uses a 2-layer LSTM as the base network, with 128 hidden units, a Dropout rate of 0.2, and 100 Monte Carlo sampling times (M). During the inference phase, Dropout activation is maintained, and M forward propagations are performed to output the mean and variance of the weather forecast.
[0043] Step 5: Input the site relationship weight matrix, high-resolution meteorological feature data, historical power generation data from the fused data, and the mean and variance of meteorological forecasts into the pre-trained power prediction model. The power prediction model concatenates and linearly transforms the high-resolution meteorological feature data, historical power generation data from the fused data, and the mean and variance of meteorological forecasts to obtain the initial features of each site. Based on the updated adjacency matrix, the initial features of each site are aggregated to obtain the spatial features of each site. Features are extracted from the historical power generation data in the fused data to obtain the temporal features of each site. The spatial and temporal features of each site are fused, and the fused features are mapped to the power prediction results of each site.
[0044] The power prediction model includes a node feature embedding layer, a graph structure learning module, a graph attention layer, a temporal Transformer layer, a spatiotemporal feature fusion layer, and a prediction output layer.
[0045] The node feature embedding layer concatenates and linearly transforms the high-resolution meteorological feature data, historical power generation data, meteorological forecast mean, and meteorological forecast variance of the same site to obtain the initial features of the site.
[0046] During the training of the power prediction model, the graph structure learning module uses the site relationship weight matrix as the initial adjacency matrix and updates the adjacency matrix. The updated adjacency matrix is obtained by updating the initial adjacency matrix using the site relationship weight matrix as the initial adjacency matrix, and is represented as follows: ; ; in, Indicates the first The site and the The site was updated at [time]. The adjacency matrix, , Indicates the first The site and the Before the site was updated, at that time The adjacency matrix, , This represents the site relationship weight matrix. Indicates the first The site and the Each station at time Meteorological similarity Indicates the first The site and the Each station at time Power sequence correlation, Indicates the first The site and the Each station at time The connection score, Weighting coefficients representing meteorological similarity. Weighting coefficients representing the correlation of power series. , The reinforcement step size represents the connection strength. This indicates the step size for weakening the connection strength. Indicates the threshold for enhancing connectivity. This represents the threshold for weakening connections.
[0047] The graph attention layer aggregates the initial features of each station based on the updated adjacency matrix. When the preset maximum number of iterations is reached, the result of the last iteration is used as the spatial feature of each station, represented as: ; ; ; in, Indicates the first After the nth iteration Spatial characteristics of each site This represents the activation function. Indicates the first The neighbor set of each site, Indicates the first The site and the Attention coefficient between sites Indicates the first The weight matrix of the next iteration. Indicates the first After the nth iteration Spatial characteristics of each site This represents a vector concatenation operation. This represents a leaky ReLU activation function. The parameter vector representing the attention mechanism. Indicates transpose. Indicates the first The initial characteristics of each site Indicates the first The initial characteristics of each site This represents a linear transformation matrix.
[0048] The time-transformer layer extracts features from historical power generation data in the fused data and maps the historical power generation data to linear embedding. The temporal features of each station are obtained by performing location encoding on the dimensional vector.
[0049] The spatiotemporal feature fusion layer fuses the spatial and temporal features of each site, as shown below: ; in, Indicates the first The integration characteristics of individual sites This represents the activation function. Indicates feature splicing, Indicates the first Spatial characteristics of each site Indicates the first Time characteristics of each site This represents the matrix of the first fully connected layer. This indicates the first deviation term.
[0050] The prediction output layer maps the fused features to the power prediction results for each site, as follows: ; in, Indicates the first Power prediction results for each site, This represents the matrix of the second fully connected layer. This indicates the second deviation term.
[0051] In this embodiment, the node feature embedding layer of the power prediction model has an output dimension of 128; the graph attention layer is set to 2 layers, each with 4 attention heads, and a hidden dimension of 128; the temporal Transformer layer is set to 2 layers, each with 4 attention heads, and a feedforward dimension of 512, with sinusoidal position encoding; the spatiotemporal feature fusion layer is a fully connected layer with an output dimension of 128 and the activation function is ReLU; the prediction output layer is a fully connected layer with an output dimension of 1. The parameters of the graph structure learning module are as follows: connection strength enhancement step size is 0.1, weakening step size is 0.1, connection enhancement threshold is 0.7, connection weakening threshold is 0.3, and the weight coefficient of meteorological similarity is... Weighting coefficients of power series correlation .
[0052] The power prediction model is trained using a model-independent meta-learning strategy. The training process includes: For prediction tasks at pre-acquired sites, including support and query sets, for each site's prediction task, gradient updates are performed on its support set based on the current global model parameters to obtain task-specific parameters. The task-specific parameters are evaluated on the corresponding query set. With the objective of minimizing the overall loss of each prediction task, the global model parameters are updated using stochastic gradient descent to obtain the model initialization parameters. Historical power generation data and corresponding meteorological feature data are extracted from the fused data and error-corrected high-resolution meteorological features of the new sites. Gradient updates are then performed based on the model initialization parameters to obtain a power prediction model suitable for the new sites.
[0053] In this embodiment, the Model-Independent Meta-Learning strategy uses MAML, with an inner loop learning rate of 0.01 and an outer loop learning rate of 0.001. The number of tasks is set to 32, and the support set and query set for each task use 7 days of historical data. When adapting to new sites, historical power generation data within the last 7 days and corresponding meteorological characteristic data are used.
[0054] Knowledge distillation is used to transfer prediction knowledge from existing sites to the power prediction model of new sites. Specifically, the power prediction model trained through meta-learning is used as the teacher model, and the ST-Transformer model is used as the student model for the new sites. Knowledge transfer is achieved by minimizing the KL divergence between the output of the teacher model and the output of the student model.
[0055] In this embodiment, the student model is set to 2 layers, with 4 attention heads in each layer and a hidden dimension of 64; the distillation temperature is set to 3, and the loss function is KL divergence.
[0056] Based on the site relationship weight matrix calculation formula in step two, calculate the similarity between the new site and each existing site, select the model parameters of the K sites with the highest similarity (preferably, K = 5), and perform a weighted average with similarity as the weight to initialize the power prediction model parameters of the new site.
[0057] Based on the ST-Transformer model, a family of prediction models is constructed at different time scales, with dedicated prediction models designed for ultra-short-term (next 4 hours), short-term (next 3 days), medium-term (next 10 days), and long-term (next 30 days) prediction scenarios. The inputs for each scale model are high-resolution meteorological feature data after error correction and historical power generation data extracted from the fused data.
[0058] Furthermore, the specialized models at each time scale can utilize meta-learning pre-trained parameters and knowledge distillation strategies to improve the generalization ability and deployment efficiency of multi-scale models on new sites.
[0059] The power sequence is decomposed into trend, periodic, and random components. Specifically, STL decomposition (Seasonal-Trend decomposition using LOESS) or wavelet decomposition is used to decompose the original power sequence into trend, periodic, and random components. In this embodiment, when using STL decomposition, the period length is set to 24, and the trend smoothing parameter uses the default value; when using wavelet decomposition, the wavelet basis is selected as db4, and the number of decomposition levels is set to 3.
[0060] The three components are modeled and predicted separately and then recombined. Specifically, the trend component is predicted by extrapolation using linear regression or multinomial regression; the periodic component is predicted using Fourier series fitting or a seasonal autoregressive model; and the random component is predicted using a Gaussian process or an autoregressive conditional heteroscedasticity model.
[0061] Short-term forecasts are used as inputs for medium- and long-term forecasts to reduce error accumulation. Specifically, the cascaded forecast framework consists of four levels: the first level is ultra-short-term forecasts (next 4 hours), which use real-time monitoring data and minute-level weather forecasts as inputs and outputs power forecasts for the next 4 hours; the second level is short-term forecasts (next 3 days), which use ultra-short-term forecasts as inputs and the day-ahead forecasts in the corrected high-resolution meteorological element field output from step S2; the third level is medium-term forecasts (next 10 days), which use short-term forecasts as inputs and weekly-scale weather forecasts; and the fourth level is long-term forecasts (next 30 days), which use medium-term forecasts as inputs and monthly-scale climate forecasts.
[0062] The prediction results at each level are passed down sequentially. By using the prediction results of the previous level as historical data constraints for the next level, the accumulation of errors at each level is effectively controlled.
[0063] This method yields power forecasts for each site across multiple time scales (ultra-short-term 4 hours, short-term 3 days, medium-term 10 days, and long-term 30 days), providing high-precision and highly generalizable technical support for photovoltaic power dispatch, reserve capacity planning, and electricity market trading decisions in virtual power plants.
[0064] Example 2
[0065] This embodiment provides a distributed photovoltaic cluster power prediction system, used to implement the steps of the distributed photovoltaic cluster power prediction method of Embodiment 1, including: The data preprocessing module is used to construct a third-order tensor based on the historical power generation data, meteorological characteristic data and geographic information data of each station in the cluster that have been acquired in advance. After tensor decomposition and reconstruction of the third-order tensor, the fused data is obtained. The weight matrix construction module is used to construct a site relationship weight matrix based on fused data; The error correction module is used to spatially refine the meteorological feature data in the fused data to obtain high-resolution meteorological feature data, and to correct the error of the high-resolution meteorological feature data through a pre-trained gradient boosting tree error correction model. The weather forecast module is used to input the error-corrected high-resolution meteorological feature data into the pre-acquired MC-Dropout model to obtain the weather forecast mean and weather forecast variance. The power prediction module is used to input the site relationship weight matrix, high-resolution meteorological feature data, historical power generation data from the fused data, and the mean and variance of meteorological forecasts into a pre-trained power prediction model. The power prediction model concatenates and linearly transforms the high-resolution meteorological feature data, historical power generation data from the fused data, and the mean and variance of meteorological forecasts to obtain the initial features of each site. Based on the updated adjacency matrix, the initial features of each site are aggregated to obtain the spatial features of each site. Features are extracted from the historical power generation data in the fused data to obtain the temporal features of each site. The spatial and temporal features of each site are fused, and the fused features are mapped to the power prediction results of each site. The updated adjacency matrix is obtained by updating the site relationship weight matrix as the initial adjacency matrix.
[0066] Example 3
[0067] This embodiment provides a distributed photovoltaic cluster power prediction device, including a processor and a storage medium. The storage medium is used to store instructions. The processor is used to perform operations according to the instructions to execute the steps of the distributed photovoltaic cluster power prediction method described in Embodiment 1.
[0068] Example 4
[0069] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the distributed photovoltaic cluster power prediction method described in Embodiment 1.
[0070] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0071] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0072] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0073] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0074] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for predicting the power of a distributed photovoltaic cluster, characterized in that, include: Based on the historical power generation data, meteorological characteristic data and geographic information data of each site in the cluster, a third-order tensor is constructed. After tensor decomposition and reconstruction of the third-order tensor, fused data is obtained. Construct a site relationship weight matrix based on fused data; Spatial refinement of meteorological feature data in fused data yields high-resolution meteorological feature data, and error correction of high-resolution meteorological feature data is performed using a pre-trained gradient boosting tree error correction model. The high-resolution meteorological feature data after error correction is input into the pre-acquired MC-Dropout model to obtain the meteorological forecast mean and the meteorological forecast variance. The site relationship weight matrix, high-resolution meteorological feature data, historical power generation data from the fused data, and the mean and variance of meteorological forecasts are input into the pre-trained power prediction model. The power prediction model concatenates and linearly transforms the high-resolution meteorological feature data, historical power generation data from the fused data, and the mean and variance of meteorological forecasts to obtain the initial features of each site. The initial features of each site are aggregated based on the updated adjacency matrix to obtain the spatial features of each site; the temporal features of each site are obtained by extracting features from the historical power generation data in the fused data. The spatial and temporal features of each station are fused, and the fused features are mapped to the power prediction results of each station. The updated adjacency matrix is obtained by updating the station relationship weight matrix as the initial adjacency matrix.
2. The distributed photovoltaic cluster power prediction method according to claim 1, characterized in that, The process involves constructing a third-order tensor based on pre-acquired historical power generation data, meteorological characteristic data, and geographic information data from each site in the cluster. After tensor decomposition and reconstruction of the third-order tensor, fused data is obtained, including: After synchronizing and interpolating the historical power generation data, meteorological characteristic data, and geographic information data of each station, a third-order tensor including time dimension, station dimension, and feature dimension is constructed. The tensor decomposition employs Tucker decomposition, decomposing the third-order tensor into a core tensor and factor matrices representing the time dimension, site dimension, and feature dimension, and then reconstructing it as follows: ; in, Represents the reconstructed tensor. Represents the core tensor. , and These represent factor matrices for the time dimension, site dimension, and feature dimension, respectively. , and These represent the products of the first, second, and third modules, respectively. For missing positions in the third-order tensor, the corresponding values of the reconstructed tensor are used to fill in the missing positions. The filled third-order tensor is then used as the fused data, which includes historical power generation data, meteorological feature data, and geographic information data.
3. The distributed photovoltaic cluster power prediction method according to claim 2, characterized in that, The construction of the site relationship weight matrix based on fused data includes: Geographic distance similarity, meteorological similarity, and power sequence correlation are calculated separately and expressed as follows: ; ; ; in, Indicates the first The site and the Geographical distance similarity between sites Indicates the first The site and the Weather similarity between stations Indicates the first The site and the Power sequence correlation of each site This indicates the number of calculations using the Haversine formula. The site and the spherical distance between stations Indicates the first distance bandwidth parameter. Represents an exponential function. Indicates the first The average meteorological characteristic data of each station, Indicates the first The mean of meteorological characteristic data of each station, where ||·|2 represents the L2 norm. Indicates the first Historical power sequence of each station Indicates the first Historical power sequence of each station Describing covariance, Indicates the first Standard deviation of the historical power series of each site Indicates the first Standard deviation of the historical power series of each station; Construct a site relationship weight matrix, represented as follows: ; in, The site relationship weight matrix represents the first... The site and the The element corresponding to each site Weights representing geographical distance similarity. The weights representing meteorological similarity The weights represent the correlation of power sequences.
4. The distributed photovoltaic cluster power prediction method according to claim 3, characterized in that, The process involves spatially refining the meteorological feature data in the fused data to obtain high-resolution meteorological feature data, and then correcting the errors in the high-resolution meteorological feature data using a pre-trained gradient boosting tree error correction model, including: Meteorological feature data and geographic information data from the fused data are input into a pre-constructed geographic weighted convolutional neural network model for spatial refinement. The geographic weighted convolutional neural network model includes a geographic feature encoding layer, a geographic weighted convolutional layer, a multi-scale convolutional layer, and an upsampling layer. The geographic feature encoding layer extracts geographic features from the geographic information data. The geographic weighted convolutional layer adjusts geographic distance weights based on the geographic features and aggregates the meteorological feature data based on the adjusted geographic distance weights to obtain aggregated features. The multi-scale convolutional layer extracts meteorological features at different spatial scales from the aggregated features. The upsampling layer restores the meteorological features at different spatial scales to the target resolution, obtaining high-resolution meteorological feature data. The convolution kernel weights adjusted based on geographic features are represented as follows: ; in, Indicating the first of the meteorological characteristic data Geographic distance weights of grid points Indicating the first of the meteorological characteristic data The Euclidean distance between each grid point and the target high-resolution grid point Indicates the second distance bandwidth parameter; High-resolution meteorological feature data is input into the gradient boosting tree error correction model to obtain the prediction error value. The high-resolution meteorological feature data after error correction is represented as follows: ; in, In high-resolution meteorological feature data, the first Error correction value for each grid point In high-resolution meteorological feature data, the first Predicted values for each grid point In high-resolution meteorological feature data, the first The prediction error value for each grid point.
5. The distributed photovoltaic cluster power prediction method according to claim 1, characterized in that, The step of inputting the error-corrected high-resolution meteorological feature data into the pre-acquired MC-Dropout model to obtain the meteorological forecast mean and the meteorological forecast variance includes: The high-resolution meteorological feature data after error correction is input into the MC-Dropout model. Dropout activation is maintained during the inference phase, and M forward propagation samplings are performed to obtain the meteorological forecast mean and variance, as follows: ; ; in, Indicates the number of Monte Carlo samples. Indicates the first Meteorological element predictions obtained from the second forward propagation This represents the average of weather forecasts. This represents the variance of weather forecasts. Indicates the first The prediction accuracy parameter corresponding to each sampling.
6. The distributed photovoltaic cluster power prediction method according to claim 3, characterized in that, The power prediction model includes a node feature embedding layer, a graph structure learning module, a graph attention layer, a temporal Transformer layer, a spatiotemporal feature fusion layer, and a prediction output layer. The node feature embedding layer splices and linearly transforms the high-resolution meteorological feature data, historical power generation data, meteorological forecast mean, and meteorological forecast variance of the same site to obtain the initial features of the site. During the training process of the power prediction model, the graph structure learning module uses the site relationship weight matrix as the initial adjacency matrix and updates the adjacency matrix, as shown below: ; ; in, Indicates the first The site and the The site was updated at [time]. The adjacency matrix, Indicates the first The site and the Before the site was updated, at that time The adjacency matrix, Indicates the first The site and the Each station at time Meteorological similarity Indicates the first The site and the Each station at time Power sequence correlation, Indicates the first The site and the Each station at time The connection score, Weighting coefficients representing meteorological similarity. Weighting coefficients representing the correlation of power series. The reinforcement step size represents the connection strength. This indicates the step size for weakening the connection strength. Indicates the threshold for enhancing connectivity. This represents the threshold for weakening connections; The graph attention layer aggregates the initial features of each station based on the updated adjacency matrix. When the preset maximum number of iterations is reached, the result of the last iteration is used as the spatial feature of each station, represented as: ; ; ; in, Indicates the first After the nth iteration Spatial characteristics of each site This represents the activation function. Indicates the first The neighbor set of each site, Indicates the first The site and the Attention coefficient between sites Indicates the first The weight matrix of the next iteration. Indicates the first After the nth iteration Spatial characteristics of each site This represents a vector concatenation operation. This represents a leaky ReLU activation function. The parameter vector representing the attention mechanism. Indicates transpose. Indicates the first The initial characteristics of each site Indicates the first The initial characteristics of each site Represents a linear transformation matrix; The time Transformer layer extracts features from the historical power generation data in the fused data, maps the historical power generation data into a vector through linear embedding, and then performs location encoding to obtain the time features of each station. The spatiotemporal feature fusion layer fuses the spatial and temporal features of each station; The prediction output layer maps the fused features to the power prediction results for each site.
7. The distributed photovoltaic cluster power prediction method according to claim 6, characterized in that, The training process of the power prediction model employs a model-independent meta-learning strategy, including: For prediction tasks of existing sites, including support sets and query sets, for each site's prediction task, gradient updates are performed on its support set based on the current global model parameters to obtain task-specific parameters; the task-specific parameters are evaluated on the corresponding query set, and the global model parameters are updated through stochastic gradient descent with the goal of minimizing the overall loss of each prediction task to obtain the model initialization parameters. Historical power generation data and corresponding meteorological feature data are extracted from the fused data and error-corrected high-resolution meteorological features of the new site. Gradient updates are performed based on the model initialization parameters to obtain a power prediction model suitable for the new site.
8. A distributed photovoltaic cluster power prediction system, characterized in that, The steps for implementing the distributed photovoltaic cluster power prediction method according to any one of claims 1 to 7 include: The data preprocessing module is used to construct a third-order tensor based on the historical power generation data, meteorological characteristic data and geographic information data of each station in the cluster that have been acquired in advance. After tensor decomposition and reconstruction of the third-order tensor, the fused data is obtained. The weight matrix construction module is used to construct a site relationship weight matrix based on fused data; The error correction module is used to spatially refine the meteorological feature data in the fused data to obtain high-resolution meteorological feature data, and to correct the error of the high-resolution meteorological feature data through a pre-trained gradient boosting tree error correction model. The weather forecast module is used to input the error-corrected high-resolution meteorological feature data into the pre-acquired MC-Dropout model to obtain the weather forecast mean and weather forecast variance. The power prediction module is used to input the site relationship weight matrix, high-resolution meteorological feature data, historical power generation data from the fused data, and the mean and variance of meteorological forecasts into a pre-trained power prediction model. The power prediction model concatenates and linearly transforms the high-resolution meteorological feature data, historical power generation data from the fused data, and the mean and variance of meteorological forecasts to obtain the initial features of each site. Based on the updated adjacency matrix, the initial features of each site are aggregated to obtain the spatial features of each site. Features are extracted from the historical power generation data in the fused data to obtain the temporal features of each site. The spatial and temporal features of each site are fused, and the fused features are mapped to the power prediction results of each site. The updated adjacency matrix is obtained by updating the site relationship weight matrix as the initial adjacency matrix.
9. A distributed photovoltaic cluster power prediction device, characterized in that, Including processor and storage media; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the distributed photovoltaic cluster power prediction method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the distributed photovoltaic cluster power prediction method according to any one of claims 1 to 7.