A short-term photovoltaic power prediction method and system based on hybrid deep learning

CN122992674APending Publication Date: 2026-10-27STATE GRID HENAN ELECTRIC POWER ELECTRIC POWER SCI RES INST +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611143548.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0006]为了解决现有光伏功率预测技术中因缺乏物理机理引导的云图特征提取、多模态特征交互方式僵化以及模型训练缺乏物理边界约束,导致复杂气象条件下预测精度低和结果可解释性不足的技术问题,本发明公开了一种基于混合深度学习的短期光伏功率预测方法及系统

Benefits of technology

1、本发明通过引入太阳几何定位与关注区掩码技术,强制模型聚焦于太阳光传播路径上的云层纹理,有效抑制了地平线边缘及非光路区域的无效背景干扰。相比传统全图卷积,这种物理增强手段显著提升了模型对有效遮挡的感知能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122992674A_ABST
    Figure CN122992674A_ABST
Patent Text Reader

Abstract

The application discloses a kind of short-term photovoltaic power prediction method and system based on hybrid deep learning, comprising: collecting multi-source data and using interpolation method with time attenuation weight to complete missing value;Solar positioning algorithm is used to construct attention area mask to physically enhance all-sky cloud image;Variational modal decomposition is carried out on power sequence to obtain intrinsic modal component;A hybrid deep learning model is constructed, cloud image features are extracted through visual coding branch and mapped into gating coefficient, and modal components are adaptively screened across modal using gating coefficient, to realize the dynamic guidance of visual information to time series signal;Predicted value is output through time series prediction branch.In the training stage, the physical out-of-limit penalty term based on the theoretical maximum power is introduced for joint optimization, and online frozen update can be performed based on error monitoring.The application effectively solves the problem of insufficient interaction between visual and time series features, and improves the accuracy and robustness of photovoltaic power prediction under complex weather conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of photovoltaic power generation prediction technology, and in particular relates to a short-term photovoltaic power prediction method and system based on hybrid deep learning. Background Technology

[0002] As an important form of renewable energy, photovoltaic (PV) power generation is significantly affected by various meteorological factors such as solar radiation, temperature, and cloud cover, resulting in marked intermittency and volatility. When PV penetration reaches a high level, this volatility can cause grid frequency shifts, increasing the difficulty of coordinating the dispatch of traditional power sources and new energy sources. Therefore, high-precision short-term PV power forecasting has become a key technology for ensuring the safe operation of the power system and reducing the operating costs of solar energy.

[0003] Current prediction methods mainly include physical modeling, statistical learning, and deep learning. Physical modeling relies on detailed photovoltaic module parameters and meteorological data, resulting in high computational complexity and limitations imposed by idealized assumptions; statistical models have limited capabilities in handling nonlinear relationships. In recent years, deep learning models, represented by convolutional neural networks, long short-term memory networks, and Transformers, have gradually become mainstream due to their powerful nonlinear feature extraction capabilities. For example, existing techniques often use CNNs to extract spatial features from cloud images, utilize LSTM or Transformers to extract temporal features from power sequences, and finally use fully connected layers to concatenate features to achieve multimodal fusion prediction.

[0004] However, existing hybrid deep learning solutions still face key technical bottlenecks: First, current technologies typically treat the entire sky cloud image as a whole for global feature extraction, ignoring the physical nature of photovoltaic power generation. In fact, only clouds located along the path of sunlight will have a substantial shading effect on photovoltaic arrays, while clouds in the horizon edge region or other background areas far from the sun are often ineffective information. Existing methods lack effective tracking of the sun's position and a focusing mechanism for key shading regions, making the model susceptible to background cloud noise and unable to accurately capture effective shading sources causing power fluctuations in complex cloud movements. Second, most existing technologies employ a fusion strategy of extracting features from each modality separately and then simply stitching them together. This approach severs the logical connection between visual information and temporal signals, making it difficult for visual modalities to influence the processing of temporal modalities. Taking the frequency domain features of photovoltaic power sequences as an example, the high-frequency components typically manifest as random noise generated by the inverter in clear weather and should be suppressed; while in cloudy weather, they manifest as real power fluctuations caused by cloud shading and should be preserved. Existing model structures cannot adaptively adjust the filtering and retention strategies for different frequency signals based on the weather conditions presented by cloud images, resulting in insufficient adaptability and robustness of prediction models under variable weather scenarios. Finally, traditional deep learning models primarily rely on minimizing the numerical error between predicted and actual values ​​to drive parameter updates, representing a purely data-driven optimization approach. This method ignores the physical operating laws and theoretical limits of photovoltaic power generation systems. When encountering extreme weather conditions or missing input data, the model is prone to outputting predictions exceeding the local theoretical irradiance limit or violating the law of conservation of energy, leading to poor interpretability of the prediction data and making it difficult to meet the data reliability requirements of the power grid dispatching system.

[0005] Therefore, there is an urgent need to develop a new photovoltaic power prediction method that can integrate physical mechanism perception, achieve deep cross-modal interaction, and have physical boundary constraints. Summary of the Invention

