A method for ultra-short-term solar irradiance prediction based on multimodal feature fusion

Through the multi-modal feature fusion method, two-dimensional temporal convolution and multi-level visual transformer models are used to extract features from timing and images, and combined with Transformer for information fusion, solving the temporal dependence and multi-modal features in the existing technology. High-precision ultra-short-term solar irradiance prediction is achieved by solving the under-utilization problem.

CN118470486BActive Publication Date: 2024-10-18NANJING NORMAL UNIVERSITY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410913505.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-10-18
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

Existing technologies cannot fully exploit temporal dependence and multi-modal features in ultra-short-term solar irradiance prediction, and traditional methods cannot effectively utilize multi-source data for high-precision prediction.

Method used

Using a method based on multi-modal feature fusion, temporal features are extracted through two-dimensional temporal convolution, combined with a multi-level visual transformer model to mine image information from local and global perspectives, and Transformer is used to fuse multi-modal feature information to achieve high accuracy Solar irradiance forecast.

Benefits of technology

It can directly extract hidden features from historical sequences and sky images, improve the spatial receptive field of the model, solve the problem of feature disappearance and computational redundancy of the recursive network and Transformer architecture, and achieve high-precision ultra-short-term solar irradiance predict.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118470486B_ABST
    Figure CN118470486B_ABST
Patent Text Reader

Abstract

The present invention discloses an ultra-short-term solar irradiance prediction method based on multimodal feature fusion, comprising the following steps: (1) obtaining multi-source historical data of a photovoltaic power station to be tested and performing preprocessing; (2) using the two-dimensional time series convolution of TimesNet to learn time series features from the perspective of multi-periodic characteristics of the time series, converting the historical series into a two-dimensional tensor, and extracting time series features using two-dimensional convolution; (3) using T2T-ViT to mine image information from both local and global perspectives, and extracting features characterizing cloud distribution and motion information; (4) using the encoder of a transformer model Transformer to find parts similar to the time series features in the image features and perform attention fusion; (5) using the decoder of the Transformer to directly output the multi-step prediction result of photovoltaic power generation, and performing error evaluation on it; the present invention can extract features characterizing cloud distribution and motion information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of photovoltaic prediction, and in particular to an ultra-short-term solar irradiance prediction method based on multi-modal feature fusion. Background Art

[0002] As one of the most abundant and easily accessible renewable energy sources, solar energy has low power generation costs, is environmentally friendly, and has the potential to replace fossil fuels and meet global energy needs. However, the output of photovoltaic power generation mainly depends on the local solar radiation intensity, and its intermittent and volatile nature poses a threat to the stable operation of high-penetration power systems. Therefore, it is necessary and challenging to achieve high-precision and high-resolution horizontal solar irradiance forecasts. At present, according to the time scale, GHI forecasts can be divided into ultra-short-term forecasts (no more than 6 hours), short-term forecasts (6-24 hours), and medium- and long-term forecasts (more than one month). Although the ultra-short-term forecast has the shortest time scale, it has high resolution and is of great significance for the optimal scheduling of power systems and economic transactions in power markets.

[0003] Solar irradiance prediction methods based on historical data and sky images have been widely studied, but existing models cannot fully exploit temporal dependencies. Traditional deep learning methods use recursive neural networks to encode historical data rows in time series. They rely on special serial memory units to save the autocorrelation of time series data and cannot interact with information across arbitrary time steps. Although the time series model based on the Transformer architecture uses an attention mechanism to capture the pairwise temporal dependencies between time points, it cannot learn complex temporal trends from scattered time points. In terms of sky image features, the visual model based on convolutional neural networks can extract features from local receptive fields, but its ability to perceive global information is limited. The Transformer-based visual model is too rough in image segmentation and will lose local features. In terms of using multimodal features, most studies use simple stacking, linear models, and modules for representing multimodal information to achieve multimodal feature fusion, which cannot achieve deep interactions between multimodal information and cannot fully utilize multi-source data to achieve high-precision predictions. Summary of the invention

