Photovoltaic power generation day-ahead forecasting method based on causal inference and multi-scale feature fusion

By adopting PCMCI causal inference and multi-scale feature fusion methods in photovoltaic power generation prediction, combining multiple basic learners and cross-attention fusion models, the problem of difficult causal relationships in the existing technology and insufficient model adaptability is solved, significantly improving prediction accuracy and stability.

CN119578669BActive Publication Date: 2025-04-11HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510138801.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2025-04-11
Estimated Expiration
2045-02-08

AI Technical Summary

Technical Problem

Existing photovoltaic power generation prediction technology is difficult to effectively capture the causal relationship between meteorological factors and power generation power, and a single deep learning model is difficult to adapt to in complex and changing application scenarios. The basic learners of the integrated learning model are insufficient, which limits its generalization ability and prediction accuracy.

Method used

The weight of model input is determined by using a PCMCI method based on causal inference, combined with basic learners such as BiLSTM, TCN and SE-ResNet50 to extract multi-scale features from global, local and periodic perspectives, and fuse local meteorological fluctuations through a multi-layer cross-attention fusion model to improve prediction accuracy.

Benefits of technology

Effectively identify and capture the causal relationships in photovoltaic power generation systems, improve the interpretability and robustness of the model, and significantly improve the accuracy and stability of the recent predictions of photovoltaic power generation, especially in complex climate change environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119578669B_ABST
    Figure CN119578669B_ABST
Patent Text Reader

Abstract

The present invention discloses a photovoltaic power generation day-ahead prediction method based on causal inference and multi-scale feature fusion, and belongs to the field of photovoltaic power generation prediction technology. The method divides historical meteorological feature data into multiple samples, and uses the power generation power of the samples in the future M steps as corresponding labels. The PCMCI causal inference method is used to calculate the causal inference weight between the sample and the label, and the samples are weighted and input in parallel into three base learners, BiLSTM, TCN, and GAF‑SE‑ResNet50, to identify the trend of the input sequence from three dimensions: global, local, and periodic. The corresponding training obtains the preliminary prediction value of the photovoltaic power generation day-ahead. The wavelet features of the local weather forecast sequence of the prediction point are extracted, and the final prediction value is obtained by fusing the preliminary prediction value of the base learner with the cross-attention mechanism. Accurate and stable photovoltaic power generation prediction under complex climate change environment is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of photovoltaic power generation prediction, and specifically relates to a photovoltaic power generation day-ahead prediction method based on causal inference and multi-scale feature fusion. Background Art

[0002] Meteorological factors such as solar radiation have a significant impact on photovoltaic power generation output, resulting in strong intermittency and uncertainty in its power generation. Especially after photovoltaic grid connection, the fluctuation of grid frequency and voltage increases, which easily leads to instability and poses a challenge to the stable operation of the power system. Therefore, accurate photovoltaic power generation day-ahead forecast is particularly important, which can provide a reliable basis for grid dispatch and improve the dispatch efficiency and overall stability of the power system.

[0003] The current photovoltaic power generation prediction technology generally adopts the correlation analysis method in the feature extraction stage. By establishing the correlation between historical meteorological feature data and photovoltaic power generation data, the key features that have a significant impact on the power generation are screened out, and then these features are input into the deep learning model to generate the final prediction. However, the correlation analysis method can only evaluate the correlation between meteorological factors and power generation, and cannot reveal the causal relationship between the prediction model input and the target output. In addition, a single deep learning model has inherent limitations in prediction and is difficult to adapt to complex and changing application scenarios. Ensemble learning, as an advanced technical framework, has been widely adopted by building multiple base learners to improve overall performance. However, the lack of diversity of base learners will cause the ensemble learning model to be unable to capture the rich features and patterns in the data and limit the generalization ability. Furthermore, the synergy problem between base learners is still prominent. How to effectively integrate the prediction results of each base learner has become a key challenge to improve prediction accuracy. Summary of the invention

[0004] In view of the shortcomings of the prior art, the present invention proposes a photovoltaic power generation day-ahead forecasting method based on causal inference and multi-scale feature fusion, adopts PCMCI causal inference (Peter-Clark Minimal Conditional Independence) to determine the weights of different inputs of the model, and takes into account the timing characteristics of photovoltaic power generation sequence. Different base learners are used to extract sequence features from global and local perspectives respectively, and the periodic and structured feature information of the sequence is extracted at the same time, capturing the different trends of the multi-dimensional sequence, and combining the local meteorological fluctuation characteristics at the prediction time, so as to improve the accuracy of photovoltaic power generation day-ahead forecasting when dealing with different climate fluctuations.

