Next Article in Journal
Comparative Analysis of Market Clearing Mechanisms for Peer-to-Peer Energy Market Based on Double Auction
Previous Article in Journal
Seawater Desalination System Driven by Sustainable Energy: A Comprehensive Review
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Research on Medium- and Long-Term Hydropower Generation Forecasting Method Based on LSTM and Transformer

1
China Renewable Energy Engineering Institute, Beijing 100011, China
2
School of Civil and Hydraulic Engineering, Huazhong University of Science and Technology, Wuhan 430074, China
*
Author to whom correspondence should be addressed.
Energies 2024, 17(22), 5707; https://doi.org/10.3390/en17225707
Submission received: 15 October 2024 / Revised: 10 November 2024 / Accepted: 11 November 2024 / Published: 14 November 2024
(This article belongs to the Section F: Electrical Engineering)

Abstract

:
Hydropower generation is influenced by various factors such as precipitation, temperature, and installed capacity, with hydrometeorological factors exhibiting significant temporal variability. This study proposes a hydropower generation forecasting method based on Transformer and SE-Attention for different provinces. In the model, the outputs of the Transformer and SE-Attention modules are fed into an LSTM layer to capture long-term data dependencies. The SE-Attention module is reintroduced to enhance the model’s focus on important temporal features, and a linear layer maps the hidden state of the last time step to the final output. The proposed Transformer-LSTM-SE model was tested using provincial hydropower generation data from Yunnan, Sichuan, and Chongqing. The experimental results demonstrate that this model achieves high accuracy and stability in medium- and long-term hydropower forecasting at the provincial level, with an average accuracy improvement of 33.79% over the LSTM model and 24.30% over the Transformer-LSTM model.

1. Introduction

In recent years, the global demand for clean energy has surged, with hydropower playing a critical role in meeting the increasing energy needs. Accurate hydropower generation forecasting is essential not only for ensuring a stable power supply but also for optimizing water resource management. Hydropower generation is influenced by various factors, including precipitation and temperature, among which hydrometeorological factors exhibit significant temporal variability. Thus, developing robust medium- to long-term hydropower generation forecasting methods remains a crucial challenge for researchers in the field of hydropower energy.
Numerous studies have investigated power generation forecasting, with machine learning and deep learning techniques gaining prominence due to their capacity to model complex nonlinear relationships within time series data. Traditional forecasting models include both linear and nonlinear approaches [1]. For instance, the Autoregressive Moving Average (ARMA) model, a standard linear approach, has been widely applied to capture dependencies in time series data by assuming linear relationships between past values [2,3]. In contrast, nonlinear models like the Autoregressive Conditional Heteroskedasticity (ARCH) model account for volatility clustering and changing variances, offering enhanced modeling of nonstationary data [4,5]. However, traditional time series forecasting models face limitations, as they depend primarily on fixed historical factors, use iterative procedures sensitive to initial conditions, and require strict stationarity, which constrains their adaptability to the complex, nonlinear relationships inherent in real-world scenarios.
To address the limitations inherent in traditional models, machine learning techniques like support vector machines (SVMs) [6,7] and hybrid methods that combine neural networks [8] have been implemented in power generation forecasting. Artificial neural networks (ANNs) [9,10] and other deep learning networks [11] have consistently shown improved performance over conventional techniques by effectively capturing nonlinear patterns in data. For instance, Chang et al. [12] developed a three-layer ANN model for constructing a lower upper bound estimation (LUBE) interval prediction model, which specifically enhances forecasting by estimating prediction intervals, offering a robust framework for handling predictive uncertainty in flood forecasting. Wan et al. [13] utilized an SVM for short-term power load forecasting, highlighting the model’s ability to handle high-dimensional data. Similarly, Cao et al. [14] developed a photovoltaic power forecasting model based on the Adaptive Swarm Optimization-Back Propagation Neural Network (ASO-BPNN), which enhances prediction accuracy by optimizing the learning process of neural networks. Nevertheless, traditional machine learning methods often rely heavily on hand-crafted data features, making them more applicable to short-term forecasting. For more robust feature extraction and improved forecasting accuracy, particularly in longer-term predictions, models with memory capabilities are essential. Coulibaly et al. [15] explored the application of recurrent neural networks (RNNs) for real-time short-term inflow forecasting in reservoirs, achieving superior results compared to traditional models such as ARMAX and conceptual models like PREVIS, which lack the recurrent structure suited for temporal dependencies. While RNNs leverage their sequential nature to capture time-dependent patterns, they are affected by the vanishing gradient problem, which limits their effectiveness in long-term forecasting. To overcome this, long short-term memory (LSTM) networks were introduced to retain relevant information over extended sequences, becoming a prominent deep learning model for time series forecasting by effectively handling long-term dependencies.
Long short-term memory (LSTM) networks, introduced by Hochreiter and Schmidhuber in 1997 [16], were developed to resolve the vanishing and exploding gradient issues that hindered traditional recurrent neural networks (RNNs) during long-sequence training. By implementing a gating mechanism, LSTM networks can effectively retain and selectively update memory cells, allowing them to capture long-term dependencies within sequential data. Due to these advantages, LSTM networks have been extensively utilized in hydropower generation forecasting. For example, Zhang et al. [17] proposed an LSTM-based interval prediction method designed for a hybrid power generation system incorporating hydropower, wind power, and solar energy. Similarly, Zolfaghari et al. [18] introduced a hybrid forecasting model that combines LSTM with adaptive wavelet transformation and Random Forest, significantly enhancing prediction accuracy for hydropower generation. Additionally, Guo et al. [19] explored an optimization and combination strategy for daily runoff prediction models by coupling LSTM with physical mechanisms, demonstrating that this approach could improve forecasting performance by leveraging both data-driven and physically informed methods. Although LSTM networks have achieved notable success by focusing on short-term dependencies, they may struggle with retaining information from earlier time steps when handling longer sequences. This limitation can lead to a decline in performance for long-term forecasting tasks, as relevant early information may be diluted or lost over time.
The Transformer architecture, introduced in the landmark paper “Attention Is All You Need” [20], utilizes a self-attention mechanism to capture global dependencies across data sequences. This approach enables the Transformer to efficiently manage large-scale data with high accuracy [21]. Since its inception, the Transformer has been successfully applied in diverse fields, including machine translation [20], speech recognition [22], and computer vision [23,24], showcasing its adaptability across domains. Unlike traditional models, the Transformer processes long sequences in parallel and selectively focuses on relevant sequence elements without requiring a fixed order, which has made it a leading model for both natural language processing and time series forecasting. For instance, Wu et al. [25] developed a novel time series forecasting approach based on the Transformer, while Huang et al. [26] demonstrated the model’s efficacy in capturing long-term dependencies within wind power forecasting. Additionally, Shi et al. [27] evaluated four deep learning models—RNN, LSTM, GRU, and Transformer—in predicting air quality in Beijing, finding that the Transformer consistently outperformed the others in both single-step and multi-step forecasts. These findings suggest that the Transformer is particularly well-suited for hydropower generation forecasting, given its ability to manage the long-term dependencies typical of hydrometeorological data and power generation sequences. However, the Transformer’s relatively high computational demands and sensitivity to positional encoding may limit its generalization and accuracy in nonautoregressive tasks. Consequently, when applied to regression-based tasks like hydropower generation forecasting, the Transformer model may face stability challenges.
To address these challenges, the Squeeze-and-Excitation (SE) attention mechanism [28] has been incorporated into neural network architectures to enhance the significance of key feature channels selectively. Integrating SE-Attention into hydropower generation forecasting models enables the model to prioritize the most influential time series features, potentially mitigating some limitations observed in Transformer models. By refining the model’s attention to critical features, this approach contributes to improved stability and accuracy in regression tasks, making it particularly valuable for forecasting applications that demand robust handling of long-term dependencies.
Currently, the critical challenge in hydropower generation forecasting remains achieving high accuracy over medium- to long-term horizons, particularly under complex and fluctuating hydrometeorological conditions. Existing models often focus on short-term predictions or rely on simplified assumptions, which may fall short in capturing the intricate dependencies within hydropower systems. For regions heavily dependent on hydropower, effective medium- to long-term forecasting is essential for optimizing water resource management, ensuring grid stability, and meeting energy demands. The proposed Transformer-LSTM-SE model is designed to address these needs specifically for provincial-level hydropower forecasting by leveraging the sequential dependency modeling of LSTM, the global attention mechanism of the Transformer, and adaptive feature selection via SE-Attention. This approach provides a more reliable tool for power planning and resource allocation in hydropower-dependent regions.
In this paper, we propose a novel Transformer-LSTM-SE model for medium- to long-term hydropower generation forecasting. The model leverages the capabilities of the Transformer to capture global dependencies in time series data while utilizing LSTM layers to model long-term sequential relationships. Additionally, the SE-Attention module is integrated to adaptively recalibrate feature channels, thereby enhancing the model’s focus on the most critical temporal features. This multi-layer architecture enables a more comprehensive and effective representation of the underlying data, resulting in higher prediction accuracy compared to existing deep learning models. The proposed Transformer-LSTM-SE model was tested using provincial hydropower generation data from Yunnan, Sichuan, and Chongqing. The experimental results demonstrate that this model achieves high accuracy and stability in medium- and long-term hydropower forecasting at the provincial level, with an average accuracy improvement of 33.79% over the LSTM model and 24.30% over the Transformer-LSTM model.
The main contributions of this work are twofold: (1) the effective integration of Transformer, SE-Attention, and LSTM models; and (2) the introduction of a medium- to long-term hydropower generation forecasting model capable of predicting provincial power generation for the next 12 months with high accuracy.
This paper is organized as follows: Section 2: Methodology outlines the data preprocessing steps, the analysis of influencing factors, the construction and evaluation of predictive models, and the experimental platform used. Section 3: Results and Discussion presents the findings, including the analysis of influencing factors, model prediction results for different regions, and a discussion of the implications. Section 4: Conclusions summarizes the main contributions and suggests directions for future research and applications in hydropower management.

