An ultra-short-term solar irradiance prediction method, device and medium
Patent Information
- Application Number
- CN202610709747.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-22
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2046-05-22
AI Technical Summary
(1)现有数值模型依赖于历史数据的被动外推,忽略了高度信息化的时序数值先验,例如,未来晴空辐照度和太阳角度,这种对历史统计的依赖缺乏由未来确定性太阳变量提供的前瞻性物理指导,从而限制了模型对辐照度变化趋势的准确捕捉能力;
1、本发明通过生成未来时段的时序数值先验及历史和未来时段的时空轨迹先验,并利用先验分别引导时序编码器和视觉编码器,将预测范式从单纯依赖历史数据转变为融合未来确定性信息的主动引导预测,从而有效利用未来确定性信息,提升了超短期太阳辐照度预测的准确性和鲁棒性。
Smart Images

Figure CN122241136B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy power generation and power system technology, and in particular to a method, device and medium for predicting ultra-short-term solar irradiance based on future prior guidance and physical constraints. Background Technology
[0002] As an important renewable energy source, solar power generation is highly dependent on global horizontal irradiance (GHI). However, rapid fluctuations in GHI caused by meteorological factors such as cloud cover pose a severe challenge to grid dispatch and stable operation, especially on ultra-short-term (minute to hourly) timescales. Therefore, high-precision ultra-short-term GHI forecasting is crucial for achieving proactive control of photovoltaic grid connection.
[0003] Existing GHI prediction methods are mainly divided into three categories: physical methods, statistical methods, and artificial intelligence (AI) methods. Physical methods, such as clear-sky models or numerical weather prediction (NWP), are difficult to characterize cloud-induced irradiance fluctuations, and NWP has limited spatiotemporal resolution; statistical methods rely on linear or weakly nonlinear assumptions of historical time series, and their performance is limited when dealing with drastic irradiance changes.
[0004] In recent years, AI methods have become a research hotspot due to their powerful nonlinear modeling capabilities. Early works employed Support Vector Regression (SVR) or Gaussian Processes (GP), but these were limited by manual feature engineering and the generalization ability of high-dimensional data. Subsequently, Recurrent Neural Networks (such as LSTM and GRU) were widely used for time series modeling, but they still suffer from sequential computation bottlenecks and long-term reliance on insufficient modeling. More recently, Transformer-based architectures have improved global context modeling capabilities through self-attention mechanisms.
[0005] Furthermore, to incorporate spatial information, some studies utilize all-sky ground images and employ CNNs or VisionTransformers (ViT) to capture the spatiotemporal characteristics of cloud dynamics. However, pure vision models lack the use of precise historical irradiance values, resulting in insufficient absolute amplitude calibration capabilities. To address this, multimodal fusion frameworks have emerged, such as CNN-LSTM hybrid models and fusion models combining Informer and ViT, attempting to jointly model numerical temporal and visual spatial features.
[0006] Despite the progress made by the above methods, the following problems still exist: (1) Existing numerical models rely on passive extrapolation of historical data and ignore highly information-based time-series numerical priors, such as future clear-sky irradiance and solar angle. This reliance on historical statistics lacks forward-looking physical guidance provided by future deterministic solar variables, thus limiting the model's ability to accurately capture the trend of irradiance changes. (2) Mainstream image-based models fail to utilize spatiotemporal trajectory priors, namely the predictable history and future trajectory of the sun in sky images. This makes it difficult for the models to learn solar motion cues that can be used to guide cloud dynamic modeling, fundamentally restricting their ability to extract effective visual features.
[0007] (3) Existing models usually describe GHI prediction as a single regression task, ignoring the inherent physical constraints between GHI and its components, namely direct normal irradiance (DNI) and diffuse horizontal irradiance (DHI). This hinders the model from learning the physical relationships between these irradiance components, thus limiting the prediction accuracy.
[0008] A search revealed that application publication number CN119649178A discloses a multimodal ultra-short-term solar irradiance prediction method and apparatus based on sky images. This scheme acquires sky images using an all-sky imager, extracts dynamic cloud features using grayscale conversion, normalized red-blue ratio, and dense optical flow methods, then uses a 3D-ResNet model to extract spatial image features, and an Informer model to temporally encode historical irradiance data. Finally, a multimodal interactive fusion matrix based on an attention mechanism aligns and fuses the two features to generate predicted irradiance values. However, this method still relies on historical data for prediction. When cloud movement is intense and irradiance fluctuates rapidly, historical time-series data alone is insufficient to accurately capture abrupt changes in irradiance trends. Furthermore, it does not utilize the physical relationships between the various irradiance components to constrain the prediction results, leaving room for improvement in prediction accuracy and stability under complex weather conditions.
[0009] Therefore, how to effectively utilize future deterministic information and consider the intrinsic physical relationships between irradiance components in ultra-short-term solar irradiance prediction to improve prediction performance is a technical problem that needs to be solved. Summary of the Invention
[0010] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a method, device and medium for predicting ultra-short-term solar irradiance based on future a priori guidance and physical constraints.
[0011] The objective of this invention can be achieved through the following technical solutions: According to a first aspect of the present invention, a method for predicting ultra-short-term solar irradiance based on future prior guidance and physical constraints is provided, comprising: Obtain historical irradiance numerical time series and historical all-sky image series; Based on solar physical and geometric models, we generate time-series numerical priors for future moments, as well as spatiotemporal trajectory priors for historical and future moments. The time series of irradiance values at the historical moments and the prior time series values are input into the time encoder, and the prior time series values are used to guide the time encoder to extract deep time series features. The all-sky image sequence at the historical moment and the spatiotemporal trajectory prior are input into the visual encoder, and the spatiotemporal trajectory prior is used to guide the visual encoder to extract deep visual features. The deep temporal features and the deep visual features are fused to obtain the fused features; Based on the fusion features, a physically constrained multi-task learning strategy is used to simultaneously predict global horizontal irradiance, direct normal irradiance, and diffuse horizontal irradiance, and output the predicted values.
[0012] As a preferred technical solution, the time-series numerical priors include clear-sky irradiance, solar altitude angle, solar azimuth angle, atmospheric outward normal irradiance, and atmospheric mass at future times; the spatiotemporal trajectory priors include the trajectory coordinates of the sun on the image plane at historical and future times, generated based on the geometric projection model of the all-sky camera.
[0013] As a preferred technical solution, the temporal encoder is guided by the prior temporal values to extract deep temporal features, specifically including: The irradiance numerical time series of the historical moment and the time series numerical prior are respectively embedded into a high-dimensional feature space and the features are aligned. Using the aligned historical irradiance numerical time series features as queries and the aligned time series numerical prior features as keys and values, future guiding features are extracted through a cross-attention mechanism. The future guidance features are fused with the historical irradiance value time series features by the gated fusion module to obtain the guidance fusion features; The guided fusion features are input into the temporal backbone network to extract deep temporal features.
[0014] As a preferred technical solution, the step of using spatiotemporal trajectory priors to guide the visual encoder in extracting deep visual features specifically includes: The trajectory coordinates of the sun on the image plane in the spatiotemporal trajectory prior are mapped to a high-dimensional feature space, and the global trajectory dependency is captured through a self-attention mechanism. The subsequence corresponding to historical moments in the prior spatiotemporal trajectory is extracted as the global solar trajectory guide; The entire sky image sequence at the historical moment is divided into blocks and encoded into image tokens. The global solar trajectory is then injected into the image tokens to obtain an enhanced representation. The enhanced representation is input into the visual backbone network to extract deep visual features.
[0015] As a preferred technical solution, the fusion of the deep temporal features and the deep visual features specifically includes: The deep temporal features are encoded using a Transformer encoder to obtain temporal encoded features; The deep visual features are transformed using a feedforward network to obtain the visual transformation features; Using the temporal coding features as queries and the visual transformation features as keys and values, a visual context is generated through a cross-attention mechanism. The visual context and the temporal coding features are fused using a gating fusion module to obtain the fused features.
[0016] As a preferred technical solution, the multi-task learning strategy for physical constraints includes constructing a physical constraint loss function. This physical constraint loss function is based on the physical relationship between global horizontal irradiance (GHI), direct normal irradiance (DNI), diffuse horizontal irradiance (DHI), and the solar zenith angle, and its expression is: , in, As the normalization factor, For sequence length, For predicted values, For the first i The solar zenith angle at each time step.
[0017] As a preferred technical solution, the multi-task learning strategy based on physical constraints further includes dynamically balancing the losses of each task using an adaptive weighting mechanism based on uncertainty, with the composite loss function being: , in, L 1. L 2. L 3. L The four categories are global horizontal irradiance prediction loss, direct normal irradiance prediction loss, scattered horizontal irradiance prediction loss, and physical constraint prediction loss, respectively. For the learnable first k Uncertainty parameters for each task.
[0018] As a preferred technical solution, the timing encoder uses a stacked TimesBlock residual network as the timing backbone network; the visual encoder uses a Swing Transformer as the visual backbone network.
[0019] According to a second aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described thereon.
[0020] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.
[0021] Compared with the prior art, the present invention has the following advantages: 1. This invention generates prior time-series numerical values for future periods and prior spatiotemporal trajectories for historical and future periods. These priors are then used to guide the temporal encoder and visual encoder, respectively. This transforms the prediction paradigm from simply relying on historical data to actively guiding prediction by integrating future deterministic information. As a result, it effectively utilizes future deterministic information and improves the accuracy and robustness of ultra-short-term solar irradiance prediction.
[0022] 2. This invention adopts a dual-encoder parallel architecture, which guides the extraction of temporal features through prior temporal numerical data and the extraction of visual features through prior spatiotemporal trajectory data, respectively. This accurately matches the modeling requirements of temporal data and image data, and improves the accuracy of temporal dependency capture and dynamic cloud modeling.
[0023] 3. This invention performs deep multimodal fusion of deep temporal features and deep visual features, fully exploring the complementary information between temporal data and sky images. Compared with simple feature stitching, it effectively enhances the feature expression ability and prediction robustness of the model.
[0024] 4. This invention employs a physically constrained multi-task learning strategy, with global horizontal irradiance prediction as the main task and its direct normal irradiance and scattered horizontal irradiance prediction as auxiliary tasks. It explicitly learns the intrinsic physical relationships of each component of irradiance to ensure that the prediction results conform to the physical laws of solar radiation.
[0025] 5. This invention introduces an uncertainty adaptive weighting mechanism to dynamically balance the loss contributions of the main task, auxiliary tasks and physical constraints, and automatically reduce the weight ratio of high uncertainty tasks, making model training more stable and generalization ability stronger. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating the overall technical process of the method of the present invention. Figure 2 This is a schematic diagram of the algorithm structure of the method of the present invention; Figure 3 This is a schematic diagram of the geometric projection model of the all-sky camera according to the method of the present invention; wherein, Figure 3 (a) in the diagram is a schematic diagram of the three-dimensional definition of the solar angle; Figure 3 (b) in the figure is a geometrical representation of the projection of the solar zenith angle and the radial distance of the image; Figure 3 (c) in the diagram is a schematic diagram of the transformation from the physical coordinate system to the image coordinate system; Figure 3 (d) in the figure is a schematic diagram of the polar coordinate representation of the sun's position in the sky image; Figure 4 This is a comparison chart of the 10-minute advanced GHI prediction results of the method of this invention and the benchmark model under three typical weather days. Figure 5 This is a comparison chart of the computational complexity of the method of this invention and the benchmark model; Figure 6 This is a graph showing the evolution of the learnable uncertainty parameters and total loss during the training process of the method of this invention. Detailed Implementation
[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0028] Example 1: like Figure 1 As shown, this invention provides a method for predicting ultra-short-term solar irradiance based on future prior guidance and physical constraints, comprising the following steps: Step S1: Acquire historical data and generate future prior information. Specifically, acquire historical irradiance numerical time series (including historically measured global horizontal irradiance, direct normal irradiance, diffuse horizontal irradiance, and auxiliary meteorological parameters) and historical all-sky image series (ground sky images taken by all-sky cameras); based on solar physical and geometric models, generate time-series numerical priors for future periods and spatiotemporal trajectory priors for historical and future periods. The time-series numerical priors include clear-sky irradiance, solar altitude angle, solar azimuth angle, atmospheric outward normal irradiance, and atmospheric mass for future periods; the spatiotemporal trajectory priors include the historical and future trajectory coordinates of the sun on the all-sky image plane.
[0029] Step S2: Input the historical irradiance value time series and the prior time series values into the time-series encoder, and use the prior time series values to guide the time-series encoder to extract deep temporal features. Specifically, the time-series encoder adopts a TimesNet-based architecture, and injects future prior information into the historical sequence features through a cross-attention mechanism and a gating fusion module, so that the model changes from passive extrapolation to active guided prediction.
[0030] Step S3: Input the historical full-sky image sequence and the spatiotemporal trajectory prior into the visual encoder, and use the spatiotemporal trajectory prior to guide the visual encoder to extract deep visual features. Specifically, the visual encoder adopts the Swin Transformer architecture, maps and encodes the solar trajectory coordinates in the spatiotemporal trajectory prior, and then injects them as explicit solar motion cues into the image tokens to guide the model to focus on the cloud dynamics near the sun's position.
[0031] Step S4: Fuse the deep temporal features and the deep visual features to obtain fused features. The fusion process employs a cross-attention mechanism and a gated fusion module, using temporal features as queries and visual features as keys and values to generate visual context, which is then adaptively fused with the temporal features.
[0032] Step S5: Based on the fusion features, a physically constrained multi-task learning strategy is adopted to simultaneously predict global horizontal irradiance (GHI), direct normal irradiance (DNI), and diffuse horizontal irradiance (DHI), and output the predicted values to improve the prediction accuracy of global horizontal irradiance. The global horizontal irradiance prediction values output by this invention can be used for ultra-short-term power prediction, grid dispatching, and energy storage control of photovoltaic power plants, helping the power system to cope in advance with irradiance fluctuations caused by cloud shading, and improving the stability and dispatching efficiency of photovoltaic grid connection.
[0033] The method of the present invention will be described in detail below: Step S101: Step S1011: Acquisition of historical data.
[0034] In one specific embodiment of the present invention, an all-sky camera (e.g., a fisheye lens camera) is used to acquire sky images at a fixed time resolution, such as 1 minute / frame, to form a sequence of all-sky images at historical moments. ,in T For historical time steps, for example, T =10 frames, corresponding to 10 minutes of historical data; simultaneously, the time series of irradiance values for the same period are collected synchronously through ground weather stations or irradiance sensors. This includes global horizontal irradiance (GHI), direct normal irradiance (DNI), diffuse horizontal irradiance (DHI), and auxiliary meteorological parameters such as temperature, humidity, and air pressure.
[0035] Step S1012: Generation of time series numerical priors.
[0036] The time-series numerical priors are calculated based on solar physics models, do not rely on historical data, and only require geographical location and current time.
[0037] Solar position calculation: The NREL (National Renewable Energy Laboratory) solar position algorithm is used to accurately calculate the solar zenith angle based on inputs such as Julian day, geographical latitude, geographical longitude, and time zone at a given time. and solar azimuth ; Atmospheric mass: Atmospheric mass was calculated using the Katen-Young model. ; External atmospheric normal irradiance: The external atmospheric normal irradiance was calculated using the Spencer model and based on the Earth-Sun distance correction factor. ; in, is the solar constant.
[0038] Clear-sky irradiance: Using the Ineichen-Perez clear-sky model, with inputs such as atmospheric mass, extra-atmospheric irradiance, altitude, and Lincoln turbidity coefficient, the global horizontal irradiance (GHIcs), direct normal irradiance (DNIcs), and diffuse horizontal irradiance (DHIcs) under clear-sky conditions are estimated.
[0039] For each future moment in the prediction time domain t +1, t +2, ..., t + τ (For example τ =10 minutes ahead), calculate the above parameters to construct the time series numerical prior. ,in For each time step, the feature dimensions are defined, for example, 7 dimensions: GHIcs, DNIcs, DHIcs. , ,m, .
[0040] Step S1013: Generation of spatiotemporal trajectory priors.
[0041] The solar pixel coordinates are calculated based on the geometric projection model of the all-sky camera, and the sequence of solar pixel coordinates from historical and future time periods is constructed as a spatiotemporal trajectory prior. Specifically, such as Figure 3 As shown, the method for calculating the sun pixel coordinates is as follows: First, based on the solar zenith angle Calculate radial distance : , in The radius of the sky image; Then based on the camera orientation deviation Calculate the polar angle in the image coordinate system : , in This is the solar azimuth angle; Finally, the solar pixel coordinates are calculated. : , , in The center of the image.
[0042] Calculate the solar pixel coordinates for each moment in the historical time period (corresponding to the historical image time) and the future time period (corresponding to the prediction time) to obtain the spatiotemporal trajectory prior. , among which the former T Each point represents a historical trajectory, later... τ Each point represents the future trajectory.
[0043] Step S201: Temporal feature encoding.
[0044] The structure of a timing encoder is as follows Figure 2 As shown. Let the historical numerical sequence... Time series numerical prior ,in, Input the dimension of the feature at each time step. The dimension of the prior features at each time step. In this embodiment, T =90, τ =60 means inputting 90 minutes of historical data to predict the next 60 minutes.
[0045] Step S2011: Embedding and Alignment.
[0046] Using the embedding module proposed in TimesNet Mapping to initial representation ,Will Mapped to ,in For model dimensions. Because... T and τ They may be equal, but in general they can be unequal. Therefore, a linear layer projects them to a uniform length. L For example, take L = T = τ The aligned representation is obtained. and .
[0047] Step S2012: Cross-attention extraction of future guiding features.
[0048] by For Query, Using key and value, extract future bootstrapping context representations through a cross-attention mechanism. : , Output This is the future-guiding feature, which includes the selective absorption of future prior information by historical states.
[0049] Step S2013: Gating fusion.
[0050] Adaptive fusion of historical representations through gated fusion module With future guiding characteristics First, the two are concatenated and input into a linear layer (with an output dimension of 1 or the same as the feature dimension), then the gating value is obtained through the Sigmoid function. g ∈(0,1): , in, This indicates concatenation along the feature dimension. σ The Sigmoid function is used; then the fused output is calculated: , in, To guide the integration of features, The gating weights are dynamically calculated. For the Sigmoid function, This is element-wise multiplication.
[0051] Step S2014: Deep extraction using TimesBlock.
[0052] The fused features are input into a temporal backbone network composed of multiple stacked TimesBlocks. Each TimesBlock contains a Fast Fourier Transform (FFT) and a one-dimensional convolution, enabling the capture of multi-period patterns. l The layer output is: , in, For the first The output features of the layer For the first The output features of the layer Using this as the initial input, this embodiment stacks multiple (e.g., two) TimesBlocks to ultimately output deep temporal features. .
[0053] Step S301: Visual feature encoder.
[0054] Visual encoder structure as follows Figure 2 As shown.
[0055] Step S3011: Trajectory embedding and global dependency capture.
[0056] First, the spacetime trajectory is a priori. The initial trajectory representation is obtained by mapping to a high-dimensional space through a linear embedding layer. Then, a self-attention mechanism is used to capture the global dependencies of the trajectory: , Self-attention enables the model to understand the continuity and motion patterns of the sun's trajectory. Next, it extracts the previous sequence of images corresponding to the duration of the historical image sequence. T Each time step serves as a guide for the global solar trajectory: .
[0057] Step S3012: Image block embedding and trajectory injection.
[0058] Using the standard image partitioning method of Swin Transformer: each image is divided into blocks. I t Divide the image into multiple non-overlapping blocks (e.g., 16×16 in size), and obtain image tokens through linear projection. T Get the initial image token from the images. ,in, The number of tokens for each image.
[0059] Historical sky image sequence Image tokens are encoded in blocks using a two-dimensional convolutional layer. : , ImageEmbedding is the image embedding module; it guides the global solar trajectory. Through broadcasting mechanism and Element-wise addition yields a trajectory-guided enhanced visual representation. : , In this way, each image token carries a clue to the movement of the sun in the whole picture at that moment, which is a guiding enhancement token.
[0060] Step S3013: Swing Transformer hierarchical feature extraction.
[0061] The guidance enhancement token is fed into the Swin Transformer backbone network. The Swin Transformer adopts a hierarchical pyramid structure with a total of 4 stages. Each stage first performs downsampling through Patch Merging (except for the first stage), and then stacks several Swin Transformer blocks (window multi-head attention and shift window multi-head attention). The first stage directly processes the initial input: , in, As the initial input, This is the first stage of the Swing Transformer block; The next three stages were passed After merging downsampling, connect to a Swin Transformer block:
[0062] Finally, visual features are output through global average pooling and linear projection. .
[0063] Step S401: Multimodal fusion.
[0064] Multimodal fusion structure such as Figure 2 As shown.
[0065] Step S4011: Feature Refinement.
[0066] Deep temporal features The Transformer is input into a Transformer encoder (containing a self-attention layer and a feedforward layer), and temporal information is further fused to obtain refined temporal features. : ; visual features Input a two-layer feedforward network (FFN), perform a nonlinear transformation, and obtain refined visual features. : ; Wherein, TransformerEncoder is the Transformer encoder, and FFN is the feedforward neural network; Step S4012: Cross-attention generates visual context.
[0067] by For query matrix Query, Given a key matrix (Key) and a value matrix (Value), a visual context is generated using a cross-attention mechanism. : , This visual context illustrates how temporal features derive supplementary knowledge from visual information, such as the decrease in irradiance caused by cloud cover.
[0068] Step S4013: Gated fusion yields the final fused features.
[0069] The gated fusion module is used again to fuse the refined temporal features and visual context: , , This refers to the characteristics after fusion.
[0070] Step S4014: The decoder outputs multi-step prediction.
[0071] Using a standard Transformer decoder, the decoder input... It consists of two parts: a historical token (a learnable positional code concatenated with a zero placeholder) and a future placeholder (a learnable predictive positional code). The decoder uses... For querying, based on fused features Using keys and values, outputs are generated through self-attention and cross-attention, and finally passed through a linear output layer to obtain the future... τ Predicted GHI, DNI, and DHI values at each time point: , Among them, the three channels correspond to , , .
[0072] Step S501: Physical constraint multi-task learning.
[0073] Step S5011: Define the multi-task loss function.
[0074] During training, the goal is to simultaneously optimize the GHI primary task, DNI, and DHI auxiliary tasks, while imposing physical constraints. The following loss terms are defined (all using mean squared error, MSE): GHI predicted loss: ; DNI predicted loss: ; DHI predicted loss: ; The physical constraint loss is based on the solar radiation physics formula: Total radiation on the horizontal surface = Normal direct radiation × Cosine of the solar zenith angle + Scattered horizontal radiation, that is: , Based on this relationship, the physical constraint loss is constructed as follows: , in, For sequence length, For predicted values, For the true value, As the normalization factor, For the first The solar zenith angle at each time step.
[0075] Step S5012: Adaptive weighting based on uncertainty.
[0076] Different tasks have varying learning difficulties and convergence speeds, and directly adding them with equal weights can lead to suboptimal solutions. This invention employs an adaptive weighting mechanism based on homoscedastic uncertainty, defining the composite loss function as: , in k =1, 2, 3, 4 respectively correspond to , , , ; This is a learnable, task-related uncertainty parameter, typically initialized to 1.0. The property of this function is: when a task's uncertainty... When the task is large (difficult to learn), its weight Automatically decreasing the size reduces the task's contribution to the total loss; regularization terms prevent Unlimited growth; during training, the network simultaneously learns model parameters and various... It automatically and dynamically balances the losses from multiple tasks.
[0077] Step S5013: Training and Prediction.
[0078] Training samples are constructed using historical data, each sample containing... T Historical values and images for minutes, tagged with future. τ The actual values of GHI, DNI, and DHI were obtained at 1 minute intervals, using the Adam optimizer with a learning rate of 1×10⁻⁶. -4 Batch size 32, training for 20 epochs. In each iteration, calculate... The parameters are then updated via backpropagation. After training, for new inputs, the model directly outputs a GHI prediction that integrates future prior guidance and physical constraints.
[0079] This invention generates temporal numerical priors for future periods and spatiotemporal trajectory priors for historical and future periods based on solar physical and geometric models. The temporal numerical priors guide the temporal encoder to extract deep temporal features from historical numerical time series, while the spatiotemporal trajectory priors guide the visual encoder to extract deep visual features from historical sky image sequences. These two types of features are then fused in a multimodal manner, and a physically constrained multi-task learning strategy is employed to simultaneously predict global horizontal irradiance and its components. An adaptive weighting mechanism dynamically balances the contributions of each task. This method transforms the prediction paradigm from passive historical extrapolation to active future guidance, improving the accuracy, robustness, and interpretability of ultra-short-term solar irradiance prediction.
[0080] Example 2: To verify the effectiveness of the present invention, an experiment was conducted using a publicly available multimodal solar energy dataset from Folsom, California, USA. This dataset contains solar irradiance, meteorological data, and corresponding sky images from 2014 to 2016, with a time resolution of 1 minute.
[0081] The proposed method was compared with multiple benchmark models, including single-modal benchmark models (Reformer, Autoformer, Informer, TimesNet, ViT, ResNet, Swin Transformer) and multimodal fusion baseline models (TimesNet + Swin Transformer), using root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²). 2 Using [a specific indicator] as the evaluation metric, assessments were conducted in the 10-minute, 30-minute, and 60-minute prediction time domains. The experimental results are shown in Table 1. Table 1
[0082] As shown in Table 1, the method of this invention achieves the best prediction performance across all prediction time domains and evaluation metrics: among the single-modal baseline models, TimesNet performs best in the numerical time series category, while Swin Transformer performs best in the image base model category; the multimodal baseline model formed by fusing the two (TimesNet + Swin Transformer) shows a significant improvement over the single model, with average RMSE and MAE reduced by 2.7% and 17.4% respectively compared to TimesNet, and by 6.1% and 23.0% respectively compared to Swin Transformer, confirming the inherent benefits of multimodal data fusion for solar irradiance prediction; based on this, the method of this invention further improves the prediction performance, with average RMSE reduced by 14.0%–19.4% and average MAE reduced by 26.3%–28.2% across all prediction time domains compared to the multimodal baseline model, significantly outperforming various comparative models.
[0083] To visually demonstrate the predictive performance of the method of the present invention under different irradiance variations, Figure 4 The results of 10-minute advance forecasts for three typical weather days are presented. Figure 4 As shown, on sunny days with low variability (Day 1), all models can track the true values well; however, on cloudy days with high variability (Day 2 and Day 3), the advantages of the method of this invention are particularly obvious. That is, in challenging scenarios where GHI fluctuates rapidly, other models show significant deviations when the changes are drastic; while the prediction results of the method of this invention have a higher degree of agreement with the true values, and the error distribution is narrower and more concentrated near zero.
[0084] In addition to prediction accuracy, the method of this invention also has good practicality in terms of computational complexity. For example... Figure 5 As shown, the method of this invention (23.47M parameters, 3.3384 GFLOPs) incurs only a slight computational overhead compared to the multimodal baseline model (23.42M parameters, 3.3367 GFLOPs), with a slightly increased inference latency (18.36 ms vs. 16.32 ms). This overhead mainly stems from the additional prior guidance and fusion components of this invention. Although the computational requirements are higher than those of the single-modal baseline models TimesNet (0.69M parameters, 0.5089 GFLOPs) and Swin Transformer (22.21M parameters, 2.4470 GFLOPs), this trade-off results in a significant improvement in accuracy. Furthermore, the final inference latency of 18.36 ms fully meets the operational requirements of a real-time ultra-short-term prediction system.
[0085] To quantify the contribution of each key component of this invention, a systematic ablation experiment was designed to assess the degree of performance degradation by progressively removing key components. The experimental results are shown in Table 2. Table 2
[0086] As shown in Table 2, using the complete model as the baseline, the average RMSE is 31.21 and the MAE is 14.17. The complete model shows the most significant performance degradation after removing the adaptive weighting mechanism, with an average RMSE increase of 18.4% and a MAE increase of 60.8%. Removing the entire physical constraint composite loss and the adaptive weighting mechanism leads to average RMSE and MAE increases of 3.6% and 7.1%, respectively. This indicates that while the physical constraint strategy is important, the adaptive weighting scheme is more crucial for dynamically balancing all learning tasks. To visualize this phenomenon, as shown in Table 2... Figure 6 As shown, learnable uncertainty parameters ( The evolution of the total training loss during training. Specifically, as the total training loss decreases, the uncertainty of the main task GHI ( It quickly converges to a value lower than the auxiliary task's DNI ( ) and DHI ( The value of ) confirms that the adaptive weighting scheme naturally assigns higher weights to GHI, prioritizing accuracy. Meanwhile, the uncertainty of physical constraints ( The fastest decline and the lowest level indicate that the model quickly learns the intrinsic physical relationship between irradiance components.
[0087] For the two types of prior data, removing the temporal numerical prior led to an increase of 14.4% and 14.1% in average RMSE and MAE, respectively, verifying the importance of basing proactive predictions on deterministic future physical priors; removing the spatiotemporal trajectory prior led to an increase of 3.4% and 7.2% in average RMSE and MAE, respectively, confirming that the spatiotemporal trajectory prior provides clear cues of solar motion for the visual encoder, which is beneficial for cloud dynamic modeling; at the same time, removing both priors led to more significant performance degradation, with average RMSE and MAE increasing by 15.5% and 24.8%, respectively, highlighting the synergistic and complementary contributions of the two priors.
[0088] Ultimately, removing all key components and degrading to a multimodal baseline resulted in the greatest performance degradation. Specifically, compared to the complete model, the average RMSE and MAE increased by 20.3% and 37.8%, respectively. In summary, the ablation experiments of the system fully demonstrate the positive role of each key component of this invention in the final performance.
[0089] Example 3: The electronic device of this invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) or loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0090] Multiple components in the device are connected to the I / O interface, including: input units such as keyboards and mice; output units such as various types of displays and speakers; storage units such as disks and optical discs; and communication units such as network interface cards (NICs), modems, and wireless transceivers. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0091] The processing unit executes the various methods and processes described above, such as methods S1 to S5. For example, in some embodiments, methods S1 to S5 may be implemented as computer software programs tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of methods S1 to S5 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute methods S1 to S5 by any other suitable means (e.g., by means of firmware).
[0092] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0093] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0094] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0095] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for predicting ultra-short-term solar irradiance, characterized in that, include: Obtain historical irradiance numerical time series and historical all-sky image series; Based on solar physical and geometric models, we generate time-series numerical priors for future moments, as well as spatiotemporal trajectory priors for historical and future moments. The temporal numerical priors include clear-sky irradiance, solar altitude angle, solar azimuth angle, atmospheric outward normal irradiance, and atmospheric mass at future times; the solar physics models include the NREL solar position algorithm for calculating solar altitude angle and solar azimuth angle, the Kasten-Young model for calculating atmospheric mass, the Spencer model for calculating atmospheric outward normal irradiance, and the Ineichen-Perez clear-sky model for calculating clear-sky irradiance; the spatiotemporal trajectory priors include the trajectory coordinates of the sun on the image plane at historical and future times, generated based on the all-sky camera geometric projection model; The time series of irradiance values at the historical moments and the prior time series values are input into the time encoder, and the prior time series values are used to guide the time encoder to extract deep time series features. The all-sky image sequence at the historical moment and the spatiotemporal trajectory prior are input into the visual encoder, and the spatiotemporal trajectory prior is used to guide the visual encoder to extract deep visual features. The deep temporal features and the deep visual features are fused to obtain the fused features; Based on the fusion features, a physically constrained multi-task learning strategy is used to simultaneously predict global horizontal irradiance (GHI), direct normal irradiance (DNI), and diffuse horizontal irradiance (DHI), and output the predicted values. The physical constraints are based on the physical equilibrium relationship of solar radiation. Build, in This is the solar zenith angle.
2. The method for predicting ultra-short-term solar irradiance according to claim 1, characterized in that, The process of using temporal numerical priors to guide the temporal encoder in extracting deep temporal features specifically includes: The irradiance numerical time series of the historical moment and the time series numerical prior are respectively embedded into a high-dimensional feature space and the features are aligned. Using the aligned historical irradiance numerical time series features as queries and the aligned time series numerical prior features as keys and values, future guiding features are extracted through a cross-attention mechanism. The future guidance features are fused with the historical irradiance value time series features by the gated fusion module to obtain the guidance fusion features; The guided fusion features are input into the temporal backbone network to extract deep temporal features.
3. The method for predicting ultra-short-term solar irradiance according to claim 1, characterized in that, The visual encoder is guided to extract deep visual features using the spatiotemporal trajectory prior, specifically including: The trajectory coordinates of the sun on the image plane in the spatiotemporal trajectory prior are mapped to a high-dimensional feature space, and the global trajectory dependency is captured through a self-attention mechanism. The subsequence corresponding to historical moments in the prior spatiotemporal trajectory is extracted as the global solar trajectory guide; The entire sky image sequence at the historical moment is divided into blocks and encoded into image tokens. The global solar trajectory is then injected into the image tokens to obtain an enhanced representation. The enhanced representation is input into the visual backbone network to extract deep visual features.
4. The method for predicting ultra-short-term solar irradiance according to claim 1, characterized in that, The fusion of the deep temporal features and the deep visual features specifically includes: The deep temporal features are encoded using a Transformer encoder to obtain temporal encoded features; The deep visual features are transformed using a feedforward network to obtain the visual transformation features; Using the temporal coding features as queries and the visual transformation features as keys and values, a visual context is generated through a cross-attention mechanism. The visual context and the temporal coding features are fused using a gating fusion module to obtain the fused features.
5. The method for predicting ultra-short-term solar irradiance according to claim 1, characterized in that, The multi-task learning strategy for physical constraints includes constructing a physical constraint loss function, which is based on the physical relationship between global horizontal irradiance (GHI), direct normal irradiance (DNI), diffuse horizontal irradiance (DHI), and solar zenith angle. Its expression is as follows: , in, As the normalization factor, For sequence length, For predicted values, For the first i The solar zenith angle at each time step.
6. The method for predicting ultra-short-term solar irradiance according to claim 5, characterized in that, The multi-task learning strategy based on physical constraints also includes dynamically balancing the losses of each task using an adaptive weighting mechanism based on uncertainty. The composite loss function is: , in, L 1. L 2. L 3. L The four categories are global horizontal irradiance prediction loss, direct normal irradiance prediction loss, scattered horizontal irradiance prediction loss, and physical constraint prediction loss, respectively. For the learnable first k Uncertainty parameters for each task.
7. The method for predicting ultra-short-term solar irradiance according to claim 1, characterized in that, The temporal encoder uses a stacked TimesBlock residual network as the temporal backbone network; the visual encoder uses a SwingTransformer as the visual backbone network.
8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Multi-modal ultra-short-term solar irradiation prediction method and system based on sky image
CN119649178A
Photovoltaic ultra-short-term power prediction method and system based on multi-modal information fusion
CN120999587A