[0005] A photovoltaic power generation day-ahead prediction method based on causal inference and multi-scale feature fusion, the specific steps are as follows:

[0006] Step 1: Suppress noise and process outliers on historical meteorological characteristic data, and perform maximum and minimum normalization on different characteristic data respectively, and adjust their numerical range to [0, 1] to eliminate the interference of dimension on causal inference results.

[0007] Step 2: Divide the data processed in step 1, set the sliding step of the sliding window to 1 and the window size to N, and get the sample :

[0008]

[0009] Wherein, i=1,2,...,LN-M+1, D represents the dimension of the historical meteorological characteristic data, and L represents the length of the historical meteorological characteristic data.

[0010] Will The photovoltaic power generation in the next M time steps is used as the label :

[0011]

[0012] Step 3: Select the elements at the same position in each sample to form the input sequence, select the elements at the same position in each label to form the output sequence, and use the PCMCI causal inference (Peter-Clark Minimal Conditional Independence) method to calculate the causal inference weight between the input and output sequences. , so as to obtain the elements in the sample Overall causal impact weight for output power label :

[0013]

[0014] in, , the overall causal weight of each element The weight matrix is ​​obtained by adjusting the value range to [0,1] through maximum and minimum normalization. Using the weight matrix For samples Weighted to get weighted samples .

[0015] Step 4: Construct the BiLSTM prediction network, the temporal convolutional network (TCN) prediction network, and the SE-ResNet50 prediction network as base learners and train them. The specific steps are as follows:

[0016] Step 4.1: Weighted samples Input the BiLSTM prediction network, train the BiLSTM prediction network to predict the photovoltaic power generation in the next M time steps, and map the output of the BiLSTM prediction network to the prediction target .

[0017] Step 4.2: Weighted samples Input the TCN prediction network, train the TCN prediction network to predict the photovoltaic power generation in the next M time steps, and map the output of the TCN prediction network to the prediction target .

[0018] Step 4.3: Sample Each dimension feature , generating a shape of The GAF (Gram Angular Field) matrix , a sample of GAF matrices are stacked together to form an image with D channels. , input SE-ResNet50 prediction network, train SE-ResNet50 prediction network to predict photovoltaic power generation in the next M time steps, and map the output of SE-ResNet50 prediction network to the prediction target .

[0019] Step 4.4: Use grid search and Bayesian optimization to optimize the discrete parameters and continuous hyperparameters of the base learner, and calculate the predicted target and label of the base learner. The mean square error (MSE) is used to determine the optimal model parameters and train the prediction network.

[0020] Step 5: For the predicted target time m, select the local climate fluctuation data of three moments before and after to form the local climate fluctuation sequence at time m = , discrete wavelet transform (DWT) is applied to perform wavelet decomposition on the local climate fluctuation data of each dimension, and the approximation coefficients obtained by decomposition are , the detail coefficient is and the corresponding standard deviation , , as the local climate fluctuation data at time m Features , e=1,2,…E, h=1,2,…H, where E represents the dimension of the weather forecast meteorological characteristic data, and H represents the number of layers of wavelet decomposition.

[0021] Step 6: Construct a multi-layer cross-attention fusion model. In the first layer of the cross-attention mechanism, the local climate fluctuation data at time m is and the local climate fluctuation series at time m Features Concatenate and map into key matrix K1 and value matrix V1 through linear layer; the predicted power of the three base learners at time m is After concatenation, it is mapped into the query matrix Q1 through the linear layer, and the fusion result between the meteorological data and the preliminary forecast value is output. .

[0022] In the b-th layer attention mechanism, the output of the b-1-th layer attention mechanism Mapped to query matrix Q b , the bond matrix K b Sum value matrix V b , output fusion features Through the B-layer attention module, the deep pattern is extracted layer by layer to generate the final fusion feature representation , b=2,3,…B. The final fusion feature representation is obtained by multi-layer perceptron. Mapping to prediction target , that is, the photovoltaic power generation power at time m.

[0023] The grid search method is used to determine the feature dimension d and the number of attention layers B of the cross-attention mechanism, and the learning rate is determined by the Bayesian optimization algorithm. and Dropout rate, training a multi-layer cross-attention fusion model.