[0006] To address the technical problems of low prediction accuracy and insufficient interpretability under complex meteorological conditions caused by the lack of physical mechanism-guided cloud image feature extraction, rigid multimodal feature interaction methods, and lack of physical boundary constraints in model training in existing photovoltaic power prediction technologies, this invention discloses a short-term photovoltaic power prediction method and system based on hybrid deep learning. The method involves collecting multi-source data and using interpolation with time decay weights to fill in missing values; constructing a region of interest mask using a solar positioning algorithm to physically enhance the entire sky cloud image, highlighting light path occlusion features; performing variational mode decomposition on the power sequence to obtain intrinsic mode components; constructing a hybrid deep learning model, extracting cloud image features through a visual encoding branch and mapping them to gating coefficients, and using these gating coefficients to perform cross-modal adaptive filtering of mode components, achieving dynamic guidance of the temporal signal by visual information; and outputting predicted values ​​through a temporal prediction branch. During the training phase, a physical limit-breaking penalty term based on the theoretical maximum power is introduced for joint optimization, and online freeze updates can be performed based on error monitoring. This invention effectively solves the problem of insufficient interaction between visual and temporal features, improving the accuracy and robustness of photovoltaic power prediction under complex meteorological conditions.

[0007] The present invention adopts the following technical solution.

[0008] A first aspect of the present invention provides a short-term photovoltaic power prediction method based on hybrid deep learning, comprising: Step 1: Obtain historical power data of the photovoltaic power station before the time to be predicted, weather forecast data for the time period to be predicted, and the current all-sky cloud map; perform interpolation to complete the missing values ​​in the historical power data; use the solar positioning algorithm to calculate the pixel coordinates of the sun in the all-sky cloud map at the current time, and construct a region of interest mask centered on the pixel coordinates; superimpose the region of interest mask with the all-sky cloud map to obtain a physically enhanced cloud map; Step 2: Perform variational mode decomposition on the processed historical power data to obtain multiple intrinsic mode components; Step 3: Input the physical augmentation cloud map into the visual encoding branch of the preset hybrid deep learning model, extract the visual feature vector and map the visual feature vector into gating coefficients; use the gating coefficients to adaptively weight and filter the intrinsic modal components to obtain the filtered intrinsic modal components; Step 4: Concatenate the selected intrinsic mode components with the weather forecast data along the feature dimension, input them into the temporal prediction branch of the hybrid deep learning model, and perform temporal dependency analysis through a multi-head self-attention mechanism to obtain the photovoltaic power prediction value.

[0009] Preferably, the historical power data, weather forecast data, and all-sky cloud imagery mentioned in step 1 specifically include: The historical power data includes the historical active power time series of the photovoltaic power plant up to the time to be predicted. The weather forecast data includes predicted sequences of solar irradiance, ambient temperature, and relative humidity for the period to be predicted. The all-sky cloud image includes visible light images acquired by the ground-based all-sky imager at the current moment.

[0010] Preferably, step 1 involves interpolating and completing missing values ​​in the historical power data, specifically including: Select several nearby valid observations before and after the missing time point; Calculate the absolute value of the time difference between the time point corresponding to each valid observation and the missing time point; An exponential decay function is constructed based on the absolute value of the time difference, and the time weight of each effective observation is calculated, wherein the time weight decreases as the absolute value of the time difference increases; The time weight is used to calculate a weighted average of all selected valid observations to obtain the interpolated data for the missing time point.

[0011] Preferably, step 1 involves constructing a region of interest mask centered on pixel coordinates, specifically including: Generate a two-dimensional weight matrix with the same resolution as the all-sky cloud image; Using the pixel coordinates as the center point, calculate the Euclidean distance of each point in the two-dimensional weight matrix relative to the center point; The weight value of each point is calculated using the Gaussian distribution function, with the center point having the largest weight value. Using the two-dimensional weight matrix as the region of interest mask, the pixel values ​​of the all-sky cloud map are multiplied by the weight values ​​at the corresponding positions in the region of interest mask to obtain the physical augmented cloud map.

[0012] Preferably, the intrinsic mode components in step 2 include multiple components arranged from high to low center frequency, wherein the high frequency component corresponds to sudden changes in cloud shading and random noise, the mid frequency component corresponds to the intraday periodic changes in photovoltaic power, and the low frequency component corresponds to the gradual trend characteristics of photovoltaic power.

[0013] Preferably, in step 3, the visual feature vector of the physically augmented cloud map is extracted through the visual coding branch, and the visual feature vector is mapped to gating coefficients, specifically including: The physical augmentation cloud map is input into the visual coding branch, and features are extracted through multiple convolutional layers and downsampling layers. The global spatial feature vector is obtained through a global pooling layer. The global spatial feature vector is mapped to a gated vector with the same dimension as the number of intrinsic mode components using a fully connected layer; the gated vector is then processed using a nonlinear activation function to map the element values ​​of the gated vector to the interval between 0 and 1, thereby obtaining the gated coefficients.

[0014] Preferably, step 3, which involves concatenating the selected intrinsic mode components with weather forecast data and obtaining the photovoltaic power prediction value through a multi-head self-attention mechanism in the time-series prediction branch, specifically includes: The selected intrinsic mode components are concatenated with the weather forecast data along the feature dimension, and the location encoding vector is superimposed to obtain the time-series input matrix; The time series input matrix is ​​input into the time series prediction branch, and the query matrix, key matrix and value matrix are calculated using a multi-head self-attention mechanism. The query matrix and the key matrix are then subjected to dot product operation and normalization to obtain the attention weight matrix. The attention weight matrix and the value matrix are multiplied to obtain a time-series feature vector; the time-series feature vector is then mapped to a photovoltaic power prediction value using a fully connected layer.

