Keywords

1 Introduction

Electricity power plants require efficient load balancing that heavily depends on electricity consumption. Future forecast based on historical data can provide insight for future so the government and power plant can take decision to balance demand and supply chain. Statistical analysis can provide simple solution in terms of computation and short-term prediction but heavily suffer from data preprocessing like stationarity issue. Neural networks on the other hand can provide a model based on various parameters that can be tuned and applied in the real-world scenario for better accuracy.

Forecasting of electricity consumption can provide future insights so power plant can manage their electricity production, which can save the resources for holding the economy. This can directly impact on the prices of other fuel resources like gasoline and liquefied petroleum gas [1]. This emphasizes and motivates us to find better forecasting model that can predict future values effectively. In this study, the authors conducted comprehensive models for related dataset. Authors identified the hyperparameters for models, conducted experiments, and compared results based on RMSE metrics. These models provide enough insights for the dataset to get more accurate forecasting. Authors also contributed more by combining LSTM with Bi-LSTM to create a new model to forecast and analyze the electricity consumption. The structure of the paper is as follows: Section 2 provides related work about neural networks. Section 3 provides material and methods that have been used while conducting this study. Section 4 provides information of the experiments and discusses certain results that are observed. Furthermore, results are discussed for future work.

2 Literature Review

Neural networks are mostly renown for image processing especially in medical image processing. Different models with certain parameters have to be analyzed to determine the best outcomes. The study of [2] shows good progress in terms of medical image processing as they analyze 5 thousand to 160 million parameters with a certain number of layers to evaluate their large scale dataset, which eventually helps in computer aided vision (CAD). Neural networks can help in understanding the personality dynamics and can determine state of personality is stable or not [3] and what are the variables that can affect the personality variable. Photovoltaic (PV) integration can help in economic growth as it is a promising source of renewable energy that thus requires prediction and forecasting to help in taking future decision. Forecasting PV based data can be done by neural network model named as LSTM. LSTM-RNN is analyzed by Abdel-Nasser and Mahmoud [4], which can determine temporal changes in PV output and can be evaluated through hourly dataset for a year. Electricity being considered as a key role player in the economy thus studied by many researchers with different models and approaches. An approach used by Bouktif et al. [5] utilizes LSTM along with genetic algorithm to get better results and performance with time series data for short-term and long-term forecasting. Further improvement in forecasting with LSTM is done in article from [6] where author combined the CNN with Bi-LSTM to get better forecasting result for electricity for households. Considering electricity plays an essential role, [7] also propose a model with LSTM that is capable of forecasting load for single residential as there are certain other parameters that are involved. They proposed a framework with LSTM and evaluated the framework with real residential smart meter data. Residential usage is considered to be important, and many researchers are looking deeper to find patterns in residential electricity usage. Forecasting long-term electricity demand for residential user is also affected by other variables. As electricity demand and supply forecasting is divided into short, mid-, and long term, researchers are getting their hands-on granularity data to forecast hourly and daily with the help of artificial neural network. Modeling with granularity is quite challenging as shown by Rodrigues et al. [8]. Recurrent neural networks (RNN) can be used for dynamic modeling for the non-linear data. Data plays an important role in overall modeling and experimentation, so [9] make simple modification into RNN to work along with non-linear spatio-temporal data for forecasting applications. Computational time is also an important factor in the overall forecasting process, and time factor can be heavily improved if we decrease the number of variables as [10, 11] did it in their study by relying only on past data of solar energy consumption.

3 Material and Methods

We have chosen core i7 processor along with NVIDIA GPU with 8 GB memory, in terms of hardware utilized, to speed up the computational time. To develop prediction models, we have used Python along with Python integrated environment along with TensorFlow and Keras libraries for neural network and statsmodels’ libraries to implement statistical models (Table 1).

Table 1 Abbreviation table

4 Building the Forecasting

We have tested neural network model with Bi-LSTM layer with 50 units along with LSTM layer with 25 units. We choose loss as our model evaluation metrics with mean squared error (Fig. 1).

Fig. 1
figure 1

LSTM results

4.1 LSTM

LSTM requires data reshaping according to samples, timestamps, and feature. Data has been reshaped accordingly and sent to two layers of LSTM and is configured with 50 neurons to boost the learning process. RELu activation function has been used with return_sequences equal to true so data can be passed from one layer to another. After 200 epochs, we got a train score 0.15 RMSE and a test score 0.21 RMSE.

Figure 2 shows the LSTM result with 120 observations 70–30%. Seventy percent for training and 30% for test.

Fig. 2
figure 2

LSTM model loss

4.2 Bi-LSTM-LSTM Model

Our experimentations also include combined model of Bi-LSTM and LSTM layers. Configuration is the same as we have utilized for our previous models’ experimentation. We have used one layer of Bi-LSTM and one layer of LSTM for this experimentation. After 50 epochs, we get a training score as 0.15 RMSE and a testing score as 0.26 RMSE.

Figure 3 shows the results of the model for training and testing for 120 observations, while Fig. 4 shows the model loss. It can be seen that model loss is fluctuating as compared to Bi-LSTM model and trend can be seen to go downward. This means over the time this model will produce less loss. Like other models, this model can also be re-tuned to work for mid-term forecasting applications.

Fig. 3
figure 3

Bi-LSTM-LSTM results

Fig. 4
figure 4

Model loss

5 Conclusions

The main focus of the study is to determine the performance of LSTM and Bi-LSTM with LSTM layers in neural networks time series prediction. To compare all the models, we maintain the consistency of hyperparameters so comparison can be most realistic. This study will expand to find results from different neural network models that are applicable in time series prediction. Our model shows RMSE scores of 0.15 on training and 0.19 for testing with tuning hyperparameters that are in process of tuning for better accuracy and less loss. In future, we are planning to extend our study to build a model that can perform better with provided dataset.