[0024] Step 7: For the unknown photovoltaic power generation to be predicted, obtain the D-dimensional historical meteorological characteristic data of the previous N steps, and use the weight matrix calculated in step 3 The historical meteorological characteristic data of the first N steps are weighted and then input into the three forecasting networks trained in step 4 in parallel to generate three sets of preliminary day-ahead forecast results. The characteristics of the local climate fluctuation data are extracted for each forecast time point and input into the multi-layer cross-attention fusion model trained in step 6 together with the preliminary day-ahead forecast results at that time point to obtain the predicted daily photovoltaic power generation at that moment.

[0025] The present invention has the following beneficial effects:

[0026] 1. Using the PCMCI causal inference (Peter-Clark Minimal Conditional Independence) method, the causal relationship between input and output prediction in the photovoltaic power generation prediction model can be effectively identified, and the interpretability of the model can be improved. Different from the traditional correlation analysis method, PCMCI can capture the complex nonlinear and high-order dependencies in the photovoltaic power generation system, reduce the interference of redundant features on model performance to a greater extent, and enhance the robustness and generalization ability of the model for different inputs.

[0027] 2. Considering the long-term dependence and local mutation of the historical meteorological feature sequence and the photovoltaic power generation sequence, this method processes the multidimensional time series composed of the historical meteorological feature sequence and the power generation sequence by inputting them into the BiLSTM model and the TCN model respectively. Furthermore, in order to better capture the periodic characteristics of the sequence, the multidimensional time series is converted into a GAF image, and feature extraction is performed through the SE-ResNet50 network. This method makes full use of the advantages of BiLSTM, TCN and GAF-SE-ResNet50, and can comprehensively characterize the complex characteristics of the multidimensional time series from three levels: global, local and periodic. This multi-scale feature extraction method helps to provide more accurate, stable and comprehensive photovoltaic power generation forecasts under complex climate change environments.

[0028] 3. This method fully exploits the potential of weather forecast (NWP) feature data, extracts local meteorological fluctuation characteristics at each forecast moment, and combines the cross-attention mechanism to fuse the forecast outputs of the three base models at that moment with the local meteorological fluctuation characteristics. In this way, the model can dynamically adjust the attention to the forecast outputs of the three base learners according to different meteorological fluctuation patterns, thereby accurately capturing key forecast information, greatly enhancing the forecast model's ability to respond to diverse climate fluctuations, and significantly improving the forecast accuracy and robustness. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 This is a diagram of the day-ahead prediction model of BiLSTM and TCN in the embodiment;

[0030] Figure 2 This is a schematic diagram of the SE-ResNet50 model structure in the embodiment;

[0031] Figure 3 This is the GAF-SE-Resnet50-day forecasting model diagram in the embodiment;

[0032] Figure 4 Schematic diagram of the day-ahead prediction of the multi-layer cross-attention fusion model in the embodiment;

[0033] Figure 5 This is a visualization diagram of the power generation prediction result on a sunny day in the embodiment;

[0034] Figure 6 This is a visualization diagram of the power generation prediction result on a cloudy day in the embodiment;

[0035] Figure 7 This is a visualization diagram of the power generation prediction results on a rainy day in the embodiment. DETAILED DESCRIPTION

[0036] The present invention will be further explained below with reference to the accompanying drawings;

[0037] A data set of a photovoltaic power station in Hebei Province, China was selected. The data set includes two types of feature data: one is weather forecast (NWP) data, covering global radiation, direct radiation, temperature, humidity, wind speed, wind direction and air pressure; the other is local measurement data, including total radiation, diffuse radiation, temperature, air pressure, wind direction, wind speed and power generation. The time resolution of the data is hourly (1 hour), and the time span is from July 1, 2018 to June 12, 2019. On this basis, experiments are conducted to implement a photovoltaic power generation day-ahead prediction method based on causal inference and multi-scale feature fusion. The specific steps are as follows:

[0038] Step 1: Noise suppression and outlier processing

[0039] Step 1.1: Use Gaussian filtering to filter the multidimensional time series composed of local measurement data. To process:

[0040]

[0041] in, Represents the tth time step and the The value of a meteorological characteristic, represents the photovoltaic power value at the tth time step, , , represents the length of the sequence, D is the sequence dimension, and in this embodiment, D=7. By setting the kernel function in each feature dimension , construct the corresponding Gaussian filter, for each feature column Perform Gaussian filtering separately:

[0042]

[0043] in, is a Gaussian function representing the weight of the filter. It is the offset of the real data point from the center point, and is taken as the relative distance during convolution. is the standard deviation, which is used to control the width of the filter and is set to 1 in this embodiment. Discretize into , for each real data point Perform a convolution operation to perform a weighted average of its surrounding neighborhood to smooth the data and remove high-frequency noise:

[0044]