[0004] Purpose of the invention: The purpose of the present invention is to provide an ultra-short-term solar irradiance prediction method based on multimodal feature fusion, which solves the problems of multimodal feature extraction and multimodal information fusion. The present invention can better extract time series features from the perspective of two-dimensional time series through convolution, explore the changing trend of multivariate sequences, and simultaneously discover useful information from sky images at both local and global scales, and then use Transformer to fuse multimodal feature information to achieve high-precision solar irradiance prediction.

[0005] Technical solution: The ultra-short-term solar irradiance prediction method based on multimodal feature fusion described in the present invention comprises the following steps:

[0006] (1) Obtain multi-source historical data of the photovoltaic power station to be tested and perform preprocessing;

[0007] (2) Using the two-dimensional time series convolution of the time two-dimensional change model TimesNet to learn time series features from the perspective of time series multi-cycle characteristics, the historical sequence is converted into a two-dimensional tensor, and the time series features are extracted using two-dimensional convolution;

[0008] (3) Using the multi-level visual transformer model T2T-ViT to mine image information from both local and global perspectives, we extract features that represent cloud distribution and motion information;

[0009] (4) Use the encoder of the transformer model Transformer to find parts similar to temporal features in image features and perform attention fusion;

[0010] (5) The Transformer decoder is used to directly output the multi-step prediction results of photovoltaic power generation and perform error evaluation on them.

[0011] Furthermore, step (1) preprocessing is as follows: outliers are removed and missing values ​​are filled in the original data, all text data are standardized, image data are distorted and resampled, optical flow maps between consecutive frames of sky images are calculated, and input data of different modes are aligned to establish a feature database; including the following steps:

[0012] (11) Use the Laida criterion method to set the confidence probability and determine the confidence limit. Errors exceeding the confidence limit do not belong to the range of random errors and are considered outliers and eliminated;

[0013] (12) On the basis of eliminating outliers, the bilinear interpolation method is used to fill the missing data in the historical irradiance data and historical meteorological factor data;

[0014] (13) The cleaned historical irradiance data and historical meteorological factor data are subjected to Z-score standardization, and the formula is as follows:

[0015] ;

[0016] in, is the mean of the overall data, is the standard deviation of the overall data, is the observed value, is the standardized observed value;

[0017] (14) The multi-chessboard calibration method is used to correct the distortion of the sky image taken by the fisheye camera, and then downsample it to obtain a corrected sky image;

[0018] (15) The Farneback dense optical flow algorithm is used to calculate the corrected sky image to obtain the optical flow map of multiple frames of sky images.

[0019] Furthermore, step (2) TimesNet consists of a stacked multi-layer time processing module TimesBlock, including the following steps:

[0020] (21) The period of the one-dimensional time series feature is calculated using the fast Fourier transform and converted into a two-dimensional tensor. The calculation formula is:

[0021] ;

[0022] ;

[0023] in, represents the period calculation function, represents the calculated amplitude, , represents frequency and period, represents the transformed 2D tensor, The function fills the end of the time series with 0. The function reconstructs a 1D sequence into a 2D tensor;

[0024] (22) Select the classic deep separable convolutional neural network Inception to extract two-dimensional time series features. The formula is as follows:

[0025] ;

[0026] in, Represents two-dimensional time series features. For the extracted time series features, convert them back to one-dimensional space for information aggregation:

[0027] ;

[0028] in, The function removes the 0 added to the sequence. Represents the aggregated one-dimensional time series features, and then the obtained one-dimensional representation The weighted summation with the corresponding frequency intensity is output as follows:

[0029] ;

[0030] ;

[0031] in, For frequency The corresponding calculated amplitude is, represents the activation function, Represents the one-dimensional features of the output;

[0032] Finally, the time series is output as highly refined mapped time series features through multiple layers of TimesBlock.

[0033] Furthermore, step (3) includes the following steps:

[0034] (31) The local information modeling of the sky image and the optical flow map is performed through the image reconstruction and segmentation module T2T of T2T-ViT. T2T includes soft segmentation and reconstruction, including the following steps:

[0035] (311) Let the token sequence output by the given upper layer be T i , global features are extracted through the self-attention module, and then reconstructed. The formula is as follows:

[0036] ;

[0037] ;

[0038] in, represents the multi-layer self-attention function, Represents a multi-layer perceptron function; represents the reconstruction function, is the output of the self-attention module, is the reconstructed image, l for T i ’ Length, h , w , c are the height, width and number of channels respectively, and ;

[0039] (312) To obtain the reconstructed image I i Then soft segmentation is performed to divide the image into blocks with overlapping information. The tokens in each block are transformed into one token by connection. The formula is as follows:

[0040] ;

[0041] in, represents the soft segmentation function;

[0042] (32) At the output of the T2T module T fEmbed the position code, retain the position information, and then perform feature extraction. The formula is as follows:

[0043] ;

[0044] ;

[0045] ;

[0046] in, It is the position code, which indicates the position of each block in the original image; It is the input of T2T-ViT backbone; y is the output image feature; Indicates j The output of the layer global feature extraction module; finally, the sky image and optical flow map are encoded by T2T-ViT, and the multi-layer perceptron outputs the feature mapping results of the sky image and optical flow map.

[0047] Furthermore, step (4) includes the following steps:

[0048] (41) The time series features are used as source features and are encoded by an encoder. L The same encoder layers are stacked together. Each layer contains two sub-layers, namely the self-attention layer and the fully connected feed-forward layer. The two sub-layers are connected by a residual network. The characterization process formula is as follows:

[0049] ;

[0050] ;

[0051] in, , and They are attention function, normalization function and feedforward network function; , and Respectively l The query vector, key vector, and value vector of the layer self-attention module; , For the l- 1 Layer and l The output of the layer, For the l The output of the self-attention sublayer;

[0052] (42) The time series features are encoded by a multi-layer encoder to obtain source representation , sky image features extracted by T2T-ViT The auxiliary representation is input to the feedforward layer for learning, and the auxiliary representation is attached to the source representation using the self-attention mechanism. The formula is as follows:

[0053] ;

[0054] in, and A key vector and a value vector representing the sky image, represents the enhanced source representation;

[0055] Will and The efficient features are obtained by fusion, and the formula is as follows:

[0056] ;

[0057] ;

[0058] in, and is the model parameter. is the activation function, represents the weight, Represents the fused features.

[0059] Furthermore, step (5) is specifically as follows: L The decoder composed of stacked identical decoder layers is used for ultra-short-term solar irradiance prediction, as follows: First, a long sequence before the test point is used and the sequence to be tested Composition start input Finally, the input is input into the attention and feedforward layers for encoding; secondly, the final feature enhancement mapping result of step (4) is input into the multi-head attention layer of the decoder; finally, the multi-layer perceptron generates the multi-step solar irradiance prediction result.

[0060] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: it can directly extract hidden features from historical sequences and sky images for ultra-short-term solar irradiance prediction; it uses two-dimensional time series convolution to learn time series features from the perspective of time series multi-period characteristics; it solves the problems of recursive network feature disappearance and Transformer architecture computational redundancy; it mines image information from both local and global perspectives; and because the model can extract features that characterize cloud distribution and motion information, it expands the model's spatial receptive field and improves the model's performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 It is the principle diagram of the present invention;

[0062] Figure 2TimesNet schematic diagram of the present invention;

[0063] Figure 3 This is a schematic diagram of the T2T module of the present invention. DETAILED DESCRIPTION

[0064] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.

[0065] like Figure 1 As shown, an embodiment of the present invention provides an ultra-short-term solar irradiance prediction method based on multimodal feature fusion, comprising the following steps:

[0066] (1) Obtain multi-source historical data of the photovoltaic power station to be tested and perform preprocessing; the preprocessing is as follows: remove outliers and fill missing values ​​from the original data, standardize all text data, perform distortion correction and resample the image data, calculate the optical flow map between consecutive frames of the sky image, align the input data of different modes, and establish a feature database; the preprocessing includes the following steps:

[0067] (11) Use the Laida criterion method to set the confidence probability and determine the confidence limit. Errors exceeding the confidence limit do not belong to the range of random errors and are considered outliers and eliminated;

