Study on Short-Term Electricity Load Forecasting Based on the Modified Simplex Approach Sparrow Search Algorithm Mixed with a Bidirectional Long- and Short-Term Memory Network
Abstract
:1. Introduction
2. Long- and Short-Term Memory Networks
3. Bidirectional Long- and Short-Term Memory Networks
4. Improving Sparrow Search Algorithm to Optimize Bidirectional Long- and Short-Term Memory Networks
4.1. Principles of Sparrow Search Algorithm
4.2. Improved Sparrow Search Algorithm
- (1)
- Improving the search mechanism
- (2)
- Improving the detection mechanism
- (3)
- Introduction of simplex mechanism
- (4)
- Improving Sparrow Search Algorithm Flow
4.3. Improved Sparrow Search Algorithm Performance Test Simulation
- (1)
- Test Functions
- (2)
- Comparison of algorithms
4.4. Construction of SMSSA-BiLSTM Models
- (1)
- Establish the BiLSTM network model’s structure, including how many nodes are in each input layer, how many layers are in the hidden layer, and how many nodes are in the output layer. The number of nodes in the hidden layer is obtained by utilizing an optimization algorithm to determine which is the best.
- (2)
- The SMSSA method is used to maximize the learning rate, number of trainings, and number of nodes in the BiLSTM network’s hidden layer.
- (3)
- The optimized model is used to estimate the real load and assess the performance of the model.
4.5. Prediction Process of SMSSA-BiLSTM Model
- (1)
- Determine the initial parameters of the model. Determine the sparrow population size N, the maximum number of iterations , the upper bound ub and lower bound lb of the population search, the dimension d, and the proportion of discoverers P. Use a random function to determine the sparrow’s starting location. Count the number of nodes in the BiLSTM network’s input and output layers as well as the number of hidden layers.
- (2)
- Determine each sparrow’s specific adaptations and note where the best, worst, and suboptimal adaptations are found, , and , as well as their adaptation values, , and .
- (3)
- The sparrow’s position is updated by the finder, follower, and warning formulas, and the hyperparameters constrained by the boundary function are passed into the BiLSTM prediction model to return the adaptation values. Replaces are made if the current sparrow position’s ideal adaptation value is greater than the optimal position’s adaptation value; otherwise, nothing changes.
- (4)
- Determine if the algorithm has finished. If the number of iterations reaches the maximum number of iterations and model accuracy, output the location of the ideal population, feed the acquired parameters back to the BiLSTM prediction model, and predict the trained optimization model on the original data to obtain the result.
5. Simulation Analysis
5.1. Data Selection and Simulation Environment
- (1)
- Selection of data
- (2)
- Simulation environment
- (3)
- Error evaluation metrics
5.2. Simulation Process and Analysis
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Wang, K.; Zhang, J.; Li, X.; Zhang, Y. Long-Term Power Load Forecasting Using LSTM-Informer with Ensemble Learning. Electronics 2023, 12, 2175. [Google Scholar] [CrossRef]
- Li, J.; Lei, Y.; Yang, S. Mid-long term load forecasting model based on support vector machine optimized by improved sparrow search algorithm. Energy Rep. 2022, 8, 491–497. [Google Scholar] [CrossRef]
- Ciechulski, T.; Osowski, S. High Precision LSTM Model for Short-Time Load Forecasting in Power Systems. Energies 2021, 11, 2983. [Google Scholar] [CrossRef]
- Cui, C.; He, M.; Di, F.; Lu, Y.; Dai, Y.; Lv, F. Research on power load forecasting method based on LSTM model. In Proceedigns of the 2020 IEEE 5th Information Technology and Mechatronics Engineering Conference (ITOEC), Chongqing, China, 12–14 June 2020. [Google Scholar]
- Butt, F.M.; Hussain, L.; Jafri, S.H.M.; Alshahrani, H.M.; Al-Wesabi, F.N.; Lone, K.J.; El Din, E.M.T.; Duhayyim, M.A. Intelligence based Accurate Medium and Long Term Load Forecasting System. Appl. Artif. Intell. 2022, 36, 2089. [Google Scholar] [CrossRef]
- Jin, Y.; Guo, H.; Wang, J.; Song, A. A hybrid system based on LSTM for short-term power load forecasting. Energies 2020, 13, 6241. [Google Scholar] [CrossRef]
- Kwon, B.; Park, R.; Song, K. Short-term load forecasting based on deep neural networks using LSTM layer. J. Electr. Eng. Technol. 2020, 15, 1501–1509. [Google Scholar] [CrossRef]
- Rafi, S.H.; Masood, N.A.; Deeba, S.R.; Hossain, E. A short-term load forecasting method using integrated CNN and LSTM network. IEEE Access 2020, 9, 32436–32448. [Google Scholar] [CrossRef]
- Chao, H.; Lin, F.; Pan, J.; Chien, W.; Lai, C. Power Load Forecasting Based on VMD and Attention-LSTM. In Proceedings of the 3rd International Conference on Data Science and Information Technology, Xiamen, China, 24–26 July 2020. [Google Scholar]
- Yang, J.; Zhang, X.; Bao, Y. Short-term Load Forecasting of Central China based on DPSO-LSTM. In Proceedings of the 2021 IEEE 4th International Electrical and Energy Conference (CIEEC), Wuhan, China, 28–30 May 2021. [Google Scholar]
- Siami-Namini, S.; Tavakoli, N.; Namin, A.S. The performance of LSTM and BiLSTM in forecasting time series. In Proceedings of the 2019 IEEE International Conference on Big Data (Big Data), Los Angeles, CA, USA, 9–12 December 2019. [Google Scholar]
- Yan, L.; Zhang, H. A Variant Model Based on BiLSTM for Electricity Load Prediction. In Proceedings of the 2021 IEEE International Conference on Power, Intelligent Computing and Systems (ICPICS), Shenyang, China, 29–31 July 2021. [Google Scholar]
- Wang, Z.; Jia, L.; Ren, C. Attention-Bidirectional LSTM Based Short Term Power Load Forecasting. In Proceedings of the 2021 Power System and Green Energy Conference (PSGEC), Shanghai, China, 20–22 August 2021. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
- Graves, A. Connectionist temporal classification. In Supervised Sequence Labelling with Recurrent Neural Networks; Springer: Berlin/Heidelberg, Germany, 2012; pp. 61–93. [Google Scholar]
- Wang, Y.; Sun, S.; Cai, Z. Daily Peak-Valley Electric-Load Forecasting Based on an SSA-LSTM-RF Algorithm. Energies 2023, 16, 7964. [Google Scholar] [CrossRef]
- Zhong, B. Deep learning integration optimization of electric energy load forecasting and market price based on the ANN–LSTM–transformer method. Front. Energy Res. 2023, 11, 1292204. [Google Scholar] [CrossRef]
- Liu, G.; Guo, J. Bidirectional LSTM with attention mechanism and convolutional layer for text classification. Neurocomputing 2019, 337, 325–338. [Google Scholar] [CrossRef]
- Li, Z.; Hu, R.; Liu, X.; Deng, Y.; Tang, P.; Wang, Y. Multi-factor short-term load forecasting model based on PCA-DBILSTM. Proc. CSU-EPSA 2020, 32, 32–39. [Google Scholar]
- Gong, P.; Luo, Y.; Fang, Z.; Dou, F. Short-term power load forecasting method based on Attention-BiLSTM-LSTM neural network. J. Comput. Appl. 2021, 41, 81–86. [Google Scholar]
- Xue, J.; Shen, B. A novel swarm intelligence optimization approach: Sparrow search algorithm. Syst. Sci. Control Eng. 2020, 8, 22–34. [Google Scholar] [CrossRef]
- Liu, C.; He, Q. Simplex-guided sparrow search algorithm with improved search mechanism. Comput. Eng. Sci. 2021, 44, 2238–2245. [Google Scholar]
- Yaprakdal, F.; Arısoy, M.V. A Multivariate Time Series Analysis of Electrical Load Forecasting Based on a Hybrid Feature Selection Approach and Explainable Deep Learning. Appl. Sci. 2023, 13, 12946. [Google Scholar] [CrossRef]
- Alghamdi, H.; Hafeez, G.; Ali, S.; Ullah, S.; Khan, M.I.; Murawwat, S.; Hua, L. An Integrated Model of Deep Learning and Heuristic Algorithm for Load Forecasting in Smart Grid. Mathematics 2023, 11, 4561. [Google Scholar] [CrossRef]
Test Function | Dimension | Space Search | Target Value |
---|---|---|---|
Sphere | 20 | (−100, 100) | 0.0 |
Griewank | 20 | (−600, 600) | 0.0 |
Rastrigin | 20 | (−5.12, 5.12) | 0.0 |
Test Function | Arithmetic | Theoretical Optimum | Average Value | Standard Deviation |
---|---|---|---|---|
Sphere | SSA | 0 | 1.18 × 10−25 | 3.76 × 10−25 |
SMSSA | 0 | 6.23 × 10−34 | 3.19 × 10−34 | |
Griewank | SSA | 0 | 3.76 × 10−12 | 3.72 × 10−12 |
SMSSA | 0 | 7.22 × 10−15 | 6.38 × 10−15 | |
Ristrigin | SSA | 0 | 1.58 × 10−11 | 5.00 × 10−11 |
SMSSA | 0 | 3.29 × 10−13 | 1.28 × 10−13 |
Sampling Point | Actual Value (MW) | PSO-BiLSTM (MW) | SSA-BiLSTM (MW) | SMSSA-BiLSTM (MW) |
---|---|---|---|---|
1 | 3048 | 2747.11 | 2903.35 | 3123.14 |
2 | 3067 | 2909.45 | 3066.95 | 3131.26 |
3 | 3052 | 2958.33 | 3046.46 | 3103.63 |
4 | 3029 | 2961.12 | 3046.35 | 3121.46 |
5 | 3025 | 2988.31 | 2972.88 | 3099.32 |
6 | 3016 | 2997.53 | 2895.25 | 3066.20 |
7 | 3019 | 2947.23 | 2831.53 | 3070.89 |
8 | 3001 | 2985.50 | 2817.96 | 2947.12 |
9 | 2959 | 2992.92 | 2832.80 | 2897.79 |
10 | 2927 | 3012.80 | 2922.70 | 2936.87 |
11 | 2953 | 3010.87 | 2898.15 | 2939.44 |
12 | 2929 | 2972.52 | 2945.42 | 3005.58 |
13 | 2927 | 2922.96 | 3011.40 | 3026.32 |
14 | 2911 | 2886.00 | 3046.37 | 3001.41 |
15 | 2887 | 2804.23 | 2924.19 | 2917.03 |
16 | 2906 | 2678.05 | 3046.82 | 2864.42 |
17 | 2904 | 2657.74 | 3010.11 | 2817.48 |
18 | 2917 | 2686.11 | 3012.36 | 2849.18 |
19 | 2908 | 2737.43 | 3018.44 | 2828.40 |
20 | 2918 | 2821.99 | 3058.16 | 2832.48 |
21 | 2937 | 2954.65 | 3027.39 | 2852.91 |
22 | 2944 | 3076.14 | 3102.34 | 2903.58 |
23 | 2981 | 3164.35 | 3022.83 | 2896.01 |
24 | 2998 | 3272.54 | 2969.08 | 2988.25 |
25 | 3095 | 3374.65 | 3029.18 | 3046.53 |
26 | 3198 | 3411.10 | 3018.59 | 3155.55 |
27 | 3230 | 3393.57 | 2966.55 | 3207.54 |
28 | 3252 | 3395.72 | 3109.89 | 3293.16 |
29 | 3296 | 3430.21 | 3191.35 | 3327.88 |
30 | 3300 | 3493.47 | 3338.41 | 3458.48 |
31 | 3437 | 3588.89 | 3435.89 | 3555.30 |
32 | 3669 | 3704.28 | 3627.80 | 3677.18 |
33 | 3723 | 3803.90 | 3771.55 | 3800.62 |
34 | 3824 | 3935.53 | 3948.94 | 3936.64 |
35 | 3956 | 3982.81 | 3947.52 | 4063.60 |
36 | 4035 | 4090.46 | 4048.83 | 4103.73 |
37 | 4057 | 4139.46 | 4077.96 | 4159.73 |
38 | 4105 | 4241.07 | 4037.80 | 4220.50 |
39 | 4180 | 4271.11 | 4014.56 | 4246.69 |
40 | 4164 | 4248.36 | 4015.98 | 4186.14 |
41 | 4201 | 4198.59 | 4028.03 | 4188.56 |
42 | 4160 | 4220.04 | 4017.73 | 4096.38 |
43 | 4103 | 4035.01 | 3918.28 | 3974.41 |
44 | 4067 | 3901.14 | 3855.39 | 3917.36 |
45 | 3827 | 3874.28 | 3721.49 | 3776.09 |
46 | 3685 | 3744.66 | 3581.93 | 3679.55 |
47 | 3509 | 3686.84 | 3535.65 | 3632.12 |
48 | 3595 | 3688.05 | 3610.30 | 3684.94 |
49 | 3681 | 3673.98 | 3564.26 | 3709.10 |
50 | 3847 | 3639.41 | 3682.40 | 3817.39 |
51 | 3879 | 3655.12 | 3787.28 | 3823.51 |
52 | 3946 | 3666.19 | 3774.13 | 3929.55 |
53 | 3980 | 3699.21 | 3724.60 | 3915.93 |
54 | 3977 | 3726.61 | 3789.13 | 3910.37 |
55 | 3922 | 3726.48 | 3804.39 | 3984.26 |
56 | 3896 | 3857.93 | 3850.61 | 3997.45 |
57 | 3967 | 3897.54 | 3906.38 | 4019.75 |
58 | 3910 | 3927.59 | 4012.46 | 4080.65 |
59 | 3993 | 3909.16 | 4010.41 | 4093.94 |
60 | 3953 | 3938.80 | 3957.31 | 4060.62 |
61 | 3886 | 3860.73 | 3859.73 | 4104.93 |
62 | 3941 | 3917.16 | 3803.81 | 4027.03 |
63 | 3973 | 3940.04 | 3749.71 | 4032.20 |
64 | 3963 | 4004.98 | 3794.97 | 4019.75 |
65 | 3986 | 3937.14 | 3801.11 | 4021.05 |
66 | 3939 | 3949.48 | 3821.72 | 4057.08 |
67 | 3874 | 3880.77 | 3839.87 | 4058.12 |
68 | 3892 | 3825.82 | 3749.89 | 3982.33 |
69 | 3732 | 3740.79 | 3623.82 | 3896.62 |
70 | 3589 | 3814.75 | 3573.08 | 3857.26 |
71 | 3575 | 3826.02 | 3542.31 | 3734.95 |
72 | 3623 | 3734.69 | 3554.83 | 3645.18 |
73 | 3665 | 3770.85 | 3650.56 | 3618.00 |
74 | 3626 | 3769.68 | 3695.80 | 3600.15 |
75 | 3664 | 3665.84 | 3784.51 | 3613.52 |
76 | 3753 | 3550.13 | 3781.90 | 3620.93 |
77 | 3717 | 3568.19 | 3805.00 | 3692.27 |
78 | 3743 | 3495.66 | 3771.43 | 3729.30 |
79 | 3705 | 3424.45 | 3715.54 | 3775.04 |
80 | 3673 | 3432.33 | 3625.07 | 3739.84 |
81 | 3599 | 3457.64 | 3639.64 | 3709.07 |
82 | 3645 | 3490.29 | 3515.21 | 3651.94 |
83 | 3605 | 3521.31 | 3415.00 | 3642.90 |
84 | 3537 | 3623.05 | 3404.88 | 3587.46 |
85 | 3544 | 3643.25 | 3371.99 | 3510.71 |
86 | 3581 | 3692.53 | 3364.86 | 3492.24 |
87 | 3521 | 3703.73 | 3410.67 | 3504.95 |
88 | 3492 | 3701.34 | 3469.24 | 3393.38 |
89 | 3425 | 3610.68 | 3431.17 | 3383.56 |
90 | 3342 | 3620.40 | 3487.35 | 3323.01 |
91 | 3319 | 3472.42 | 3410.15 | 3233.84 |
92 | 3233 | 3354.25 | 3247.19 | 3119.12 |
93 | 3155 | 3242.35 | 3129.31 | 3051.70 |
94 | 3126 | 3240.47 | 3105.42 | 3027.70 |
95 | 3064 | 3198.01 | 2933.46 | 3059.66 |
96 | 3019 | 3280.52 | 3041.63 | 3259.66 |
Errors | PSO-BiLSTM | SSA-BiLSTM | SMSSA-BiLSTM | |
---|---|---|---|---|
first type | RMSE | 147.7229 | 114.5868 | 90.1895 |
MAE | 121.1514 | 93.2343 | 74.3971 | |
MAPE | 3.54% | 2.72% | 2.10% | |
second type | RMSE | 156.6372 | 143.8687 | 115.0086 |
MAE | 119.8673 | 115.3176 | 92.1552 | |
MAPE | 3.10% | 2.85% | 2.28% |
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. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhang, C.; Zhang, F.; Gou, F.; Cao, W. Study on Short-Term Electricity Load Forecasting Based on the Modified Simplex Approach Sparrow Search Algorithm Mixed with a Bidirectional Long- and Short-Term Memory Network. Processes 2024, 12, 1796. https://doi.org/10.3390/pr12091796
Zhang C, Zhang F, Gou F, Cao W. Study on Short-Term Electricity Load Forecasting Based on the Modified Simplex Approach Sparrow Search Algorithm Mixed with a Bidirectional Long- and Short-Term Memory Network. Processes. 2024; 12(9):1796. https://doi.org/10.3390/pr12091796
Chicago/Turabian StyleZhang, Chenjun, Fuqian Zhang, Fuyang Gou, and Wensi Cao. 2024. "Study on Short-Term Electricity Load Forecasting Based on the Modified Simplex Approach Sparrow Search Algorithm Mixed with a Bidirectional Long- and Short-Term Memory Network" Processes 12, no. 9: 1796. https://doi.org/10.3390/pr12091796