[0045] in, yes The filtered value, that is, the smoothed value after the filter. is the radius of the filter kernel, which is set in this embodiment = 3 .

[0046] Step 1.2: For the data filtered in step 1.1, use the Local Outlier Factor (LOF) algorithm to detect outliers in each feature dimension and set the neighborhood size. =20, for each data point of a one-dimensional sequence , calculate its core distance , that is, The distance to the nearest neighbor:

[0047]

[0048] It means calculating the Euclidean distance. Indicates taking the maximum value. For data points and its neighbors , calculate their reachable distance :

[0049]

[0050] Yes core distance.

[0051] The value is a measure of how different the density of a data point is from the density of its neighbors:

[0052]

[0053] in, Yes The neighborhood set of is the neighborhood size. When, think is an abnormal point, which is corrected by linear interpolation , to maintain data continuity and validity:

[0054]

[0055] in, , Respectively represent and outlier points The adjacent normal data points before and after, t-, t+ are time step indexes, and t- <t<t+。

[0056] Step 1.3: For the data after outlier processing, perform maximum and minimum normalization processing on each feature dimension respectively, and adjust its numerical range to [0,1] to eliminate the interference of dimension on the causal inference results.

[0057] Step 2: Dataset Sample Division

[0058] In order to use the historical multidimensional time series with a time step of N to predict the photovoltaic power generation in the next M time steps, for the data processed in step 1, the sliding window is used for sample division, the sliding step is set to 1, the window size is N+M, and the multidimensional time series with a length of L is divided into Samples :

[0059]

[0060] Will Photovoltaic power generation in the next M time steps As a tag:

[0061]

[0062] in, , in this embodiment, N, M=24.

[0063] Step 3: Calculate the causal weight of the sample input for the output prediction target

[0064] Step 3.1: Take a sample With label Expanded to and ∈ , and then concatenated into a sequence ∈ :

[0065]

[0066]

[0067] The sequence matrix of all samples Merge to form a set Z:

[0068] Z=[Z1, Z2,…,Z L-N-M+1 ] T

[0069] Step 3.2: Use the PCMCI (Peter-Clark Minimal Conditional Independence) method to calculate the set medium sequence , The causal weight relationship between :

[0070]

[0071]

[0072] ,m=1,2,…M

[0073] in, Indicates that under a given set of conditions Down and The mutual information between Indicates that under a given set of conditions Down and The mutual information between:

[0074] =

[0075] =

[0076] in, , express , The joint probability of . , Indicates that the condition , Down probability. , Indicates the conditions , Down The probability of , Indicates the conditions , Down The probability of . Given a set of conditions Includes the set Z except , All sequences except . Given a set of conditions include , The candidate parent variable set {A | }, and the set of lagged variables .

[0077] for The nth element in , its overall causal weight for:

[0078]

[0079] The overall causal weight for each input element The sample is obtained by adjusting the value range to [0,1] through maximum and minimum normalization and adjusting it to the form of a matrix. The corresponding causal weight matrix .

[0080] Step 3.3: Use the weight matrix With sample Multiply element by element to get weighted samples :

[0081]

[0082] in, Represents element-wise multiplication.

[0083] Step 4: Build a BiLSTM prediction network

[0084] Step 4.1: Figure 1 As shown, the weighted samples As the input of the bidirectional long short-term memory network (BiLSTM), the photovoltaic power generation is predicted for the next M time steps. The BiLSTM model combines the forward long short-term memory network (Forward LSTM) and the reverse long short-term memory network (Backward LSTM) to capture bidirectional context information. Among them, the forward LSTM processes data from the first time step of the sequence and propagates backward step by step to capture past dependencies in the sequence. The reverse LSTM propagates forward from the last time step of the input sequence to capture future dependencies. Input data It will be encoded in multiple layers of BiLSTM in turn, and the output of each layer will be used as the input of the next layer until all BiLSTM layers are passed, and each layer of BiLSTM generates a hidden state containing bidirectional context information. , mapped to the prediction target through a three-layer hidden layer perceptron (MLP) .

[0085] In this embodiment, the number of neurons in the three layers is set to [128, 64, 32], and the activation function is ReLU.

[0086] Step 4.2: Set the model training process to use 5-fold cross validation, the ratio of training set to test set is 4:1, and the seed size is set to 42. Set Batch_size to 32 during training.

