A photovoltaic power short-term multi-step prediction method enhanced by feature extraction of fecam-sertcn

By using the FECAM-SERTCN enhanced feature extraction method, combined with TCN and SENet network models, and utilizing a Transformer encoder for photovoltaic power generation prediction, the grid stability problem caused by photovoltaic power generation fluctuations is solved, and high-precision short-term multi-step prediction is achieved.

CN120855335BActive Publication Date: 2026-01-02SOUTHWEAT UNIV OF SCI & TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511375301.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2026-01-02
Estimated Expiration
2045-09-25

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately predict photovoltaic power generation, impacting grid stability and power dispatch efficiency, particularly due to power fluctuations caused by the intermittency and weather dependence of photovoltaic power generation.

Method used

The FECAM-SERTCN enhanced feature extraction method is adopted. Predictors are selected through Pearson correlation coefficient matrix analysis, and the FECAM-SERTCN feature extraction network is constructed. The frequency features are enhanced by combining TCN and SENet network models, and the Transformer encoder is used for prediction.

Benefits of technology

It improves the accuracy and reliability of photovoltaic power prediction, with R2 not lower than 0.9994, MAE not higher than 1.76KW, RMSE not higher than 2.06KW, and MAPE not higher than 1.28KW, significantly enhancing the stability of grid operation and the precision of power dispatch.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120855335B_ABST
    Figure CN120855335B_ABST
Patent Text Reader

Abstract

The application belongs to the field of power system power prediction, and discloses a photovoltaic power short-term multi-step prediction method based on FECAM-SERTCN enhanced feature extraction, including the following steps: obtaining meteorological data and actual photovoltaic power data from a photovoltaic power station, and preprocessing to obtain processed meteorological data and processed power data; analyzing the correlation between the processed meteorological data and the processed power data through a Pearson correlation coefficient matrix, and selecting a prediction factor based on the correlation; constructing a FECAM-SERTCN feature extraction network, and obtaining frequency features based on the prediction factor, then performing feature enhancement on the frequency features to obtain enhanced feature information; constructing a Transformer encoder prediction model, and performing power prediction based on the enhanced feature information to obtain a prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of power system power prediction, and particularly relates to a photovoltaic power short-term multi-step prediction method based on FECAM-SERTCN enhanced feature extraction. BACKGROUND

[0002] Under the urgent consensus of global energy structure transformation and climate change response, developing clean and low-carbon new energy has become a strategic core. Although photovoltaic technology provides clean and abundant energy, its inherent intermittency and weather-dependent variability pose a major challenge to grid stability and power dispatching efficiency. Therefore, accurate prediction of photovoltaic power is crucial for optimizing grid operation, improving economic efficiency, and ensuring the reliable integration of solar energy into modern power systems.

[0003] Photovoltaic power, i.e. the actual power output per unit time (usually measured in kilowatts, kW, or megawatts, MW), is a core indicator for measuring the effectiveness of photovoltaic systems and assessing their contribution to the grid. It determines the amount of electricity generated and economic benefits, and the power level is affected by multiple factors such as solar intensity, component efficiency, system loss (such as temperature, dust shading, equipment performance), installation angle, etc. Accurate power prediction is crucial for ensuring the safe and stable operation of the grid and is a key basis for power balancing and standby capacity arrangement by grid dispatching departments. Only by mastering reliable photovoltaic power data and its variation rules can the grid more effectively accommodate large-scale photovoltaic access, avoid voltage fluctuations or frequency instability problems caused by power fluctuations, and ensure power quality. SUMMARY

[0004] The present application aims to solve the problems of the prior art and provides the following solutions:

[0005] A photovoltaic power short-term multi-step prediction method based on FECAM-SERTCN enhanced feature extraction, comprising the following steps:

[0006] Obtain meteorological data and actual photovoltaic power data from a photovoltaic power station and preprocess them to obtain processed meteorological data and processed power data;

[0007] Analyze the correlation between the processed meteorological data and the processed power data through a Pearson correlation coefficient matrix, and select prediction factors based on the correlation;

[0008] Construct a FECAM-SERTCN feature extraction network, obtain frequency features based on the prediction factors, and then perform feature enhancement on the frequency features to obtain enhanced feature information;

[0009] A Transformer encoder prediction model is constructed to predict power based on the enhanced feature information, and a prediction result is obtained.

