1. Introduction
Power load forecasting is based on the identification of multi-dimensional factors such as technology, economy, policy, and meteorology, and explores the impact mechanisms and the internal logical relationships of various related factors on the power load [
1]. Combining the evolutionary trend with the development law of historical power load data, an accurate and scientific prediction of future power load can be achieved. Power load forecasting can be further divided into medium- and long-term power load forecasts, short-term power load forecasts and ultra-short-term power load forecasts [
2]. Of these, the time scale of ultra-short-term power load forecasting is from 15 min to hours. Accurate ultra-short-term power load forecasting is helpful in solving problems such as real-time dispatching of the power system and real-time trading in the electricity market [
3].
Statistical theory and machine learning methods are commonly used in power load forecasting. The applied models mainly include the ARIMA [
4], the least squares support vector machine (LSSVM) [
5] and the random forest (RF) [
6]. With the continuous development of new power systems, the power consumption data of users present an exponential growth trend. The interaction between power sources, power grids, loads and energy storage is further enhanced, which greatly increases the diversity and randomness of user-side load requirements. Therefore, some scholars have introduced deep learning algorithms into power load forecasting to improve the forecasting accuracy. Muzaffar and Afshar [
7] proposed a multi-time-scale power load forecasting model based on a long short-term memory (LSTM) network model. Compared with models such as ARMA, SARIMA and ARMAX, it has a higher performance and prediction accuracy. Li et al. [
8] proposed an improved sequence-to-sequence gated recurrent unit (GRU) network, which improved the problems of recurrent neural network gradient disappearance, gradient descent and long LSTM calculation time.
However, the superiority of deep learning algorithms often needs to be reflected in large-capacity and high-volatility sample data. When dealing with small-sample data or data with relatively weak random volatility, the prediction accuracy does not produce significant improvements compared to the traditional statistical methods. Shah and Shroff [
9] sampled financial market data and found that the traditional ARIMA model had higher prediction accuracy in each dataset by comparing deep learning algorithms such as LSTM and Transformer. In addition, deep learning models often have a relatively complex spatial network structure, which means that the computational complexity and processing time of the model is greatly improved, but the effectiveness of the model is limited. Nevertheless, by carefully configuring the parameters and inputs of traditional machine learning models, their prediction accuracy and computational efficiency are often no less than deep learning algorithms. Elsayed et al. [
10] proposed an improved gradient boosting regression tree model in 2021. Through the refined configuration of the model input, its prediction accuracy and generalization ability are significantly better than those of eight deep learning prediction algorithms proposed at nine top computer conferences such as NeurIPS from 2016 to 2020.
In addition to the model, the selection of input indicators was also one of the key factors affecting the accuracy of power load forecasting. In the existing research, scholars mainly focused on meteorological factors and day-types. Tang et al. [
11] proposed an ultra-short-term power load prediction method based on an attention mechanism and a convolutional neural network. Meteorological indicators, such as temperature, humidity and precipitation, were selected as the input variables, which significantly reduced the prediction error. Zhu et al. [
12] proposed a hybrid prediction model based on a pattern sequence-based matching method and an extreme gradient boosting which significantly improved the forecasting accuracy through introducing influencing factors such as meteorological indicators and day-types. However, with the continuous development of an electricity spot market, the number of market transaction entities has gradually increased [
13]. The introduction of the market-based electricity price mechanism will have a significant impact on the electricity consumption behavior and habits of users, which will make it more difficult to deduce the characteristics of the diversified transaction behaviors of transaction entities, and will increase the difficulty of electricity load forecasting in the spot market environment [
14,
15]. Therefore, to improve the accuracy of power load forecasting, it is necessary to further consider the impact of real-time electricity prices on power load.
Based on previous research, this paper proposes an ultra-short-term power load forecasting method based on the real-time electricity price and a window-based XGBoost model. On the one hand, by windowing the traditional XGBoost model, the multi-dimensional input variables are converted into a one-dimensional reconstruction vector, which not only reduces the complexity of the model, but also helps the model to capture the autocorrelation effect of the predicted object. On the other hand, by introducing real-time electricity prices, the forecasting accuracy of the ultra-short-term power load forecasting model is significantly improved. The simulation analysis was carried out using actual data from the national electricity market of Singapore (NEMS). The superiority and feasibility of the model proposed in this paper are verified by comparing it with several deep learning algorithms.
The structure of this study is as follows.
Section 2 introduces the methodology applied in this paper.
Section 3 illustrates the model construction and data preprocessing.
Section 4 introduces the case study, and the conclusions are given in
Section 5.
4. Case Study
4.1. Parameter Setting
The computer used in the empirical analysis had an i7-1185G7 processor, 32 GB memory, and the simulation platform was Python 3.10.2. The parameter setting of the window-based XGBoost model is listed in
Table 2 as follows:
To reflect the superiority of the ultra-short-term forecasting model proposed in this paper, two scenarios, “without considering the real-time electricity price” and “considering the real-time electricity price”, are set up, respectively. In the first scenario, the traditional load influencing factors such as temperature and humidity are taken into consideration, while, in the second scenario, we additionally consider the impact of real-time electricity prices, and use real-time electricity price data as one of the input indicators of the model. The essential difference between the two scenarios is whether the influencing factors cover the real-time electricity price, and other parameter settings remain unchanged.
The prediction accuracy of the XGBoost(W-b) model proposed in this paper is verified by comparing it with several other existing models, including: persistence method, machine learning models (LSSVM and BP network), advanced deep learning algorithms (LSTM and GRU) and the original XGBoost model, and the parameters of the compared models are listed in
Table 3. From these, the persistence method is often utilized to establish reference (baseline) models which can then be used for comparison. Since the power load often exhibits obvious periodicity and regularity, the model can be used as a baseline for analysis [
20,
21]. The persistence method of load forecasting can be described as:
where
represents the actual value at time
. Considering the periodic characteristics of the load data, we set
to be 1 day (24 h), 7 days (168 h) and 30 days (720 h), respectively.
The parameters of the other compared models are set according to the relevant literature. Of which, the of LSTM and GRU are set the same as the one of XGBoost, and the of LSTM and GRU are set to the same value to ensure consistency (parameters not mentioned are set to default values).
At the same time, to reflect the wider applicability of the model, a sensitivity analysis of the model and the three comparative models are carried out to study the changes in the prediction accuracy of each model when using the sample sizes 5000, 10,000, 20,000 and 30,000.
4.2. Model Prediction Accuracy Based on Persistence Method (Baseline Analysis)
The prediction results and prediction accuracy of persistence method are shown in
Figure 3 and
Table 4.
As can be seen from
Figure 3 and
Table 4, load forecasting based on the persistence method can learn the historical evolution law of power load, which has a relatively good performance, especially when
.
4.3. Comparison of Model Prediction Accuracy without Considering Real-Time Electricity Prices
Without considering the real-time electricity price, the prediction results and prediction accuracy of each model are shown in
Figure 4 and
Table 5. Too much data can prevent the clear visualization of the forecast results, so we display the forecast results for the last 100 h separately. The load forecasting part considering the real-time electricity price is the same as the processing method here, and will not be repeated.
It can be seen that, without considering the real-time electricity price, the prediction accuracy ranking of each model is: XGBoost(W-b) > GRU > LSTM > XGBoost > LSSVM > BP. From the MAE point of view, the prediction errors of the XGBoost(W-b) model proposed in this paper are reduced by 90.80%, 91.21%, 86.20%, 67.00% and 65.61%, respectively, compared with the other five models. Meanwhile, we also find that the prediction effect of most models is even lower than the persistence method when the real-time electricity price is not considered. This means that real-time electricity price factors need to be taken into account. In addition, the proposed model is only slightly longer than BP in terms of computation time, which is a significant improvement compared to the other deep learning algorithms.
4.4. Comparison of Model Prediction Accuracy Considering Real-Time Electricity Prices
Considering the real-time electricity price, the prediction results and prediction accuracy of each model are shown in
Figure 5 and
Table 6:
It can be seen that when considering the real-time electricity price, the prediction accuracy ranking of each model is: XGBoost(W-b) > GRU > LSTM > XGBoost > LSSVM > BP (except that the RMSE of the GRU model is slightly lower than XGBoost(W-b)). From the MAE point of view, the prediction errors of the XGBoost(W-b) model proposed in this paper are reduced by 96.67%, 96.98%, 87.63%, 55.66% and 14.28%, respectively, compared with the other three models. Meanwhile, the computation time of other models is greatly improved due to the increase in the dimension of the input metrics. However, through the windowing method in this paper, even if the real-time electricity price is considered, it does not increase the complexity of the model calculation.
4.5. Sensitivity Analysis
To further verify the applicability of the models proposed in this paper, a sensitivity analysis of each model was carried out. To simplify the analysis, only the changes in MAPE of each model after the sample size change is shown. The results are shown in
Figure 6:
As can be seen from
Figure 6, the XGBoost(W-b) model proposed in this paper has better performance in most cases. Whether shrinking or expanding the sample size, the prediction error of the model is smaller than that of the traditional XGBoost model and the deep learning algorithm LSTM model. In addition, compared with the GRU model, the model proposed in this paper has a slightly insufficient prediction accuracy when the sample size is expanded to 20,000, but still maintains a high prediction accuracy under other sample sizes. In contrast, traditional machine learning models (LSSVM and BP) seem to perform unsatisfactorily on different sample sizes.