2. Methodology

The methodology, as depicted in Figure 1, is organized into four main stages: Data Preprocessing, Influencing Factors Analysis, Model Training, and Model Prediction.
In the Data Preprocessing stage, cubic spline interpolation and normalization are applied to the raw data to address missing values and standardize variable ranges, ensuring data quality and model convergence. Influencing Factors Analysis involves evaluating key variables, such as precipitation and temperature (mean, maximum, and minimum), that affect hydropower generation, providing insights into the most impactful predictors. In the Model Training stage, several models, including BP, LSTM, Transformer-LSTM, and the proposed Transformer-LSTM-SE, are constructed and trained on the preprocessed dataset. This stage focuses on optimizing each model to improve prediction performance. Finally, in the Model Prediction stage, the trained models are employed to forecast hydropower generation for specific regions, including Yunnan, Sichuan, and Chongqing. The predictions are then evaluated to assess the effectiveness of each model in capturing the dynamics of hydropower generation across these provinces.

2.1. Data Preprocessing

The hydropower generation data used in this study were obtained from the National Bureau of Statistics, covering the period from January 2003 to December 2023, totaling 252 months. Figure 2a, Figure 2b and Figure 2c display the monthly hydropower generation trends in Yunnan Province, Sichuan Province, and Chongqing Municipality, respectively.
Figure 2 illustrates the time series distribution of hydropower generation in Yunnan Province, Sichuan Province, and Chongqing Municipality. In Figure 2a, the hydropower generation trend for Yunnan shows a clear seasonal pattern, with peaks typically occurring in the summer months, aligning with the region’s rainy season. An upward trend is evident over time, indicating an increase in hydropower capacity and generation. Figure 2b, which displays the trend for Sichuan Province, also shows a seasonal pattern, but with slightly more pronounced fluctuations due to the complex topography and climate variability of the region. This province also demonstrates an upward trend, likely driven by infrastructure expansion. In contrast, Figure 2c, representing Chongqing Municipality, displays a more irregular seasonal variation, possibly due to the smaller hydropower base and differing climatic influences in Chongqing. Despite these irregularities, an overall increasing trend is still observable throughout the study period.
To ensure data quality, several preprocessing steps were applied across both hydropower generation data and related meteorological variables, including precipitation, maximum temperature, minimum temperature, and average temperature. First, cubic spline interpolation was used to handle any missing data, ensuring continuity in the time series. Subsequently, normalization was performed on all variables to standardize their ranges, facilitating model convergence during training.

2.2. Study on Influencing Factors

The prediction of hydropower generation is influenced by multiple factors, including meteorological variables such as temperature and precipitation. Selecting the optimal combination of input variables is essential for improving the model’s predictive accuracy. To assess the relative importance of these factors, this study employs a Random Forest model, which is capable of handling high-dimensional data and provides an importance score for each input variable. These feature importance scores guide the selection of significant factors for hydropower generation forecasting.
The Random Forest model predicts by constructing multiple decision trees. It uses the bootstrap method to generate different training subsets through random sampling with replacement from the original dataset. During each tree’s node-splitting process, a random subset of features is selected to optimize decision making. For classification tasks, the model aggregates predictions through majority voting among the trees, enhancing overall accuracy and robustness.

2.3. Power Generation Forecasting

To enable effective model evaluation, the dataset was divided into training and testing sets. Data from January 2003 to December 2022 served as the training set, while the testing set covered data from January 2023 to December 2023. This arrangement aligns with the study’s objective of forecasting hydropower generation for the upcoming year, which is essential for power management and decision making.

2.3.1. Predictive Model Construction