[0068] (12) On the basis of eliminating outliers, the bilinear interpolation method is used to fill the missing data in the historical irradiance data and historical meteorological factor data;

[0069] (13) The cleaned historical irradiance data and historical meteorological factor data are subjected to Z-score standardization. The standardization method formula is as follows:

[0070] ;

[0071] in, is the mean of the overall data, is the standard deviation of the overall data, is the observed value, is the standardized observed value;

[0072] (14) The multi-chessboard calibration method is used to correct the distortion of the sky image taken by the fisheye camera, and then downsample it to obtain a corrected sky image;

[0073] (15) The Farneback dense optical flow algorithm is used to calculate the corrected sky image to obtain the optical flow map of multiple frames of sky images.

[0074] (2) Using the two-dimensional time series convolution of the time two-dimensional change model TimesNet to learn time series features from the perspective of time series multi-cycle characteristics, the historical sequence is converted into a two-dimensional tensor, and the time series features are extracted using two-dimensional convolution; Figure 2 As shown in the figure, TimesNet consists of a stacked multi-layer time processing module TimesBlock, which includes the following steps:

[0075] (21) The period of the one-dimensional time series feature is calculated using the fast Fourier transform and converted into a two-dimensional tensor. The calculation formula is:

[0076] ;

[0077] ;

[0078] in, represents the period calculation function, represents the calculated amplitude, , represents frequency and period, represents the transformed 2D tensor, The function fills 0 at the end of the time series. The function reconstructs a 1D sequence into a 2D tensor;

[0079] (22) Select the classic deep separable convolutional neural network Inception to extract two-dimensional time series features. The formula is as follows:

[0080] ;

[0081] in, Represents two-dimensional time series features. For the extracted time series features, convert them back to one-dimensional space for information aggregation:

[0082] ;

[0083] in, The function removes the 0 added to the sequence. Represents the aggregated one-dimensional time series features, and then the obtained one-dimensional representation The weighted summation with the corresponding frequency intensity is output as follows:

[0084] ;

[0085] ;

[0086] in, For frequency The corresponding calculated amplitude is, represents the activation function, Represents the one-dimensional features of the output;

[0087] Finally, the time series is output as highly refined mapped time series features through multiple layers of TimesBlock.

[0088] (3) Using the multi-level visual transformer model T2T-ViT to mine image information from both local and global perspectives, extract features that represent cloud distribution and motion information; Figure 3 As shown, the following steps are included:

[0089] (31) The local information modeling of the sky image and the optical flow map is performed through the image reconstruction and segmentation module T2T of T2T-ViT. T2T includes soft segmentation and reconstruction, including the following steps:

[0090] (311) Let the token sequence output by the given upper layer be T i , global features are extracted through the self-attention module, and then reconstructed. The formula is as follows:

[0091] ;

[0092] ;

[0093] in, represents the multi-layer self-attention function, Represents a multi-layer perceptron function; represents the reconstruction function, is the output of the self-attention module, is the reconstructed image, l for T i ’ Length, h , w , c are the height, width and number of channels respectively, and ;

[0094] (312) To obtain the reconstructed image I i Then soft segmentation is performed to divide the image into blocks with overlapping information. The tokens in each block are transformed into one token by connection. The formula is as follows:

[0095] ;

[0096] in, Represents the soft segmentation function; after multiple layers of iteration, the Tokens output by the T2T module have a fixed length, and then the backbone of T2T-ViT models the global relationship on this basis.

[0097] (32) At the output of the T2T module T f Embed the position code, retain the position information, and then perform feature extraction. The formula is as follows:

[0098] ;

[0099] ;

[0100] ;

[0101] in, It is the position code, which indicates the position of each block in the original image; It is the input of T2T-ViT backbone; y is the output image feature; Indicates j The output of the global feature extraction module of the layer; finally, the sky image and optical flow map are encoded by T2T-ViT, and the multi-layer perceptron outputs the feature mapping results of the sky image and optical flow map.