[0015] Preferably, the training process of the hybrid deep learning model includes: Historical archived data of photovoltaic power plants is acquired, including historical power data, historical weather data, and historical all-sky cloud images. Missing value interpolation, physical augmentation cloud image generation, and variational mode decomposition are performed on the historical archived data. Training sample pairs are constructed for each sample sampling time. The input features of the training sample pairs include: historical power data before the sample sampling time, historical all-sky cloud images at the sample sampling time, and historical weather data for the period to be predicted after the sample sampling time. The label value of the training sample pairs is: the actual photovoltaic power during the period to be predicted after the sample sampling time. The physical augmentation cloud map in the training sample pair is input into the visual coding branch. The historical power data is subjected to variational mode decomposition to obtain intrinsic mode components. After gating and filtering, the intrinsic mode components are concatenated with historical weather data and input into the time series prediction branch to obtain the training prediction value of the current round. Based on the geographical location information of the photovoltaic power station and the time information of the period to be predicted, the theoretical maximum irradiance at the current moment is calculated using the clear-sky radiation model and converted into the theoretical maximum power; the difference between the predicted photovoltaic power value and the theoretical maximum power is calculated; when the predicted photovoltaic power value is greater than the theoretical maximum power, the difference is extracted using an activation function and squared to obtain the physical limit violation penalty term; otherwise, the physical limit violation penalty term is set to zero; the prediction error loss term and the physical limit violation penalty term are weighted and summed to obtain the total loss function. The gradient is calculated using the total loss function, and the parameters of the visual encoding branch and the time-series prediction branch of the hybrid deep learning model are jointly updated using the backpropagation algorithm.

[0016] A second aspect of the present invention provides a hybrid deep learning system for short-term photovoltaic power prediction, wherein running the hybrid deep learning-based short-term photovoltaic power prediction method includes: The data augmentation module is used to acquire historical power data of the photovoltaic power station before the predicted time, weather forecast data for the predicted period, and the current all-sky cloud map; to interpolate and complete missing values ​​in the historical power data; to calculate the pixel coordinates of the sun in the all-sky cloud map at the current time using a solar positioning algorithm, and to construct a region of interest mask centered on the pixel coordinates; and to superimpose the region of interest mask with the all-sky cloud map to obtain a physically augmented cloud map. The mode decomposition module is used to perform variational mode decomposition on the processed historical power data to obtain multiple intrinsic mode components. The visual encoding module is used to input the physical augmented cloud map into the visual encoding branch of a preset hybrid deep learning model, extract visual feature vectors and map the visual feature vectors into gating coefficients; and use the gating coefficients to adaptively weight and filter the intrinsic modal components to obtain the filtered intrinsic modal components. The temporal coding module is used to concatenate the selected intrinsic mode components with the weather forecast data in the feature dimension, input the concatenation into the temporal prediction branch of the hybrid deep learning model, and perform temporal dependency analysis through a multi-head self-attention mechanism to obtain the photovoltaic power prediction value.

[0017] A third aspect of the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when loaded onto the processor, implements the aforementioned short-term photovoltaic power prediction method based on hybrid deep learning.

[0018] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned short-term photovoltaic power prediction method based on hybrid deep learning.

[0019] The beneficial effects of this invention are as follows: 1. This invention introduces solar geometric positioning and region-of-interest masking techniques to force the model to focus on cloud textures along the sunlight propagation path, effectively suppressing invalid background interference at the horizon edge and in non-light-path areas. Compared to traditional full-image convolution, this physical enhancement method significantly improves the model's ability to perceive effective occlusion.

[0020] 2. This invention proposes a visual feature-based gating and filtering mechanism. This mechanism can adaptively open or close the passage channel for high-frequency components based on the weather conditions reflected in the cloud image: automatically filtering out high-frequency noise from the inverter on sunny days and retaining the true power fluctuation signal on cloudy days. This solves the problem that traditional models cannot adaptively distinguish between signals and noise under different weather conditions, thus improving prediction accuracy.

[0021] 3. This invention integrates a physical limit penalty term based on a clear-sky model into the loss function, internalizing the energy conservation and physical limits of photovoltaic power generation into the deep learning network. This effectively avoids outliers that exceed the theoretical irradiance limit when the model outputs values ​​that are missing data or under extreme conditions, ensuring that the prediction results conform to physical laws and improving the grid dispatcher's confidence in the prediction data. Attached Figure Description

[0022] Figure 1 This is a flowchart of a short-term photovoltaic power prediction method based on hybrid deep learning provided by the present invention. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this invention. The embodiments described in this application are merely some embodiments of this invention, and not all embodiments. Based on the spirit of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of this invention.

[0024] Example 1: like Figure 1 As shown, this invention provides a short-term photovoltaic power prediction method based on hybrid deep learning, comprising: Step 1: Obtain historical power data of the photovoltaic power station before the predicted time, weather forecast data for the predicted period, and the current all-sky cloud map; perform interpolation to complete the missing values ​​in the historical power data; use the solar positioning algorithm to calculate the pixel coordinates of the sun in the all-sky cloud map at the current time, and construct a region of interest mask centered on the pixel coordinates; superimpose the region of interest mask with the all-sky cloud map to obtain a physically enhanced cloud map.

[0025] In a preferred but non-limiting embodiment of the present invention, step 1 specifically includes: This embodiment selects a photovoltaic power station (e.g., a photovoltaic demonstration base) as the experimental object. To address the problem of insufficient information from a single data source, this step constructs a heterogeneous data acquisition system that includes data from the power station, meteorological, and visual sources, and performs physical enhancement preprocessing.

[0026] Step 1.1 Multi-source data acquisition The data collected in this embodiment specifically includes the following three categories: (1) Historical power data: The historical active power time series before the predicted time of the grid connection point is collected by the SCADA system of the photovoltaic power station. The sampling frequency is set to 15 minutes / point. In order to eliminate the influence of the difference in installed capacity, the power data is normalized by dividing by the total installed capacity of the power station to obtain the normalized historical active power time series.