The proposed hydropower generation forecasting model integrates a Transformer encoder, LSTM, and SE-Attention module. This integration aims to enhance the representation capability of input features, handle the dependencies in long-term sequential data, and ultimately improve the prediction accuracy. The model processes the input multi-dimensional time series data through a multi-layer structure, which then outputs the forecasted results.
The Transformer model addresses the global dependency problem in long-term sequence forecasting using the attention mechanism. Traditional recurrent neural networks (e.g., LSTM) rely on the sequential order of data points when processing time series, whereas the Transformer can parallelize the entire sequence and capture global dependencies between each time step. The Transformer encoder consists of a multi-head self-attention mechanism and a feed-forward network (FFN).
The self-attention mechanism calculates dependencies between each time step in the sequence using the following formula:
Attention ( Q , K , V ) = softmax Q K T d k V
In this context, Q, K, and V represent the query, key, and value vectors, respectively, and dk is the dimension of the key vectors.
The multi-head attention mechanism extends the self-attention mechanism to multiple subspaces, enhancing the model’s capability to express different subfeatures. Each Transformer encoder layer uses this multi-head attention mechanism to extract global features from the sequence while employing the feed-forward network (FFN) to apply nonlinear transformations to the extracted features, further enhancing their expressiveness. To supplement positional information, the Transformer introduces positional encoding, which encodes the temporal information of each position using sine and cosine functions. The formula is given as follows:
P E ( p o s , 2 i ) = s i n ( p o s 10000 2 i d m o d e l ) P E ( p o s , 2 i + 1 ) = c o s ( p o s 10000 2 i d m o d e l )
In this context, pos represents the position index in the input sequence, i is the feature dimension index, dmodel is the model’s feature dimensionality, and 10,000 is a scaling factor for distributing positional frequencies.
After extracting global features with the Transformer encoder, these features are passed into the LSTM layer. LSTM, a type of recurrent neural network (RNN), incorporates memory cells and gating mechanisms (such as the forget gate, input gate, and output gate) to effectively capture dependencies in long-term sequential data. The update equations for the LSTM unit are as follows:
f t = σ ( W f [ h t 1 , x t ] + b f )
i t = σ ( W i [ h t 1 , x t ] + b i )
o t = σ ( W o [ h t 1 , x t ] + b o )
C t = f t C t 1 + i t tanh ( W C [ h t 1 , x t ] + b C )
h t = o t tanh ( C t )
In these equations, f, it, and ot represent the forget gate, input gate, and output gate, respectively, while Ct denotes the cell state and ht the hidden state. Through this gating mechanism, LSTM can effectively retain important information and discard irrelevant data in long-term sequence forecasting, making it highly suitable for time series data with long-term dependencies.
To further enhance the model’s focus on important features, the Squeeze-and-Excitation (SE) attention mechanism is introduced. The SE module extracts global information from each feature channel through global average pooling and adaptively adjusts the importance of each feature channel using two fully connected layers, thereby enhancing the representation of key channels. The workflow of the SE module can be described as follows:
  • Squeeze: Perform global average pooling on the feature maps to generate a channel-wise descriptor.
    z c = 1 H × W H i = 1 W j = 1 x i , j , c
  • Excitation: The channel importance is recalibrated through two fully connected layers:
    s c = σ ( W 2 ReLU ( W 1 z c ) )
  • Reweighting: The features of each channel are adjusted by weighting:
    x ˜ i , j , c = s c x i , j , c
    In these formulas, z c represents the channel-wise descriptor for channel c, obtained via global average pooling over the feature map with height H and width W, where x i , j , c is the feature value at spatial position ( i , j ) in channel c . s c denotes the recalibrated channel importance, computed through two fully connected layers with weight matrices W1 and W2, using the ReLU and sigmoid activation functions. Finally, x ~ i , j , c is the reweighted feature value, where s c serves as the scaling factor applied to each feature x i , j , c in channel c .
Through this adaptive channel reweighting, the SE module enables the model to more effectively capture key features and enhances its ability to discern complex characteristics. The entire model architecture comprises multiple layers of Transformer encoders, LSTM layers, and SE-Attention modules. First, the input multidimensional time series data are embedded using a linear layer, with positional information introduced through a positional encoding layer. The Transformer encoder then models the global dependencies within the input data, and the output is passed through the SE-Attention module for channel importance adjustment. Subsequently, these features are fed into the LSTM layer to further capture temporal dependencies in the sequence. After the LSTM layer’s output, the SE-Attention module is reintroduced to enhance the focus on critical temporal features. Finally, a linear layer maps the hidden state of the last time step to the predicted result. This multi-layer architecture demonstrates outstanding performance in capturing long-term dependencies, enhancing key feature representation, and improving prediction accuracy. We propose a Transformer-LSTM-SE model, and the model structure is depicted in Figure 3.

2.3.2. Evaluation Indexes for Predictive Models

When analyzing the predictive results of hydropower generation forecasting models, obtaining an accurate assessment of each model’s performance is challenging due to the large volume of data inputs across different time periods. To quantitatively evaluate the overall performance and accuracy of the models, this study employs four evaluation metrics: root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and the coefficient of determination (R2). These metrics are used to identify the optimal forecasting model. The specific calculation formulas for these metrics are defined as follows:
R M S E = 1 n n i = 1 y i y ^ i 2
M A E = 1 n n i = 1 | y ^ i y i |
M A P E = 100 % n n i = 1 y ^ i y i y i
R 2 = 1 n i 1 ( y i y ^ i ) 2 n i = 1 ( y i y ¯ ) 2

2.3.3. Evaluation of Model Goodness of Fit

To ensure a robust assessment of model performance in forecasting hydropower generation, this study evaluates the goodness of fit [29,30] using four key metrics: root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and the coefficient of determination (R2). Table 1 summarizes the threshold values for each metric, categorized into four performance levels: “very good”, “good”, “satisfactory”, and “unsatisfactory”. These thresholds help quantify the model’s accuracy and allow for a comprehensive comparison of forecasting results across regions with different hydropower characteristics.
Each metric provides specific insights into model performance, creating a robust framework for evaluating forecasting accuracy. RMSE and MAE measure absolute error magnitude, with thresholds set at 50% of the standard deviation to distinguish between acceptable and substantial errors, critical in hydropower forecasting where large deviations highlight prediction issues [30]. RMSE is sensitive to large errors, while MAE provides an overall error measure, reducing outlier impact. MAPE measures average percentage error, allowing relative comparisons across regions, which is vital for assessing model consistency in varying contexts [29]. The coefficient of determination, R2, reflects the proportion of variance explained by the model, with values above 0.5 generally indicating that the model captures significant data variability [30]. Together, these metrics assess absolute accuracy, relative error, and data fit, guiding the choice of the most reliable forecasting model.

2.4. Experimental Platform

The modeling in this study was conducted using the deep learning framework PyTorch, with the experimental code written in Python. Data processing and experiments were performed on a Windows platform. The specific configurations used in the experiments are listed in Table 2.

3. Results and Discussion

3.1. Analysis of Influencing Factors Results

To determine the most relevant factors affecting hydropower generation, a Random Forest model was applied to evaluate the importance of various meteorological variables across the provinces of Yunnan, Sichuan, and Chongqing. The importance scores for each province indicate that precipitation consistently emerges as the most influential factor, with an average score of 0.45 across all three provinces. In Yunnan, precipitation has a particularly high importance score of 0.48, while in Sichuan and Chongqing, it also holds the highest score among factors at 0.44 and 0.43, respectively. Other variables, such as maximum temperature (average score of 0.20), minimum temperature (0.18), and mean temperature (0.17), demonstrate relatively lower importance compared to precipitation. These findings, summarized in Table 3, underscore the strong correlation between precipitation and hydropower generation across the three regions, justifying the selection of precipitation and hydropower generation as the key input variables for the forecasting model.

3.2. Model Prediction Results

This section aims to evaluate and compare the forecasting performance of four distinct models: BP, LSTM, Transformer-LSTM, and Transformer-LSTM-SE, applied to hydropower generation across different provincial regions. The analysis focuses on both the accuracy of the predictions and the strength of the correlation between predicted and actual values. By presenting both numerical metrics and visual comparisons (scatter plots and time series graphs), we aim to highlight the strengths and limitations of each model in terms of their applicability for medium- to long-term hydropower generation forecasting. The results are examined across three regions: Yunnan Province, Sichuan Province, and Chongqing Municipality, providing insights into the models’ performance in diverse geographical and hydrological conditions.

3.2.1. Sichuan Province Prediction Results