[0010] Preferably, the FECAM-SERTCN feature extraction network comprises a FECAM module and a SERTCN module.

[0011] The SERTCN module is composed of a TCN network model and a SE-Net network model, and the SE-Net network model is fused with the time block in the TCN network model to obtain the SERTCN module.

[0012] Preferably, the working process of the FECAM module comprises:

[0013] Given an input feature tensor , where B represents the batch size, C represents the number of channels, L represents the length of the time series, R represents the real set;

[0014] The feature tensor on each channel is shifted and discrete cosine transformed to obtain the corresponding frequency domain feature:

[0015] ,

[0016] where F i represents the frequency domain feature of each channel, DCT(·) represents the shift discrete cosine transform, i represents each channel;

[0017] Stacking the initial frequency domain features of all channels obtains a frequency domain feature tensor F req , and modeling the frequency feature through a two-layer feedforward network to learn the importance of the channel-frequency dimension, and obtaining the attention weight:

[0018] ,

[0019] where A represents the attention weight, σ (·) represents the Sigmoid activation function, δ (·) represents the ReLU activation function, W 1 and W 2 represent the full connection weight matrix;

[0020] The attention weight is element-wise applied to the feature tensor to obtain the frequency feature.

[0021] Preferably, the TCN network model is composed of a causal convolution, a dilated convolution and a residual connection;

[0022] The causal convolution is:

[0023] ,

[0024] wherein, y ( t ) represents the result of the causal convolution, K represents the size of the convolution kernel, w ( k ) represents the weight coefficient of the convolution kernel at the bit k , t represents the time step of the current calculation, k represents the index within the convolution kernel, x ( t - k ) represents the value of the input signal x at the time step t - k ;

[0025] The dilated convolution is:

[0026] ,

[0027] wherein, g ( t ) represents the result of the dilated convolution, d represents the dilation rate, x ( t - d · k ) represents the value of the input signal at the time step t - d · k .

[0028] Preferably, in the SE-Net network model:

[0029] The global average pooling compresses the global spatial information in the spatial dimension to generate a global description vector for each channel, and obtains a compressed vector z ∈ RC ;

[0030] Based on the compressed vector z ∈ RC , the nonlinear relationship between channels is learned to generate a weight vector;

[0031] The channel correlation is modeled by a fully connected layer and an activation function to obtain the importance weight s of each channel:

[0032] ,

[0033] wherein, z c the first c global feature of the channel, X c,l denotes the feature value of the channel at position c l W 1 and W 2denotes two-layer full-connection weight matrix;

[0034] Finally, the importance weight s is re-applied to the original feature map, and each channel is element-wise scaled to obtain the final output feature.

[0035] Preferably, the Transformer encoder prediction model is obtained by stacking a plurality of identical sub-layers;

[0036] The sub-layer is composed of a multi-head attention sub-layer and a feed-forward full-connection network;

[0037] The multi-head attention sub-layer projects the input data into a plurality of different subspaces in parallel, independently calculates the attention relationship in each sub-space, and finally splices and integrates the outputs of each head through linear transformation to obtain the output of the multi-head attention sub-layer;

[0038] After the multi-head attention sub-layer, a layer of the feed-forward full-connection network is connected, and the output of the multi-head attention sub-layer is added to the input through a residual connection, and then output to the feed-forward full-connection network after normalization to obtain the model output.

[0039] Compared with the prior art, the present application has the following advantages:

[0040] The present application separates the frequency domain information of historical meteorological variables and environmental variables by introducing FECAM, and fuses it with the original information. The frequency domain expression and periodic expression of the input prediction factor are enhanced. In addition, in order to enhance the feature extraction of the input prediction factor, a feature extraction module SERTCN is proposed, which can adaptively enhance the attention of important feature channels, and is used to enhance feature extraction. Finally, the features fused with the frequency domain information and enhanced are input into the TE for predicting photovoltaic power. Under the experimental data set, the R 2 Not less than 0.9994, MAE not more than 1.76KW, RMSE not more than 2.06KW and MAPE not more than 1.28KW, showing good prediction accuracy. BRIEF DESCRIPTION OF DRAWINGS

[0041] ​​In order to more clearly illustrate the technical solutions of the present application, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings described below are only some of the embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.

[0042] Figure 1 The method flowchart of the embodiment of the present application is shown in the figure.

[0043] Figure 2 The structure diagram of the FECAM module of the embodiment of the present application is shown in the figure.