[0027] (2) Weather forecast data: Numerical weather forecast data for the forecast period at the latitude and longitude of the power station location are obtained from the regional meteorological service center. The time resolution of the data is 1 hour, which needs to be interpolated to 15 minutes. In this embodiment, linear interpolation is used to convert hourly data into 15-minute sequences. The selected feature parameters include at least solar irradiance, ambient temperature, and relative humidity. Wind speed, wind direction, and air pressure data can also be introduced as auxiliary features according to the actual situation.

[0028] (3) All-sky cloud image: Visible light image acquired by the ground-based all-sky imager at the current moment. The acquired image is an RGB visible light image with an original resolution of 1024×1024 pixels and a sampling interval of 10 minutes. In order to reduce the computational complexity, the image is uniformly scaled to 512×512 pixels and normalized.

[0029] In this embodiment, the time period to be predicted refers to the power value at the next future time T+15. "Before the time to be predicted" refers to selecting data from the past 4 hours (or 24 hours) prior to the current time T as the historical input length. Since the cloud map sampling interval is 10 minutes and the power sampling interval is 15 minutes, this embodiment selects the cloud map with the smallest time difference from the power sampling time as the corresponding cloud map for that time (e.g., power data at 10:15 matches cloud maps at 10:10 or 10:20) to ensure temporal alignment of multi-source data.

[0030] 1.2 Anomaly Cleaning and Temporal Interpolation Completion Historical power data may contain missing values ​​due to communication failures or equipment maintenance. Considering the strong short-term correlation of photovoltaic power, meaning that the power at the next moment is highly dependent on the power at the previous moment, and is prone to sudden changes due to cloud cover, this embodiment adopts the nearest neighbor interpolation method with time decay weights.

[0031] Specifically, assuming that power data at time t is missing, several nearby valid observations before and after the missing time are selected, for example, k valid observations within 30 minutes before and after the missing time. Calculate the time point corresponding to each valid observation. absolute value of the time difference between the missing time t and the missing time t Based on the absolute value of the time difference, an exponential decay function is constructed to calculate the time weight of each effective observation, expressed as:

[0032] in, It is a decay function; The time decay constant is set to 15 minutes in this embodiment, which means that the reference weight decreases exponentially as the interval increases. is the time weight, which decreases as the absolute value of the time difference increases; i is the queue number.

[0033] The interpolated data for the missing time point is obtained by using a weighted average of all selected valid observations with the time weight. , represented as:

[0034] This method effectively preserves the high-frequency fluctuation characteristics of photovoltaic power under cloudy weather conditions, avoiding excessive smoothing of the data.

[0035] 1.3 Physical Augmentation of Cloud Images Based on Sun-Cloud Geometric Projection To address the problem that traditional convolutional networks cannot distinguish between effective occlusion clouds and invalid background clouds, this step introduces astronomical geometric constraints.

[0036] (1) Solar pixel positioning: Using the SPA (Solar Position Algorithm), the longitude, latitude, altitude and current sampling time of the photovoltaic power station are input to calculate the solar altitude angle. and azimuth By combining the lens projection model of an all-sky imager, such as isometric projection, the spatial coordinates of the sun are mapped to pixel coordinates on the image plane. .

[0037] (2) Constructing the region of interest mask: Generating a two-dimensional weight matrix M with the same resolution as the all-sky cloud image; using the pixel coordinates Using the center point as the reference point, calculate the Euclidean distance of each point in the two-dimensional weight matrix relative to the center point. Calculate the weight value of each point using a Gaussian distribution function, such that the weight value decreases Gaussianly as the Euclidean distance increases, as expressed below:

[0038] in Image pixel coordinates, Let be the field of view radius parameter. This formula maximizes the weight value at the center point, setting it to 1.

[0039] (3) Generate physically enhanced cloud map: Use the two-dimensional weight matrix as the region of interest mask, and generate the full-sky cloud map. The pixel values ​​of each element are multiplied by the weight values ​​at the corresponding positions in the region of interest mask to obtain the physical augmentation cloud map. , represented as:

[0040] This process preserves the cloud texture along the path of sunlight, while suppressing invalid clouds at the horizon and interference from ground features, resulting in a physically enhanced cloud map containing physical light path information.

[0041] Step 2: Perform variational mode decomposition on the processed historical power data to obtain multiple intrinsic mode components.

[0042] In a preferred but non-limiting embodiment of the present invention, step 2 specifically includes: Because power data is non-stationary and multi-scale, exhibiting both daily periodic variations and cloud cover fluctuations, directly inputting it into a neural network makes it difficult to capture all these features simultaneously. Therefore, this step utilizes the Variational Mode Decomposition (VMD) algorithm to decouple the preprocessed historical power data in the frequency domain.

[0043] 2.1 VMD Model Construction In this embodiment, the photovoltaic historical power sequence is considered as a composite time signal composed of the superposition of multiple physical processes with different frequency characteristics. VMD is a non-recursive signal processing method whose core idea is to decompose the composite power signal into K signals with specific center frequencies. intrinsic mode components In this embodiment, decomposition is achieved by solving a constrained variational problem, with the goal of minimizing the sum of the estimated bandwidths of each modal component.