The predictive performance of four models was evaluated by comparing the predicted and actual hydropower generation, along with scatter plots that show the correlation between the predicted and actual values. The performance of the BP model is illustrated in Figure 4, which shows a relatively poor fit to the real data. While the predicted values generally follow the overall trend of the actual generation, there are significant discrepancies during periods of lower generation, particularly at the beginning and end of the year. The scatter plot further supports this observation, with an R2 value of 0.59, indicating a weaker correlation between the predicted and actual values. The scatter points deviate noticeably from the regression line, especially for higher generation values, suggesting considerable prediction errors.
According to the goodness of fit criteria, the BP model’s performance in Sichuan Province falls within the “unsatisfactory” range, with an R2 of 0.59, indicating weak explanatory power. The RMSE (63.74) and MAE (49.88), representing about 64% and 50% of the standard deviation (99.86), further confirm the low accuracy of this model. The MAPE of 17.33% also places the model within the “satisfactory” range, highlighting substantial errors and limited reliability, particularly during periods of lower generation.
Figure 5 presents the prediction results of the LSTM model, which demonstrates some improvements over the BP model. The predicted values for high-generation months align more closely with the actual values, although some discrepancies remain during periods of low generation. The scatter plot reflects this improvement, with an R2 value of 0.62, indicating a slightly stronger correlation between the predicted and actual values compared to the BP model. However, overall error metrics such as RMSE and MAPE still suggest room for further model enhancement.
Based on the goodness of fit criteria, the LSTM model in Sichuan achieves a “satisfactory” fit with an R2 of 0.62, showing modest improvement over the BP model. The RMSE (61.82) and MAE (47.90), approximately 62% and 48% of the standard deviation (99.86), remain in the “unsatisfactory” range. The MAPE of 16.78% falls within the “satisfactory” category, suggesting limited predictive accuracy and continued errors, particularly in lower-generation periods.
Figure 6 illustrates the performance of the Transformer-LSTM model, which shows a significant improvement in the alignment of predicted values with actual data compared to the previous two models. This model more accurately captures the seasonal variations in hydropower generation, as well as its peaks and valleys, compared to the BP and LSTM models. The scatter plot reveals that the predicted values are closer to the regression line, with an R2 value of 0.70, reflecting a stronger correlation between the predictions and actual values. The lower RMSE and MAPE values further support the model’s enhanced performance.
Based on the goodness of fit criteria, the Transformer-LSTM model achieves a “good” fit for Sichuan Province, with an R2 of 0.70, indicating improved correlation with actual values. The RMSE (54.95) and MAE (43.88), approximately 55% and 44% of the standard deviation (99.86), meet the “good” range. The MAPE of 14.66% falls within the “satisfactory” category, indicating better overall accuracy, especially in capturing seasonal trends, though some prediction errors remain.
Figure 7 demonstrates the superior performance of the Transformer-LSTM-SE model. The predicted values almost perfectly match the actual hydropower generation data, particularly during peak generation periods. The scatter plot shows an almost perfect linear relationship between the predicted and actual values, with an R2 value of 0.82. Error metrics such as RMSE (42.40) and MAPE (11.02%) are the lowest among all the models, indicating that the Transformer-LSTM-SE model is the most accurate and reliable for hydropower generation forecasting in Sichuan Province.
According to the goodness of fit criteria, the Transformer-LSTM-SE model achieves a “very good” fit in Sichuan Province, with an R2 of 0.82, indicating strong predictive accuracy. The RMSE (42.40) and MAE (31.97), approximately 42% and 32% of the standard deviation (99.86), also fall within the “very good” range. The MAPE of 11.02% is within the “good” category, highlighting this model’s high reliability and improved precision, particularly during peak generation periods.
As shown in Table 4, the Transformer-LSTM-SE model significantly outperforms the other models in terms of accuracy, particularly in capturing seasonal trends and variations in hydropower generation. The strong correlations observed in the scatter plots of both the Transformer-LSTM and Transformer-LSTM-SE models suggest that these architectures are highly suitable for medium- to long-term hydropower generation forecasting.

3.2.2. Yunnan Province Prediction Results

The predictive performance of four models was evaluated by comparing the predicted and actual hydropower generation, as well as through scatter plots that show the correlation between the predicted and actual values. The performance of the BP model is illustrated in Figure 8, which shows a moderate fit to the real data. The predicted values generally follow the overall trend of the actual generation, particularly during peak generation periods. However, noticeable discrepancies exist between the predicted and actual values during the periods of lower generation at the beginning and end of the year. The scatter plot further supports this observation, indicating a strong linear relationship between the predicted and actual values, with an R2 value of 0.9272. However, when predicting higher generation values, the scatter points deviate from the regression line, indicating some prediction errors.
Based on the goodness of fit evaluation criteria, the BP model achieves a “very good” fit with an R2 of 0.93, indicating strong explanatory power. However, the RMSE (26.70) and MAE (20.96), being approximately 27% and 21% of the standard deviation of the measured data (98.93), place the model in the “satisfactory” range. The MAPE of 10.10% is at the threshold of the “good” category, suggesting the model maintains reasonable accuracy but may experience higher error during lower-generation periods.
Figure 9 presents the prediction results of the LSTM model, which exhibit similarities to those of the BP model but show improvements in certain aspects. The predicted values for high-generation months align more closely with the actual values, although some discrepancies persist during periods of low generation. The scatter plot reflects this improvement, with an R2 value of 0.9293, indicating a slightly stronger correlation between the predicted and actual values compared to the BP model. However, the overall error metrics, such as RMSE and MAPE, remain relatively high, suggesting there is still room for further model enhancement.
Based on the goodness of fit criteria, the LSTM model achieves a “very good” fit with an R2 of 0.93, reflecting strong correlation with the actual values. However, the RMSE (26.31) and MAE (22.08), representing about 27% and 22% of the standard deviation (98.93), are within the “satisfactory” range. The MAPE of 10.50% marginally places the model within the “good” category, indicating reasonable accuracy but a need for further refinement to reduce errors in low-generation periods.
Figure 10 illustrates the performance of the Transformer-LSTM model, which shows a significant improvement in the alignment of predicted values with actual data compared to the previous two models. This model more accurately captures the seasonal variations in hydropower generation, as well as its peaks and valleys, than the BP and LSTM models. The scatter plot reveals that the predicted values are closer to the regression line, with an R2 value of 0.9544, reflecting a stronger correlation between the predictions and actual values. Further supporting the model’s enhanced performance are the lower RMSE and MAPE values, indicating overall higher precision.
According to the goodness of fit criteria, the Transformer-LSTM model achieves a “very good” fit with an R2 of 0.95, showing strong predictive accuracy. The RMSE (21.12) and MAE (16.63), constituting about 21% and 17% of the standard deviation (98.93), fall within the “good” range. Additionally, the MAPE of 7.59% meets the “very good” category, indicating improved accuracy and consistency across seasonal variations compared to previous models.
Figure 11 demonstrates the superior performance of the Transformer-LSTM-SE model. The predicted values almost perfectly match the actual hydropower generation data, particularly during peak generation periods. The scatter plot shows an almost perfect linear relationship between the predicted and actual values, with an R2 value of 0.9740. Error metrics such as RMSE (15.965) and MAPE (5.302%) are the lowest among all the models, indicating that the Transformer-LSTM-SE model is the most accurate and reliable for hydropower generation forecasting.
Based on the goodness of fit criteria, the Transformer-LSTM-SE model achieves an excellent “very good” fit, with an R2 of 0.97, reflecting near-perfect alignment with actual values. The RMSE (15.96) and MAE (10.70), approximately 16% and 11% of the standard deviation (98.93), also meet the “very good” standard. The MAPE of 5.30% further confirms this top-tier accuracy, indicating that the model provides the most reliable and precise forecasts among all evaluated models.
Table 5 highlights that combining the Transformer with the SE layer significantly enhances the accuracy of hydropower generation forecasting. While the BP and LSTM models provide reasonable baseline predictions, the Transformer-LSTM-SE model exhibits superior predictive performance in capturing the seasonal trends and variations in the data. The strong correlation observed in the scatter plots of both the Transformer-LSTM and Transformer-LSTM-SE models further suggests that these architectures are highly suitable for medium- to long-term hydropower generation forecasting.