[0102] (4) Using the encoder of the transformer model Transformer to find parts similar to the temporal features in the image features and perform attention fusion; including the following steps:

[0103] (41) The time series features are used as source features and are encoded by an encoder. L The same encoder layers are stacked together. Each layer contains two sub-layers, namely the self-attention layer and the fully connected feed-forward layer. The two sub-layers are connected by a residual network. The representation process formula is as follows:

[0104] ;

[0105] ;

[0106] in, , and They are attention function, normalization function and feedforward network function; , and Respectively l The query vector, key vector, and value vector of the layer self-attention module; , For the l- 1 Layer and l The output of the layer, For the l The output of the self-attention sublayer;

[0107] (42) The time series features are encoded by a multi-layer encoder to obtain source representation , sky image features extracted by T2T-ViT The auxiliary representation is input to the feedforward layer for learning, and the auxiliary representation is attached to the source representation using the self-attention mechanism. The formula is as follows:

[0108] ;

[0109] in, and A key vector and a value vector representing the sky image, represents the enhanced source representation;

[0110] Will and The efficient features are obtained by fusion, and the formula is as follows:

[0111] ;

[0112] ;

[0113] in, and is the model parameter. is the activation function, represents the weight, Represents the fused features.

[0114] (5) Use the Transformer decoder to directly output the multi-step prediction results of photovoltaic power generation and perform error evaluation on them. Specifically: L The decoder composed of stacked identical decoder layers is used for ultra-short-term solar irradiance prediction, as follows: First, a long sequence before the test point is used and the sequence to be tested Composition start input Finally, the input is input into the attention and feedforward layers for encoding; secondly, the final feature enhancement mapping result of step (4) is input into the multi-head attention layer of the decoder; finally, the multi-layer perceptron generates the multi-step solar irradiance prediction result.

Claims

1. An ultra-short-term solar irradiance prediction method based on multimodal feature fusion, characterized in that: The following steps are involved: (1) Obtain multi-source historical data of the PV power station to be tested and perform preprocessing; (2) Using the two-dimensional time series convolution of the time two-dimensional change model TimesNet to learn time series features from the perspective of time series multi-cycle characteristics, the historical sequence is converted into a two-dimensional tensor, and the time series features are extracted using two-dimensional convolution; TimesNet consists of a stack of multi-layer time processing modules TimesBlock, including the following steps: (21) The period of the one-dimensional time series feature is calculated using the fast Fourier transform and converted into a two-dimensional tensor. The calculation formula is: ; ; in, represents the period calculation function, represents the calculated amplitude, , represents frequency and period, represents the transformed 2D tensor, The function fills 0 at the end of the time series. The function reconstructs a 1D sequence into a 2D tensor; (22) Select the classic deep separable convolutional neural network Inception to extract two-dimensional time series features. The formula is as follows: ; in, Represents two-dimensional time series features. For the extracted time series features, convert them back to one-dimensional space for information aggregation: ; in, The function removes the 0 added to the sequence. Represents the aggregated one-dimensional time series features, and then the obtained one-dimensional representation The weighted summation with the corresponding frequency intensity is output as follows: ; ; in, For frequency The corresponding calculated amplitude is, represents the activation function, Represents the one-dimensional features of the output; Finally, the time series is output as highly refined mapped time series features through multiple layers of TimesBlock; (3) Using the multi-level visual transformer model T2T-ViT to mine image information from both local and global perspectives, extract features that represent cloud distribution and motion information; including the following steps: (31) The local information modeling of the sky image and the optical flow map is performed through the image reconstruction and segmentation module T2T of T2T-ViT. T2T includes soft segmentation and reconstruction, including the following steps: (311) Let the token sequence output by the given upper layer be T i , global features are extracted through the self-attention module, and then reconstructed. The formula is as follows: ; ; in, represents the multi-layer self-attention function, Represents a multi-layer perceptron function; represents the reconstruction function, is the output of the self-attention module, is the reconstructed image, l for T i ’ Length, h , w , c are the height, width and number of channels respectively, and ; (312) To obtain the reconstructed image I i Then soft segmentation is performed to divide the image into blocks with overlapping information. The tokens in each block are transformed into one token by connection. The formula is as follows: ; in, represents the soft segmentation function; (32) At the output of the T2T module T f Embed the position code, retain the position information, and then perform feature extraction. The formula is as follows: ; ; ; in, It is the position code, which indicates the position of each block in the original image; It is the input of T2T-ViT backbone; y is the output image feature; Indicates j The output of the layer global feature extraction module; finally, the sky image and optical flow map are encoded by T2T-ViT, and the multi-layer perceptron outputs the feature mapping results of the sky image and optical flow map; (4) Use the encoder of the transformer model Transformer to find parts similar to temporal features in image features and perform attention fusion; (5) The Transformer decoder is used to directly output the multi-step prediction results of photovoltaic power generation and perform error evaluation on them.