[0044] The performance of the VMD algorithm is highly dependent on the mode decomposition number K and the second-order penalty factor. The setting of K is crucial. If the K value is too small, it will lead to mode aliasing, meaning signals of different scales will be mixed together; if the K value is too large, it will lead to spurious components. To determine the optimal parameters in this embodiment, an improved dung beetle optimization algorithm (DBO) is used for optimization: the fitness function is the minimization of the decomposed envelope entropy. The smaller the envelope entropy, the better the sparsity of the decomposed components and the more obvious the features. Considering that the photovoltaic power signal contains at least three physical modes—trend, period, and noise—the lower limit for the optimization of K is set to 3 (e.g., the search range is set to [3, 10]). Through iterative calculation, the optimal parameter combination is determined to be K=3. =2000.

[0045] 2.2 Decomposition Results The intrinsic mode components mentioned in step 2 include multiple components arranged from high to low center frequency. The high-frequency components correspond to sudden changes in cloud cover and random noise, the mid-frequency components correspond to the intraday periodic changes in photovoltaic power, and the low-frequency components correspond to the gradual trend of photovoltaic power. In this embodiment, based on the above optimal parameters, the historical power sequence is decomposed into intrinsic mode components in three different frequency bands, including: (1) High-frequency components characterizing abrupt changes in cloud cover and random noise The main causes are power surges caused by rapid cloud movement and random measurement noise introduced by the inverter and sensors.

[0046] (2) The second high frequency component characterizing the intraday periodic variation of photovoltaic power The intraday variation in light intensity is mainly affected by the Earth's rotation.

[0047] (3) Low-frequency components characterizing the gradual change trend of photovoltaic power This mainly represents the seasonal trend of photovoltaic power or a long-term benchmark value affected by weather systems, such as continuous rainy days.

[0048] To illustrate the decomposition effect more intuitively, let's take a 4-hour historical power series under a typical cloudy weather condition as an example: Suppose that at 10:30, due to cloud cover, the original power suddenly drops from 200kW to 80kW. After VMD decomposition (K=3) in this embodiment, the components behave as follows: The high-frequency component manifests as noise that jitters rapidly around the 0 value, with a small amplitude, such as fluctuating within the range of ±5kW, corresponding to the random measurement noise of the inverter; The sub-high frequency component exhibits a large negative trough at 10:30, with a value of approximately -120kW, accurately capturing the power surge characteristics caused by cloud cover, while remaining stable during cloudless periods. The low-frequency component is represented by a smooth rising curve, for example, gradually increasing from 180kW to 220kW, reflecting the intraday power reference trend caused by changes in the solar altitude angle.

[0049] Through this decomposition, the previously mixed trends and mutations are successfully decoupled, providing clear feature inputs for targeted screening using visual gating mechanisms in the subsequent step 3.

[0050] Step 3: Input the physical augmentation cloud map into the visual encoding branch of the preset hybrid deep learning model, extract the visual feature vector and map the visual feature vector into gating coefficients; use the gating coefficients to adaptively weight and filter the intrinsic modal components to obtain the filtered intrinsic modal components.

[0051] In a preferred but non-limiting embodiment of the present invention, step 3 specifically includes: 3.1 Visual Encoding Branch, which aims to extract implicit weather state features from physically augmented cloud images.

[0052] Obtain the physical augmentation cloud map obtained in step 1 The dimensions are 512×512×3. The physically augmented cloud map is input into the visual encoding branch. In this embodiment, the visual encoding branch adopts a lightweight convolutional neural network (CNN) architecture, specifically including three convolutional layers: the first layer contains 32 3×3 convolutional kernels with a stride of 2 and a ReLU activation function, followed by a max pooling layer; the second layer contains 64 3×3 convolutional kernels with a stride of 2 and a ReLU activation function, followed by a max pooling layer; the third layer contains 128 3×3 convolutional kernels with a stride of 1 and a ReLU activation function. Feature extraction is performed through multiple convolutional layers and downsampling layers, and the spatial dimension is compressed to 1 through a global pooling layer, finally outputting a 128-dimensional global spatial feature vector.

[0053] 3.2 Cross-modal gating mechanism A fully connected layer is used to map the 128-dimensional global spatial feature vector into a gated vector with the same dimension as the number of intrinsic mode components. A nonlinear activation function (such as the sigmoid function) is then used to process the gated vector, mapping the element values ​​to the interval between 0 and 1, resulting in a gate coefficient containing three elements. .

[0054] The generated gating coefficients are extended to the time dimension and compared with the three intrinsic mode components obtained in step 2. , and Perform channel-wise multiplication:

[0055] in, These are the original component values ​​obtained from VMD decomposition. These are the filtered component values; The gating coefficient represents the k-th modal component.

[0056] This mechanism establishes a logical connection between visual and temporal modalities. For example, when a CNN identifies a cloud image as clear sky, the network automatically learns the gating coefficients for the corresponding high-frequency components. The value approaches 0, thus automatically filtering out high-frequency inverter noise. When identified as rapidly moving fragmented cumulus clouds, the network output... It approaches 1, thus preserving the true power surge signal caused by cloud obstruction.

[0057] Step 4: The selected intrinsic mode components are concatenated with the weather forecast data in the feature dimension and input into the temporal prediction branch of the hybrid deep learning model. Temporal dependency analysis is performed through a multi-head self-attention mechanism to obtain the photovoltaic power prediction value.

[0058] The timing prediction branch is responsible for processing the filtered timing signals and outputting the prediction results.

[0059] First, the intrinsic mode components selected in step 3.2 are concatenated with the weather forecast data along the feature dimension. Then, in order for the model to perceive the sequential order of the sequence, a position encoding vector is superimposed on the feature vector to obtain the time-series input matrix.

[0060] The temporal input matrix is ​​input into the temporal prediction branch. In this embodiment, the temporal prediction branch uses a Transformer encoder architecture, which contains two stacked encoding layers. To balance computational efficiency and feature extraction capability, the model hyperparameters are set as follows: the number of heads in the multi-head self-attention mechanism is set to 4, and the hidden layer dimension is set to 128.