3.2.3. Chongqing Municipality Prediction Results

The predictive performance of four models was evaluated by comparing the predicted and actual hydropower generation, along with scatter plots that show the correlation between the predicted and actual values. The performance of the BP model is illustrated in Figure 12, which shows a reasonable fit to the real data. The predicted values generally follow the overall trend of actual generation, but there are notable discrepancies during some periods. The scatter plot further supports this observation, with an R2 value of 0.67, indicating a moderate correlation between the predicted and actual values. While the predictions align closely with actual values for some periods, there are noticeable deviations, especially during periods of higher generation.
Based on the goodness of fit criteria, the BP model in Chongqing falls within the “satisfactory” range, with an R2 of 0.50, indicating moderate predictive power. The RMSE (3.81) and MAE (2.92), approximately 71% and 54% of the standard deviation (5.37), also classify as “unsatisfactory”. The MAPE of 19.54% is within the “satisfactory” range, suggesting the model captures general trends but lacks precision, particularly in periods of higher generation.
Figure 13 presents the prediction results of the LSTM model. Compared to the BP model, the LSTM model demonstrates lower performance, as reflected in the R2 value of 0.46, indicating a weaker correlation between the predicted and actual values. The predicted values for several months show noticeable deviations from the actual values, particularly during high-generation periods. The error metrics, such as RMSE and MAPE, are higher than those of the BP model, suggesting that the LSTM model does not perform as well for Chongqing’s hydropower generation forecasting.
According to the goodness of fit criteria, the LSTM model in Chongqing shows a “satisfactory” fit with an R2 of 0.55, indicating moderate correlation. The RMSE (3.61) and MAE (3.07), around 67% and 57% of the standard deviation (5.37), fall in the “unsatisfactory” range. The MAPE of 20.81% also indicates “unsatisfactory” accuracy, highlighting that this model struggles to capture high-generation periods effectively.
Figure 14 illustrates the performance of the Transformer-LSTM model, which shows a moderate improvement over the LSTM model. The predicted values align more closely with the actual data, especially during low- and medium-generation periods. However, some discrepancies persist during high-generation periods. The scatter plot shows an R2 value of 0.55, indicating a better correlation between the predicted and actual values than the LSTM model. The lower RMSE and MAPE values further confirm the improved predictive performance of this model.
Based on the goodness of fit criteria, the Transformer-LSTM model in Chongqing achieves a “satisfactory” fit with an R2 of 0.67, reflecting moderate improvement. The RMSE (3.08) and MAE (2.73), approximately 57% and 51% of the standard deviation (5.37), are within the “satisfactory” range. However, the MAPE of 21.94% is “unsatisfactory”, suggesting the model captures trends better than previous models but still struggles with accuracy during high-generation periods.
Figure 15 demonstrates the performance of the Transformer-LSTM-SE model, which, despite combining both Transformer and SE-Attention mechanisms, does not show a significant improvement over the Transformer-LSTM model in this case. The predicted values are closer to the actual values than those of the LSTM model, but discrepancies remain, particularly during high-generation periods. The scatter plot reveals an R2 value of 0.50, reflecting a moderate correlation between the predicted and actual values. Although the RMSE and MAPE values are relatively low, they are still not as good as expected for this model.
According to the goodness of fit criteria, the Transformer-LSTM-SE model in Chongqing achieves a “good” fit with an R2 of 0.76, indicating stronger correlation with actual values compared to previous models. The RMSE (2.64) and MAE (2.12), approximately 49% and 39% of the standard deviation (5.37), meet the “satisfactory” and “good” ranges, respectively. The MAPE of 17.58% is within the “satisfactory” category, highlighting reasonable accuracy, although some discrepancies remain, particularly in high-generation periods.
As shown in Table 6, the Transformer-LSTM-SE model does not outperform the BP model as it did for Yunnan Province, and while it shows improvements in capturing seasonal trends compared to the LSTM model, the BP model performs better in terms of correlation. The error metrics indicate that further optimization of the Transformer-LSTM-SE model is necessary to improve its accuracy for hydropower generation forecasting in Chongqing Municipality.

3.3. Discussion

The BP model demonstrated a basic capability in time series prediction but exhibited relatively high errors across hydropower forecasts in Yunnan, Sichuan, and Chongqing. For instance, in Yunnan Province, the BP model yielded an RMSE of 26.70, an MAPE of 10.11%, and an R2 of 0.93. In Sichuan, where seasonal fluctuations are more pronounced, the BP model’s MAPE increased to 17.33%, with a low R2 of 0.59, reflecting weak fitting performance. This model’s limitations are primarily due to its inability to capture long-term dependencies within time series data and its susceptibility to local optima, leading to low prediction accuracy across various regions.
The goodness of fit analysis reveals that the BP model’s performance varies significantly across provinces. While it achieves a high R2 in Yunnan, indicating strong explanatory power, its accuracy diminishes in Sichuan and Chongqing, where RMSE and MAE metrics fall into lower performance categories. The model shows moderate reliability in capturing general trends, yet struggles with precision during periods of fluctuating generation, particularly in regions with pronounced seasonal variability. Overall, these results underscore the BP model’s limited capacity to handle complex temporal dependencies in hydropower forecasting.
In comparison, the LSTM model, which incorporates memory cells and gating mechanisms to mitigate the vanishing gradient issue, exhibited a marked improvement in capturing short- and medium-term dependencies. In Yunnan Province, the LSTM model’s RMSE decreased to 26.31, with an MAPE of 10.50% and an R2 of 0.93, indicating better fitting accuracy. However, in Sichuan and Chongqing, prediction errors remained substantial, with MAPE reaching 20.81% and R2 at 0.55 in Chongqing, underscoring LSTM’s limitations in handling longer time series data, where information loss and higher error rates in high-frequency variations are evident.
The goodness of fit analysis highlights that, while the LSTM model exhibits improved short- to medium-term predictive accuracy, its performance remains mixed across regions. In Yunnan, the model achieves a high R2, signaling a strong fit, but RMSE and MAE values suggest room for refinement to handle low-generation periods more effectively. In Sichuan and Chongqing, the LSTM model’s metrics fall within “satisfactory” and “unsatisfactory” ranges for most indicators, reflecting limitations in maintaining accuracy over longer time series. These results underscore that, despite its advancements over the BP model, the LSTM model still faces challenges with longer sequences and high-frequency variations, particularly in regions with distinct seasonal shifts.
To further enhance long-sequence dependency modeling, the Transformer-LSTM model integrates the self-attention mechanism from Transformer architecture, improving its capability to capture global temporal dependencies and achieving better overall performance. For instance, in Yunnan Province, the Transformer-LSTM model reduced RMSE and MAPE to 21.12 and 7.59%, respectively, with R2 increasing to 0.95, highlighting superior performance under complex fluctuations. In Sichuan and Chongqing, MAPE dropped to 14.66% and 21.94%, with R2 values of 0.70 and 0.67, respectively. This demonstrates that the Transformer-LSTM effectively mitigates the error accumulation observed in BP and LSTM for long-sequence data. However, limitations in feature focusing remain, leading to deviations in extreme fluctuation data.
The goodness of fit evaluation confirms that the Transformer-LSTM model successfully enhances predictive accuracy and dependency modeling, particularly in Yunnan, where it achieves a “very good” fit with high consistency in handling seasonal fluctuations. RMSE and MAE fall within the “good” range, indicating a solid improvement in capturing complex temporal patterns over previous models. In Sichuan, the model achieves a “good” fit overall, with an R2 of 0.70, although some prediction errors persist, particularly during periods of higher variability. In Chongqing, the model demonstrates a “satisfactory” fit, with moderate improvements in trend capture, but its MAPE remains “unsatisfactory”, highlighting limitations in feature focusing and suggesting the need for further refinement to address high-generation deviations more effectively.
Building on the strengths of prior models, the Transformer-LSTM-SE model integrates the SE module to weight channel features and enhance focus on critical information, achieving superior predictive accuracy across different hydropower contexts. In Yunnan, the model attained the lowest RMSE of 15.97 and MAPE of 5.30%, with a high R2 of 0.97, indicating exceptional precision. In Sichuan, the model’s MAPE reduced to 11.02% with an R2 of 0.82, while in the complex conditions of Chongqing, the MAPE was 17.58% with an R2 of 0.76, still outperforming other models. The SE module enables this architecture to effectively emphasize important feature channels and mitigate noise, yielding the highest stability and accuracy for medium- and long-term hydropower forecasting across various regions.
The goodness of fit analysis underscores the Transformer-LSTM-SE model’s superior performance across all provinces, with an exceptional “very good” fit in Yunnan, demonstrated by its high R2 and low error metrics, establishing it as the most precise model tested. In Sichuan, the model similarly maintains a “very good” fit, effectively handling seasonal peaks and offering improved stability in predictions. Although Chongqing’s complex conditions challenge the model’s accuracy, it achieves a “good” fit with notable enhancements over previous models, capturing general trends with satisfactory reliability. These results confirm the SE module’s efficacy in refining feature focus and noise reduction, making the Transformer-LSTM-SE model particularly adept at medium- to long-term hydropower forecasting across diverse hydrological contexts.
In summary, the Transformer-LSTM-SE model addresses the limitations of the BP, LSTM, and Transformer-LSTM models, achieving optimal performance by combining global dependency modeling with precise feature extraction. Figure 16 shows the hydropower generation forecast comparison across the three regions. This model demonstrated an average improvement in accuracy of approximately 33.79% over the LSTM and 24.30% over the Transformer-LSTM, indicating its robust capability for capturing complex temporal patterns in hydropower generation data. However, while it performs well in most regions, further optimization is recommended for areas with unique hydropower characteristics, such as Chongqing, to fully capture regional variations. The results underscore that integrating self-attention mechanisms and feature recalibration is highly effective for advancing accuracy and robustness in hydropower forecasting, making the Transformer-LSTM-SE model a promising approach for long-term, regionally adaptive predictions.