[0087] Set the candidate values ​​of the number of BiLSTM layers to {1,2,3} and the candidate values ​​of the number of BiLSTM units to {32,64,128,256}. Use the grid search method to optimize the number of layers and units of the BiLSTM model, and perform 12 sets of grid searches in total. Set the learning rate The range is , in order to facilitate optimization, the learning rate is adjusted to , and then perform Bayesian optimization in logarithmic space; set the range of Dropout rate to , and Bayesian optimization is used for search, limiting Bayesian optimization to 30 combinations. The final hyperparameter combination is determined by the minimum mean square error (MSE) calculated on the test set after the model has been trained for 30 epochs in the first fold.

[0088] The gradient is calculated through the back-propagation algorithm, and the parameters of the BiLSTM model are updated using the Adam optimizer. The loss performance of the model on the training set and the test set is monitored, and the total number of training epochs is set to 1000. Combined with the early stopping mechanism (EarlyStopping), if the test set loss function value does not decrease within 30 consecutive epochs, the training is stopped in advance to prevent overfitting and improve the prediction and generalization capabilities of the model.

[0089] Step 5: Build TCN prediction network

[0090] Step 5.1: weighted samples As the input of the Time Convolutional Network (TCN), the photovoltaic power generation in the next M time steps is predicted. The TCN model ensures temporal causality through causal convolution, that is, each time step of the output only depends on the current time step and the time step before it, thereby avoiding the leakage of future information.

[0091] In order to aggregate sequence features, the output of the TCN model is pooled and then mapped to the prediction target through a three-layer hidden layer perceptron. .

[0092] Step 5.2: Set the discrete hyperparameters of the model to be optimized using the grid search method during model training, including TCN convolution kernel size, number of TCN convolution layers, number of TCN convolution hidden channels, and pooling layer strategy. Use the Bayesian optimization method to optimize continuous hyperparameters, including the learning rate. and Dropout rate.

[0093] Set the TCN convolution kernel size candidate value to , the candidate value of TCN convolution layer is , the candidate value of the number of hidden channels of TCN convolution is , the candidate value of the pooling layer strategy is In the grid search method, a total of 36 discrete parameter combination experiments were conducted. Setting the learning rate The range is , and is converted to , set the range of Dropout rate to , limiting Bayesian optimization to 30 combinations of two continuous hyperparameters. The final hyperparameter combination selection is based on the minimum mean square error (MSE) calculated on the test set after the model has been trained for 30 epochs in the first fold.

[0094] Step 6: Build the GAF-ResNet50 prediction network

[0095] Step 6.1: For the weighted samples , transform it from rectangular coordinates to polar coordinates , the value range is [0, ]. According to the polar coordinate angle, for each dimension of feature Generate a shape The GAF matrix of a sample of GAF matrices are stacked together to form an image with D channels. :

[0096]

[0097] Step 6.2: Use a layer of convolution operation to transform the image The number of channels is converted into a three-channel output vector , and then upsampled by bilinear interpolation method to The shape of is adjusted to 224*224, and then input into the pre-trained SE-ResNet50 model. Figure 2 As shown in Figure 1, the SE-ResNet50 model introduces a channel attention mechanism SE on the ResNet50 model. The channel attention mechanism SE is adaptively calibrated according to the importance of each feature channel, and the calibrated features are fused with the original features to enhance the generalization ability and prediction effect of the model.

[0098] Step 6.3: Perform a global average pooling layer on the feature map output by the SE-ResNet50 model to average all pixels, thereby converting the high-dimensional feature map into a one-dimensional vector. Add a fully connected layer with 1024 neurons, add a ReLU activation function, and map it to the prediction target. ,like Figure 3 shown.

[0099] Step 7: Extract local fluctuation characteristics at the predicted time point

[0100] Step 7.1: For the predicted target time m, select the weather forecast (NWP) meteorological characteristic data points at three times before and after, including global radiation, direct radiation, temperature, humidity, wind speed, wind direction and air pressure, to form a local climate fluctuation sequence = , , E represents the weather forecast data dimension, and in this embodiment, E=7.

[0101] Step 7.2: Local climate fluctuation data for the eth dimension = , e=1,2,…E, select Coiflets as the wavelet function, apply discrete wavelet transform (DWT) to decompose into 3 layers, and the approximation coefficient of the hth layer decomposition is , the detail coefficient is , h=1,2,3, where the approximation coefficient It captures the overall trend of the meteorological fluctuation series, while the detail coefficient It reflects the local fluctuations in the sequence.

[0102] Step 7.3: Calculate the approximation coefficient Standard Deviation To evaluate the overall fluctuation of the feature, calculate the detail coefficient The standard deviation Used to quantify the intensity of local fluctuations in the sequence and construct the characteristics of the local climate fluctuation data in the e-th dimension :