[0061] Inside the encoding layer, the query matrix (Q), key matrix (K), and value matrix (V) are calculated through linear transformations. The query matrix Q and the key matrix K are then multiplied and normalized to obtain the attention weight matrix, which reflects the dependence strength between different time steps. Subsequently, the attention weight matrix and the value matrix V are multiplied to obtain the temporal feature vector. Finally, the encoder output passes through a fully connected layer, mapping the temporal feature vector to photovoltaic power prediction values.

[0062] To intuitively illustrate the working mechanism of the time series prediction branch, let's take the prediction of power at 10:45 as an example: Assume that the intrinsic mode component sequence after step 3 retains a significant negative mutation feature at 10:30, such as a value of -54.88, which indicates cloud obstruction, while the weather forecast data obtained in step 1 at 10:45 shows that the solar irradiance has risen to 800W / m², indicating that the cloud layer has dissipated.

[0063] When these two sets of features are concatenated into the time-series prediction branch, the multi-head self-attention mechanism captures the strong correlation between abrupt changes in cloud occlusion in historical moments and high irradiance in future moments, assigning a larger attention weight to the trend recovery features. Finally, after mapping through a fully connected layer, the model outputs a predicted value of 135kW at 10:45, accurately predicting the power recovery trend after cloud dissipation and avoiding the underestimation problem caused by relying solely on historical low values.

[0064] Step 5: Model Training and Optimization The training process of the hybrid deep learning model includes: Historical archived data of photovoltaic power plants is acquired, including historical power data, historical weather data, and historical all-sky cloud images. Missing value interpolation, physical augmentation cloud image generation, and variational mode decomposition are performed on the historical archived data. Training sample pairs are constructed for each sample sampling time. The input features of the training sample pairs include: historical power data before the sample sampling time, historical all-sky cloud images at the sample sampling time, and historical weather data for the period to be predicted after the sample sampling time. The label value of the training sample pairs is: the actual photovoltaic power during the period to be predicted after the sample sampling time. The physical augmentation cloud map in the training sample pair is input into the visual coding branch. The historical power data is subjected to variational mode decomposition to obtain intrinsic mode components. After gating and filtering, the intrinsic mode components are concatenated with historical weather data and input into the time series prediction branch to obtain the training prediction value of the current round. Based on the geographical location information of the photovoltaic power station and the time information of the period to be predicted, the theoretical maximum irradiance at the current moment is calculated using the clear-sky radiation model and converted into the theoretical maximum power; the difference between the predicted photovoltaic power value and the theoretical maximum power is calculated; when the predicted photovoltaic power value is greater than the theoretical maximum power, the difference is extracted using an activation function and squared to obtain the physical limit violation penalty term; otherwise, the physical limit violation penalty term is set to zero; the prediction error loss term and the physical limit violation penalty term are weighted and summed to obtain the total loss function. The gradient is calculated using the total loss function, and the parameters of the visual encoding branch and the time-series prediction branch of the hybrid deep learning model are jointly updated using the backpropagation algorithm.

[0065] In a preferred but non-limiting embodiment of the present invention, step 5 specifically includes: 5.1 Calculation of Theoretical Physical Boundaries Based on the geographical location and time information of the photovoltaic power station, including latitude, longitude, altitude, and the current timestamp, the theoretical maximum irradiance at the current moment is calculated using a clear-sky radiation model, such as the Ineichen-Perez model. Combined with the photoelectric conversion efficiency of photovoltaic modules And the total installed capacity S, converting theoretical irradiance into theoretical maximum power. , represented as:

[0066] in, This is the overall system efficiency coefficient. This constitutes the physical upper limit of photovoltaic output at the current moment.

[0067] 5.2 Constructing Physical Limit Exceedance Penalties Traditional mean squared error (MSE) only focuses on numerical fitting, ignoring physical laws. This embodiment constructs a physical limit violation penalty term to force the model to comply with energy conservation and nonnegativity constraints. First, the difference between the predicted photovoltaic power and the theoretical maximum power is calculated; when the predicted photovoltaic power exceeds the theoretical maximum power, the difference is extracted using an activation function and squared to obtain the physical limit violation penalty term. When the predicted photovoltaic power is less than or equal to the theoretical maximum power, the physical limit violation penalty term applies. Set to zero. This is represented as:

[0068] Where N is the number of batch samples during training; This is a linear rectified function used to extract positive values; This represents the predicted photovoltaic power output by the model at time t. The penalty coefficient is set to 1.0 in this embodiment; additionally, in the first term, when the predicted value... When the ReLU output is positive and squared, a gradient penalty is applied; when... When the predicted value is 0, this item is 0, which does not affect normal training. In the second item, when the predicted value... At that time, because photovoltaic power cannot be negative, a penalty is incurred.

[0069] 5.3 Total Loss Function and Joint Optimization Construct the total loss function Combining prediction errors with physical constraints:

[0070] in, The mean squared error between the predicted and actual values. This is the weight of the physical constraint, for example, 0.5.

[0071] Then, the AdamW optimizer is used to optimize the total loss function. Minimize the process. Calculate the result using the backpropagation algorithm. The gradients of the network parameters are calculated, and all trainable parameters of both the visual encoding branch (CNN) and the temporal prediction branch (Transformer) are updated simultaneously. This joint optimization mechanism forces the CNN branch to extract gated features that conform to physical laws, and forces the Transformer branch to output predictions that do not exceed the limits, thereby improving the rationality of the model's prediction logic in extreme weather and nighttime periods.