4. Conclusions

This study proposes a medium- to long-term hydropower generation forecasting model based on the Transformer-LSTM-SE architecture. The model captures global dependencies in time series data using the self-attention mechanism of the Transformer, combined with the LSTM layer to model long-term sequential relationships. Additionally, the introduction of the SE-Attention module further enhances the model’s focus on critical temporal features, thereby significantly improving the overall forecasting performance.
The main findings of this study are as follows:
1.
The proposed Transformer-LSTM-SE model demonstrates superior performance in both accuracy and stability across the three provincial regions compared to traditional LSTM and Transformer-LSTM models. Specifically, it achieves an average accuracy improvement of 33.79% over the LSTM model and 24.30% over the Transformer-LSTM model in hydropower generation forecasting. This integration of self-attention and adaptive feature recalibration demonstrates the effectiveness of combining multiple deep learning architectures for more precise hydropower generation predictions.
2.
Analysis using the Random Forest model revealed that precipitation is the most important variable affecting hydropower generation, followed by maximum temperature. This finding aligns with the characteristic of hydropower generation’s strong dependence on water sources, highlighting precipitation as a key factor in improving forecasting accuracy.
3.
The construction of the Transformer-LSTM-SE model represents a targeted innovation aimed at improving forecasting performance under complex hydrometeorological conditions. The unique integration of SE-Attention with the Transformer-LSTM architecture allows the model to adaptively focus on significant temporal features, thus capturing intricate dependencies in hydropower data. By purposefully enhancing the model’s sensitivity to high-impact features, this study advances a forecasting tool that is both adaptive and robust in handling diverse and fluctuating data patterns.
4.
Experimental evaluations using hydropower data from Yunnan, Sichuan, and Chongqing highlight the model’s robustness and versatility across regions with distinct seasonal variations. Achieving an MAPE as low as 5.30% in Yunnan and significant improvements in Sichuan (11.02%) and Chongqing (17.58%), the model demonstrates consistent accuracy across various conditions. These results suggest that the Transformer-LSTM-SE model is well-suited for practical applications, including improving grid stability in hydropower-dependent regions, and supporting long-term energy planning and policy development.
In summary, the Transformer-LSTM-SE model offers an innovative, application-ready solution for medium- to long-term hydropower forecasting. By combining global and local dependency modeling with adaptive feature weighting, this model is a valuable tool for hydropower resource management, especially in areas with strong seasonal or regional variability. Future work may focus on refining this model to address unique hydrological patterns in other regions, extending its utility to broader climate conditions, and enhancing its integration within operational hydropower management systems.

Author Contributions

G.Z.: the literature collection and arrangement; experimental analysis; paper writing, revision, improvement. H.L.: experimental operation, record, analysis, discussion; paper writing, revision, improvement. L.W.: the literature collection and arrangement; record, analysis, discussion; paper writing, revision, improvement. W.W.: experimental analysis, discussion; paper writing, revision, improvement. J.G.: experimental analysis, discussion; paper writing, revision, improvement. H.Q.: experimental analysis, discussion; paper improvement. X.N.: experimental analysis, discussion; paper improvement. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by National Natural Science Foundation of China (No. 52409099) and the Science and Technology Project of China Renewable Energy Engineering Institute (ZX-KJHB-20230013).

Data Availability Statement

The data presented in this study are contained within the article. The data presented in this study are also available on request from the corresponding author.

Conflicts of Interest

Authors Guoyong Zhang, Lingli Wang and Weiying Wang were employed by the company China Renewable Energy Engineering Institute. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest. The authors declare that this study received funding from China Renewable Energy Engineering Institute.