[0044] Figure 3 The structure diagram of the SERTCN module of the embodiment of the present application is shown in the figure.

[0045] Figure 4 The structure diagram of the Transformer encoder prediction model of the embodiment of the present application is shown in the figure.

[0046] Figure 5 The sliding window algorithm for data set partitioning of the embodiment of the present application is shown in the figure.

[0047] Figure 6(a) is a diagram showing the prediction effect of different models on the data set of B after 1 hour according to the embodiment of the present application.

[0048] Figure 6(b) is a diagram showing the prediction effect of different models on the data set of B after 3 hours according to the embodiment of the present application.

[0049] Figure 6(c) is a diagram showing the prediction effect of different models on the data set of B after 6 hours according to the embodiment of the present application.

[0050] Figure 7(a) is a diagram showing the test evaluation index of different models on the data set of B after 1 hour according to the embodiment of the present application.

[0051] Figure 7(b) is a diagram showing the test evaluation index of different models on the data set of B after 3 hours according to the embodiment of the present application.

[0052] Figure 7(c) is a diagram showing the test evaluation index of different models on the data set of B after 6 hours according to the embodiment of the present application. DETAILED DESCRIPTION

[0053] The technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, and not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0054] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below in combination with the drawings and specific embodiments.

[0055] Embodiment one:

[0056] In this embodiment, as shown in the figure, a photovoltaic power short-term multi-step prediction method enhanced by FECAM-SERTCN feature extraction includes the following steps: Figure 1

[0057] S1. Obtain meteorological data and actual photovoltaic power data from a photovoltaic power station and pre-process them to obtain processed meteorological data and processed power data.

[0058] In this embodiment, first, meteorological data and actual photovoltaic power data are obtained from a certain photovoltaic power station, and the actual photovoltaic power data is cleaned, including deleting outliers, deleting null values, etc. The same data cleaning work needs to be done on all the obtained meteorological data. Processed meteorological data and processed power data are obtained.

[0059] S2. Analyze the correlation between the processed meteorological data and the processed power data through the Pearson correlation coefficient matrix, and select the prediction factor based on the correlation.

[0060] In this embodiment, the correlation between each meteorological data and power data is analyzed through the Pearson correlation coefficient matrix, and after analysis, it is decided to select the meteorological data with a correlation greater than 0.7 as the prediction factor. This can reduce data redundancy and reduce the required computing power. And through the autocorrelation analysis of photovoltaic power data, the historical step of input prediction factor is selected. Thus, all the data required for the experiment is obtained.

[0061] S3. Build a FECAM-SERTCN feature extraction network, obtain frequency features based on the prediction factor, and then enhance the frequency features to obtain enhanced feature information.

[0062] The FECAM-SERTCN feature extraction network includes a FECAM module and a SERTCN module; the SERTCN module is composed of a TCN network model and a SE-Net network model, and the SE-Net network model is fused with the time block in the TCN network model to obtain the SERTCN module.

[0063] ​In time series analysis, frequency features are the core elements to reveal the periodic patterns of data. Real-world photovoltaic power and its driving data, such as historical meteorological features and time series, contain rich frequency information, such as key patterns like day / night cycles, seasonal fluctuations, and weather system cycles. Photovoltaic power and its driving data, such as historical meteorological and time series, also contain rich key frequency information. These frequency features are the core elements to capture the energy generation patterns. The powerful ability of deep learning lies in its ability to automatically extract and model these implicit frequency features. By fully exploiting and utilizing these frequency patterns, we can more accurately capture the energy generation patterns of photovoltaic systems, thereby significantly improving the accuracy and reliability of power prediction.

[0064] To more effectively capture the frequency features in the time series of historical meteorological data, we introduce a frequency-enhanced channel attention mechanism (FECAM) based on discrete cosine transform (DCT) in the model. This module can improve the model's perception of different channels and frequency domain information without significantly increasing computational overhead, thereby enhancing the time series modeling capability. The detailed structure of FECAM is shown in Figure 2 .

[0065] Specifically, the workflow of the FECAM module includes: given the input feature tensor , where B represents the batch size, C represents the number of channels, L represents the length of the time series, R represents the real set; shift the discrete cosine transform on the feature tensor on each channel to obtain the corresponding frequency domain feature:

[0066] ,

[0067] where F i represents the frequency domain feature of each channel, DCT(·) represents the shift discrete cosine transform, i represents each channel; stack the initial frequency domain features of all channels to obtain the frequency domain feature tensor F req , and model the frequency features through a two-layer feedforward network to learn the importance of the channel-frequency dimension, obtaining the attention weight:

[0068] ,

[0069] where A represents the attention weight, σ(·) denotes a Sigmoid activation function, δ (·) denotes a ReLU activation function, W 1 and W 2 denote the fully connected weight matrix; the attention weight is element-wise applied to the feature tensor to obtain the frequency feature.

[0070] The TCN network model is composed of causal convolution, dilated convolution and residual connection; it is a convolutional neural network architecture specially designed for time series data modeling. In the photovoltaic power prediction task, the power output usually has obvious time dependence and presents multi-scale periodic changes (such as daily cycle, weekly cycle, seasonality), and is also affected by multiple meteorological factors (such as irradiance, temperature, wind speed, humidity, etc.), so its data has the characteristics of noise, strong fluctuation, and difficult to model sudden changes. Using TCN for feature extraction, causal convolution (Causal Convolution) ensures one-way dependence of time steps, avoids future information leakage, and meets the needs of real photovoltaic power prediction scenarios. At the same time, the introduction of dilated convolution (Dilated Convolution) significantly expands the receptive field, enabling the model to capture the dependence of photovoltaic power on other environmental and meteorological information over a long time range without significantly increasing computational complexity. In addition, the convolution kernel in TCN has a parameter sharing mechanism when extracting features, which can model different meteorological information uniformly and effectively mine the temporal correlation between variables. The residual connection (Residual Connection) structure further alleviates the gradient vanishing problem in deep network training, enhancing the stability and expression ability of the model. Therefore, TCN can efficiently extract key temporal structures and potential associations when dealing with data such as photovoltaic power, which has strong temporal, nonlinear, and multivariate characteristics, and is a high-precision modeling of different meteorological information.

[0071] Squeeze-and-Excitation Networks (SENet) is a classic representative of channel attention mechanisms. This model explicitly models the global dependence between channels, adaptively assigns weights to each channel, and thus improves the overall feature expression ability. Traditional convolution operations mainly focus on local features in the spatial domain and are difficult to capture the correlation between different channels; while the SE module introduces a "squeeze-excitation" process in the channel dimension: first, use global average pooling to "squeeze" each channel feature and extract global context information; then, through two fully connected layers and nonlinear activation, the compressed description is reweighted to generate channel weights and perform "excitation" operations on the original features. This dynamic reweighting can highlight key information and suppress redundant features, significantly enhancing the model's expression ability and bringing stable performance improvements in multiple visual tasks.

[0072] The TCN network and the SENet are introduced above, and thus an improved TCN model is proposed in this embodiment to perform adaptive enhancement of important channels for feature extraction of an input sequence. The time block of the TCN network is mainly improved, and the SENet network is fused with the time block: the TCN network is good at extracting local / long-distance dependence features, and the SENet introduced at the tail of the main channel of the time block can give different attention degrees to different channels in the feature map extracted by the TCN network, automatically strengthen important channels (features), suppress invalid or redundant channels, and improve the expression efficiency of the model. Provide more robust features for subsequent prediction models. The structure of SERTCN is shown in Figure 3 .

[0073] Causal Convolution, that is, the output at time step t only depends on the input at time step t and before t, and does not depend on future information. Given an input sequence x [ x 1, x 2,…, x T ], a standard one-dimensional convolution may cause information "leakage" to future time steps. Causal convolution shifts the convolution window to force the output to only depend on historical input. This structure avoids the participation of future information at the current time step, which meets the needs of the real prediction scene. The causal convolution is:

[0074] ,

[0075] wherein, y ( t ) represents the causal convolution result, K represents the size of the convolution kernel, w ( k ) represents the weight coefficient of the convolution kernel at the position k (i.e., the learnable parameter of the convolution kernel), t represents the current time step (i.e., the current time) being calculated, k represents the index inside the convolution kernel (from 0 to k-1 , indicating the past time step offset covered by the convolution kernel), x(t - k) represents the value of the input signal x at time step t - k (i.e., the input data at the past k time step);

[0076] Dilated Convolution is based on the ordinary convolution, and inserts intervals between the elements of the convolution kernel, so that the convolution kernel can cover a larger time range without increasing the number of parameters and computational complexity. It effectively enhances the model's ability to model long-term dependencies. Dilated convolution is:

[0077] ,

[0078] where, g ( t ) represents the dilated convolution result, d represents the dilation rate, x ( t - d · k ) represents the value of the input signal at time step (or position) t - d · k . By setting different dilation factors, SERTCN can build a multi-scale time modeling capability to capture long-term and short-term dependencies.

[0079] In order to alleviate the problem of gradient disappearance in the training process and improve the training efficiency and performance of the model, residual connection is introduced. Residual connection allows information to be directly transmitted from earlier layers to later layers, so that the model can more easily learn the identity mapping, and thus more easily train deep networks.

[0080] In the SENet network model: the global average pooling compresses the global spatial information in the spatial dimension to generate a global description vector for each channel, obtaining the compressed vector z ∈ RC ; based on the compressed vector z ∈ RC , learn the nonlinear relationship between channels to generate a weight vector; through the fully connected layer and the activation function, model the channel correlation to obtain the importance weight s :

[0081] ,

[0082] where, z c The global feature of the c th channel, X c,l represents the feature value of the c th channel at position l , W 1 and W 2 represents two layers of fully connected weight matrices; finally, the importance weight s is re-applied to the original feature map (such as Figure 2The final output feature is obtained by element-wise scaling for each channel, which preserves the original spatial structure and explicitly enhances the discriminative channel features.

[0083] S4. Constructing a Transformer encoder prediction model, and performing power prediction based on the enhanced feature information to obtain a prediction result.

[0084] Transformer is a deep learning architecture based on self-attention mechanism, and its original design goal is to provide efficient sequence modeling capability for natural language processing tasks such as machine translation and text generation. Based on the consideration of efficiency and task target, this embodiment uses an encoder-only architecture to extract historical information only by using an encoder, and then predicts the future through a linear layer or a simple prediction head. A Transformer encoder prediction model is constructed. And the experiment proves that the effect is indeed better than that of Transformer, and it is more advantageous in time. The structure of the Transformer encoder prediction model is as shown in Figure 4

[0085] The Transformer encoder prediction model is obtained by stacking several layers of the same sublayer; the sublayer is composed of a multi-head attention sublayer and a feed-forward fully connected network.

[0086] The multi-head attention sublayer projects the input data into multiple different subspaces in parallel, independently calculates the attention relationship in each subspace, and finally splices and integrates the outputs of each head through linear transformation to obtain the output of the multi-head attention sublayer. This design effectively captures the complex dependency relationships and context information between input sequence elements, providing strong ability for modeling global context. In specific implementation, the input sequence wherein, n denotes the sequence length, a denotes the input vector dimension, which will be sent to three groups of linear transformation layers respectively, thereby generating the corresponding query matrix (Query, Q ), key matrix (Key, K ) and value matrix (Value, V ), as shown below:

[0087] ,

[0088] wherein, W Q , W K , W V denote the linear transformation layers used to generate​Q 、 K 、 V learnable weight matrix. In a single attention head, the scaled dot-product between the query matrix Q and the key matrix K is computed and attention weights are obtained by Softmax normalization, as follows:

[0089] ,

[0090] where Attention( Q , K , V ) denotes the normalized attention weights, d k denotes the matrix dimensions, QK T denotes the computation of the similarity of sequence elements. The computation of a single attention head allows each head to use different weights for projecting the input sequence and compute attention in various subspaces, thus capturing multiple dimensional features, as follows:

[0091] ,

[0092] where, head v denotes the v th head. The outputs of all heads are concatenated and fused by a linear layer W O into the final multi-head attention output, as follows:

[0093] ,

[0094] where MultiHead( Q , K , V ) denotes the multi-head attention output, Concat denotes the concatenation operation, h denotes the number of heads. The multi-head mechanism endows the model with the ability to jointly attend to information at various positions and from various subspaces.

[0095] After the multi-head attention sublayer, a feed-forward fully connected network is connected, and the output of the multi-head attention sublayer is added to the input through a residual connection, and then normalized and output to the feed-forward fully connected network to obtain the model output, as follows:

[0096] ,

[0097] where FFN( e ) denotes the model output, max denotes the maximum value, e denotes the input vector, b1 denotes a bias vector of the first linear transformation, b 2 denotes a bias vector of the second linear transformation.

[0098] Example Two:

[0099] In this embodiment, two different data sets are used to evaluate the performance of the model. The first data set is from a photovoltaic system in A place in 2022, and the data resolution is 15 minutes. The second data set is from a solar system in B place in 2022, and the data resolution is 5 minutes. In order to compare the two data sets, this embodiment converts the sampling rate of the data set in B place to 15 minutes and performs experiments.

[0100] When collecting data sets, there are various reasons for partial and continuous data missing, null values, etc., and the quality of the data significantly affects the accuracy and robustness of the prediction, so it is necessary to preprocess it. The three stages of data processing are data cleaning, predictor selection, and data set partitioning.

[0101] (1) Data cleaning: In the data set of B place, there are many null values and outliers, so the data needs to be preprocessed. Dates with more than 20 minutes of continuous null values are deleted, and for the remaining null values, linear interpolation is used for interpolation. For many days of continuous power values less than 1 due to machine reasons, the dates are deleted. Because there is no light at night, the photovoltaic system does not work, so for the data set of B place, the photovoltaic data from 7:00 to 19:30 every day is extracted for experiments.

[0102] (2) Predictor selection: There are a total of 15 columns of related data in the data set of B place obtained from the official website. Delete two columns of data with 0 features, and the strongly correlated feature current, there are still 12 columns of data, if all the data is input at the same time, not only the algorithmic requirement is huge, but also the use of low correlation features will affect the final prediction effect. Therefore, Pearson correlation coefficient matrix analysis and autocorrelation analysis are performed on the data set to obtain the correlation between the power data and other features and the autocorrelation of the power. Reduce data set feature redundancy, select important features and important time series to improve model efficiency.

[0103] From the correlation analysis results of the obtained power data and other features, the correlation of each data in the two data sets with the power can be seen. Among them, the colors of GHR and Pyr-1 in the data set of B are the deepest, and the correlation is also above 0.9. The correlation of the two thermometers is above 0.7. The others do not exceed 0.4. Finally, GHR, Pyr-1, t1, t2 are selected as the prediction factors of the Australian data set. Since solar radiation shows a day-night pattern, it will cause the PV power to have a significant periodicity. Therefore, the historical power value provides valuable guidance for predicting future power generation. Therefore, it is necessary to select a suitable historical data sequence length as the model input. This embodiment selects the autocorrelation function (ACF) to analyze and determine the time-dependent pattern in the data.

[0104] From the autocorrelation analysis results of the power, the autocorrelation of the first 100 photovoltaic power data in the two data sets can be known. The horizontal axis represents time, and the vertical axis represents the autocorrelation value. With the increase of time, the correlation between the past and future power first decreases and then increases. From the first figure, it can be clearly seen that at time 51, the autocorrelation reaches a local maximum, and the autocorrelation is 0.88. The lag of 51 corresponds to 24 hours, indicating that the period of power alternation is one day, which is consistent with physical intuition. Considering that multi-step prediction requires a long enough input sequence for model learning, it is determined that the input length of the prediction factors of the data set of B is 51 time points. Based on this analysis, the meteorological features and historical photovoltaic power data within the previous day are used as prediction factors to predict the future 1h, 3h and 6h photovoltaic power generation.

[0105] (3) Data set partitioning: In addition, the original data is divided into a training set and a test set in chronological order. 70% of the data is allocated to the training set, and 30% is used as the test set. Each data set is divided into multiple samples using the sliding window method. Figure 5 The time relationship between the model input and output of each sample is illustrated. The horizontal axis represents the length of the PV time series, and the vertical axis represents the number of samples. The prediction factor block represents the time period T i The prediction factor sequence used as the model input, the photovoltaic power block represents the time period T n + W The prediction sequence used as the model output. The sliding window is slid by a step size of W When making predictions, it is assumed that from the t time, the historical prediction factors from t to t + T i are used as features as input. Then, the model will predict from t + Ti to t + T i + T n + W The power value of the next sample is predicted. For the prediction of the next sample, both the input and output time points are shifted by W , and the start time of the prediction is also moved forward by W . This process continues until all samples are traversed. Since the sliding of the sliding window has an overlap for the prediction sequence, the last 2 values of the pre-sequence are selected as the evaluation values. T i The autocorrelation analysis is performed for the two datasets, and the values are set to 51 and 57, respectively, representing one day of data for the two datasets. T n The prediction step is set to represent the time interval of the prediction, and the values are 1h, 3h, and 6h, respectively.

[0106] In order to evaluate and demonstrate the prediction effect of the model, multiple indicators are used to evaluate the performance of the model, providing insights into the accuracy of the prediction and guiding the optimization of the model. The main indicators used are MAE , RMSE , MAPE, and R 2 The accuracy and stability of the prediction model are evaluated, and the formula is as follows:

[0107] ,

[0108] where m represents the total number of samples, y j represents the true value, represents the predicted value, represents the y j average value, j represents the index variable (or summation index). MAE represents the overall prediction error of the model; RMSE represents the average Euclidean distance between the predicted value and the true value; MAPE represents the percentage error of the predicted value relative to the true value; the closer the three indicators are to 0, the better the model fitting. R 2 represents the percentage of the explanatory degree of the relationship between the two variables, R 2 and the closer the value is to 1, the better the fitting.

[0109] In order to verify the generalization and effectiveness of the proposed model, the two data sets introduced above are verified. It is found in the experiment that due to the complexity of the single LSTM algorithm, it is difficult to cope with the test task, and the double-layer LSTM can perform better in the experiment, so the double-layer LSTM is used in the subsequent comparative experiment, and is called ELSTM. Finally, several baseline models such as ELSTM, Transformer encoder and Transformer are selected for comparative experiment to verify the effect of the proposed model. The Transformer encoder, SERTCN-TE and the model proposed in the application are selected for ablation experiment to prove the effectiveness of the improved TCSEN and DCT proposed in the application. In addition, by using several evaluation indexes such as MAE, RMSE, R 2 and MAPE, the different gaps and advantages and disadvantages between the models are intuitively displayed. In the experimental setting, the input time series length is set to 51 and 57 (24 h), and the prediction step is 5, 13, 25 (i.e. 1 hour, 3 hours and 6 hours), to verify the accuracy of the short-term prediction of the model.

[0110] Fig. 6 (a), Fig. 6 (b) and Fig. 6 (c) are the prediction effects of photovoltaic power after 1 hour, 3 hours and 6 hours of different models under the data set of B. Since the data volume is large, all the details of the test data cannot be displayed in the same figure, so the last 6 days of data in the test data are selected for drawing to display more details. From the figure, it can be clearly seen that in the process of photovoltaic power generation, when the fluctuation is large due to various influences, the prediction results of the two baseline models LSTM and Transformer have obvious deviation, and the prediction performance of the TE proposed in the application is better, and there is no obvious and serious deviation from the large graph. From a-2, b-2 and c-2, it can be seen that in addition to the proposed algorithm having the best prediction effect, other algorithms have different degrees of fluctuation. From a-3, b-3 and c-3, it can be seen that when the power suddenly changes, only SERTCN-TE and the algorithm proposed in the application can successfully cope with this situation, and other algorithms cannot successfully predict. Therefore, it can be seen that the algorithm proposed in the application has good response to sudden weather changes and sudden changes in the working efficiency of the photovoltaic panel caused by other reasons. From a-4, b-4 and c-4, it can be analyzed that under high-frequency and severe fluctuations, although SERTCN-TE shows good prediction effect, detailed observation can still find that part of the prediction results are deviated.

[0111] Fig. 7 (a), Fig. 7 (b) and Fig. 7 (c) are the evaluation index diagrams of different models tested under three prediction time scales of the data set of B. MAE, RMSE, R R 2 ,MAE 、 RMSE and MAPE respectively show the performance of the model proposed in the present application and the comparison of other models from multiple angles. It can be clearly seen that the model proposed in the present application is the best in each angle. The comparison between the Transformer and TE can more clearly show the reason why the TE is selected in the present application. Compared with the SERTCN-TE, it can be seen from R 2 each model performs well. From the other three indicators, in the one-hour prediction range MAE improves by 1.85kW, RMSE improves by 2.35KW, and MAPE improves by 0.205kW. In the three-hour prediction range, MAE improves by 1.11kW, RMSE improves by 1.79KW, and MAPE improves by 0.447kW. In the 6-hour prediction range, it improves by 1.06kW, 1.76kW, and 0.198kW respectively. Thus, it can be seen that the effectiveness of the SERTCN proposed in the present application for feature extraction, which can adaptively enhance important meteorological and environmental features, enhance the expression ability of the features. Compared with the SERTCN-TE and the model proposed in the present application, the MAE improves by an average of 1.74kW, the RMSE improves by an average of 2.29KW, and the MAPE improves by an average of 0.78kW. After adding the FECAM, the expression of the frequency domain information and the cycle information of the data is enhanced, which has a strong improvement for the prediction of the model.

[0112] The above-described embodiments are only descriptions of the preferred modes of the present application, and do not limit the scope of the present application. Without departing from the design spirit of the present application, various modifications and improvements to the technical solutions of the present application made by those skilled in the art shall fall within the protection scope determined by the claims of the present application.

Claims

1. A photovoltaic power short-term multi-step prediction method by enhancing feature extraction with FECAM-SERTCN, characterized in that, The method comprises the following steps: obtaining meteorological data and actual photovoltaic power data from a photovoltaic power station, and preprocessing the data to obtain processed meteorological data and processed power data; analyzing the correlation between the processed meteorological data and the processed power data through a Pearson correlation coefficient matrix, and selecting a prediction factor based on the correlation; constructing an FECAM-SERTCN feature extraction network, obtaining frequency features based on the prediction factor, and then performing feature enhancement on the frequency features to obtain enhanced feature information; constructing a Transformer encoder prediction model, performing power prediction based on the enhanced feature information to obtain a prediction result; the FECAM-SERTCN feature extraction network comprises an FECAM module and a SERTCN module; the SERTCN module is composed of a TCN network model and a SE-Net network model, the SE-Net network model is fused with a time block in the TCN network model to obtain the SERTCN module; the working process of the FECAM module comprises: Given input feature tensor where, B denotes batch size, C denotes number of channels, L denotes time series length, R denotes real set; performing shift discrete cosine transformation on the feature tensor on each channel to obtain corresponding frequency domain features: , wherein F i represents the frequency domain feature of each channel, DCT( ) represents a shift discrete cosine transform, i represents each channel; Stacking the initial frequency domain features of all channels to get the frequency domain feature tensor F req And modeling the frequency features through two layers of feedforward networks, learning the importance of channel-frequency dimension, to get the attention weight: , wherein, A denotes an attention weight, the TCN network model is composed of causal convolution, dilated convolution and residual connection; (·) denotes a Sigmoid activation function, the causal convolution is: (·) denotes a ReLU activation function, W 1 and W 2 denote a fully connected weight matrix; applying the attention weight element-wise to the feature tensor wherein the frequency feature is obtained. the dilated convolution is: in the SE-Net network model: , wherein, y ( t ) denotes the causal convolution result, K denotes the size of the convolution kernel, w ( k ) denotes the weight coefficient of the convolution kernel at position k , t denotes the time step of the current computation, k denotes the index within the convolution kernel, x ( t - k ) denotes the value of the input signal x at time step t - k ; and W , wherein, g ( t ) denotes the dilated convolution result, d denotes the dilation rate, x ( t - d · k ) denotes the value of the input signal at time step t - d · k ; Finally, the importance weight s is re-applied to the original feature map, and each channel is scaled element by element to obtain the final output feature. The global average pooling compresses the global spatial information in the spatial dimension to generate a global description vector of each channel, and obtains a compressed vector z ∈ The Transformer encoder prediction model is obtained by stacking a plurality of layers of the same sublayer; ; based on the compressed vector z ∈ the sublayer is composed of a multi-head attention sublayer and a feedforward fully connected network; , learning the nonlinear relationship between channels to generate a weight vector; The channel correlation is modeled by a fully connected layer and an activation function to obtain the importance weight of each channel s : , wherein, z c first c global features of the channel, X c,l representing a first c feature value of the channel at a position l W 1 the multi-head attention sublayer projects the input data into a plurality of different subspaces in parallel, independently calculates the attention relationship in each sub-space, and finally splices and integrates the outputs of each head through linear transformation to obtain the output of the multi-head attention sublayer; 2 represent two-layer fully connected weight matrices;​ after the multi-head attention sublayer, a layer of the feedforward fully connected network is connected, the output of the multi-head attention sublayer is added to the input through a residual connection, and then the output is output to the feedforward fully connected network after normalization to obtain the model output.

2. The photovoltaic power short-term multi-step prediction method by enhancing feature extraction through FECAM-SERTCN according to claim 1, characterized in that, ​ ​ ​ ​

Citation Information

Patent Citations

  • Distributed photovoltaic power prediction method in low voltage area based on temporal convolutional network

    CN119740114A

  • Offshore wind plant generation power prediction method based on time sequence convolutional network and Transform

    CN120262383A