2. According to claim 1, a method for predicting ultra-short-term solar irradiance based on multimodal feature fusion is characterized in that: Step (1) preprocessing is as follows: remove outliers and fill missing values ​​from the original data, standardize all text data, perform distortion correction and resample the image data, calculate the optical flow map between consecutive frames of the sky image, align the input data of different modes, and establish a feature database; it includes the following steps: (11) Use the Laida criterion method to set the confidence probability and determine the confidence limit. Errors exceeding the confidence limit do not belong to the range of random errors and are considered outliers and eliminated; (12) On the basis of eliminating outliers, the bilinear interpolation method is used to fill the missing data in the historical irradiance data and historical meteorological factor data; (13) The cleaned historical irradiance data and historical meteorological factor data are subjected to Z-score standardization, and the formula is as follows: ; in, is the mean of the overall data, is the standard deviation of the overall data, is the observed value, is the standardized observed value; (14) The multi-chessboard calibration method is used to correct the distortion of the sky image taken by the fisheye camera, and then downsample it to obtain a corrected sky image; (15) The Farneback dense optical flow algorithm is used to calculate the corrected sky image to obtain the optical flow map of multiple frames of sky images.

3. The ultra-short-term solar irradiance prediction method based on multimodal feature fusion according to claim 1 is characterized in that: Step (4) includes the following steps: (41) The time series features are used as source features and are encoded by an encoder. L The same encoder layers are stacked together. Each layer contains two sub-layers, namely the self-attention layer and the fully connected feed-forward layer. The two sub-layers are connected by a residual network. The characterization process formula is as follows: ; ; in, , and They are attention function, normalization function and feedforward network function; , and Respectively l The query vector, key vector, and value vector of the layer self-attention module; , For the l-1 Layer and l The output of the layer, For the l The output of the self-attention sublayer; (42) The time series features are encoded by a multi-layer encoder to obtain source representation , sky image features extracted by T2T-ViT The auxiliary representation is input to the feedforward layer for learning, and the self-attention mechanism is applied to attach the auxiliary representation to the source representation. The formula is as follows: ; in, and A key vector and a value vector representing the sky image, represents the enhanced source representation; Will and The efficient features are obtained by fusion, and the formula is as follows: ; ; in, and are model parameters; is the activation function, represents the weight, Represents the fused features.

4. The ultra-short-term solar irradiance prediction method based on multimodal feature fusion according to claim 1 is characterized in that: Step (5) is as follows: L The decoder composed of stacked decoder layers is used for ultra-short-term solar irradiance prediction. The details are as follows: First, a long sequence before the test point is used and the sequence to be tested Composition start input After that, input the attention and feed-forward layers for encoding; Secondly, the final feature enhancement mapping result of step (4) is input into the multi-head attention layer of the decoder; finally, the multi-layer perceptron generates the multi-step solar irradiance prediction result.

Citation Information

Patent Citations

  • Ultra-short-term solar radiation prediction method and system based on cross-modal attention mechanism

    CN115511220A

  • Method, system and equipment for combined optimization prediction of photovoltaic power, and medium

    CN117374926A

  • Solar photovoltaic power generation short-term prediction method based on sky image

    CN117410976A

  • Long short-term memory self-attention model-based three-dimensional medical image segmentation method and system

    WO2024104035A1