References

  1. Adhikari, R.; Agrawal, R.K. An introductory study on time series modeling and forecasting. arXiv 2013, arXiv:1302.6613. [Google Scholar]
  2. Hipel, K.W.; McLeod, A.I. Time Series Modelling of Water Resources and Environmental Systems, 1st ed.; Elsevier: Amsterdam, The Netherlands, 1994; pp. 154–196. [Google Scholar]
  3. Galbraith, J.; Zinde-Walsh, V. Autoregression-Based Estimators for ARFIMA Models. Unpublished Work. 2001. Available online: https://depot.erudit.org//id/000260dd (accessed on 13 September 2024).
  4. Engle, R.F. Autoregressive conditional heteroscedasticity with estimates of the variance of United Kingdom inflation. Econometrica 1982, 50, 987–1007. [Google Scholar] [CrossRef]
  5. Radha, S.; Thenmozhi, M. Forecasting short term interest rates using ARMA, ARMA-GARCH and ARMA-EGARCH models. In Proceedings of the Indian Institute of Capital Markets 9th Capital Markets Conference, Mumbai, India, 17 January 2006. [Google Scholar]
  6. Cao, L. Support vector machines experts for time series forecasting. Neurocomputing 2003, 51, 321–339. [Google Scholar] [CrossRef]
  7. Chen, T.T.; Lee, S.J. A weighted LS-SVM based learning system for time series forecasting. Inf. Sci. 2015, 299, 99–116. [Google Scholar] [CrossRef]
  8. Nie, H.; Liu, G.; Liu, X.; Zhang, Y. Hybrid of ARIMA and SVMs for short-term load forecasting. Energy Procedia 2012, 16, 1455–1460. [Google Scholar] [CrossRef]
  9. Nor, M.E.; Safuan, H.M.; Shab, N.F.M.; Karim, A. Neural network versus classical time series forecasting models. In Proceedings of the AIP Conference, Melaka, Malaysia, 30 March 2017. [Google Scholar]
  10. Kristjanpoller, W.; Minutolo, M.C. Gold price volatility: A forecasting approach using the Artificial Neural Network–GARCH model. Expert Syst. Appl. 2015, 42, 7245–7251. [Google Scholar] [CrossRef]
  11. Masum, S.; Liu, Y.; Chiverton, J. Multi-step time series forecasting of electric load using machine learning models. In Artificial Intelligence and Soft Computing, Proceedings of the 17th International Conference, ICAISC 2018, Zakopane, Poland, 3–7 June 2018; Springer International Publishing: Berlin/Heidelberg, Germany, 2018; pp. 148–159. [Google Scholar]
  12. Chang, X.; Guo, J.; Qin, H.; Huang, J.; Wang, X.; Ren, P. Single-Objective and Multi-Objective Flood Interval Forecasting Considering Interval Fitting Coefficients. Water Resour. Manag. 2024, 38, 3953–3972. [Google Scholar] [CrossRef]
  13. Wan, Q.; Wang, Q.L.; Wang, R.H. Short-term load forecasting of a regional power grid based on support vector machine. Power Syst. Clean Energy 2016, 32, 14–20. [Google Scholar]
  14. Cao, H.; Wang, T.; Chen, P.; Li, Y. Solar energy forecasting in short term based on the ASO-BPNN model. Front. Energy Res. 2022, 10, 902486. [Google Scholar] [CrossRef]
  15. Coulibaly, P.; Anctil, F. Real-time short-term natural water inflows forecasting using recurrent neural networks. In Proceedings of the IJCNN’99. International Joint Conference on Neural Networks, Washington, DC, USA, 10–16 July 1999; IEEE: Piscataway, NJ, USA; Volume 6, pp. 3802–3805. [Google Scholar]
  16. Hochreiter, S. Long Short-term Memory. Neural Comput. MIT Press 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
  17. Zhang, Z.; Qin, H.; Yao, L.; Lu, J.; Cheng, L. Interval prediction method based on Long-Short Term Memory networks for system integrated of hydro, wind and solar power. Energy Procedia 2019, 158, 6176–6182. [Google Scholar] [CrossRef]
  18. Zolfaghari, M.; Golabi, M.R. Modeling and predicting the electricity production in hydropower using conjunction of wavelet transform, long short-term memory and random forest models. Renew. Energy 2021, 170, 1367–1381. [Google Scholar] [CrossRef]
  19. Guo, J.; Liu, Y.; Zou, Q.; Ye, L.; Zhu, S.; Zhang, H. Study on Optimization and Combination Strategy of Multiple Daily Runoff Prediction Models Coupled with Physical Mechanism and LSTM. J. Hydrol. 2023, 624, 129969. [Google Scholar] [CrossRef]
  20. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is All You Need. Adv. Neural Inf. Process. Syst. 2017, 30. [Google Scholar] [CrossRef]
  21. Chowdhary, K.R. Fundamentals of Artificial Intelligence, 1st ed.; Springer: New Delhi, India, 2020. [Google Scholar]
  22. Zeyer, A.; Bahar, P.; Irie, K.; Schlüter, R.; Ney, H. A comparison of transformer and LSTM encoder-decoder models for ASR. In Proceedings of the 2019 IEEE Automatic Speech Recognition and Understanding Workshop (ASRU), Singapore, 14–18 December 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 8–15. [Google Scholar]
  23. Carion, N.; Massa, F.; Synnaeve, G.; Usunier, N.; Kirillov, A.; Zagoruyko, S. End-to-end object detection with transformers. In Proceedings of the European Conference on Computer Vision, Glasgow, UK, 23–28 August 2020; Springer International Publishing: Cham, Switzerland, 2020; pp. 213–229. [Google Scholar]
  24. Wang, X.; Girshick, R.; Gupta, A.; He, K. Non-local neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 7794–7803. [Google Scholar]
  25. Wu, N.; Green, B.; Ben, X.; O’Banion, S. Deep transformer models for time series forecasting: The influenza prevalence case. arXiv 2020, arXiv:2001.08317. [Google Scholar]
  26. Duong-Ngoc, H.; Nguyen-Thanh, H.; Nguyen-Minh, T. Short term load forecast using deep learning. In Proceedings of the 2019 Innovations in Power and Advanced Computing Technologies (i-PACT), Vellore, India, 22–23 March 2019; IEEE: Piscataway, NJ, USA, 2019; Volume 1, pp. 1–5. [Google Scholar]
  27. Shi, J.; Jain, M.; Narasimhan, G. Time series forecasting (TSF) using various deep learning models. arXiv 2022, arXiv:2204.11115. [Google Scholar]
  28. Hu, J.; Shen, L.; Sun, G. Squeeze-and-excitation networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 7132–7141. [Google Scholar]
  29. Pérez-Sánchez, M.; Sánchez-Romero, F.J.; Ramos, H.M.; López Jiménez, P.A. Calibrating a flow model in an irrigation network: Case study in Alicante, Spain. Span. J. Agric. Res. 2017, 15, 1–13. [Google Scholar] [CrossRef]
  30. Moriasi, D.N.; Arnold, J.G.; Van Liew, M.W.; Bingner, R.L.; Harmel, R.D.; Veith, T.L. Model evaluation guidelines for systematic quantification of accuracy in watershed simulations. Trans. ASABE 2007, 50, 885–900. [Google Scholar] [CrossRef]
