Citation: He, B.; Ma, R.; Zhang, W.;
Zhu, J.; Zhang, X. An Improved
Generating Energy Prediction
Method Based on Bi-LSTM and
Attention Mechanism. Electronics
2022, 11, 1885. https://doi.org/
10.3390/electronics11121885
Academic Editors:
Luis Hernández-Callejo and
Javid Taheri
Received: 18 April 2022
Accepted: 13 June 2022
Published: 15 June 2022
Publisher’s Note: MDPI stays neutral
with regard to jurisdictional claims in
published maps and institutional affil-
iations.
Copyright: © 2022 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/).
Article
An Improved Generating Energy Prediction Method Based on
Bi-LSTM and Attention Mechanism
Bo He
1
, Runze Ma
2
, Wenwei Zhang
2,3
, Jun Zhu
4,
* and Xingyuan Zhang
1,
*
1
Department of Polymer Science and Engineering, University of Science and Technology of China,
Hefei 230026, China; hebo01@zts.com.cn
2
Key Laboratory of Wireless Sensor Network and Communication of Chinese Academy of Sciences,
Shanghai Institute of Microsystem and Information Technology, Shanghai 201899, China;
marunze@mail.sim.ac.cn (R.M.); wenweizhang@mail.sim.ac.cn (W.Z.)
3
University of Chinese Academy of Sciences, Beijing 100049, China
4
Special Display and Imaging Technology Innovation Center of Anhui Province,
Academy of Opto-Electric Technology, Hefei University of Technology, Hefei 230009, China
* Correspondence: jzhu@hfut.edu.cn (J.Z.); zxym@ustc.edu.cn (X.Z.)
Abstract:
The energy generated by a photovoltaic power station is affected by environmental factors,
and the prediction of the generating energy would be helpful for power grid scheduling. Recently,
many power generation prediction models (PGPM) based on machine learning have been proposed,
but few existing methods use the attention mechanism to improve the prediction accuracy of gen-
erating energy. In the paper, a PGPM based on the Bi-LSTM model and attention mechanism was
proposed. Firstly, the environmental factors with respect to the generating energy were selected
through the Pearson coefficient, and then the principle and implementation of the proposed PGPM
were detailed. Finally, the performance of the proposed PGPM was evaluated through an actual data
set collected from a photovoltaic power station in Suzhou, China. The experimental results showed
that the prediction error of proposed PGPM was only 8.6 kWh, and the fitting accuracy was more
than 0.99, which is better than existing methods.
Keywords: Bi-LSTM; artificial neural networks; generating energy prediction
1. Introduction
The daily generating energy of a photovoltaic power station affects the power con-
sumption of the local area [
1
–
3
], while the photovoltaic power generation has a relationship
with environmental factors, such as sunshine duration, temperature, etc. Thus, the predic-
tion of the generating energy helps the local power grid system to improve foreseeability
and to create a proper generating schedule [
4
–
7
]. Since the main facility of a photovoltaic
power station works outdoors, the environmental factors would affect the device’s work-
ing state, making it meaningful to study this effect. For example, the characteristics of
temperature changes on the quality of output current in solar power plants are studied in
Indonesia [
8
]. In the global viewpoint, temperature and sunshine duration vary in different
countries around the world, which makes the characteristics of solar plants generation
different. It is a research focus to predict the generation based on environmental variation.
Generally, prediction is essentially a regression problem, the purpose of which is to
build the relationship between environmental factors and generating energy. Hence, the
machine learning-based methods have been widely used to achieve power generation
prediction, such as outage forecasting, wind power prediction, stability forecasting, peak
load prediction, etc.
The machine learning algorithm can treat big data efficiently [
9
], which can obtain
the optimal parameters for PGPMs based on a lot of historical data, as well as make a
prediction to generating energy through a trained model. Recently, the PGPMs based on
Electronics 2022, 11, 1885. https://doi.org/10.3390/electronics11121885 https://www.mdpi.com/journal/electronics