[0103]

[0104] Therefore, the local climate fluctuation sequence at time m is Features for:

[0105]

[0106] Step 8: Build an integrated fusion model for power generation prediction

[0107] Step 8.1: Construct a multi-layer cross-attention fusion model. In the first layer of the cross-attention mechanism, the local climate fluctuation data at time m is and the local climate fluctuation series at time m Features Splice to , mapped into key matrix K1 and value matrix V1 through linear layer:

[0108]

[0109]

[0110] in, =91, indicating the sequence length. =1, indicating the input dimension. and is a trainable weight parameter matrix used to perform a linear transformation on the input I. and is the bias vector, which is also a trainable parameter.

[0111] The predicted power at time m for the output of the three base learners After concatenation, it is mapped into the query matrix Q1 through the linear layer, and the fusion result between the meteorological data and the preliminary forecast value is output. .

[0112] In the b-th layer attention mechanism, the output of the b-1-th layer attention mechanism Mapped to query matrix Q b , the bond matrix K b Sum value matrix V b , output fusion features :

[0113]

[0114] Through the B-layer attention module, deep patterns are extracted layer by layer to generate the final fusion feature representation , b=2,3,…B, d represents the feature dimension.

[0115] Step 8.2: Fusion features The input is fed into a multi-layer perceptron (MLP) with three hidden layers. The number of neurons is [128, 64, 32], and the complex patterns are extracted layer by layer through linear transformation and nonlinear activation function, and finally mapped to the prediction target. , that is, the photovoltaic power generation power at time m, such as Figure 4 shown.

[0116] Step 8.3: Use grid search to determine the feature dimension d and the number of attention layers B of the cross-attention mechanism. The feature dimension d determines the feature representation space, and the candidate value range is , the number of attention layers B is used to control the depth of the cross-attention and self-attention modules, and the candidate value range is , and comprehensively evaluates the combination of these discrete hyperparameters by exhaustively enumerating them in a grid. Setting the learning rate The range is , and adjusted by logarithmic transformation to , set the range of Dropout rate to , limit Bayesian optimization to 30 learning rates The final hyperparameter combination selection is based on the minimum mean square error (MSE) between the true value and the model output value calculated on the test set after the model has been trained for 30 epochs in the first fold.

[0117] In order to illustrate the effectiveness of this method, the prediction performance of this method and the base learners PCMCI-BiLSTM, PCMCI-TCN, and PCMCI-GAF-SE-ResNet50 combined with PCMCI causal inference were compared under different data sets, and RMSE (root mean square error) and MAE (mean absolute error) were selected as evaluation indicators, where RMSE represents the square root of the average of the squares of the difference between the predicted value and the true value, which can punish larger errors to a greater extent and is more sensitive to large errors. MAE represents the average of the absolute difference between the predicted value and the true value, and measures the average error of the model prediction.

[0118] Table 1 shows the prediction performance of different methods on the full dataset:

[0119] Table 1

[0120]

[0121] The RMSE and MAE of this method on the entire dataset are 0.5608 and 0.2892, respectively. Compared with the three base learners combined with PCMCI causal inference, it shows a significant improvement in prediction accuracy, with an average reduction of 38.22% and 34.43% in RMSE and MAE, respectively.

[0122] In order to fully verify the prediction effect of this method under different weather conditions and evaluate its ability to maintain stable performance in a complex and changeable environment, a total of three weather types in the test set, namely sunny days, rainy days, and cloudy days, were sampled and evaluated. Three typical days were sampled for each weather type. The prediction accuracy and adaptability of this method in different weather scenarios were systematically compared and verified. The results are shown in Table 2:

[0123] Table 2

[0124]

[0125] From the prediction error data shown in Table 2, it can be seen that the prediction effect of this method under the three weather types is better than that of a single model, and the error indicators RMSE and MAE are reduced by an average of 34.22% and 32.43% respectively, showing its comprehensive advantages in different weather modes. It not only improves the overall prediction accuracy, but also can better adapt to different weather conditions.

[0126] The visual prediction results of different methods for sunny, cloudy and rainy days are as follows Figure 5 , Figure 6 , Figure 7 As shown in the figure, in the forecast of sunny days, the PCMCI-BiLSTM method performs best. This is because the meteorological conditions on sunny days are relatively stable, with stable light intensity and changing trends, showing a more obvious time correlation, and the BiLSTM model is particularly good at capturing such features. In the forecast of rainy days, the PCMCI-TCN method performs relatively well. This is because the weather on rainy days is usually accompanied by high uncertainty and has complex local characteristics. TCN is good at processing local information and can better capture these short-term dynamic changes.

[0127] This method makes full use of the different advantages of the three base learners and integrates them, effectively reducing the possible limitations of a single model, enhancing the ability to adapt to complex data patterns, and achieving significant improvement in forecasting performance in all weather types.

[0128] In order to further prove the advantages of this method in constructing the integrated fusion model of power generation prediction, the three base learners are fused using the average weighted method, entropy weight method and neural network method respectively, and compared with this method. The results are shown in Table 3:

[0129] Table 3

[0130]

[0131] It can be seen from the table data that this method is superior to the average weighted method, entropy weight method and neural network method in terms of error indicators RMSE and MAE. The error indicators are reduced by an average of 19.73% and 24.88%, respectively, showing a stronger prediction integration capability.

Claims

1. A photovoltaic power generation day-ahead forecasting method based on causal inference and multi-scale feature fusion uses a sliding window with a window size of N and a step size of 1 to divide the historical meteorological feature data of length L to obtain sample X i , X i The photovoltaic power generation in the next M time steps is used as the label Y i , i=1,2,…,LN-M+1; characterized in that: The specific steps include: Step 1: Select the elements at the same position in each sample to form the input sequence x n , select the elements at the same position in each label to form the output sequence p m , use the PCMCI causal inference method to calculate the causal inference weight ω between the input and output sequences nm , get each element x in the sample i,n The overall causal influence weight for the label D represents the dimension of historical meteorological characteristic data; Step 2: Use weights For sample X i Weighted; weighted sample X′ i Input into multiple different base learners respectively, the prediction target output by the sth base learner is calculate With label Y i The mean square error of the base learner is optimized; The base learner includes a bidirectional long short-term memory network BiLSTM, a temporal convolutional network TCN and a ResNet50 model that introduces a channel attention mechanism SE; wherein the bidirectional long short-term memory network BiLSTM and the temporal convolutional network TCN directly use weighted samples X′ i As input, output prediction target The ResNet50 model with the channel attention mechanism SE is introduced to weight the sample X′ i Corresponding GAF image GAFImage i As input, output prediction target Step 3: Select the local climate fluctuation data of the prediction target time m and the three times before and after it, and extract the data features v m , the local climate fluctuation data at time m m With feature v m Splicing is feature I; Step 4: The predicted power generation at time m is obtained by fusing feature I with the prediction target output by the base learner through the cross attention mechanism Compare with the label and optimize the cross-attention mechanism parameters; Step 5: Obtain the historical meteorological characteristic data N steps before the time to be predicted, use the weights obtained in step 1 to weight and input them into the base learner optimized in step 2 to generate a preliminary day-ahead prediction result, and then use the cross-attention mechanism optimized in step 4 to fuse it with the local climate fluctuation data characteristics at the prediction time point to obtain the predicted daily photovoltaic power generation power at the time to be predicted.

2. The photovoltaic power generation day-ahead prediction method based on causal inference and multi-scale feature fusion as claimed in claim 1, characterized in that: The historical meteorological characteristic data are local historical measurement data, including total radiation, scattered radiation, temperature, air pressure, wind direction, wind speed and power generation power; the local climate fluctuation data are weather forecast data, including global radiation, direct radiation, temperature, humidity, wind speed, wind direction and air pressure.

3. The photovoltaic power generation day-ahead prediction method based on causal inference and multi-scale feature fusion as claimed in claim 1 or 2, characterized in that: The historical meteorological characteristic data are subjected to noise suppression and outlier processing, and the characteristic data of different dimensions are subjected to maximum and minimum normalization processing, and their numerical range is adjusted to [0,1] to eliminate dimensional interference, and then the samples are divided.

4. The photovoltaic power generation day-ahead prediction method based on causal inference and multi-scale feature fusion as claimed in claim 3 is characterized by: The historical meteorological characteristic data of length L is divided using a sliding window with a window size of N and a step size of 1 to obtain the sample X i , X i The photovoltaic power generation in the next M time steps is used as the label Y i : Y i ={p i+N ;p i+N+1 ;…;p i+N+M-1 }; The sample X i , Y i After expansion, it is spliced ​​into sequence Z i : Z i =[x i,1 ,x i+1,1 ,...x i+N-1,1 ,x i,2 ,...,p i ,p i+1 ,...,p i+N-1 ,p i+N ,p i+N+1 ,…,p i+N+M-1 ]; The sequence matrix Z of all samples i Merge to form a set Z: Z=[Z1,Z2,…,Z L-N-M+1 ] T ; Select the elements at the same position in LN-M+1 samples to form the input sequence x n , the elements at the same position in the label form the input sequence p m : p m =[p m+N ,p m+N+1 ,…,p m+L-M+1 ],m=1,2,…M; Then the sequence x n 、p m The causal weight relationship ω n,m for: Among them, P(x n ,p m ,C n,m )、P(x m ,p m ,F n,m ) represents x n ,p m ,C n,m 、x n ,p m ,F n,m The joint probability of n ,p m ∣C n,m )、P(x n ,p m ∣F n,m ) means that under condition C n,m 、F n,m Next x n ,p m The probability of P(x n ∣C n,m )、P(x n ∣F n,m ) indicates condition C n,m 、F n,m Next x n The probability, P(p m ∣C n,m )、P(p m ∣F n,m ) indicates condition C n,m 、F n,m Next m The probability of; given the condition set C n,m Includes all the elements in Z except x n 、p m All sequences except n,m Include x n 、p m The candidate parent variable set {A|A∈C n,m ,I(x n ;A|Zx n -A)>0.05 or I(p m ; A|Zp m -A)>0.05}, and the set of lagged variables {x1,x2,…x n-1 }∪{p1,p2,…p m-1 }.

5. The photovoltaic power generation day-ahead prediction method based on causal inference and multi-scale feature fusion as claimed in claim 1, characterized in that: The grid search method and Bayesian optimization are used to optimize the discrete parameters and continuous hyperparameters of the base learner respectively. i The optimal model parameters are determined by minimizing the mean square error.

6. The photovoltaic power generation day-ahead prediction method based on causal inference and multi-scale feature fusion as claimed in claim 5, characterized in that: The candidate values ​​of the number of layers of the bidirectional long short-term memory network BiLSTM are set to {1, 2, 3}, the candidate values ​​of the number of units are set to {32, 64, 128, 256}, and the range of the learning rate η is [10 -5 ,10 -2 ], the range of Dropout rate is [0.3,0.5]; Set the candidate values ​​of the TCN convolution kernel size to {3×3, 5×5, 7×7}, the candidate values ​​of the number of convolution layers to {2, 3, 4}, and the range of the learning rate η to [10 -5 ,10 -2 ], the range of Dropout rate is [0.1,0.5].

7. The photovoltaic power generation day-ahead prediction method based on causal inference and multi-scale feature fusion as claimed in claim 1 or 2, characterized in that: For the predicted target time m, select the local climate fluctuation data of three moments before and after to form a sequence Local m =[Local m-3 ,Local m-2 ,...,local m+3 ], local m =[local m,1 ,local m,2 ,…local m,E ], E represents local climate fluctuation data, local m Represents the local climate fluctuation data at time m; For the local climate fluctuation data of the eth dimension local m,e =[local m-3,e ,local m-2,e ,...,local m+3,e ], e = 1, 2, ... E, select Coiflets as the wavelet function, apply discrete wavelet transform to perform H-layer decomposition, and the approximation coefficient of the h-th layer decomposition is The detail factor is Calculate the approximation coefficient Standard Deviation and detail factor Standard Deviation Constructing the characteristics of local climate fluctuation data in the e-th dimension The local climate fluctuation data characteristics of E dimensions Splice to get the characteristics of local climate fluctuation data at time m 8. The photovoltaic power generation day-ahead prediction method based on causal inference and multi-scale feature fusion as claimed in claim 1, characterized in that: Construct a B-layer cross-attention fusion model. In the first layer of the cross-attention mechanism, the feature I is mapped to the key matrix K1 and the value matrix V1 through the linear layer, and the prediction target output by the base learner is mapped to the query matrix Q1 through the linear layer, and the fusion result between the meteorological data and the preliminary prediction value is output. In the b-th layer attention mechanism, the output of the b-1-th layer attention mechanism Mapped to query matrix Q b , the bond matrix K b Sum value matrix V b , output fusion features b = 2, 3, ... B, d represents the feature dimension; The fusion features are Mapped to the prediction target at time m 9. The photovoltaic power generation day-ahead prediction method based on causal inference and multi-scale feature fusion as claimed in claim 8, characterized in that: The multilayer perceptron includes three hidden layers, and the number of neurons is [128, 64, 32] respectively.

Citation Information

Patent Citations

  • Photovoltaic power interval probability prediction method based on deep learning fusion model

    CN115115125A

  • Energy storage power station evaluation method and system oriented to source network load multivariate application

    CN118484666A