Optimal Load Dispatch of Community Microgrid
Optimal Load Dispatch of Community Microgrid
Optimal load dispatch of community microgrid with deep learning based solar
power and load forecasting
PII: S0360-5442(19)30077-5
DOI: 10.1016/j.energy.2019.01.075
Please cite this article as: Lulu Wen, Kaile Zhou, Shanlin Yang, Xinhui Lu, Optimal load dispatch of
community microgrid with deep learning based solar power and load forecasting, Energy (2019),
doi: 10.1016/j.energy.2019.01.075
This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to
our customers we are providing this early version of the manuscript. The manuscript will undergo
copyediting, typesetting, and review of the resulting proof before it is published in its final form.
Please note that during the production process errors may be discovered which could affect the
content, and all legal disclaimers that apply to the journal pertain.
ACCEPTED MANUSCRIPT
Lulu Wen a,b, Kaile Zhou a,b,c*, Shanlin Yang a,b*, Xinhui Lu a,b
b. Key Laboratory of Process Optimization and Intelligent Decision-making of Ministry of Education, Hefei
Abstract: A deep recurrent neural network with long short-term memory units (DRNN-LSTM)
model is developed to forecast aggregated power load and the photovoltaic (PV) power output in
community microgrid. Meanwhile, an optimal load dispatch model for grid-connected community
microgrid which includes residential power load, PV arrays, electric vehicles (EVs), and energy
storage system (ESS), is established under three different scheduling scenarios. To promote the
supply-demand balance, the uncertainties of both residential power load and PV power output are
considered in the model by integrating the forecasting results. Two real-world data sets are used to
test the proposed forecasting model, and the results show that the DRNN-LSTM model performs
better than multi-layer perception (MLP) network and support vector machine (SVM). Finally,
particle swarm optimization (PSO) algorithm is used to optimize the load dispatch of grid-connected
community microgrid. The results show that EES and the coordinated charging mode of EVs can
promote peak load shifting and reduce 8.97% of the daily costs. This study contributes to the optimal
* Corresponding authors.
E-mail addresses: [email protected] (K. Zhou), [email protected] (S. Yang).
1
ACCEPTED MANUSCRIPT
load dispatch of community microgrid with load and renewable energy forecasting. The optimal
load dispatch of community microgrid with deep learning based solar power and load forecasting
Keywords: Optimal load dispatch; community microgrid; load forecasting; solar power; deep
learning
1. Introduction
Energy and environmental issues are two major challenges for global sustainable development
[1]. In most countries, power supply still mainly relies on the combustion of traditional fossil fuels
which has brought serious environmental problems [2]. At the same time, electricity consumption
has increased significantly with the explosive growth of population and the rapid development of
economy, especially for the residential electricity consumption which shows an increasing trend and
has approximately accounted for 18.68% of total electricity consumption in China by 2014 [3].
In recent years, a new generation of smart grid system has been proposed and developed rapidly
to deal with these challenges [4]. As a part of smart grid, microgrid is a cluster of various distributed
generators (DGs), energy storage system (ESS), loads, and other monitoring and protection devices
[5]. A microgrid can meet more flexible and personalized power demand of a local area. By
interacting with the main power grid, it can significantly improve the energy efficiency [6].
Meanwhile, it can also promote the local consumption of distributed energy resources, thus
alleviating environmental pressures. According to whether microgrid interact with the main power
grid or not, there are mainly two operation modes, i.e. islanded mode and grid-connected mode [7].
With the wide deployment of intermittent renewable energy and the integration of increasingly
2
ACCEPTED MANUSCRIPT
diverse loads in microgrid, microgrid energy management has drawn great attention [8]. Microgrid
energy management aims at promoting supply-demand balance, reducing operational costs and
pollutant emissions, and improving power system stability through the optimal dispatch of power
generation resources and demand-side loads etc. [9, 10]. The simplest dispatch model of community
microgrid only includes DGs (e.g. micro turbine and diesel generator) and loads [6]. Currently, the
studies on optimal load dispatch of community microgrid are becoming increasingly complex to
meet actual needs by considering more components. In order to reduce pollutant emissions caused
by conventional power generation and integrate renewable energy more efficiently, several
researches started to explore the community microgrid which contains renewable energy resources
[11, 12]. Meanwhile, with the development of battery related technologies, the cost of energy
storage is falling [13]. More and more studies attempt to explore the optimization of community
microgrid that contains ESS and electric vehicles (EVs) [14, 15].
ESS can smooth the output of renewable energy resources and shift the peak load in community
microgrid, thereby contributing to improve the stability of power system and reduce pollutant
emissions [16]. It has been an essential object in community microgrid load dispatch. In Ref. [14],
the authors evaluated the economics of providing demand response under a realistic tariff using a
range of storage technologies. The dynamic economic emission dispatch problem of microgrid
incorporating energy storage system was further explored in Ref. [17]. In order to integrate
renewable energy flexibly, Ansari et al. [18] investigated the optimal scheduling of battery storage
in distribution system with high photovoltaic (PV) arrays penetration. As for EVs, they are
important components in community microgrid for optimizing load dispatch, as they are regarded
as an effective way to reduce electricity consumption cost and improve stability of power system
3
ACCEPTED MANUSCRIPT
through reasonable arrangement of charging and discharging activities. In Ref. [19], a novel
charging management strategy was proposed to reduce the negative effects of EVs on power system
stability. Moreover, Liu et al. [20] developed a load dispatch model to integrate the renewable
energy source using EVs as an ESS. There are also some research efforts that have focused on the
load dispatch optimization of community microgrid that contains plug-in hybrid EVs [21, 22].
However, few works have researched the community microgrid which contains power load,
renewable energy resources, EVs, and ESS simultaneously to meet future needs in more complex
context.
The inherent randomness and volatility of renewable energy pose many challenges to the load
dispatch of community microgrid. Therefore, a variety of studies has considered the intermittence
of renewable energy in the load dispatch model of microgrid [12, 23]. For instance, in Ref. [12], the
authors presented a robust optimization method considering disturbances of solar power for
scheduling microgrid economically. At the same time, some data driven methods have been used to
forecasting renewable energy, and thus to determine the uncertainty and provide the insights for
scheduling power load [23, 24]. However, these papers just considered the uncertainty of renewable
energy resources (i.e. supply side) in microgrid. The uncertainty and volatility of power load (i.e.
demand side) which can affect supply-demand balance, are rarely taken into account.
In traditional load dispatch model of community microgrid, residential power load is usually
given directly. Few studies considered the uncertainty and volatility of load demand which plays an
important role in promoting interaction and balance between supply and demand. Accurate load
forecasting which can present the load variation over a period in future, has provided the possibility
for matching supply and demand in community microgrid. Several methods, such as support vector
4
ACCEPTED MANUSCRIPT
machine (SVM), artificial neural network (ANN), statistical regression (SR), grey model (GM),
decision tree (DR), and evolution algorithm (EA), have been used for load forecasting [25-27]. For
instance, in Ref. [28], the authors predicted air conditioning load using a SVM model with
parameters obtained through modified simulated annealing optimization. A decision tree was
employed to forecast building energy demand levels with various variables in Ref. [29]. In addition,
Kaboli et al. [30] presented an optimized gene expression programming to forecast long-term
electricity consumption. There are also some research efforts focused on the load forecasting using
SR and GM [31-33]. Nevertheless, these methods have certain limitation in learning the internal
relationship between residential power load and other factors, as well as in achieving more accurate
forecasting results. Since ANN can model more complex relations between power load and related
variables compared with other methods, it has been wildly used in the forecasting of residential
power load [34, 35]. However, general neural networks usually have weak learning ability and
cannot consider the time dependencies in power load profile, thus failing to achieve the best
forecasting results. Therefore, it is necessary to develop a deep neural network model which
performs better in feature representation and mapping as well as considers the time dependencies.
Overall, few of previous studies considered the uncertainties of renewable energy resources and
power load simultaneously. Besides, current forecasting methods have difficulty in achieving more
accurate forecasting results. To promote the balance and interaction between supply and demand
sides, both the volatility of renewable energy resources and power load should be taken into account
in the optimal load dispatch of community microgrid. Also, it is necessary to develop effective and
efficient method for the forecasting of renewable energy output and demand-side power load.
To bridge this gap, the optimal load dispatch model of a grid-connected community microgrid
5
ACCEPTED MANUSCRIPT
was developed based on the forecasting of PV power output and residential power load. The key
(1) A deep recurrent neural network with long short-term memory units (DRNN-LSTM) was
developed to forecast power load of aggregated residential buildings and PV power output during a
short-term period.
(2) The optimal load dispatch model of a grid-connected community microgrid which includes
residential power load, PV arrays, EVs, and ESS, was established under three different scheduling
scenarios.
(3) The uncertainties of the PV power output and residential power load were considered in the
optimal load dispatch model simultaneously by using the forecasting results of the DRNN-LSTM
model.
The remainder of the study is organized as follows. Section 2 introduces the related methodology.
Section 3 provides the detailed description of the DRNN-LSTM model for forecasting residential
power load and PV power output and the optimization model for finding the optimal load dispatch
of community microgrid. The experimental results and discussions are given in Section 4. Section
2. Methodology
ANN abstracts the information processing of human brain neural network, and establishes some
non-linear models to learn the relationships between input vectors and output values [36]. Different
connection modes will form different neural networks. A simple feedforward network with single
… … output
Hidden
…
layer
… … Input
where f is activation function, kj is the weight parameter between node j in layer i and node k
in layer i-1, yk is the output from node k in layer i-1, j is the bias of node j, n is the total
e ( y p ya ) 2 (2)
Then, all the samples are processed in the training phase, and all the weight parameters are
updated as
e
kj kj (3)
kj
2.2 Recurrent neural network (RNN) and Long Short-term Memory (LSTM)
Recurrent neural network (RNN) is neural sequence model that can model temporal dependencies
presented in time series data [37]. There are some ring structures in RNN, in order to remember
information at previous time steps. Therefore, RNN is capable of dealing with dynamical problems
7
ACCEPTED MANUSCRIPT
of time series. For example, RNN has been widely applied in language modeling, handwriting
recognition, and speech recognition [38, 39]. In a simple RNN, the output at time t is determined by
both the input at this time step and the output at prior time step, and it can be expressed as
time steps, is the bias parameters, x (t ) is the input at time step t, h(t 1) is the output at time step
However, RNN always consumes long time in the training through back-propagation. Besides,
the gradients are tend to vanish or explode over long time period, thus making the learning of long-
term dependencies difficult [40]. To address these problems, long short-term memory (LSTM) was
proposed to replace the conventional neuron in RNN. LSTM can adaptively scales the input and
output value, remembers or forgets the cell state value [41]. All these are achieved by using input,
forget and output gates respectively. The schematic of a LSTM unit is shown in Fig. 2
ht
Ct-1 Ct
× +
tanh
ft it pt
× ×
C't
σ σ tanh σ
ht-1 ht
Xt
When the input X t enters LSTM, it passes through an activation function which outputs ft .
f t ( f [ yt 1 , X t ] f ) (5)
In (5), f is weight parameter, f is bias parameter, and yt 1 is the output from prior LSTM
unit. Then, the forget gate will discard some information from the transient cell state, and the input
8
ACCEPTED MANUSCRIPT
gate will identify what new information remains in the cell state and update the cell state through
following functions.
it (i [ yt 1 , X t ] i ) (6)
Ct f t Ct 1 it Ct (8)
where i and c are weight parameters, i and c are bias parameters, it is the vector that
determine what value will be updated, Ct is the new candidate vector, Ct 1 is the cell state of
previous LSTM unit, and Ct is the new cell state. At last, yt will be output by two activation
zt ( p [ yt 1 , X t ] p ) (9)
yt zt tanh(Ct ) (10)
where p is weight parameter, p is bias parameter, zt is a part of cell state that will be
output.
Population based algorithm is a computational technology based on the law of biological group
behavior and is usually used to solve distributed problems [42]. As an important population based
algorithm, PSO has been widely used to deal with the load dispatch of microgrid [43]. It starts from
the random solution to find the optimal solution by iteration, and evaluates the quality of solutions
by their fitness [44]. Compared with genetic algorithm, PSO algorithm has fewer adjustable
parameters, thus making the algorithm more efficient [45, 46]. Since PSO is of strong capability
and high efficiency in solving optimization problems, this study uses PSO algorithm to deal with
In PSO algorithm, each solution of the optimization problem can be described as a particle which
has a position vector and a velocity vector. Position vector represents a possible solution of the
optimization problem, and velocity vector determines the direction and magnitude of the change in
position. Position vector and velocity vector are adjusted dynamically according to previous best
Generally, the position and velocity of particles are taken in a continuous real space. The best
velocity and the position of particle i from iteration k to iteration k+1 can be updated according to
k 1 k 1
(11)
X iD X iD ViD
k
where r1 and r2 are random numbers that are distributed in [0, 1] uniformly, c1 and c2 are
learning parameters which represent the self-learning ability and social learning ability of particle
respectively, and is inertia weight parameter. Small inertia weight parameter contributes to
convergence of PSO algorithm, and large inertia weight parameter is beneficial to jump out of local
optimal and facilitate global search [47]. Therefore, the selection of learning parameter and inertia
3. Model
This study developed a DRNN-LSTM model to forecast residential hourly power load and the
hourly PV power output over short-term horizon respectively. Then, an optimal load dispatch model
10
ACCEPTED MANUSCRIPT
of a grid-connected community microgrid which contains residential power load, PV arrays, EVs,
and ESS, was established under different scheduling scenarios. In the load dispatch model, the
residential power load and the PV power output were obtained from the forecasting results of the
DRNN-LSTM model.
Depending upon the object of forecasting, the input of the model is a given combination of
The schedule variables considered in the DRNN-LSTM model include hour of day (0-23), day of
week (1-7), day of month (1-31), and month number (1-12). It is obvious that residential power load
has high correlation with schedule variables. For example, the power load is low over daytime of
weekday as residents go to work. In contrast, the power load is high during weekend when residents
spend much time staying at home. Since PV arrays can only generate electricity under sunlight, the
The weather related variables in forecasting residential power load are different from those in
forecasting the PV power output. Previous study has shown that weather conditions, especially
temperature, has impact on power load [31]. In this study, the weather variables for forecasting
residential power load include temperature, humidity, and wind speed. Except these weather
variables, global horizontal radiation, and diffuse horizontal radiation are considered in forecasting
As for timescale variable, 24-h was selected as the reference sequence length of inputs. It is
because that routine pattern of residential power load correspond to 24-h. In addition, the PV power
11
ACCEPTED MANUSCRIPT
The residential power load reflects the operation state of household appliances which are of high
instantaneity and volatility, thus making power load profile transient and non-linear. Therefore, the
forecasting model should be capable to model non-linear and regularity of power load profile, as
Compared with residential power load profile, PV power output profile shows certain periodicity
and linearity. However, PV power output is vulnerable to weather conditions. To promote the
integration of solar power and reduce waste, more accurate forecasting is required.
The DRNN-LSTM model was proposed to overcome these challenges. The proposed forecasting
model was a hybrid model which is consisted of input layer, RNN-LSTM layers, general perception
layers, and output layer. It has been proved that hybrid model often outperforms non-hybrid model
[40]. In order to achieve the best forecasting results on residential power load and PV power output,
the model adopted a six-layer network structure, including an input layer, two RNN-LSTM layers,
two simple hidden layers, and an output layer. Fig. 3 presents the schematic of the proposed DRNN-
LSTM model.
…… Layer 6
…… Layer 3
…… Layer 2
…… Layer 1
t=1 t=2 t=3 t=24
12
ACCEPTED MANUSCRIPT
The structure of the DRNN-LSTM model is described as follows. (i) Layer 1: The input at one-
hour resolution is introduced in layer 1. Each circle represents an input, including schedule variables
and weather variables at that time step. The training data contains S samples. S is the number of
24-h sequences (i.e. the total number of days in the training data). (ii) Layer 2 and Layer 3: They
are two RNN-LSTM layers, and each circle denotes an output vector. (iii) Layer 4, Layer 5, and
Layer 6: Layer 4 and Layer 5 are two simple hidden layers, and these two layers and Layer 6
In the training of the DRNN-LSTM forecasting model, some regulations were made to improve
To eliminate the influence of dimension and accelerate training process, the training data was
xi min
xi (12)
max min
where xi is the original value, min and max are minimum value and maximum value of the variable
where xi is located.
Deep neural network has suffered from overfitting, thereby causing serious errors in testing phase.
term to cost function [48]. It can weaken the impact of perturbations and noise existed in training
e e( w) wT w (13)
2S
where e is the original error function, w is the weight vector, and was set as 0.01 which is
Dropout is another way to overcome overfitting. It deletes a certain proportion of neural units in
neural network layers to change the network structure. Hence, it can adjust the learning ability of
neural network model adaptively, and learn more robust characteristics [50].
The Adam was used to optimize the weight parameters in each layer [51]. It is known that
conventional gradient descent algorithm takes a lot of time and computing resource in training phase.
Although distributed parallel training can accelerate model learning, the computational resources
needed are not reduced. Compared with conventional gradient descent algorithm, Adam algorithm
has fast convergence speed and is well suitable for dealing with problems that involve large datasets
and many parameters [51]. In addition, it designs an independent adaptive learning rate for different
The setting of hyper-parameters will affect the performance of machine learning algorithms. They
are usually assigned empirically or determined by the model structure and data characteristics. The
hyper-parameters in the DRNN-LSTM model are shown as following: (i) Length of output from
Layer 2, Layer 3, Layer 4, and Layer 5; (ii) Activation function of Layer 4, Layer 5, and Layer 6;
(iii) Type of neuron nodes (i.e. LSTM or GRU) in Layer 2 and Layer 3; (iv) Dropout of Layer 2,
Layer 3, Layer 4, and Layer 5. To optimize the hyper-parameters, a global method is required.
Hyperopt, a python library for hyper-parameters optimization, provides an effective way to optimize
optimization method which presents an optimized interface that accepts an evaluation function and
parameters space. Given the parameters space, the optimal structure for the DRNN-LSTM model
To evaluate the performance of the proposed DRNN-LSTM model, four common metrics were
used.
(1) Root Mean Square Error (RMSE). RMSE is the root mean square error between actual value
T
t 1
( ya y p ) 2
RMSE= (14)
T
where ya is the actual value in testing phase, y p is the corresponding forecasting value, and T
(2) Mean Absolute Error (MAE). MAE represents the mean absolute error between actual value
T
ya y p
MAE t 1
(15)
T
The meanings of all the variables in Eq. (15) are the same as those in RMSE.
(3) Mean absolute percentage error (MAPE). MAPE denotes the mean absolute error in testing
phase, and the smaller value of MAPE represents better forecasting performance.
100% ya y p
t 1 y (16)
T
MAPE
T a
The meanings of all the variables in Eq. (16) are the same as those in RMSE.
(4) Pearson Correlation Coefficient (PCC). PCC reflects the correlation between actual values
The meanings of all the variables in Eq. (17) are the same as those in RMSE.
In this section, the optimal load dispatch model of grid-connected community microgrid which
15
ACCEPTED MANUSCRIPT
contains power load, PV arrays, EVs, and ESS, was established. Fig. 4 shows the structure of the
. . . ESS
PV power
Main
power
grid . . .
.
.
. . . .
. . .
Residential Community
The EVs in the grid-connected community microgrid, can act as a load or a power source by
charging or discharging to join the load dispatch of microgrid. The daily driving distance, the
starting charging time, and charging load of EVs are important factors for electric vehicles to access
microgrid.
The daily running distance of EV obeys lognormal distribution (i.e. distance : log N ( 1 , 12 ) )
1 (ln x1 1 ) 2 (18)
f distance ( x1 ) exp( )
2 1 x1 2 12
where 1 3.2 , 1 0.88 , and x1 is the daily running distance [53]. The charging demand of EV
is determined by driving distance. At the same time, it was assumed that charging electricity of EV
is equal to daily electricity consumption in this study. Fig. 5 presents the probability distribution of
16
ACCEPTED MANUSCRIPT
It can be seen from Fig. 5 that daily driving distance of an EV is mainly between 0 km and 100
km.
Since the microgrid is a grid-connected community microgrid, the charging situation in which
EVs owners start charging when arriving home in the evening according to their daily routine, was
studied. The last return time of an EV was defined as a normal distribution (i.e. t : N ( 2 , 22 ) ) which
can be expressed as
1 ( x 24 2 ) 2
exp( 2 ), 0 x2 2 12
2 2 x2 2 22
f t ( x2 ) (19)
1 ( x )2
exp( 2 2 2 ), 2 12 x2 24
2 x 2 2
2 2
where 2 17.6 , 2 3.4 , and x2 is the last return time of an EV [53]. The probability
The daily starting charging time and driving distance of EV are independent mutually, then the
charging load profiles of EV can be calculated by a random experiment. In this study, the total
charging load of EVs are obtained by Monte Carlo simulation which can produce charging load
17
ACCEPTED MANUSCRIPT
At the same time, there are some constraints for the EVs charging model, including capacity
(1) Capacity constraints of EVs. The ratio of the residual electricity to the rated capacity can be
used to estimate the charge state (CS) of EVs. The CS must be in a certain range in order to protect
the batteries.
where CSi is the CS of i-th EV, CSimin represents the lower limits, and CSimax represents the
upper limits.
(2) Capacity constraints of EVs when leaving the microgrid. In order to ensure that EVs have
enough power for routine running, the following presents another constraint.
CSti CStmin
i
(21)
min
where CSt is the CS of i-th EV when it leaves microgrid, and CSti
i
is the lower limit for routine
running of EVs.
(3) Charge/discharge constraints of EVs. To prevent the damage caused by high power of
where Pi EV is charging or discharging power of the i-th EV, Pi min denotes the lower limits, and
The objective of the optimal load dispatch model is to minimize the transaction cost between the
microgrid and the main power grid, depreciation cost of EVs and ESS, and the cost of pollutant
18
ACCEPTED MANUSCRIPT
treatment. The operation and maintenance cost of PV arrays was not considered in the model.
(1) Transaction cost between the microgrid and the main power grid can be described as
T
C1 P (t ) St (23)
t 1
where P(t ) is the transmission electricity between microgrid and the main power grid. The
positive value of P(t ) denotes that the main power grid transmits electricity to microgrid, and the
negative value of P(t ) denotes that microgrid sells electricity to the main power grid. St is the
electricity price over period t. If St 0 , it indicates that microgrid purchases electricity from the
main power grid. When St 0 , it indicates that microgrid sells electricity to the main power grid.
i 1 E1 ti1
Pi EV (t ) dt ) (24)
where m is the total number of EVs, cr is the battery replacement cost of EV, E1 is total charge-
accessing to the microgrid, and Pi EV (t ) represents the charging or discharging power of i-th EV
j 1 E2 t j1
PjESS (t ) dt ) (25)
where n is the total number of energy storage unit (ESU), cs is the battery replacement cost of
and ending time of j-th ESU accessing to the microgrid, and PjESS (t ) represents the charging or
19
ACCEPTED MANUSCRIPT
where k represents the k-th pollutant emission, K is the total number of pollutant emissions including
CO 2 , SO 2 , and NO x [43]. c k is the treatment cost of the k-th pollutant emission, k is the
pollutant discharge coefficients of the k-th pollutant emission, and P is the transaction electricity
Therefore, the total cost of the proposed model is consisted of transaction cost between microgrid
and the main power grid, depreciation cost of EVs and ESS, and treatment cost of pollutant
min C1 C2 C3 C4 (27)
The constraints of the model will be given in this section, including electricity supply and demand
balance constraint, the constraint of transmission capacity between the microgrid and the main
power grid, as well as capacity and charge/discharge constraints of ESS. The following part provides
(1) Electricity supply and demand balance constraint. The balance of electricity supply and
demand should be kept in the operation of microgrid, and the constraint can be described as:
where P is the transmission power between microgrid and the main power grid, Psolar is the PV
power output, PEV is the net power output of EVs, PESS is the net power output of ESS, and Pload
CS min
j CS j CS max
j
(29)
upper limits.
where PjESS is charging or discharging power of the j-th ESU, Pjmin denotes the lower limits, and
(4) Transmission capacity constraints. The transmission power between microgrid and the main
power grid is restricted in a certain range to ensure the stability and reliability of power system.
4.1 Data
The residential power load data was obtained from Dataport website which provides a vast
database of original and curated data, including utility market operations data to consumer
behavioral research data [56]. The aggregated power load of 40 residential buildings which were
randomly selected, was used in this study. The residential buildings are located in Austin, Texas,
including single-family homes, town homes, apartments, and stores. The power load profiles at 1-
hour resolution between January 1, 2018 and February 1, 2018 were used in the experiments. The
training data corresponding to the data during January 1, 2018, 00:00 AM and January 28, 2018,
23:00 PM, and the testing data corresponding to the data over January 29, 2018, 00:00 AM-February
1, 2018, 23:00 PM. In addition, the weather variables of input in forecasting residential power load
were obtained from MesoWest website corresponding to KATT station, Austin [57].
The proposed DRNN-LSTM model was also tested on the data obtained from Yulara PV plant
21
ACCEPTED MANUSCRIPT
[58]. The output power data over January 1, 2018-February 1, 2018 of a rooftop PV whose array
rating is 106.6 kW, was used in the experiment. Meanwhile, the website has provided the related
weather data which is necessary for the forecasting model. The partition of training data and testing
data is the same as the partition of that in forecasting residential power load.
The proposed forecasting model was implemented in Python by using the Keras API running on
a TensorFlow backend. Table 1 presents the search space for hyper-parameters optimization.
Table 1
Search space of hyper-parameters.
Hyper-parameter Range
Length of output from Layer 2, Layer 3, Layer 4, and Layer 5 [10, 200]
Types of neuron nodes in Layer 2 and Layer 3 [LSTM, GRU]
Activation functions in Layer 4, Layer 5, and Layer 6 [Sigmoid, ReLU]
Dropout in Layer 2, Layer 3, Layer 4, and Layer 5 [0, 1]
In Table 1, the ranges of output length from Layer 2, Layer 3, Layer 4, and Layer 5 are set
reasonably. To avoid gradient vanishing or exploding, the type of neuron nodes on Layer 2 and
Layer 3 are optimized from LSTM and GRU. It is because that both LSTM and GRU can consider
the time dependency in data, but they may have different effects in analyzing different datasets.
Meanwhile, the forecasting performance was estimated and optimized by using different activation
The proposed DRNN-LSTM model was used to forecast the short-term aggregated power load
of 40 residential buildings in Austin, TX, the United States. Fig. 11 shows the training and testing
process of the DRNN-LSTM model using the aggregated residential power load data over January
22
ACCEPTED MANUSCRIPT
1, 2018-February 1, 2018. Fig. 12 presents the forecasting results during January 29, 2018-February
1, 2018.
Training Testing
Fig. 11. Training and testing process of the DRNN-LSTM model using the aggregated residential power load data
over January 1, 2018-February 1, 2018.
Fig. 12. Forecasting results of aggregated residential power load using DRNN-LSTM during January 29, 2018-
February 1, 2018.
From Fig. 11-12, it can be seen that residential power load is of high volatility and fluctuates
between 17.36 kW and 83.02 kW. There are two power load peaks in the morning and evening
during which residents tend to consume more electricity as they may cook meals, washing clothes,
and showering etc. However, the power load profile did not show an obvious daily periodic trends.
It is because that residential electricity consumption behavior is of high randomness and usually
affected by interferences from environment. In Fig. 12, it can be seen that the forecasting profile
almost coincides with actual power load profile. It illustrates that the DRNN-LSTM model has great
capability in modeling complex residential power load and can achieve good performance.
To further demonstrate the forecasting performance, multi-layer perception (MLP) network and
23
ACCEPTED MANUSCRIPT
support vector machine (SVM) were also used to forecast aggregated residential power load. Fig.
13 shows the forecasting results over January 29, 2018-February 1, 2018 using MLP and SVM
respectively. Table 4 presents the relative performances of the DRNN-LSTM, MLP, and SVM in
Table 4
Evaluation metrics values of the DRNN-LSTM, MLP and SVM in forecasting aggregated residential power load.
Models DRNN-LSTM MLP SVM
RMSE 2.987 5.654 6.191
MAE 2.365 4.383 4.488
MAPE 7.43% 12.68% 19.02%
PCC 0.925 0.701 0.646
From Fig. 13, it can be seen that MLP perform better than SVM in forecasting aggregated
residential power load, but they still cannot surpass the proposed DRNN-LSTM model. Table 4
shows that RMSE and MAE of the DRNN-LSTM model in testing phase are 2.987 and 2.365
respectively, which are significantly less than the errors obtained by MLP and SVM. Meanwhile,
the MAPE of the DRNN-LSTM model (7.426%) is less than other two methods as well. When the
PCC is close to 1, it represents good forecasting results. The PCC of the DRNN-LSTM model
achieves 0.925 which is higher than MLP (0.701) and SVM (0.646). This is because that the high
randomness and instantaneity of residential power load lead to complex characteristics of power
load profile, such as nonlinearity and aperiodicity. Therefore linear model (e.g. SVM) has some
24
ACCEPTED MANUSCRIPT
limitations in forecasting residential power load. As for MLP, it cannot accommodate the time
dependency in the residential power load, thus influencing the forecasting performance.
The DRNN-LSTM model was also used to forecast the PV power output including 324 panels in
SITD (Sails in the Desert), Yulara, Australia. Fig. 14 shows the training and testing process of the
DRNN-LSTM model using the data of PV power output over January 1, 2018-February 1, 2018.
Fig. 15 presents the forecasting results during January 29, 2018-February 1, 2018.
Training Testing
Fig. 14. Training and testing process of the DRNN-LSTM model using the data of PV power output over January
1, 2018-February 1, 2018.
Fig. 15. Forecasting results of the PV power output using DRNN-LSTM during January 29, 2018-February 1,
2018.
In Fig. 14-15, the profile of PV power output fluctuates slightly compared with the profile of
residential power load, and the fluctuation may be caused by some floating clouds. Besides, the
profile exhibits certain periodicity. Generally, the PV power output is 0 during 08:00 PM - 05:00
25
ACCEPTED MANUSCRIPT
AM since there is no sunlight at that time. At around 12:00 AM, the PV power output reaches the
maximum that is about 100kW. From Fig. 14-15, it can be seen that the forecasting results almost
bring into correspondence with actual data in testing phase. In other words, the model performs well
in forecasting both PV power output and residential power load. It denotes that the DRNN-LSTM
At the same time, the forecasting results are compared with the results obtained by MLP and
SVM. Fig. 16 shows the forecasting results over January 29, 2018-February 1, 2018 using MLP and
SVM respectively. Table 5 presents the relative performances of the DRNN-LSTM, MLP, and SVM
Table 5
Evaluation metrics values of the DRNN-LSTM, MLP and SVM in forecasting the PV power output.
Models DRNN-LSTM MLP SVM
RMSE 7.536 12.181 14.923
MAE 4.369 7.526 11.549
MAPE 15.87% 34.71% 38.96%
PCC 0.961 0.928 0.914
From Fig. 15-16, it can be seen that the DRNN-LSTM model achieves the best forecasting results
through comparing the forecasting power output profile with actual power output profile. Table 5
shows that RMSE, MAE, and MAPE of the DRNN-LSTM model are less than MLP and SVM.
Besides, the PCC of the DRNN-LSTM model is 0.961 which is higher than MLP (0.928) and SVM
26
ACCEPTED MANUSCRIPT
(0.914). It can also be found that all the evaluation metrics values of MLP are just slightly better
than those of SVM. It is because that the power output profile of PV array is of certain linearity and
periodicity. The practices have shown the capability of MLP and SVM in dealing with simple
linearity problems.
Overall, the proposed DRNN-LSTM model is of capability to make more accurate forecasting
results than traditional method in forecasting both aggregated residential power load and the PV
power output over short-term period. It provides the possibility for integrating renewable energy
efficiently, reducing pollutant emissions, as well as promoting to implement more flexible demand
The forecasting results of residential power load and the PV power output on February 1, 2018
will be used as the given experimental setup in the optimal load dispatch model, thereby contributing
In this section, three scheduling scenarios were discussed in order to analyze the influence of EVs
Scheduling scenario 1:
To prove the effect of the coordinated charging/discharging of EVs on shifting peak load and
improving power system stability, the charging/discharging mode of EVs in scheduling scenario 1
was uncoordinated. At the same time, the ESS was not connected to the microgrid.
Scheduling scenario 2:
Compared with scheduling scenario 1, the ESS was connected to the microgrid in scheduling
scenario 2.
27
ACCEPTED MANUSCRIPT
Scheduling scenario 3:
In this scheduling scenario, the EVs were dispatched under coordinated charging/discharging
mode. Besides, the EVs was constrained to have enough power to meet the needs of residential daily
driving, and the residual capacity of EVs battery will participate in the load dispatch of microgrid.
Although EVs has developed rapidly, the EVs ownership is still limited. Therefore, this study
assumed that the permeability of EVs was 50%, i.e. 20 EVs were connected to the microgrid. All
the EVs were integrated as a whole and controlled by the centralized controller. Fig. 17 shows the
daily power load profiles under 0% and 50% permeability of EVs. It can be seen from the two power
load profiles that the load is low during deep night and noon, but is high during morning and evening.
When the permeability of EVs is 50%, the peak load during evening will increase significantly and
bring more burden on the main power grid. This is because that the residents were assumed to charge
their EVs when they arrive home in the evening, and the EVs adopt uncoordinated charging mode.
Table 6 shows the parameters of EVs and each EV has the same parameters. The replacement cost
of an EV battery is ¥ 30,000, and the total charge-discharge capacity in its life cycle is 240,000 kWh
[59].
Table 7 shows the parameters of ESS. The replacement cost of ESS is ¥ 120,000, and the total
The day-ahead hourly purchasing price and selling price of electricity are shown in Fig. 18. The
selling price was assumed to be 10% lower than the respective purchasing price.
In this study, the operation and maintenance costs of PV arrays is set to 0, the environmental
28
ACCEPTED MANUSCRIPT
Table 6
Parameters of EVs.
Parameters Value
Battery capacity (kWh) 30
SC lower/upper limits (%) 10/90
Power load per 100 km (kWh/100 km) 15 10
Charging efficiency 0.9
Discharging efficiency 0.9
Charging power limit (kWh) 5
Charging power limit (kWh) 5
Replacement cost of battery (¥) 30000
Table 7
Parameters of ESS.
Parameters Value
Maximum capacity (kWh) 100
Initial storage (kWh) 0.5
Maximum charging rate (kW) 10
Maximum discharging rate (kW) 10
Charging efficiency 0.9
Discharging efficiency 0.9
Replacement cost of battery (¥) 120000
Fig. 18. Day-ahead hourly purchasing price and selling price of electricity.
Table 8
29
ACCEPTED MANUSCRIPT
Generally, the dispatch cycle is set as one day, and 1-h is a dispatch period. The profiles of
residential power load and the PV power output in this load dispatch model, come from the
In this section, PSO algorithm was used to optimize the load dispatch under three different
scheduling scenarios. The particle population size and maximum iteration number of the algorithms
were set to 100 and 500 respectively. The optimal result, which reflects the best performance on the
In scheduling scenario 1, the ESS was not considered in the microgrid. PV arrays provides the
renewable energy for the microgrid, and the main power grid plays a complementary role when the
PV power output cannot satisfy the load demand of microgrid. Besides, the EVs adopt
uncoordinated charging mode. It means that EVs just provides a part of load. The dispatch profiles
It is can be seen from Fig. 19 that PV arrays generates solar power over 05:00 AM-18:00 PM,
30
ACCEPTED MANUSCRIPT
and reaches the peak output power (i.e. 59.96kW) at around 10:00 AM when the light condition is
the best. The load profile represents the total load of residential power load and the charging load
of EVs. There are two peaks in load profile which occur in the morning and evening respectively.
We can also see that the load is always above 22 kW. This may be because that some household
appliances are in operation even at deep night, such as refrigerator and air conditioner.
Meanwhile, it can be found that the quantity of electricity purchasing from the main power grid
declines with the PV power output increases. At about 10:00 AM, the amount of electricity
purchasing decreases to 0. When the value of grid profile is less than 0, it means that PV arrays can
generate enough solar power to satisfy the load, and the microgrid can sell extra electricity to the
main power grid. By 10:00 AM, the microgrid can sell electricity to the main power grid with the
maximum power output of 30 kW. After that, the PV power output will decline gradually as the
light illumination is weakening. Since the electricity purchasing price is high during 09:00AM-
13:00 PM, thus the PV arrays contributes to reduce the total costs of the microgrid. However, the
load in the evening is not optimized as the residual electricity of EVs does not participate in the
dispatch.
Compared with scheduling scenario 1, an EES whose maximum capacity is 100 kWh was adopted
in the community microgrid in scheduling scenario 2. The EVs still adopt uncoordinated charging
mode. Fig. 20 shows the dispatch profiles of the microgrid under scheduling scenario 2.
31
ACCEPTED MANUSCRIPT
In Fig. 20, when the value of ESS profile is above 0, it denotes that ESS is charging. When the
value of ESS profile is less than 0, it means that the ESS is discharging. From Fig. 18 and Fig. 20,
it can be seen that ESS is charging in the periods of low electricity purchasing price and discharging
in the periods of high electricity purchasing price. It can also be found that ESS is also charging in
the period of 9:00 AM and 13:00 PM, although the electricity purchasing price is high. It is because
that PV array generates excess electricity during this period, and the microgrid also sells electricity
Compared with scheduling scenario 1, the adoption of ESS in microgrid contributes to shift grid
peak load which occurs in the morning and evening, thus improving the stability of power system.
In addition, the ESS helps to integrate distributed renewable energy and reduce electricity demand
from the main power grid. Therefore, the operation costs of microgrid will be reduced and the
environmental problems will be mediated. However, due to the maximum capacity of the ESS
(100kWh) is limited, the load dispatch has not yet reached the optimal result.
In scheduling scenario 3, the EVs adopt coordinated charging mode. Meanwhile, the ESS is also
adopted in the microgrid. The dispatch profiles of the microgrid under scheduling scenario 3 are
32
ACCEPTED MANUSCRIPT
It can be seen from Fig. 21 that the peak load of grid profile in the evening is further shifted to
deep night during which the electricity purchasing price is low. Since the EVs adopt coordinating
mode, their load profile has changed a lot. When the value of EV profile is above 0, the EVs are
charging electricity, and when the value is less than 0, the EVs are discharging electricity. We can
see that the EVs is charging at deep night and discharging in the evening. Therefore, the peak load
of grid during evening has been decreased significantly. It can also be found that the total
charging/discharging electricity of ESS is reduced compared with scheduling scenario 2. The reason
is that unit cost of charging/discharging electricity of ESS is greater than that of EVs and the EVs
From Fig. 19 and Fig. 21, it can be found that the PV power output can meet the load demand
in microgrid and sell electricity to the main power grid in 9:00 AM-13:00 PM, but the ESS and EVs
only charged a small amount of electricity during this period. It is because that the selling price of
electricity is high in this period, and selling the excess electricity to the main power grid is best
Table 9 shows the total cost under the three different scheduling scenarios.
Table 9
Total cost under different scheduling scenarios.
Scenarios Total cost
Scenario 1 582.13
Scenario 2 574.04
Scenario 3 529.89
It can be seen from Table 9 that the minimum dispatch cost was achieved under scheduling
scenario 3. This reveals that ESS and coordinated charging mode of EVs contribute to reduce the
total costs. Besides, the peak load of grid will be shifted substantially and the renewable energy will
33
ACCEPTED MANUSCRIPT
power system and reduce pollutant emissions. It can be believed that the battery replacement cost
of ESS and EVs will be further reduced with advances in technology. Larger scale ESS and EVs
with higher energy storage capacity can be applied in microgrid to reduce operation costs and shift
peak load.
To further reduce peak load of grid, power companies can also provide targeted demand side
strategies, such as increasing electricity purchasing price in peak load periods or providing
incentives for residents who response the demand side strategies. Therefore, the reliability and
5. Conclusions
In this study, a DRNN-LSTM model was proposed to forecast aggregated residential power load
and the PV power output over short-term period. Two real-world datasets were used to test the
DRNN-LSTM model. The forecasting results release that the DRNN-LSTM model performs better
than MLP network and SVM in forecasting the output power of PV array. It achieved more excellent
performance in forecasting aggregated residential power load with the MAPE of 7.43% since
traditional forecasting methods have limitations in modeling complex nonlinear problems and
cannot consider the time dependencies in the data. Therefore, the proposed DRNN-LSTM model
presents the potential for making more accurate short-term forecasting to support economical load
Furthermore, this paper explored the optimal load dispatch in a grid-connected community
microgrid under three different scheduling scenarios. In order to promote interaction and balance
between supply and demand, the uncertainties of both the PV power output and residential power
34
ACCEPTED MANUSCRIPT
load were considered in the load dispatch optimization by using the forecasting results of the
proposed DRNN-LSTM model. At last, the load dispatch model was optimized by a particle swarm
optimization algorithm, and the simulation results show that EES and EVs can shift peak load,
improve the solar energy utilization, as well as reduce 8.97% of daily costs. In addition, the charging
mode of EVs was discussed. It shows that charging loads of EVs will be shifted form high-priced
periods to low-priced periods under the coordinated charging mode, thereby reducing the total costs
However, there are still few limitations in this study. The forecasting model and the optimization
model are two separate part, and future study needs to explore the dynamic mechanism between
them systematically. Besides, this study achieved hourly load dispatch in community microgrid. To
optimize the load dispatch in real time, more fine-grained data will be used in future.
Acknowledgement
This work is supported by the National Natural Science Foundation of China (Nos. 71822104,
71690235, 71690230 and 71521001), Anhui Science and Technology Major Project (No.
17030901024), Hong Kong Scholars Program (No. 2017-167), China Postdoctoral Science
Foundation (No. 2017M612072), and the Fundamental Research Funds for the Central Universities
(No. JZ2018HGPA0271).
References
[1] Djørup S, Thellufsen JZ, Sorknæs P. The electricity market in a renewable energy system.
Energy. 2018;162:148-157.
[2] Pudleiner D, Pielli K. Energy efficiency as a means to expand energy access: A Uganda roadmap.
35
ACCEPTED MANUSCRIPT
[3] Zhang Y-J, Peng H-R. Exploring the direct rebound effect of residential electricity consumption:
[4] Kovacic Z, Giampietro M. Empty promises or promising futures? The case of smart grids.
Energy. 2015;93:67-74.
[5] Wang D, Qiu J, Reedman L, Meng K, Lai LL. Two-stage energy management for networked
[8] Kuznetsova E, Li Y-F, Ruiz C, Zio E. An integrated framework of agent-based modelling and
[9] Khan MRB, Jidin R, Pasupuleti J. Multi-agent based distributed control architecture for
2016;112:288-307.
[10] Modiri-Delshad M, Kaboli SHA, Taslimi-Renani E, Rahim NA. Backtracking search algorithm
for solving economic dispatch problems with valve-point effects and multiple fuel options. Energy.
2016;116:637-649.
[11] Pappala VS, Erlich I, Rohrig K, Dobschinski J. A stochastic model for the optimal operation
[12] Wang L, Li Q, Ding R, Sun M, Wang G. Integrated scheduling of energy supply and demand
36
ACCEPTED MANUSCRIPT
2017;130:1-14.
Vision (ICMV 2011): Machine Vision, Image Processing, and Pattern Analysis. 2012; 8349.
[14] Zheng M, Meinrenken CJ, Lackner KS. Smart households: Dispatch strategies and economic
analysis of distributed energy storage for residential peak shaving. Applied Energy. 2015;147:246-
257.
Management of Microgrids with External Agents including Battery/Fuel Cell Electric Vehicles.
[16] Farrokhabadi M, König S, Cañizares CA, Bhattacharya K, Leibfried T. Battery energy storage
system models for microgrid stability analysis and dynamic simulation. IEEE Transactions on
[17] Alham M, Elshahed M, Ibrahim DK, El Zahab EEDA. A dynamic economic emission dispatch
considering wind power uncertainty incorporating energy storage system and demand side
[18] Ansari B, Shi D, Sharma R, Simoes MG. Economic analysis, optimal sizing and management
of energy storage for PV grid integration. IEEE/PES Transmission and Distribution Conference and
smart grids based on managed charging of PHEVs and vehicle-to-grid strategy using Monte Carlo
37
ACCEPTED MANUSCRIPT
[20] Liu C, Chau K, Diao C, Zhong J, Zhang X, Gao S, et al. A new DC micro-grid system using
renewable energy and electric vehicles for smart energy delivery. IEEE Vehicle Power and
[22] Morais H, Sousa T, Soares J, Faria P, Vale Z. Distributed energy resources management using
plug-in hybrid electric vehicles as a fuel-shifting demand response resource. Energy Conversion
[23] Craparo E, Karatas M, Singham DI. A robust optimization approach to hybrid microgrid
[24] Gupta R, Gupta NK. A robust optimization based approach for microgrid operation in
for long-term electric power consumption forecasting. American Journal of Data Mining and
[26] Kaboli SHA, Selvaraj J, Rahim N. Long-term electric energy consumption forecasting via
[27] Russo A, Raischel F, Lind PG. Air quality prediction using optimal neural networks with
[28] Tao Y, Yan H, Gao H, Sun Y, Li G. Application of SVR optimized by Modified Simulated
Annealing (MSA-SVR) air conditioning load prediction model. Journal of Industrial Information
38
ACCEPTED MANUSCRIPT
Integration. 2018.
[29] Yu Z, Haghighat F, Fung BC, Yoshino H. A decision tree method for building energy demand
[30] Kaboli SHA, Fallahpour A, Selvaraj J, Rahim N. Long-term electrical energy consumption
formulating and forecasting via optimized gene expression programming. Energy. 2017;126:144-
164.
[31] Chen J, Wang X, Steemers K. A statistical analysis of a residential energy consumption survey
[32] Liu B, Nowotarski J, Hong T, Weron R. Probabilistic load forecasting via quantile regression
[33] Bahrami S, Hooshmand R-A, Parastegari M. Short term electric load forecasting by wavelet
transform and grey model improved by PSO (particle swarm optimization) algorithm. Energy.
2014;72:434-442.
[34] Biswas MR, Robinson MD, Fumo N. Prediction of residential building energy consumption: a
[35] Lind PG, Vera-Tudela L, Wächter M, Kühn M, Peinke J. Normal Behaviour Models for Wind
2017;10(12):1944.
[36] Hagan MT, Demuth HB, Beale MH. Neural network design. Boston: Pws Pub., 1996.
[37] Yogatama D, Dyer C, Ling W, Blunsom P. Generative and discriminative text classification
[38] Zhang X-Y, Yin F, Zhang Y-M, Liu C-L, Bengio Y. Drawing and recognizing chinese
39
ACCEPTED MANUSCRIPT
characters with recurrent neural network. IEEE Transactions on Pattern Analysis and Machine
Intelligence. 2018;40(4):849-862.
[40] Rahman A, Srikumar V, Smith AD. Predicting electricity consumption for commercial and
residential buildings using deep recurrent neural networks. Applied Energy. 2018;212:372-385.
1780.
[42] Kaboli SHA, Selvaraj J, Rahim N. Rain-fall optimization algorithm: A population based
2017;19:31-42.
[43] Lu X, Zhou K, Yang S, Liu H. Multi-objective optimal load dispatch of microgrid with
improved mechanical, tribological, corrosion and in-vitro bioactivity properties of mixed oxide
nanotubes on Ti–6Al–7Nb implant using multi-objective PSO. Journal of the Mechanical Behavior
[45] Sebtahmadi SS, Azad HB, Kaboli SHA, Islam MD, Mekhilef S. A PSO-DQ current control
scheme for performance enhancement of Z-source matrix converter to drive IM Fed by abnormal
method to formulate adhesion strength and hardness of Nb PVD coated on Ti–6Al–7Nb aimed at
40
ACCEPTED MANUSCRIPT
developing mixed oxide nanotubular arrays. Journal of the Mechanical Behavior of Biomedical
Materials. 2016;61:182-96.
[47] Trelea I C. The particle swarm optimization algorithm: convergence analysis and parameter
[48] Girosi F, Jones M, Poggio T. Regularization theory and neural networks architectures. Neural
computation. 1995;7(2):219-269.
[49] Chollet F. Keras: The python deep learning library. Astrophysics Source Code Library, 2018.
to prevent neural networks from overfitting. The Journal of Machine Learning Research.
2014;15(1):1929-1958.
[51] Kingma DP, Ba J. Adam: A method for stochastic optimization. arXiv preprint arXiv:14126980.
2014.
[52] Bergstra J, Komer B, Eliasmith C, Yamins D, Cox DD. Hyperopt: a python library for model
[53] Huang Y, Guo C, Wang L, Bao Y, Dai S, Ding Q. A cluster-based dispatch strategy for electric
191.
vehicles charging demand on the optimal energy management of renewable micro-grids. Energy.
2014;78:904-915.
[55] Bucciarelli M, Paoletti S, Vicino A. Optimal sizing of energy storage systems under uncertain
41
ACCEPTED MANUSCRIPT
42
ACCEPTED MANUSCRIPT
Highlights
The forecasting results are used as the input of the microgrid optimization model.
The adoption of EVs and ESS in microgrid contributes to 8.97% cost reduction.