Figure 1. Flowchart summarizing the research methodology.
Figure 1. Flowchart summarizing the research methodology.
Energies 17 05707 g001
Figure 2. Monthly Hydropower Generation Trends: (a) Yunnan Province, (b) Sichuan Province, (c) Chongqing Municipality (2003–2023).
Figure 2. Monthly Hydropower Generation Trends: (a) Yunnan Province, (b) Sichuan Province, (c) Chongqing Municipality (2003–2023).
Energies 17 05707 g002
Figure 3. Structure of the Transformer-LSTM-SE model.
Figure 3. Structure of the Transformer-LSTM-SE model.
Energies 17 05707 g003
Figure 4. (a) Comparison between actual and predicted hydropower generation in Sichuan Province using the BP model; (b) Correlation analysis between predicted and actual values in Sichuan Province.
Figure 4. (a) Comparison between actual and predicted hydropower generation in Sichuan Province using the BP model; (b) Correlation analysis between predicted and actual values in Sichuan Province.
Energies 17 05707 g004
Figure 5. (a) Comparison between actual and predicted hydropower generation in Sichuan Province using the LSTM model; (b) Correlation analysis between predicted and actual values in Sichuan Province.
Figure 5. (a) Comparison between actual and predicted hydropower generation in Sichuan Province using the LSTM model; (b) Correlation analysis between predicted and actual values in Sichuan Province.
Energies 17 05707 g005
Figure 6. (a) Comparison between actual and predicted hydropower generation in Sichuan Province using the Transformer-LSTM model; (b) Correlation analysis between predicted and actual values in Sichuan Province.
Figure 6. (a) Comparison between actual and predicted hydropower generation in Sichuan Province using the Transformer-LSTM model; (b) Correlation analysis between predicted and actual values in Sichuan Province.
Energies 17 05707 g006
Figure 7. (a) Comparison between actual and predicted hydropower generation in Sichuan Province using the Transformer-LSTM-SE model; (b) Correlation analysis between predicted and actual values in Sichuan Province.
Figure 7. (a) Comparison between actual and predicted hydropower generation in Sichuan Province using the Transformer-LSTM-SE model; (b) Correlation analysis between predicted and actual values in Sichuan Province.
Energies 17 05707 g007
Figure 8. (a) Comparison between actual and predicted hydropower generation in Yunnan Province using the BP model; (b) Correlation analysis between predicted and actual values in Yunnan Province.
Figure 8. (a) Comparison between actual and predicted hydropower generation in Yunnan Province using the BP model; (b) Correlation analysis between predicted and actual values in Yunnan Province.
Energies 17 05707 g008
Figure 9. (a) Comparison between actual and predicted hydropower generation in Yunnan Province using the LSTM model; (b) Correlation analysis between predicted and actual values in Yunnan Province.
Figure 9. (a) Comparison between actual and predicted hydropower generation in Yunnan Province using the LSTM model; (b) Correlation analysis between predicted and actual values in Yunnan Province.
Energies 17 05707 g009
Figure 10. (a) Comparison between actual and predicted hydropower generation in Yunnan Province using the Transformer-LSTM model; (b) Correlation analysis between predicted and actual values in Yunnan Province.
Figure 10. (a) Comparison between actual and predicted hydropower generation in Yunnan Province using the Transformer-LSTM model; (b) Correlation analysis between predicted and actual values in Yunnan Province.
Energies 17 05707 g010
Figure 11. (a) Comparison between actual and predicted hydropower generation in Yunnan Province using the Transformer-LSTM-SE model; (b) Correlation analysis between predicted and actual values in Yunnan Province.
Figure 11. (a) Comparison between actual and predicted hydropower generation in Yunnan Province using the Transformer-LSTM-SE model; (b) Correlation analysis between predicted and actual values in Yunnan Province.
Energies 17 05707 g011
Figure 12. (a) Comparison between actual and predicted hydropower generation in Chongqing Municipality using the BP model; (b) Correlation analysis between predicted and actual values in Chongqing Municipality.
Figure 12. (a) Comparison between actual and predicted hydropower generation in Chongqing Municipality using the BP model; (b) Correlation analysis between predicted and actual values in Chongqing Municipality.
Energies 17 05707 g012
Figure 13. (a) Comparison between actual and predicted hydropower generation in Chongqing Municipality using the LSTM model; (b) Correlation analysis between predicted and actual values in Chongqing Municipality.
Figure 13. (a) Comparison between actual and predicted hydropower generation in Chongqing Municipality using the LSTM model; (b) Correlation analysis between predicted and actual values in Chongqing Municipality.
Energies 17 05707 g013
Figure 14. (a) Comparison between actual and predicted hydropower generation in Chongqing Municipality using the Transformer-LSTM model; (b) Correlation analysis between predicted and actual values in Chongqing Municipality.
Figure 14. (a) Comparison between actual and predicted hydropower generation in Chongqing Municipality using the Transformer-LSTM model; (b) Correlation analysis between predicted and actual values in Chongqing Municipality.
Energies 17 05707 g014
Figure 15. (a) Comparison between actual and predicted hydropower generation in Chongqing Municipality using the Transformer-LSTM-SE model; (b) Correlation analysis between predicted and actual values in Chongqing Municipality.
Figure 15. (a) Comparison between actual and predicted hydropower generation in Chongqing Municipality using the Transformer-LSTM-SE model; (b) Correlation analysis between predicted and actual values in Chongqing Municipality.
Energies 17 05707 g015
Figure 16. Monthly Hydropower Generation Forecast Comparison: (a) Yunnan Province, (b) Sichuan Province, (c) Chongqing Municipality (2023).
Figure 16. Monthly Hydropower Generation Forecast Comparison: (a) Yunnan Province, (b) Sichuan Province, (c) Chongqing Municipality (2023).
Energies 17 05707 g016
Table 1. Importance Scores of Influencing Factors by Province.
Table 1. Importance Scores of Influencing Factors by Province.
Goodness of FitRMSEMAEMAPER2
Very Good<50% of σ *<50% of σ <10%>0.75
Good50–60% of σ 50–60% of σ 10–20%0.65–0.75
Satisfactory60–70% of σ 60–70% of σ 20–30%0.50–0.65
Unsatisfactory>70% of σ >70% of σ >30%<0.50
* σ represents the standard deviation of the measured data.
Table 2. Experimental configurations.
Table 2. Experimental configurations.
Requirement ConfigurationDetails
Operating systemWindows11
Experimental platformPyCharm2023
Operating languagesPython3.9.18
Operating frameworkPyTorch2.1.1
GPURTX 4060
Table 3. Importance Scores of Influencing Factors by Province.
Table 3. Importance Scores of Influencing Factors by Province.
RegionPrecipitationMax TemperatureMin TemperatureMean Temperature
Yunnan0.480.190.170.16
Sichuan0.440.200.180.18
Chongqing0.430.210.190.17
Table 4. Prediction result metrics of each model for Sichuan Province.
Table 4. Prediction result metrics of each model for Sichuan Province.
ModelRMSEMAEMAPER2
BP63.7449.8817.33%0.59
LSTM61.8247.9016.78%0.62
Transformer-LSTM54.9543.8814.66%0.70
Transformer-LSTM-SE42.4031.9711.02%0.82
Table 5. Prediction result metrics of each model in Yunnan Province.
Table 5. Prediction result metrics of each model in Yunnan Province.
ModelRMSEMAEMAPER2
BP26.7020.9610.11%0.93
LSTM26.3122.0810.50%0.93
Transformer-LSTM21.1216.637.59%0.95
Transformer-LSTM-SE15.9710.705.30%0.97
Table 6. Prediction result metrics of each model in Chongqing Municipality.
Table 6. Prediction result metrics of each model in Chongqing Municipality.
ModelRMSEMAEMAPER2
BP3.812.9219.54%0.50
LSTM3.613.0720.81%0.55
Transformer-LSTM3.082.7321.94%0.67
Transformer-LSTM-SE2.642.1217.58%0.76
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhang, G.; Li, H.; Wang, L.; Wang, W.; Guo, J.; Qin, H.; Ni, X. Research on Medium- and Long-Term Hydropower Generation Forecasting Method Based on LSTM and Transformer. Energies 2024, 17, 5707. https://doi.org/10.3390/en17225707

AMA Style

Zhang G, Li H, Wang L, Wang W, Guo J, Qin H, Ni X. Research on Medium- and Long-Term Hydropower Generation Forecasting Method Based on LSTM and Transformer. Energies. 2024; 17(22):5707. https://doi.org/10.3390/en17225707

Chicago/Turabian Style

Zhang, Guoyong, Haochuan Li, Lingli Wang, Weiying Wang, Jun Guo, Hui Qin, and Xiu Ni. 2024. "Research on Medium- and Long-Term Hydropower Generation Forecasting Method Based on LSTM and Transformer" Energies 17, no. 22: 5707. https://doi.org/10.3390/en17225707

APA Style

Zhang, G., Li, H., Wang, L., Wang, W., Guo, J., Qin, H., & Ni, X. (2024). Research on Medium- and Long-Term Hydropower Generation Forecasting Method Based on LSTM and Transformer. Energies, 17(22), 5707. https://doi.org/10.3390/en17225707

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop