Photovoltaic power spatiotemporal prediction method and device, electronic equipment and medium
Patent Information
- Application Number
- CN202611138638.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-27
AI Technical Summary
[0005]本发明的目的在于提供一种光伏发电功率时空预测方法、装置、电子设备以及介质,以解决现场采集的辐照、功率传感数据混杂局部离群异常与全局极端极值,传统单一异常检测算法无法同步识别两类噪声的问题
[0103]根据本申请所提出的上述技术方案,可以实现下述技术效果:该光伏发电功率时空预测方法、装置、电子设备以及介质,在光伏功率时空预测领域综合优势突出,首先构建了完整的自适应时空极值优化三级数据提质框架,弥补现有技术异常检测与数据增强手段单一的缺陷;传统方法仅采用固定阈值或单一算法处理异常,难以兼顾局部聚集噪声与极端气象极值,且常规 GAN 生成样本易出现时空逻辑断裂;本申请融合改进极值理论、LOF-iForest 混合检测与条件时空 WGAN-GP 算法,依靠地理距离动态阈值修正极端数据,通过混合评分同步识别全局、局部异常,同时引入时空一致性约束生成样本,有效改善小样本场站数据匮乏问题,从源头降低数据缺陷带来的预测误差;实现物理机理与时序空间深度学习深度融合,克服单一模型短板;现有方案多单独使用等效机理模型或图卷积网络,缺失时空特征挖掘能力和光伏内在物理约束;本申请将单二极管等效机理模型与双层图注意力网络联用,利用 APSO 辨识光伏物理参数精准刻画出力内在规律,依托多头注意力自适应分配场站空间关联权重,充分挖掘跨区域时空互补特性;通过设计动态不确定性加权融合策略,解决传统固定权重适配性差的问题,通过滚动预测误差与模型方差实时调整两类模型输出权重,晴天、阴雨、极端辐照等不同工况下均可自动平衡机理模型稳定性与数据模型灵敏性,相较各类单一及传统融合预测模型,在多类气象场景下均显著降低 MAE、RMSE,大幅提升预测决定系数与极端环境鲁棒性;同时融合传感数据清洗增强、物理机理与时空图深度学习的光伏功率时空预测方法,通过三级数据优化框架提升原始数据质量,结合单二极管机理模型与图注意力网络实现双向优势互补,依托动态不确定性加权策略完成预测结果融合,全面提升多气象、多样本场景下光伏功率预测精度与模型鲁棒性。
Smart Images

Figure CN122992672A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of photovoltaic power generation prediction technology, specifically relating to a method, device, electronic equipment, and medium for spatiotemporal prediction of photovoltaic power generation. Background Technology
[0002] With the continuous advancement of new power system construction, the scale of photovoltaic (PV) installations is rapidly expanding. Clustered PV power output exhibits strong intermittency, randomness, and significant spatiotemporal coupling characteristics, making accurate spatiotemporal power prediction a key support for ensuring stable grid dispatch and improving the absorption of new energy sources. Currently, PV power prediction mainly follows two technical routes: physical mechanism modeling and data-driven modeling. However, both single approaches have significant shortcomings: pure mechanism models derive power laws based on PV equivalent circuits, which, while physically interpretable, struggle to fully exploit the spatiotemporal correlation characteristics between power plants, leading to a significant increase in prediction errors under extreme weather conditions; pure data-driven models rely on massive amounts of sensor data to train networks, excelling at capturing spatiotemporal patterns, but lacking inherent physical constraints of PV, resulting in weak generalization capabilities for newly commissioned power plants and small-sample data scenarios. Furthermore, most existing technologies employ only one mechanism or data model, failing to achieve complementary advantages and making it difficult to balance prediction accuracy and scenario adaptability.
[0003] Currently, photovoltaic (PV) forecasting technologies still face multiple bottlenecks. First, field-collected irradiance and power sensor data are mixed with local outliers and global extreme values. Traditional single-anomaly detection algorithms cannot simultaneously identify both types of noise, and conventional data augmentation methods ignore the spatiotemporal constraints of PV, resulting in distorted temporal and spatial logic of generated samples. The shortage of data from small-sample sites remains difficult to alleviate effectively. Second, existing spatiotemporal deep learning models mostly employ fixed neighborhood aggregation methods, failing to adaptively distinguish the spatial influence weights of different PV sites and lacking sufficient ability to mine long-distance spatiotemporal correlations across regions. Third, existing mechanism-data fusion strategies use fixed weighting coefficients, failing to dynamically adjust the weights of the two models based on real-time prediction errors and scenario uncertainties. This results in poor adaptability to different weather conditions such as sunny days, heavy rain, and extreme irradiance, making it difficult to balance the stability of the mechanism model with the sensitivity of the data model. Furthermore, how to build an integrated data quality improvement framework, design a deep network adapted to the spatiotemporal characteristics of PV, and construct a dynamic fusion weighting mechanism remain core challenges restricting the improvement of PV power spatiotemporal forecasting accuracy.
[0004] Therefore, there is an urgent need for a new method, device, electronic equipment, and medium for spatiotemporal prediction of photovoltaic power generation to solve the existing problems. Summary of the Invention
[0005] The purpose of this invention is to provide a method, device, electronic device, and medium for spatiotemporal prediction of photovoltaic power generation, in order to solve the problem that traditional single anomaly detection algorithms cannot simultaneously identify two types of noise when the irradiance and power sensing data collected on-site are mixed with local outliers and global extreme values.
[0006] Firstly, this application provides a spatiotemporal prediction method for photovoltaic power generation, including:
[0007] Collect sensor data on irradiance, temperature, power output, and geographical location of photovoltaic power stations, and correct spatiotemporal anomalies in the sensor data under extreme weather events;
[0008] Cleaning spatiotemporal anomalies in local and global data;
[0009] Spatiotemporally consistent augmented samples are generated by constraining multiple modal conditions such as time, weather, and geography.
[0010] Construct a single diode equivalent circuit model and identify photovoltaic physical parameters;
[0011] Construct a two-layer multi-head graph attention network to extract multi-level spatiotemporal correlation features of the site;
[0012] Based on the dynamic weights calculated from the rolling prediction error and model variance, the final photovoltaic spatiotemporal power prediction value is obtained by weighted fusion of the output of the single diode equivalent circuit model and the two-layer multi-head graph attention network.
[0013] In one implementation of the first aspect, the spatiotemporal anomaly data under extreme weather events in the corrected sensing data includes:
[0014] Based on the spatiotemporal correlation of photovoltaic power plants, dynamic thresholds are determined:
[0015]
[0016] Among them, u st Q represents the upper threshold of the dynamic anomaly corresponding to the spatiotemporal window st; 0.95 (X st ) represents the photovoltaic dataset X within the spatiotemporal window st. st 95th percentile; X st This represents the raw sensor dataset of photovoltaic power station irradiance, power output, and temperature. This represents the amplification adjustment factor for the median absolute deviation (MAD). This represents the spatial distance attenuation weight term. Indicates the geographical distance between stations. The attenuation coefficient is... This represents the median absolute deviation of the data within the spatiotemporal window;
[0017] The GPD parameters are determined using the maximum likelihood method with regularization constraints.
[0018]
[0019] Where ξ represents the shape parameter of the GPD; β represents the scale parameter of the GPD; and xg represents the output sensing sample of the photovoltaic power station. GPD probability density function; log represents the natural logarithm; This represents the L2 regularization penalty coefficient; This represents the L2 regularization constraint, used to prevent parameter overfitting;
[0020] The revised data generation strategy is as follows:
[0021] in, Using a fixed value instead of random sampling, x corr This represents the corrected photovoltaic power sensing data.
[0022] In one implementation of the first aspect, the local and global anomalies in the cleaned spatiotemporal anomaly data include:
[0023] Mapping spatiotemporal data to a Lie group space to capture nonlinear features:
[0024]
[0025] in, Denotes the spacetime transformation basis functions. Denotes the adjoint representation; M represents the transformation operator mapping spatiotemporal data to the Lie group space; K represents the total number of spatiotemporal transformation basis functions; θ k This represents the weight coefficient corresponding to the k-th spatiotemporal transformation basis function;
[0026] The mixed scoring function is defined as follows:
[0027]
[0028] in, S represents the Hausdorff distance, used to quantify local density differences; hybrid S represents the comprehensive anomaly score after fusing global and local anomalies; iForest S represents the global anomaly score of the isolated forest output; LOF represents the local outlier factor score; X represents the photovoltaic spatiotemporal feature sample mapped to the Lie group space; HD() is the Hausdorff distance, used to quantify local density differences; Dynamic weights;
[0029] Adaptive adjustment of dynamic weights using the covariance matrix entropy:
[0030]
[0031] Wherein, Entropy() is the information entropy calculation function, and Entropy(Σ) represents the information entropy of the covariance matrix Σ, which is used to characterize the degree of disorder in the spatiotemporal data distribution; Σ is the photovoltaic spatiotemporal feature covariance matrix, Cov() is the covariance solver, and Σ=Cov(X) means calculating the covariance matrix for the spatiotemporal feature sample set X; N is the total feature dimension of the covariance matrix, which is used to normalize the information entropy to the interval of 0~1 to achieve adaptive weight adjustment.
[0032] In one implementation of the first aspect, generating spatiotemporally consistent augmented samples through time, weather, and geographic multimodal condition constraints includes: fusing time period, geographic association, and weather type information to construct a condition vector.
[0033] in, Indicates time period encoding; Indicates weather type code; This represents the geocoding generated by the graph attention network. Constructed based on site latitude and longitude and power grid topology; c is the multimodal condition vector used by the CT-WGAN-GP generator; t is the current time stamp; T is the total duration of the photovoltaic power generation cycle; W t The weather type label for time t;
[0034] A generator is designed by coupling ConvLSTM with temporal deconvolution using a U-Net structure:
[0035] ;
[0036] Where G() is the CT-WGAN-GP generator network; The first layer is a Gaussian random latent noise vector; the second layer is a convolutional layer that extracts the basic features of the concatenated data; the third layer is a ConvLSTM long short-term memory module used to capture the temporal dependencies of photovoltaic data; the fourth layer is a temporal deconvolutional layer used to reconstruct the spatial distribution of the power station and finally output the expanded photovoltaic spatiotemporal sample.
[0037] Temporal dependencies are captured using ConvLSTM, and spatial distribution is reconstructed using deconvolutional layers.
[0038] The discriminator is optimized using spectral normalization and a spatiotemporal attention module:
[0039] ;
[0040] In the formula, D() is the CT-WGAN-GP discriminator network; SN is the spectral normalization operation, which is used to stabilize network training and satisfy the Lipschitz continuity constraint; Attn() is the spatiotemporal attention module, which adaptively mines the temporal and spatial correlation features of photovoltaic data and finally outputs the true and false discrimination scores of samples.
[0041] During training, the gradient penalty term constrains the distribution of generated data:
[0042]
[0043] In the formula, L GP The gradient penalty loss term for CT-WGAN-GP is used to constrain the discriminator network to satisfy the continuity condition and stabilize the adversarial training process. This represents the mathematical expectation of the sample. A linear interpolation mixture of real photovoltaic spatiotemporal samples and generator-extended samples; For gradient operators; This indicates that the discriminator D is in the interpolated sample The output gradient at condition vector c; It is the L2 norm, used to calculate the magnitude of the gradient vector;
[0044] The objective function is:
[0045]
[0046] in, This indicates the generator optimization part. This indicates the discriminator optimization part. Represents the gradient penalty term. It is the weight hyperparameter of the gradient penalty term.
[0047] In one implementation of the first aspect, constructing a single-diode equivalent circuit model and identifying photovoltaic physical parameters includes:
[0048] The expression for the output current of a photovoltaic cell is:
[0049]
[0050] in, Indicates the flow through the series resistor The current, For photocurrent, The current flowing through the diode, For the flow through the parallel resistor The current;
[0051] Among them, the current flowing through the diode for:
[0052]
[0053] Flow through parallel resistor current for:
[0054]
[0055] in, Indicates the diode saturation current. This represents the ideality factor of the PN junction of a diode. Represents the Boltzmann constant. Indicates battery temperature. V represents electron charge; pv I is the output voltage of the photovoltaic array; pv I is the total output operating current of the photovoltaic system. sh R is the leakage current flowing through the parallel bypass resistor in the photovoltaic single diode model. sh The equivalent leakage resistance of the photovoltaic cell in parallel bypass;
[0056]
[0057] The expression for the output current of a photovoltaic cell is:
[0058]
[0059]
[0060] Among them, I sc This refers to the photovoltaic short-circuit current under standard test conditions; V oc This refers to the standard operating condition open-circuit voltage of a photovoltaic system. , Dimensionless fitting correction coefficients for simplified photovoltaic engineering models; I m V m These are the maximum power point current and maximum power point voltage of the photovoltaic system under standard test conditions. ln() is the reciprocal operator; ln() is the natural logarithm operator.
[0061] The parameter values under arbitrary light intensity and temperature conditions can be approximated using a compensation coefficient. The expression for the compensation coefficient is as follows:
[0062]
[0063] Where ΔT is the temperature difference between the actual battery temperature and the standard reference temperature; TM is the real-time operating temperature of the photovoltaic cell; T ref The standard test reference temperature is ΔS; the relative change in irradiance is ΔS; the real-time irradiance intensity is S. ref Standard reference irradiance; Iscref The standard operating condition short-circuit current; I mref This is the maximum power point current under standard operating conditions; V is the current-temperature correction factor; ocref This is the standard operating condition open-circuit voltage; V mcref is the voltage at the maximum power point under standard operating conditions; co is the voltage temperature decay coefficient, and b is the irradiance fitting correction coefficient;
[0064] Dynamically adjust inertia weight Identify photovoltaic physical parameters:
[0065]
[0066] Where ω is the inertia weighting coefficient; ω max ω represents the maximum upper limit of the weight. min This represents the minimum lower bound of the weight. K is the current iteration count; max The total number of iterations required to train the model completely.
[0067] The speed update formula is:
[0068] ;
[0069] in, Let be the flight velocity of the m-th particle after the (CI+1)-th iteration; This is the current velocity of the particle in the CI generation; For individual learning factors; As a global learning factor; , The numbers are uniformly random numbers in the interval [0,1]. Let m be the individual historical best position of the m-th particle; The optimal position for the entire population; This represents the current position of the m-th particle in the CI-th generation; m represents the particle number, and CI and CI+1 represent the current iteration and the next iteration generation, respectively.
[0070] In one implementation of the first aspect, the construction of a two-layer multi-head graph attention network to extract multi-layer spatiotemporal correlation features of the station includes:
[0071] The feature vector of each node is projected through a linear transformation to obtain a new feature representation:
[0072]
[0073] In the formula, Represents a node eigenvectors, Represents the weight matrix. Represents a node Features after transformation;
[0074] Determine the attention coefficient between nodes, two nodes and Its attention coefficient Represents a node To the neighbors The level of attention;
[0075]
[0076] in, Represents a learnable attention vector; Represents a vector join operation, which is a node. and nodes Feature splicing; Indicates the activation function; The unnormalized attention score of node j relative to node i in the graph attention network; , These are the latent features of nodes i and j after linear mapping, respectively;
[0077] Attention coefficient It will be normalized, so that for nodes The sum of the attention coefficients of all neighboring nodes is 1:
[0078]
[0079] In the formula, Represents a node The set of neighboring nodes;
[0080] The node representation is updated by weighted aggregation of neighbor node features based on attention coefficients. The new feature is the weighted sum of the features of all its neighboring nodes:
[0081]
[0082] in, Represents a non-linear activation function. This represents the weights calculated from the self-attention mechanism. Represents the weight matrix; It is a node eigenvectors, The updated latent features are obtained after node i is aggregated through the attention neighborhood;
[0083] Perform multiple independent attention calculations on each pair of nodes, and concatenate or average the outputs of the multiple attention heads;
[0084]
[0085] In the formula, Indicates the number of attention heads. This indicates a splicing operation. The attention coefficient assigned to neighboring node j by the node i at the head of kh; Let be the head-independent linear projection weight matrix of the khth head.
[0086] In one implementation of the first aspect, the step of calculating dynamic weights based on rolling prediction error and model variance, and weighting and fusing the outputs of the single-diode equivalent circuit model and the two-layer multi-head graph attention network to obtain the final photovoltaic spatiotemporal power prediction value includes:
[0087] The final prediction result of photovoltaic power is calculated by a weighted average of the mechanistic model and the data model:
[0088]
[0089] in, , The figures show the prediction results for a single-diode equivalent circuit model and a two-layer multi-head graph attention network, respectively. , The weights, corresponding to the single-diode equivalent circuit model and the two-layer multi-head graph attention network respectively, are calculated as follows:
[0090]
[0091] in, This indicates the rolling error over the most recent 24 hours. Indicates the model's prediction variance; For adjustable temperature hyperparameters, control the sensitivity of error to weight decay; , These are the rolling root mean square errors of the mechanistic model and the data model over the past 24 hours, respectively. , These represent the prediction variances of the two types of models, characterizing the prediction uncertainty; the variance of the mechanistic model is estimated using Monte Carlo parameter perturbation, while the variance of the data model is estimated using Dropout stochastic forward propagation.
[0092] Secondly, this application provides an apparatus comprising:
[0093] The data acquisition module is used to collect sensor data on irradiance, temperature, power output, and geographical location of photovoltaic power plants, and to correct spatiotemporal anomalies in the sensor data under extreme weather events.
[0094] The cleaning module is used to clean up local and global anomalies in spatiotemporal abnormal data;
[0095] The spatiotemporally consistent augmented sample generation module is used to generate spatiotemporally consistent augmented samples based on multimodal constraints such as time, weather, and geography.
[0096] The single-diode equivalent circuit model construction module is used to construct a single-diode equivalent circuit model and identify photovoltaic physical parameters.
[0097] The dual-layer multi-head image attention network construction module is used to construct a dual-layer multi-head image attention network to extract multi-level spatiotemporal correlation features of the station;
[0098] The prediction module is used to calculate dynamic weights based on the rolling prediction error and model variance, and to weight and fuse the outputs of the single diode equivalent circuit model and the two-layer multi-head graph attention network to obtain the final photovoltaic spatiotemporal power prediction value.
[0099] Thirdly, this application provides an electronic device, including: a processor and a memory;
[0100] The memory stores computer-executed instructions;
[0101] The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in the first aspect.
[0102] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the method described in the first aspect.
[0103] According to the above-mentioned technical solution proposed in this application, the following technical effects can be achieved: The method, device, electronic equipment, and medium for spatiotemporal prediction of photovoltaic power generation have outstanding comprehensive advantages in the field of spatiotemporal prediction of photovoltaic power. First, a complete adaptive spatiotemporal extreme value optimization three-level data quality improvement framework is constructed, which makes up for the shortcomings of existing technologies in anomaly detection and data augmentation methods. Traditional methods only use fixed thresholds or single algorithms to process anomalies, which makes it difficult to take into account local clustered noise and extreme meteorological extreme values. Moreover, conventional GAN-generated samples are prone to spatiotemporal logic breaks. This application integrates improved extreme value theory, LOF-iForest hybrid detection, and conditional spatiotemporal WGAN-GP The algorithm relies on dynamic thresholds based on geographical distance to correct extreme data, synchronously identifies global and local anomalies through hybrid scoring, and introduces spatiotemporal consistency constraints to generate samples, effectively improving the problem of scarce small-sample site data and reducing prediction errors caused by data defects at the source. It achieves deep integration of physical mechanisms and temporal spatial deep learning, overcoming the shortcomings of single models. Existing solutions mostly use equivalent mechanism models or graph convolutional networks alone, lacking spatiotemporal feature mining capabilities and the inherent physical constraints of photovoltaics. This application combines a single-diode equivalent mechanism model with a two-layer graph attention network, utilizing APSO... This method accurately characterizes the inherent laws of photovoltaic power generation by identifying physical parameters, and adaptively allocates spatial correlation weights for power plants based on multi-head attention to fully explore cross-regional spatiotemporal complementarity. By designing a dynamic uncertainty weighted fusion strategy, it addresses the poor adaptability of traditional fixed weights. Through rolling prediction errors and model variance, it adjusts the output weights of the two types of models in real time, automatically balancing the stability of the mechanism model and the sensitivity of the data model under different operating conditions such as sunny days, rainy days, and extreme irradiance. Compared with various single and traditional fusion prediction models, it significantly reduces MAE and RMSE in multiple meteorological scenarios, greatly improving the prediction determination coefficient and robustness in extreme environments. Simultaneously, it integrates sensor data cleaning and enhancement, physical mechanism, and spatiotemporal graph deep learning into a spatiotemporal photovoltaic power prediction method. A three-level data optimization framework improves the quality of the original data, and a combination of a single-diode mechanism model and a graph attention network achieves bidirectional complementary advantages. The dynamic uncertainty weighted strategy completes the fusion of prediction results, comprehensively improving the accuracy and robustness of photovoltaic power prediction under multiple meteorological and sample scenarios. Attached Figure Description
[0104] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below only involve some embodiments of this disclosure and are not intended to limit this disclosure. For those skilled in the art, other drawings can be obtained based on the following drawings without creative effort.
[0105] Figure 1 This is a schematic diagram of the overall framework of the method in the embodiments of this application; Figure 2 These are power prediction accuracy diagrams for different models of the methods in the embodiments of this application; Figure 3 This is a schematic diagram of the equivalent circuit of a single diode in a photovoltaic cell according to an embodiment of this application; Figure 4 This is a schematic diagram of a graph attention depth network for the method described in the embodiments of this application; Figure 5 This is an extreme value theory (EVT) threshold crossing diagram of the method in the embodiments of this application; Figure 6 This is a generalized Pareto distribution (GPD) QQ plot of the method in the embodiments of this application; Figure 7 This is a spatiotemporal anomaly heatmap of the method in the embodiments of this application; Figure 8 This is a WGAN-GP loss curve of the method in the embodiments of this application; Figure 9 This is a geographical location map of the photovoltaic power station according to the method of the embodiments of this application; Figure 10a , 10b 10c, 10d, 10e, 10f, and 10g are respectively the weather power prediction accuracy maps for sunny days, cloudy days, rainy days, sunny-to-cloudy days, cloudy-to-rainy days, sunny-to-rainy days, and extreme days using the method in the embodiments of this application; Figure 11 This is a frame diagram of an electronic device according to an embodiment of this application.
[0106] In the diagram: 900, electronic device; 910, processor; 920, read-only memory; 930, storage device; 940, random access memory; 950, bus; 960, input / output interface; 970, input device; 980, output device; 990, communication device. Detailed Implementation
[0107] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0108] Unless otherwise defined, the technical or scientific terms used in this disclosure shall have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms “first,” “second,” and similar terms used in this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as “comprising” or “including” mean that the element or object preceding the word encompasses the element or object listed following the word and its equivalents, without excluding other elements or objects. Terms such as “connected” or “linked” are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as “upper,” “lower,” “left,” and “right” are used only to indicate relative positional relationships, which may change accordingly when the absolute position of the described objects changes. It should be understood that the various steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0109] In one aspect, according to one or more embodiments, a spatiotemporal prediction method for photovoltaic power generation is provided, comprising three parts: data quality improvement, dual-model construction, and dynamic fusion prediction.
[0110] Data on irradiance, temperature, power output, and geographic location of each photovoltaic power station were collected to build an adaptive spatiotemporal extreme value optimization framework. An improved extreme value theory was used in combination with a dynamic threshold for geographic distance to correct extreme weather anomalies. Global and local outliers were cleaned simultaneously through the LOF-iForest hybrid scoring mechanism. Then, spatiotemporal consistent augmented samples were generated based on conditional spatiotemporal WGAN-GP by introducing time, weather, and geographic multimodal constraints to complete data preprocessing.
[0111] Two types of prediction models were built in parallel. On the mechanism side, a single diode equivalent circuit model was constructed, and an adaptive particle swarm optimization algorithm was used to identify key physical parameters of photovoltaics. On the data side, a two-layer multi-head graph attention network was built to extract multi-level spatiotemporal correlation features of the power station.
[0112] Dynamic weights are calculated based on rolling prediction error and model variance. The final photovoltaic spatiotemporal power prediction value is obtained by weighted fusion of the mechanistic model and graph attention network outputs. Model accuracy is verified using MAE, RMSE, and R².
[0113] Specifically, such as Figure 1 As shown, it includes the following steps:
[0114] Step S1: Construct an adaptive spatiotemporal extreme value optimization framework for improving the quality of photovoltaic data, and correct spatiotemporal anomalous data under extreme weather events through improved extreme value theory;
[0115] Step S2: Clean up local and global anomalies using the LOF-iForest hybrid anomaly detection mechanism;
[0116] Step S3: Design a conditional spatiotemporal WGAN-GP algorithm to enhance the spatiotemporal consistency of small sample data;
[0117] Step S4: Establish a framework for predicting sensor data and physical mechanisms by fusing a mechanistic model based on a single diode equivalent model and a data model based on a graph attention deep network. Propose a dynamic uncertainty weighting strategy to fuse the prediction results of the two models.
[0118] Step S1 constructs an adaptive spatiotemporal extremum optimization framework for improving photovoltaic data quality, and corrects spatiotemporal anomalies in data under extreme weather events through improved extremum theory:
[0119] Considering the spatiotemporal correlation of photovoltaic power plants, the dynamic threshold is designed as follows:
[0120]
[0121] In the formula, Indicates the geographical distance between stations. The attenuation coefficient is... Indicates the median absolute deviation of data within the spatiotemporal window; u st Q is the threshold value for the dynamic anomaly corresponding to the spatiotemporal window st; 0.95 (X st ) represents the photovoltaic dataset X within the spatiotemporal window st. st 95th percentile; X st This is the raw sensor dataset for photovoltaic power station irradiance, power output, and temperature. This is the amplification adjustment factor for the median absolute deviation (MAD). This is the spatial distance attenuation weighting term. This formula enhances the threshold consistency of neighboring stations by weighting based on geographical distance, avoiding excessive sensitivity of the threshold of a single station to local disturbances.
[0122] GPD parameter estimation employs a regularized maximum likelihood method:
[0123]
[0124] In the formula, ξ is the shape parameter of the GPD; β is the scale parameter of the GPD; and xg is the output sensor sample of the photovoltaic power station. Let be the probability density function of GPD; log is the natural logarithm. This is the L2 regularization penalty coefficient; This is an L2 regularization constraint term used to prevent parameter overfitting.
[0125] Regularization suppresses parameter overfitting and improves the model's generalization ability in extreme scenarios. The revised data generation strategy is as follows:
[0126]
[0127] In the formula, A fixed value of 0.5 is used instead of random sampling to eliminate the spatiotemporal data inconsistency caused by randomness; x corr This is the corrected photovoltaic power sensing data.
[0128] Step S2 combines the LOF-iForest hybrid anomaly detection mechanism to clean up local and global anomalies:
[0129] Photovoltaic data anomalies exhibit a coexistence of local clustering and global outliers, and traditional isolation forests (iForest) have limited ability to detect local density changes. Therefore, a hybrid anomaly scoring mechanism is proposed, integrating the Local Outlier Factor (LOF) and iForest.
[0130] Mapping spatiotemporal data to a Lie group space to capture nonlinear features:
[0131]
[0132] In the formula, For spacetime transformation basis functions, The θ represents the adjoint representation; M is the transformation operator mapping spatiotemporal data to the Lie group space; K is the total number of spatiotemporal transformation basis functions; k These are the weight coefficients corresponding to the k-th spatiotemporal transformation basis function; based on this, the hybrid scoring function is defined as:
[0133]
[0134] In the formula, S is the Hausdorff distance, used to quantify local density differences; hybrid The comprehensive anomaly score is the result of fusing global and local anomalies; S iForest The global anomaly score output for isolated forests; S LOF X represents the score for the local outlier factor; X is the photovoltaic spatiotemporal feature sample mapped to the Lie group space; HD() is the Hausdorff distance, used to quantify local density differences; The weights are dynamic and adaptively adjusted using the entropy of the covariance matrix.
[0135]
[0136] In the formula, Entropy() is the information entropy calculation function, and Entropy(Σ) represents the information entropy of the covariance matrix Σ, which is used to characterize the degree of disorder in the spatiotemporal data distribution; Σ is the photovoltaic spatiotemporal feature covariance matrix, Cov() is the covariance solver, and Σ=Cov(X) means calculating the covariance matrix for the spatiotemporal feature sample set X; N is the total feature dimension of the covariance matrix, which is used to normalize the information entropy to the interval of 0~1 to achieve adaptive weight adjustment.
[0137] This mechanism makes the model dependent on global statistical properties in stable scenarios. ), while enhancing local detection capabilities in mutation scenarios ( ).
[0138] Step S3: Design the spatiotemporal WGAN-GP algorithm to enhance the spatiotemporal consistency of small sample data.
[0139] Small sample sizes and missing data severely limit the generalization performance of prediction models. Traditional generative adversarial networks often suffer from temporal discontinuities and spatial correlation distortions in the generated data due to neglecting spatiotemporal constraints. This paper proposes a Conditional Temporal Wasserstein Time Generative Network with Gradient Penalty (CT-WGAN-GP) framework, which achieves high-quality data generation through multimodal conditional guidance and consistency constraints.
[0140] By integrating time period, geographical correlation, and weather type information, a condition vector is constructed:
[0141]
[0142] In the formula, Encoding for time periods; Encode the weather type; The geocoding generated by the graph attention network. Constructed based on site latitude and longitude and power grid topology; c is the multimodal condition vector used by the CT-WGAN-GP generator; t is the current time stamp; T is the total duration of the photovoltaic power generation cycle; W t The weather type label for time t.
[0143] The generator design employs a U-Net structure coupled with ConvLSTM and temporal deconvolution:
[0144]
[0145] In the formula, G() is the CT-WGAN-GP generator network; z is the Gaussian random latent noise vector; Conv() is the convolutional layer, which extracts the basic features of the spliced data; LSTM() is the ConvLSTM convolutional long short-term memory module, which is used to capture the temporal dependence of photovoltaic data; DeConv() is the temporal deconvolutional layer, which is used to reconstruct the spatial distribution of the power station and finally output the expanded photovoltaic spatiotemporal sample.
[0146] This structure captures temporal dependencies using ConvLSTM and reconstructs spatial distributions using deconvolutional layers.
[0147] Discriminator optimization introduces Spectral Normalization and a spatiotemporal attention module:
[0148]
[0149] In the formula, D() is the CT-WGAN-GP discriminator network; x represents the output sensor sample of the photovoltaic power station; SN is the spectrum normalization operation, used to stabilize network training and satisfy the Lipschitz continuity constraint; Attn() is the spatiotemporal attention module, which adaptively mines the temporal and spatial correlation features of photovoltaic data and finally outputs the true and false discrimination score of the sample.
[0150] The spectral normalization constrains the Lipschitz continuity of the discriminator, and the attention mechanism focuses on key spatiotemporal features.
[0151] During training, the gradient penalty term constrains the distribution of generated data:
[0152]
[0153] In the formula, L GP The gradient penalty loss term for CT-WGAN-GP is used to constrain the discriminator network to satisfy the continuity condition and stabilize the adversarial training process. This represents the mathematical expectation of the sample. A linear interpolation mixture of real photovoltaic spatiotemporal samples and generator-extended samples; For gradient operators; This indicates that the discriminator D is in the interpolated sample The output gradient at condition vector c; It is the L2 norm, used to calculate the magnitude of the gradient vector.
[0154] The objective function of the proposed CT-WGAN-GP framework is as follows:
[0155]
[0156] In the formula, For the generator optimization part, For the discriminator optimization part, This is a gradient penalty term;
[0157] min max is a minimax game, which is the alternating optimization objective for WGAN adversarial training:
[0158] `max`: With a fixed generator G, maximize the objective function of the discriminator D. The discriminator's optimization objective is to maximize the score of the true samples. Minimize the generated sample score This maximizes the score difference between real and fake samples, thereby improving the discriminator's ability to distinguish between real and fake samples.
[0159] min: With the discriminator D fixed, minimize the overall objective function. The generator's optimization objective is to minimize the discriminator's score on the generated samples, forcing the generator to output samples that are highly similar to the real samples, thus deceiving the discriminator.
[0160] Overall logic: The generator and discriminator compete against each other and update alternately, forming a zero-sum game until a Nash equilibrium is reached, at which point the distribution of generated samples approximates the distribution of real data.
[0161] It is a weight hyperparameter of the gradient penalty (GP) term, used only to balance the magnitudes of the main adversarial loss and the gradient penalty loss in WGAN, constraining the discriminator to satisfy continuity and eliminating gradient explosion / vanishing and mode collapse problems during WGAN training.
[0162] Step S4 establishes a framework for predicting sensor data and physical mechanisms by fusing a mechanistic model based on a single diode equivalent model and a data model based on a graph attention deep network. A dynamic uncertainty weighting strategy is proposed to fuse the prediction results of the two models.
[0163] S41. The physical characteristics of photovoltaic cells determine the nonlinear relationship between their output power and irradiance and temperature. To better understand the variation patterns of photovoltaic cell output voltage, current, and power, and their influencing factors, a single-diode equivalent circuit is selected to model the photovoltaic panel, and a short-term photovoltaic power prediction model is established based on this model.
[0164] S42. Graph Attention Network (GAT) is a deep learning model based on graph-structured data, and is an important variant of Graph Neural Network (GNN). Unlike traditional Graph Convolutional Network (GCN), the GAT model introduces an attention mechanism on top of GCN, enabling each node to adaptively learn the weights of different neighbors when aggregating information from neighboring nodes, thus capturing the relationships between nodes in the graph more flexibly.
[0165] In the GCN model, a node's representation is updated by averaging (or weighted averaging) the contributions of its neighbors, with the contribution weights of all neighbors either fixed or defined by the graph structure. However, in many applications, the importance of a node's neighbors varies; some neighbors have a greater impact on the node, while others may have a smaller impact. The GAT model introduces a self-attention mechanism, allowing each node to dynamically learn different weights based on the characteristics of its neighbors when aggregating information about them.
[0166] S43. The mechanistic model based on the single-diode equivalent model and adaptive particle swarm optimization algorithm has significant advantages in extreme weather (such as strong radiation / rainstorms) and newly installed sites with insufficient historical data; the data model based on graph attention deep network is more suitable for stable meteorological conditions and long-term operating sites with sufficient data. Considering the characteristics and applicability of the mechanistic model and the data model, a dynamic uncertainty weighting strategy is proposed based on the prediction results of the mechanistic model and the data model.
[0167] like Figure 3 As shown, step S41 establishes a mechanism model based on the single diode equivalent model:
[0168] In the single-diode equivalent circuit of a photovoltaic cell, the parallel resistance includes surface contamination and edge leakage resistance of the solar panel, while the series resistance mainly includes the bulk resistance of the semiconductor, the contact resistance between the metal electrode and the solar panel, and the ohmic resistance between the electrodes. These resistances affect the losses and performance of the photovoltaic cell.
[0169] According to Kirchhoff's theorem, the expression for the output current of a photovoltaic cell is:
[0170]
[0171] In the formula, For the flow through the series resistor The current, For photocurrent, The current flowing through the diode, For the flow through the parallel resistor The current.
[0172] Among them, the current flowing through the diode for:
[0173]
[0174] Flow through parallel resistor current for:
[0175]
[0176] In the formula, This is the diode saturation current. The ideality factor of the diode PN junction (value 1-5), Boltzmann constant ( ), For battery temperature, For electron charge ( );V pv I is the output voltage of the photovoltaic array; pv I is the total output operating current of the photovoltaic system. sh R is the leakage current flowing through the parallel bypass resistor in the photovoltaic single diode model. sh This is the equivalent leakage resistance of the photovoltaic cell in parallel bypass.
[0177] In summary,
[0178]
[0179] In the actual production and use of photovoltaic cells, the maximum power current of the cell is generally specified under standard illumination and other conditions. Short-circuit current Maximum power voltage and open circuit voltage And based on these parameters, a mathematical model was constructed to simulate output characteristics similar to those of photovoltaic cells. Curve. At this point, the expression for the output current of the photovoltaic cell is:
[0180]
[0181]
[0182] In the formula, I sc This refers to the photovoltaic short-circuit current under standard test conditions; V oc This refers to the standard operating condition open-circuit voltage of a photovoltaic system. , Dimensionless fitting correction coefficients for simplified photovoltaic engineering models; I m V mThese are the maximum power point current and maximum power point voltage of the photovoltaic system under standard test conditions. `ln()` is the reciprocal operation; `ln()` is the natural logarithm operation.
[0183] In actual simulations, the four parameters mentioned above will change according to a certain pattern. Therefore, it is necessary to design corresponding compensation coefficients to approximate the parameter values under arbitrary light intensity and temperature conditions. The expression for the compensation coefficient is as follows:
[0184]
[0185] In the formula, ΔT is the temperature difference between the actual temperature of the battery and the standard reference temperature; TM is the real-time operating temperature of the photovoltaic cell; T ref The standard test reference temperature is ΔS; the relative change in irradiance is ΔS; the real-time irradiance intensity is S. ref Standard reference irradiance; I scref The standard operating condition short-circuit current; I mref This is the maximum power point current under standard operating conditions; V is the current-temperature correction factor; ocref This is the standard operating condition open-circuit voltage; V mcref denoted as the maximum power point voltage under standard operating conditions; co is the voltage-temperature attenuation coefficient; and b is the irradiance fitting correction coefficient.
[0186] The parameter identification employs the Adaptive Particle Swarm Optimization (APSO) algorithm, dynamically adjusting the inertia weights. :
[0187]
[0188] In the formula, ω is the inertia weighting coefficient; ω max ω represents the maximum upper limit of the weight. min This represents the minimum lower bound of the weight. K is the current iteration count; max The total number of iterations required to train the model completely.
[0189] The speed update formula is:
[0190]
[0191] In the formula, Let be the flight velocity of the m-th particle after the (CI+1)-th iteration; This is the current velocity of the particle in the CI generation; For individual learning factors; As a global learning factor; , The numbers are uniformly random numbers in the interval [0,1]. Let m be the individual historical best position of the m-th particle; The optimal position for the entire population; This represents the current position of the m-th particle in the CI-th generation; m represents the particle number, and CI and CI+1 represent the current iteration and the next iteration generation, respectively.
[0192] like Figure 4 As shown, step S42 establishes the data model for the graph attention deep network:
[0193] The core mechanism of GAT is the self-attention mechanism between nodes, which weights neighboring nodes through attention coefficients. The main steps include:
[0194] (1) Linear transformation of node features
[0195] The feature vector of each node is transformed by a linear transformation (by a trainable weight matrix). Projecting this onto the feature yields a new feature representation:
[0196]
[0197] In the formula, It is a node eigenvectors, It is a weight matrix. It is a node The transformed features.
[0198] (2) Calculate the attention coefficient between nodes
[0199] GAT determines the relationship between nodes by calculating the attention coefficient between each pair of nodes. For two nodes in the graph... and Its attention coefficient Represents a node To the neighbors The degree of attention received. This coefficient is typically calculated using a learnable attention mechanism:
[0200]
[0201] In the formula, It is a learnable attention vector; Represents a vector join operation, which is a node. and nodes Feature splicing; It is an activation function, typically used to avoid the "dead neuron" problem; The unnormalized attention score of node j relative to node i in the graph attention network; , These are the latent features of nodes i and j after linear mapping, respectively.
[0202] Attention coefficient It will be normalized, so that for nodes The sum of the attention coefficients of all neighboring nodes is 1:
[0203]
[0204] In the formula, Represents a node The set of neighboring nodes.
[0205] (3) Feature weighted aggregation
[0206] After the attention coefficient, GAT updates the node representation by weighted aggregation of features from neighboring nodes. The new feature is the weighted sum of the features of all its neighboring nodes:
[0207]
[0208] In the formula, It is a non-linear activation function (such as ReLU). The weights are calculated from the self-attention mechanism. It is a weight matrix. It is a node eigenvectors, The updated latent feature is obtained after node i is aggregated through the attention neighborhood.
[0209] (4) Multi-head attention mechanism
[0210] To enhance the expressive power of the model, GAT typically employs a multi-head attention mechanism. This involves performing multiple independent attention calculations on each pair of nodes, then concatenating or averaging the outputs of the multiple attention heads. Multi-head attention mechanisms can improve the model's ability to learn complex graph structures.
[0211]
[0212] In the formula, It's about the number of heads to focus on. Indicates a splicing operation; The attention coefficient assigned to neighboring node j by the node i at the head of kh; Let be the head-independent linear projection weight matrix of the khth head.
[0213] Step S43 integrates sensor data and physical mechanism predictions, proposes a dynamic uncertainty weighting strategy, and fuses the prediction results of the two types of models:
[0214] The final prediction result of photovoltaic power is calculated by a weighted average of the mechanistic model and the data model:
[0215]
[0216] In the formula, , These are the prediction results from the mechanistic model and the data model, respectively. , The weights, corresponding to the mechanistic model and the data model respectively, are calculated as follows:
[0217]
[0218] In the formula, Represents the rolling error over the most recent 24 hours. The model predicts the variance; For adjustable temperature hyperparameters, control the sensitivity of error to weight decay; , These are the rolling root mean square errors of the mechanistic model and the data model over the past 24 hours, respectively. , These represent the prediction variances of the two types of models, characterizing the prediction uncertainty; the variance of the mechanistic model is estimated using Monte Carlo parameter perturbation, while the variance of the data model is estimated using Dropout stochastic forward propagation.
[0219] like Figure 2 , Figure 10a , Figure 10b , Figure 10c , Figure 10d , Figure 10e , Figure 10f , Figure 10g As shown, to verify the advancement and effectiveness of the method in this application, spring photovoltaic power output data from a region in Northwest China was selected, totaling 90 days. The data includes photovoltaic power data and temperature and irradiance characteristics, with a temporal resolution of 15 minutes. Simultaneously, the peak photovoltaic power output period from 7:00 to 17:00 each day was selected as the prediction dataset, with 41 data points per sample per day, totaling 3690 data points.
[0220] Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Coefficient of Determination (R-squared, R²) are selected as evaluation indicators, as shown in the formula:
[0221]
[0222]
[0223]
[0224] In the formula, Indicates the predicted value; Indicates the actual value; Indicates the total sample size; This is the mean of all real power samples.
[0225] An adaptive spatiotemporal extremum optimization framework for improving photovoltaic data quality is constructed, achieving a three-level data quality improvement process: data correction, anomaly cleaning, and data augmentation. The dynamic thresholds calculated based on the improved extremum theory (EVT) and the exceeding limits of actual photovoltaic power data are shown below. Figure 5 As shown. The horizontal axis represents the sample number, and the vertical axis represents the power threshold. The red horizontal line in the figure represents the dynamic threshold calculated by equation (1). .Depend on Figure 5 As can be seen, the power of most samples fluctuates steadily below the threshold, with only a few instances of significant exceedance (highlighted by red dots), indicating that these points correspond to extreme high-power events. The distribution of exceedance points exhibits both local clustering and discrete isolation, verifying the effectiveness of the EVT dynamic threshold in capturing different types of extreme values.
[0226] For "exceeding the limit" data, the QQ plot fitted based on the generalized Pareto distribution (GPD) is as follows: Figure 6 As shown, this graph is used to test the goodness of fit of the GPD model to the over-limit distribution. The horizontal axis represents the theoretical quantiles, and the vertical axis represents the sample quantiles. If a point in the graph falls near the diagonal, it indicates a good fit to the distribution. Most points are closely distributed near the diagonal, with only slight deviations at the highest few quantiles, proving that the GPD model can accurately characterize the tail distribution of the power over-limit.
[0227] The anomaly marker matrix, arranged by time step (41 points from 7:00 to 17:00) and day sequence (90 days), is as follows: Figure 7 As shown, this is presented in heatmap form. The horizontal axis represents the sample number, the vertical axis represents the time step, and the color bars represent anomaly scores (0 / 1 after binarization). Figure 7 It can be seen that anomalies are more concentrated during daytime power output peaks and extreme weather days, especially during the midday period of 11:00–14:00, where multiple clusters occur, reflecting the most intense power fluctuations during this period. Anomaly detection can effectively capture both local and global outliers. In addition, a small number of isolated anomalies are distributed in the early morning and evening, suggesting that the model is also sensitive to noise during the low power output phase at the edges.
[0228] The curves showing the changes in discriminator loss D_loss and generator loss G_loss with the number of iterations during the training of Conditional Spatiotemporal WGAN-GP are as follows: Figure 8 As shown. The horizontal axis represents the number of iterations, and the vertical axis represents the loss value. Figure 8It can be seen that D_loss and G_loss fluctuate significantly in the first few hundred iterations, and then gradually converge to a relatively stable state after about 2000 iterations. Furthermore, D_loss oscillates around G_loss, indicating that the generator and discriminator have reached a dynamic balance. This convergence behavior verifies the effectiveness of the gradient penalty term for stable GAN training, and also means that the spatiotemporal consistency and realism of the generated samples have basically met the augmentation requirements at this stage.
[0229] The geographical location of photovoltaic power stations is as follows Figure 9 As shown, the geographical distribution of power stations varies significantly, and the spatial relationships between nodes are complex. While single-layer graph attention networks can extract local features of neighboring nodes, they struggle to fully capture the dynamic geographic-meteorological coupling relationships between power stations. Therefore, a two-layer GAT structure is adopted. The first layer learns the direct spatial dependencies between adjacent power stations through a multi-head attention mechanism, while the second layer focuses on the indirect correlation features of cross-regional power stations. Combined with the time-series characteristics of meteorological data, this achieves deep fusion of multi-level spatiotemporal features. Compared to a single-layer GAT, the two-layer structure enhances the modeling ability of key power stations and long-distance correlations through hierarchical attention weight allocation, thereby more accurately representing the spatial complementarity characteristics of photovoltaic power output.
[0230] To verify the effectiveness of the proposed method for fusing sensor data and physical mechanisms, SDM-GAT (mechanism-data hybrid model), GAT (data-only model), GCN, Transformer, LightGBM, LSTM, and SDM (mechanism-only model) were selected for comparison. Table 1 shows that the MAE and RMSE of the SDM-GAT model are significantly lower than the other models, and its R² is optimal. SDM-GAT, by integrating the physical mechanism of the Single Diode Equivalent Model (SDM) with the data-driven characteristics of GAT, corrects the prediction bias of pure data models under extreme weather conditions. Its MAE is reduced by 4.2% and R² is improved by 0.17% compared to GAT. GAT, with its attention mechanism, dynamically allocates node weights, reducing MAE by 10.0% compared to the fixed neighborhood aggregation method of GCN, indicating its stronger ability to model heterogeneous spatial relationships. The SDM model, which only considers the mechanism, has a significantly higher prediction error than the hybrid model due to ignoring spatiotemporal correlation, verifying the compensating effect of data-driven characteristics on the error of the mechanism model. Compared with Transformer, LightGBM, and LSTM, SDM-GAT reduces MAE by 28.4%, 43.9%, and 53.5%, respectively, highlighting the comprehensive advantages of integrating sensor data and physical mechanism methods in complex scenarios.
[0231] Table 1 Power prediction accuracy of different models
[0232]
[0233] For different weather types, the prediction accuracy of SDM-GAT (mechanism-data hybrid driven model) is superior to traditional methods. Under sunny conditions, the MAE is only 0.0042kW, with optimal R², indicating that under stable weather conditions, the hybrid model can accurately capture the linear relationship between irradiance and temperature. Under cloudy and rainy conditions, the prediction error is significantly lower than that of the single model and the GCN model, proving that the synergistic optimization of spatiotemporal characteristics and physical mechanisms effectively suppresses the fluctuation interference of cloudy and rainy weather. In weather change scenarios, the errors for sunny-to-cloudy, cloudy-to-rainy, and sunny-to-rainy days are reduced by 15%~25% compared to the single model, proving that the hybrid model has a stronger adaptability to meteorological changes. In extreme day scenarios, the MAE of SDM-GAT is reduced by 7.8% compared to the pure data model, verifying the effect of the three-level collaborative framework for photovoltaic data quality improvement based on "data correction-anomaly cleaning-data augmentation" on the correction of extreme data, and verifying the effectiveness of the proposed method.
[0234] Table 2 Power Forecast Accuracy for Different Weather Types
[0235]
[0236] This application constructs an adaptive spatiotemporal extremum optimization framework for improving photovoltaic data quality. It corrects spatiotemporal anomalies in data under extreme weather events using an improved extremum theory, cleans local and global anomalies using a hybrid LOF-iForest anomaly detection mechanism, and designs a conditional spatiotemporal WGAN-GP algorithm to enhance the spatiotemporal consistency of small sample data. A framework for predicting sensor data and physical mechanisms is established, fusing a mechanistic model based on a single-diode equivalent model and a data model based on a graph attention deep network. A dynamic uncertainty weighting strategy is proposed to fuse the prediction results of the two models. Simulation verification using data from an actual photovoltaic power station in Northwest China demonstrates that, compared with traditional methods, the collaborative optimization of spatiotemporal feature mining and physical mechanisms significantly improves prediction accuracy and robustness under extreme weather conditions.
[0237] Secondly, according to one or more embodiments, a photovoltaic power generation spatiotemporal prediction device is provided, comprising:
[0238] The data acquisition module is used to collect sensor data on irradiance, temperature, power output, and geographical location of photovoltaic power plants, and to correct spatiotemporal anomalies in the sensor data under extreme weather events.
[0239] The cleaning module is used to clean up local and global anomalies in spatiotemporal abnormal data;
[0240] The spatiotemporally consistent augmented sample generation module is used to generate spatiotemporally consistent augmented samples based on multimodal constraints such as time, weather, and geography.
[0241] The single-diode equivalent circuit model construction module is used to construct a single-diode equivalent circuit model and identify photovoltaic physical parameters.
[0242] The dual-layer multi-head image attention network construction module is used to construct a dual-layer multi-head image attention network to extract multi-level spatiotemporal correlation features of the station;
[0243] The prediction module is used to calculate dynamic weights based on the rolling prediction error and model variance, and to weight and fuse the outputs of the single diode equivalent circuit model and the two-layer multi-head graph attention network to obtain the final photovoltaic spatiotemporal power prediction value.
[0244] Thirdly, according to one or more embodiments, an electronic device is provided, including: a processor and a memory;
[0245] The memory stores computer-executed instructions;
[0246] The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in the first aspect.
[0247] Fourthly, according to one or more embodiments, a computer-readable storage medium is provided, wherein a computer program is stored therein, which, when run on a computer, causes the computer to perform the method as described in the first aspect.
[0248] To implement the above embodiments, embodiments of this application also provide an electronic device. (See reference...) Figure 11 This document illustrates a structural schematic of an electronic device 900 used to implement this embodiment. This schematic is merely an example and should not be construed as limiting the functionality or scope of this embodiment. The electronic device 900 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), tablet computers, portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers.
[0249] Electronic device 900 may include processor 910 (such as central processing unit, graphics processor, etc.), which can perform various actions and processes according to programs stored in read-only memory 920 (ROM) or programs loaded from storage device 930 into random access memory 940 (RAM). Random access memory 940 also stores various programs and data required for the operation of electronic device 900.
[0250] The processor 910, read-only memory 920, and random access memory 940 are interconnected via bus 950.
[0251] The bus 950 is also connected to an input / output interface 960; the input / output interface 960 can connect to: input devices 970 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 980 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 930 including, for example, magnetic tape, hard disk, etc.; and communication devices 990 that allow the electronic device 900 to exchange data with other devices wirelessly or via wired communication. It should be understood that it is not required to implement or possess all the devices shown in this application. More or fewer devices may be implemented or possessed alternatively.
[0252] According to this embodiment, the process described above with reference to the flowchart can be implemented as a computer software program. For example, this embodiment includes a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart, which can be downloaded and installed from a network via a communication device 990, or installed from a storage device 930, or installed from a read-only memory 920. When the computer program is executed by the processor 910, it performs the functions defined in the method of this embodiment.
[0253] It should be noted that the aforementioned computer-readable storage medium can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. Computer-readable storage media include, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. A computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this embodiment, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. The propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0254] The aforementioned computer-readable storage medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0255] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.
[0256] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server.
[0257] In cases involving remote computers, the remote computer can be connected to the user's computer through any type of network—including a local area network (LAN) or a wide area network (WAN)—or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0258] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. Each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0259] The units involved in the embodiments of this disclosure can be implemented in software or in hardware. The names of the units are not, in some cases, limiting the scope of the unit itself.
[0260] The functions described above can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0261] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0262] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
[0263] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A spatiotemporal prediction method for photovoltaic power generation, characterized in that: include: Collect sensor data on irradiance, temperature, power output, and geographical location of photovoltaic power stations, and correct spatiotemporal anomalies in the sensor data under extreme weather events; Cleaning spatiotemporal anomalies in local and global data; Spatiotemporally consistent augmented samples are generated by constraining multiple modal conditions such as time, weather, and geography. Construct a single diode equivalent circuit model and identify photovoltaic physical parameters; Construct a two-layer multi-head graph attention network to extract multi-level spatiotemporal correlation features of the site; Based on the dynamic weights calculated from the rolling prediction error and model variance, the final photovoltaic spatiotemporal power prediction value is obtained by weighted fusion of the output of the single diode equivalent circuit model and the two-layer multi-head graph attention network.
2. The method for spatiotemporal prediction of photovoltaic power generation according to claim 1, characterized in that: The spatiotemporal anomaly data under extreme weather events in the corrected sensing data include: Based on the spatiotemporal correlation of photovoltaic power plants, dynamic thresholds are determined: ; Among them, u st Q represents the upper threshold of the dynamic anomaly corresponding to the spatiotemporal window st; 0.95 (X st ) represents the photovoltaic dataset X within the spatiotemporal window st. st 95th percentile; X st This represents the raw sensor dataset of photovoltaic power station irradiance, power output, and temperature. This represents the amplification adjustment factor for the median absolute deviation (MAD). This represents the spatial distance attenuation weight term. Indicates the geographical distance between stations. The attenuation coefficient is... This represents the median absolute deviation of the data within the spatiotemporal window; The GPD parameters are determined using the maximum likelihood method with regularization constraints. ; Where ξ represents the shape parameter of the GPD; β represents the scale parameter of the GPD; and xg represents the output sensing sample of the photovoltaic power station. GPD probability density function; log represents the natural logarithm; This represents the L2 regularization penalty coefficient; This represents the L2 regularization constraint, used to prevent parameter overfitting; The revised data generation strategy is as follows: ; in, Using a fixed value instead of random sampling, x corr This represents the corrected photovoltaic power sensing data.
3. The method for spatiotemporal prediction of photovoltaic power generation according to claim 1, characterized in that: The local and global anomalies in the cleaned spatiotemporal anomaly data include: Mapping spatiotemporal data to a Lie group space to capture nonlinear features: ; in, Denotes the spacetime transformation basis functions. Denotes the adjoint representation; M represents the transformation operator mapping spatiotemporal data to the Lie group space; K represents the total number of spatiotemporal transformation basis functions; θ k This represents the weight coefficient corresponding to the k-th spatiotemporal transformation basis function; The mixed scoring function is defined as follows: ; in, S represents the Hausdorff distance, used to quantify local density differences; hybrid S represents the comprehensive anomaly score after fusing global and local anomalies; iForest S represents the global anomaly score of the isolated forest output; LOF represents the local outlier factor score; X represents the photovoltaic spatiotemporal feature sample mapped to the Lie group space; HD() is the Hausdorff distance, used to quantify local density differences; Dynamic weights; Adaptive adjustment of dynamic weights using the covariance matrix entropy: ; Wherein, Entropy() is the information entropy calculation function, and Entropy(Σ) represents the information entropy of the covariance matrix Σ, which is used to characterize the degree of disorder in the spatiotemporal data distribution; Σ is the photovoltaic spatiotemporal feature covariance matrix, Cov() is the covariance solver, and Σ=Cov(X) means calculating the covariance matrix for the spatiotemporal feature sample set X; N is the total feature dimension of the covariance matrix, which is used to normalize the information entropy to the interval of 0~1 to achieve adaptive weight adjustment.
4. The method for spatiotemporal prediction of photovoltaic power generation according to claim 1, characterized in that: The generation of spatiotemporally consistent augmented samples through time, weather, and geographic multimodal constraints includes: fusing time period, geographic association, and weather type information to construct a condition vector. ; in, Indicates time period encoding; Indicates weather type code; This represents the geocoding generated by the graph attention network. Constructed based on site latitude and longitude and power grid topology; c is the multimodal condition vector used by the CT-WGAN-GP generator; t is the current time stamp; T is the total duration of the photovoltaic power generation cycle; W t The weather type label for time t; A generator is designed by coupling ConvLSTM with temporal deconvolution using a U-Net structure: ; Wherein, G() is the CT-WGAN-GP generator network; The first layer is a Gaussian random latent noise vector; the second layer is a convolutional layer that extracts the basic features of the concatenated data; the third layer is a ConvLSTM long short-term memory module used to capture the temporal dependencies of photovoltaic data; the fourth layer is a temporal deconvolutional layer used to reconstruct the spatial distribution of the power station and finally output the expanded photovoltaic spatiotemporal sample. Temporal dependencies are captured using ConvLSTM, and spatial distribution is reconstructed using deconvolutional layers. The discriminator is optimized using spectral normalization and a spatiotemporal attention module: ; In the formula, D() is the CT-WGAN-GP discriminator network; SN is the spectral normalization operation, which is used to stabilize network training and satisfy the Lipschitz continuity constraint; Attn() is the spatiotemporal attention module, which adaptively mines the temporal and spatial correlation features of photovoltaic data and finally outputs the true and false discrimination scores of samples. During training, the gradient penalty term constrains the distribution of generated data: ; In the formula, L GP The gradient penalty loss term for CT-WGAN-GP is used to constrain the discriminator network to satisfy the continuity condition and stabilize the adversarial training process. This represents the mathematical expectation of the sample. A linear interpolation mixture of real photovoltaic spatiotemporal samples and generator-extended samples; For gradient operators; This indicates that the discriminator D is in the interpolated sample The output gradient at condition vector c; It is the L2 norm, used to calculate the magnitude of the gradient vector; The objective function is: ; in, This indicates the generator optimization part. This indicates the discriminator optimization part. Represents the gradient penalty term. It is the weight hyperparameter of the gradient penalty term.
5. The method for spatiotemporal prediction of photovoltaic power generation according to claim 1, characterized in that: The construction of the single-diode equivalent circuit model and the identification of photovoltaic physical parameters include: The expression for the output current of a photovoltaic cell is: ; in, Indicates the flow through the series resistor The current, For photocurrent, The current flowing through the diode, For the flow through the parallel resistor The current; Among them, the current flowing through the diode for: ; Flow through parallel resistor current for: ; in, Indicates the diode saturation current. This represents the ideality factor of the PN junction of a diode. Represents the Boltzmann constant. Indicates battery temperature. V represents electron charge; pv I is the output voltage of the photovoltaic array; pv I is the total output operating current of the photovoltaic system. sh R is the leakage current flowing through the parallel bypass resistor in the photovoltaic single diode model. sh The equivalent leakage resistance of the photovoltaic cell in parallel bypass; ; The expression for the output current of a photovoltaic cell is: ; ; Among them, I sc This refers to the photovoltaic short-circuit current under standard test conditions; V oc This refers to the standard operating condition open-circuit voltage of a photovoltaic system. , Dimensionless fitting correction coefficients for simplified photovoltaic engineering models; I m V m These are the maximum power point current and maximum power point voltage of the photovoltaic system under standard test conditions. ln() is the reciprocal operator; ln() is the natural logarithm operator. The parameter values under arbitrary light intensity and temperature conditions can be approximated using a compensation coefficient. The expression for the compensation coefficient is as follows: ; Where ΔT is the temperature difference between the actual battery temperature and the standard reference temperature; TM is the real-time operating temperature of the photovoltaic cell; T ref The standard test reference temperature is ΔS; the relative change in irradiance is ΔS; the real-time irradiance intensity is S. ref Standard reference irradiance; I scref The standard operating condition short-circuit current; I mref This is the maximum power point current under standard operating conditions; V is the current-temperature correction factor; ocref This is the standard operating condition open-circuit voltage; V mcref is the voltage at the maximum power point under standard operating conditions; co is the voltage temperature decay coefficient, and b is the irradiance fitting correction coefficient; Dynamically adjust inertia weight Identify photovoltaic physical parameters: ; Where ω is the inertia weighting coefficient; ω max ω represents the maximum upper limit of the weight. min This represents the minimum lower bound of the weight. K is the current iteration count; max Total number of iterations for complete model training; The speed update formula is: ; in, Let be the flight velocity of the m-th particle after the (CI+1)-th iteration; This is the current velocity of the particle in the CI generation; For individual learning factors; As a global learning factor; , The numbers are uniformly random numbers in the interval [0,1]. Let m be the individual historical best position of the m-th particle; The optimal position for the entire population; This represents the current position of the m-th particle in the CI-th generation; m represents the particle number, and CI and CI+1 represent the current iteration and the next iteration generation, respectively.
6. The method for spatiotemporal prediction of photovoltaic power generation according to claim 1, characterized in that: The construction of a two-layer multi-head graph attention network to extract multi-layer spatiotemporal correlation features of the site includes: The feature vector of each node is projected through a linear transformation to obtain a new feature representation: ; In the formula, Represents a node eigenvectors, Represents the weight matrix. Represents a node Features after transformation; Determine the attention coefficient between nodes, two nodes and Its attention coefficient Represents a node To the neighbors The level of attention; ; in, Represents a learnable attention vector; Represents a vector join operation, which is a node. and nodes Feature splicing; Indicates the activation function; The unnormalized attention score of node j relative to node i in the graph attention network; , These are the latent features of nodes i and j after linear mapping, respectively; Attention coefficient It will be normalized, so that for nodes The sum of the attention coefficients of all neighboring nodes is 1: ; In the formula, Represents a node The set of neighboring nodes; The node representation is updated by weighted aggregation of neighbor node features based on attention coefficients. The new feature is the weighted sum of the features of all its neighboring nodes: ; in, Represents a non-linear activation function. This represents the weights calculated from the self-attention mechanism. Represents the weight matrix; It is a node eigenvectors, The updated latent features are obtained after node i is aggregated through the attention neighborhood; Perform multiple independent attention calculations on each pair of nodes, and concatenate or average the outputs of the multiple attention heads; ; In the formula, Indicates the number of attention heads. This indicates a splicing operation. The attention coefficient assigned to neighboring node j by the node i at the head of kh; Let be the head-independent linear projection weight matrix of the khth head.
7. The method for spatiotemporal prediction of photovoltaic power generation according to claim 1, characterized in that: The process of calculating dynamic weights based on rolling prediction error and model variance, and then weighting and fusing the outputs of the single-diode equivalent circuit model and the two-layer multi-head graph attention network to obtain the final photovoltaic spatiotemporal power prediction value includes: The final prediction result of photovoltaic power is calculated by a weighted average of the mechanistic model and the data model: ; in, , The figures show the prediction results for a single-diode equivalent circuit model and a two-layer multi-head graph attention network, respectively. , The weights, corresponding to the single-diode equivalent circuit model and the two-layer multi-head graph attention network respectively, are calculated as follows: ; in, This indicates the rolling error over the most recent 24 hours. Indicates the model's prediction variance; For adjustable temperature hyperparameters, control the sensitivity of error to weight decay; , These are the rolling root mean square errors of the mechanistic model and the data model over the past 24 hours, respectively. , These represent the prediction variances of the two types of models, characterizing the prediction uncertainty; the variance of the mechanistic model is estimated using Monte Carlo parameter perturbation, while the variance of the data model is estimated using Dropout stochastic forward propagation.
8. A photovoltaic power generation spatiotemporal prediction device, characterized in that, include: The data acquisition module is used to collect sensor data on irradiance, temperature, power output, and geographical location of photovoltaic power plants, and to correct spatiotemporal anomalies in the sensor data under extreme weather events. The cleaning module is used to clean up local and global anomalies in spatiotemporal abnormal data; The spatiotemporally consistent augmented sample generation module is used to generate spatiotemporally consistent augmented samples based on multimodal constraints such as time, weather, and geography. The single-diode equivalent circuit model construction module is used to construct a single-diode equivalent circuit model and identify photovoltaic physical parameters. The dual-layer multi-head image attention network construction module is used to construct a dual-layer multi-head image attention network to extract multi-level spatiotemporal correlation features of the station; The prediction module is used to calculate dynamic weights based on the rolling prediction error and model variance, and to weight and fuse the outputs of the single diode equivalent circuit model and the two-layer multi-head graph attention network to obtain the final photovoltaic spatiotemporal power prediction value.
9. An electronic device, characterized in that, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium for storing non-transitory computer-readable instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 7.