[0072] To verify the effectiveness of the physical limit violation penalty, the following scenario is used as an example for calculation and explanation: Assuming at 12:00, the theoretical maximum power calculated based on the clear-sky radiation model and the power plant's installed capacity... It is 100kW.

[0073] If the model outputs the predicted value It is 95kW. At this time... The difference is -5kW. After processing with the ReLU activation function, it becomes 0. =0 indicates that the prediction conforms to physical laws, does not incur additional penalties, and the model is only constrained by the mean square error.

[0074] If the model is undertrained, the output predicted value will be... It is 110kW. At this time The difference is 10kW. The difference is extracted using the ReLU activation function and squared to obtain... =100. This penalty value will be applied to the total loss function. Feedback to the network generates strong gradient signals during backpropagation, forcing the model parameters to adjust significantly in the direction of reducing the predicted value until the predicted value returns to the physically feasible region of [0, 100].

[0075] Furthermore, as a preferred embodiment of the present invention, to address the potential performance degradation of the model during long-term operation, this method also includes an online update mechanism. Specifically, the prediction error is monitored in real time, and when the error exceeds a preset threshold, an incremental update is triggered: the parameters of the visual encoding branch and the temporal prediction branch are kept frozen, while the parameters of the main fully connected output layer are fine-tuned. This strategy can quickly adapt to changes in the photovoltaic power plant environment with low computational power consumption.

[0076] Example 2: A hybrid deep learning system for short-term photovoltaic power prediction includes: The data augmentation module is used to acquire historical power data of the photovoltaic power station before the predicted time, weather forecast data for the predicted period, and the current all-sky cloud map; to interpolate and complete missing values ​​in the historical power data; to calculate the pixel coordinates of the sun in the all-sky cloud map at the current time using a solar positioning algorithm, and to construct a region of interest mask centered on the pixel coordinates; and to superimpose the region of interest mask with the all-sky cloud map to obtain a physically augmented cloud map. The mode decomposition module is used to perform variational mode decomposition on the processed historical power data to obtain multiple intrinsic mode components. The visual encoding module is used to input the physical augmented cloud map into the visual encoding branch of a preset hybrid deep learning model, extract visual feature vectors and map the visual feature vectors into gating coefficients; and use the gating coefficients to adaptively weight and filter the intrinsic modal components to obtain the filtered intrinsic modal components. The temporal coding module is used to concatenate the selected intrinsic mode components with the weather forecast data in the feature dimension, input the concatenation into the temporal prediction branch of the hybrid deep learning model, and perform temporal dependency analysis through a multi-head self-attention mechanism to obtain the photovoltaic power prediction value.

[0077] Example 3: The present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded onto the processor, it implements the aforementioned short-term photovoltaic power prediction method based on hybrid deep learning.

[0078] Example 4: The present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned short-term photovoltaic power prediction method based on hybrid deep learning.

[0079] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.

[0080] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0081] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0082] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute 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. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.

Claims

1. A short-term photovoltaic power prediction method based on hybrid deep learning, characterized in that, include: Step 1: Obtain historical power data of the photovoltaic power station before the time to be predicted, weather forecast data for the time period to be predicted, and the current all-sky cloud map; perform interpolation to complete the missing values ​​in the historical power data; use the solar positioning algorithm to calculate the pixel coordinates of the sun in the all-sky cloud map at the current time, and construct a region of interest mask centered on the pixel coordinates; superimpose the region of interest mask with the all-sky cloud map to obtain a physically enhanced cloud map; Step 2: Perform variational mode decomposition on the processed historical power data to obtain multiple intrinsic mode components; Step 3: Input the physical augmentation cloud map into the visual encoding branch of the preset hybrid deep learning model, extract the visual feature vector and map the visual feature vector into gating coefficients; use the gating coefficients to adaptively weight and filter the intrinsic modal components to obtain the filtered intrinsic modal components; Step 4: Concatenate the selected intrinsic mode components with the weather forecast data along the feature dimension, input them into the temporal prediction branch of the hybrid deep learning model, and perform temporal dependency analysis through a multi-head self-attention mechanism to obtain the photovoltaic power prediction value.

2. The short-term photovoltaic power prediction method based on hybrid deep learning according to claim 1, characterized in that, The historical power data, weather forecast data, and all-sky cloud images mentioned in step 1 specifically include: The historical power data includes the historical active power time series of the photovoltaic power plant up to the time to be predicted. The weather forecast data includes predicted sequences of solar irradiance, ambient temperature, and relative humidity for the period to be predicted. The all-sky cloud image includes visible light images acquired by the ground-based all-sky imager at the current moment.

3. The short-term photovoltaic power prediction method based on hybrid deep learning according to claim 1, characterized in that, Step 1 involves interpolating and completing missing values ​​in the historical power data, specifically including: Select several nearby valid observations before and after the missing time point; Calculate the absolute value of the time difference between the time point corresponding to each valid observation and the missing time point; An exponential decay function is constructed based on the absolute value of the time difference, and the time weight of each effective observation is calculated, wherein the time weight decreases as the absolute value of the time difference increases; The time weight is used to calculate a weighted average of all selected valid observations to obtain the interpolated data for the missing time point.

4. The short-term photovoltaic power prediction method based on hybrid deep learning according to claim 1, characterized in that, Step 1 involves constructing a region of interest mask centered on pixel coordinates, specifically including: Generate a two-dimensional weight matrix with the same resolution as the all-sky cloud image; Using the pixel coordinates as the center point, calculate the Euclidean distance of each point in the two-dimensional weight matrix relative to the center point; The weight value of each point is calculated using the Gaussian distribution function, with the center point having the largest weight value. Using the two-dimensional weight matrix as the region of interest mask, the pixel values ​​of the all-sky cloud map are multiplied by the weight values ​​at the corresponding positions in the region of interest mask to obtain the physical augmented cloud map.

5. The short-term photovoltaic power prediction method based on hybrid deep learning according to claim 1, characterized in that, The intrinsic mode components mentioned in step 2 include multiple components arranged from high to low center frequency. The high-frequency components correspond to sudden changes in cloud cover and random noise, the mid-frequency components correspond to the intraday periodic changes in photovoltaic power, and the low-frequency components correspond to the gradual trend of photovoltaic power.

6. The short-term photovoltaic power prediction method based on hybrid deep learning according to claim 1, characterized in that, Step 3 involves extracting the visual feature vector of the physically augmented cloud map through a visual encoding branch, and mapping the visual feature vector to gating coefficients. Specifically, this includes: The physical augmentation cloud map is input into the visual coding branch, and features are extracted through multiple convolutional layers and downsampling layers. The global spatial feature vector is obtained through a global pooling layer. The global spatial feature vector is mapped to a gated vector with the same dimension as the number of intrinsic mode components using a fully connected layer; the gated vector is then processed using a nonlinear activation function to map the element values ​​of the gated vector to the interval between 0 and 1, thereby obtaining the gated coefficients.

7. The short-term photovoltaic power prediction method based on hybrid deep learning according to claim 1, characterized in that, Step 4 involves concatenating the selected intrinsic mode components with weather forecast data and obtaining the photovoltaic power prediction value through a multi-head self-attention mechanism in the time-series forecast branch. Specifically, this includes: The selected intrinsic mode components are concatenated with the weather forecast data along the feature dimension, and the location encoding vector is superimposed to obtain the time-series input matrix; The time series input matrix is ​​input into the time series prediction branch, and the query matrix, key matrix and value matrix are calculated using a multi-head self-attention mechanism. The query matrix and the key matrix are then subjected to dot product operation and normalization to obtain the attention weight matrix. The attention weight matrix and the value matrix are multiplied to obtain a time-series feature vector; the time-series feature vector is then mapped to a photovoltaic power prediction value using a fully connected layer.

8. The short-term photovoltaic power prediction method based on hybrid deep learning according to claim 1, characterized in that, The training process of the hybrid deep learning model includes: Historical archived data of photovoltaic power plants is acquired, including historical power data, historical weather data, and historical all-sky cloud images. Missing value interpolation, physical augmentation cloud image generation, and variational mode decomposition are performed on the historical archived data. Training sample pairs are constructed for each sample sampling time. The input features of the training sample pairs include: historical power data before the sample sampling time, historical all-sky cloud images at the sample sampling time, and historical weather data for the period to be predicted after the sample sampling time. The label value of the training sample pairs is: the actual photovoltaic power during the period to be predicted after the sample sampling time. The physical augmentation cloud map in the training sample pair is input into the visual coding branch. The historical power data is subjected to variational mode decomposition to obtain intrinsic mode components. After gating and filtering, the intrinsic mode components are concatenated with historical weather data and input into the time series prediction branch to obtain the training prediction value of the current round. Based on the geographical location information of the photovoltaic power station and the time information of the period to be predicted, the theoretical maximum irradiance at the current moment is calculated using the clear-sky radiation model and converted into the theoretical maximum power; the difference between the photovoltaic power prediction value and the theoretical maximum power is calculated; when the photovoltaic power prediction value is greater than the theoretical maximum power, the difference is extracted using an activation function and squared to obtain the physical limit violation penalty term; otherwise, the physical limit violation penalty term is set to zero; the prediction error loss term obtained from the training prediction value is weighted and summed with the physical limit violation penalty term to obtain the total loss function; The gradient is calculated using the total loss function, and the parameters of the visual encoding branch and the time-series prediction branch of the hybrid deep learning model are jointly updated using the backpropagation algorithm.

9. A hybrid deep learning system for short-term photovoltaic power prediction, running the short-term photovoltaic power prediction method based on hybrid deep learning as described in any one of claims 1 to 8, characterized in that, include: The data augmentation module is used to acquire historical power data of the photovoltaic power station before the predicted time, weather forecast data for the predicted period, and the current all-sky cloud map; to interpolate and complete missing values ​​in the historical power data; to calculate the pixel coordinates of the sun in the all-sky cloud map at the current time using a solar positioning algorithm, and to construct a region of interest mask centered on the pixel coordinates; and to superimpose the region of interest mask with the all-sky cloud map to obtain a physically augmented cloud map. The mode decomposition module is used to perform variational mode decomposition on the processed historical power data to obtain multiple intrinsic mode components. The visual encoding module is used to input the physical augmented cloud map into the visual encoding branch of a preset hybrid deep learning model, extract visual feature vectors and map the visual feature vectors into gating coefficients; and use the gating coefficients to adaptively weight and filter the intrinsic modal components to obtain the filtered intrinsic modal components. The temporal coding module is used to concatenate the selected intrinsic mode components with the weather forecast data in the feature dimension, input the concatenation into the temporal prediction branch of the hybrid deep learning model, and perform temporal dependency analysis through a multi-head self-attention mechanism to obtain the photovoltaic power prediction value.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is loaded into the processor, it implements a short-term photovoltaic power prediction method based on hybrid deep learning according to any one of claims 1-8.

11. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements a short-term photovoltaic power prediction method based on hybrid deep learning according to any one of claims 1-8.