Next Article in Journal
A Nonlinear Broadband Electromagnetic Vibration Energy Harvester Based on Double-Clamped Beam
Previous Article in Journal
Characterization of the Performance of a Turbocharger Centrifugal Compressor by Component Loss Contributions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Real-Time Energy Management for a Small Scale PV-Battery Microgrid: Modeling, Design, and Experimental Verification

1
Department of Electrical & Electronic Engineering, The University of Nottingham, Nottingham NG7 2RD, UK
2
Department of Electrical Power & Machines Engineering, Tanta University, Tanta 31527, Egypt
*
Author to whom correspondence should be addressed.
Energies 2019, 12(14), 2712; https://doi.org/10.3390/en12142712
Submission received: 31 May 2019 / Revised: 5 July 2019 / Accepted: 9 July 2019 / Published: 16 July 2019
(This article belongs to the Section A1: Smart Grids and Microgrids)

Abstract

:
A new energy management system (EMS) is presented for small scale microgrids (MGs). The proposed EMS focuses on minimizing the daily cost of the energy drawn by the MG from the main electrical grid and increasing the self-consumption of local renewable energy resources (RES). This is achieved by determining the appropriate reference value for the power drawn from the main grid and forcing the MG to accurately follow this value by controlling a battery energy storage system. A mixed integer linear programming algorithm determines this reference value considering a time-of-use tariff and short-term forecasting of generation and consumption. A real-time predictive controller is used to control the battery energy storage system to follow this reference value. The results obtained show the capability of the proposed EMS to lower the daily operating costs for the MG customers. Experimental studies on a laboratory-based MG have been implemented to demonstrate that the proposed EMS can be implemented in a realistic environment.

1. Introduction

The growth of renewable energy sources (RES) in the electricity grid together with the increasing use of electricity for transport and heating, ventilation, and air-conditioning requires a new vision for future transmission and distribution grids. The Global Smart Grid Federation report claims that the existing power grid networks are not well equipped to meet the demands of the 21st century [1]. Increasing the complexity and variability of generation introduces a new type of electric grid, which needs further innovation to solve its challenges and manage its expansion.
Microgrids (MG) can combine different kinds of distributed energy resources (DERs) such as distributed generators, distributed storage units, as well as different types of load and control devices [2,3]. For the interactive operation of RES and other MG components, an energy management system (EMS) is required [4,5]. The EMS controls the power flow within the MG by providing references for the DERs based on a predefined objective [6].
There is an increasing trend for small-scale MG oriented towards encouraging local consumption of energy generated from RES at the lowest levels of the grid instead of exporting any surplus to the main grid [7]. “Energy Communities” are now appearing where end-user customers manage their local DERs for the benefit of their own MG [8]. This trend is receiving increasing attention with the development of domestic energy storage technologies (<20 kWh) and techniques for incorporating these ESS into small-scale MG architectures. The electrical load profiles of small scale MGs, particularly residential communities, can vary considerably with time: periods of house inoccupancy (e.g., during vacation) and the addition of new equipment (e.g., electric vehicle charge) or even new houses can have a strong influence on the loading profile [9]. Additionally, these small-scale systems see sharp changes in load over a short period of time as single loads (shower, cooker) can be significant considering the size of the MG. For these reasons, EMS used for small scale MGs must have a short control sample time to observe and respond to fast changes in the load and generation throughout the day [9,10]. Also, energy forecasting techniques must be adaptive and also have a short sample time if they are to help the EMS achieve good results for this type of grid.
Small-scale MGs should preferably operate as a single controllable unit that imports/exports power from/to the main grid following a predictable shape [11]. In this way, the energy community works for the benefit of the whole grid and not just the small scale MG [12]. To achieve this, a real-time controller is required that allows the small-scale MG to accurately follow a reference value for the power drawn from the main electric grid, where this reference is created by a higher level controller which considers both local and system wide factors.
Alternatively, large scale energy storage systems (ESS) (>1 MWh) will play a key role in solving problems such as intermittency of supply and loss of inertia which are challenging electricity grid operation [13], and many grid operators are encouraging the use of ESS to address, for example, increasing demand peaks and network congestion [14].
Much of the existing research focusing on microgrid energy management (MGEM) is oriented towards determining the best operating scenario for the MG [15,16,17]. In [18], Carlos et al. introduce a new iterative algorithm that manages energy flows to obtain the minimum energy cost for the microgrid based on the availability of resources, prices, and the expected demand. However, they achieved their EM results using a two-hour sample time and this restricts performance by imposing a long response time.
In [19], Mohsen et al. introduced two dispatch-optimizers as a universal tool for a centralized MGEM system. Scheduling the unit commitment and the economic dispatch of the MG units was achieved using an improved real-coded genetic algorithm (GA) and an enhanced mixed integer linear programming (MILP) based method. This approach achieved good results, but the uncertainty of both generation and demand was not addressed, and the effect of inaccurate forecasting for load demand and generation on the EM results was not considered.
The authors in [20] focused on introducing a novel two-stage stochastic energy management to minimize the operational cost of a microgrid with various types of distributed energy resources. A scenario reduction method based on mixed-integer linear optimization was used to obtain the set of reduced scenarios. The authors took the uncertainty of price, load, wind speed, and solar radiation into account in order to obtain more realistic results. The use of a scenario reduction method based on MILP optimization is often used offline, which restricts its use for real-time applications, especially when dealing with demand-side management.
The real-time operation of an EMS has also received attention in [21,22]. The authors in [23] applied a real-time energy management system for microgrid systems which minimized the energy cost and carbon dioxide emissions of the microgrid while maximizing the power of the available renewable energy resources using a genetic algorithm. The paper was oriented towards EMS for microgrids, but the load profiles used had a maximum power of 1 kW, which does not reflect the real performance of the methodology for the higher power levels found in a real MG.
Experimental validation of an EMS is very important to demonstrate that the proposed EMS can work in real time [24,25,26]. In [27], the design and experimental validation of an adaptable MGEM were implemented in an online scheme. In this case, the author aimed to minimize the operating costs and the disconnection of loads by proposing an architecture that allowed the interaction of forecasting, measurement, and optimization modules.
The research presented in this paper introduces a hierarchical EMS for small scale MGs with PV systems and battery energy storage. The EMS aims to minimize the daily cost of the energy drawn by the MG from the main electrical grid and increase the self-consumption of the MG’s renewable energy resources. This is achieved by determining an appropriate reference value for the power drawn from the main grid and forcing the MG to accurately follow this value by controlling a battery energy storage system (BESS). A mixed integer linear programming algorithm determines this reference value using a time-of-use tariff (TOU) and short-term forecasting of generation and consumption. A real-time predictive controller (RTPC) is used to control the battery energy storage system to follow this reference value. The proposed hierarchical scheme of the small scale microgrid energy management system is shown in Figure 1.
This paper contributes to the energy management of the small-scale MG by introducing a very short sampling time EMS. The structure of the hierarchical EMS enables the algorithm to deal with frequent changes in the system using a very short sample time (i.e., 1 min). This short sample time enables the proposed EMS to observe and respond to the small changes in load and generation throughout the day: this is a considerable challenge as a large amount of data must be processed and responded to in a short sample time. Much of the research published in the context of MGEM tends to use long sample times ranging from 15 min to 2 h.
Also, the paper introduces an appropriate forecasting method—the adaptive neuro-fuzzy inference system—for short term energy forecasting. This method suits the nature of loads in small scale MGs, as it can identify frequently changing load profiles and this improves the proposed MGEM’s ability to manage the small scale MG energy.
The benefits of this EMS are that it reduces the dependency of the MG on the main electrical grid (by increasing self-consumption of locally generated energy), reduces energy costs for end-users, and the MG consumption profile can be shaped to reduce consumption peaks by appropriate selection of TOU tariff periods. Also, the use of RTPC based on an autoregression forecasting algorithm contributes in achieving better EM for the small-scale MGs. The RTPC integrates a fast and simple forecasting technique such as autoregression (AR) into a rule-based controller within a rolling horizon environment, to achieve better real-time control of the BESS. Using the RTPC as a part of the small scale MGEM system has two benefits. It enables the MG to accurately follow the reference values for the power drawn from the main electric grid, and it can help to overcome errors in load and generation prediction.
The paper is arranged as follows: a full description of the MG used, including system modeling and constraints is provided in Section 2. Section 3 focuses mainly on the high-level energy management which formulates the optimization problem to minimise the daily cost of the energy drawn by the MG from the main electrical grid and increase the self-consumption of the RES. As the forecasted consumption and generation of the MG are very important variables in the optimization problem and directly affect the optimized decision, Section 4 describes the short-term energy forecasting method used in this research. Section 5 introduces the real-time predictive controller that forces the MG to follow the reference value for the power drawn from the main grid. In this section, a real-time rule-based predictive controller comprises a very short-term forecasting algorithm is introduced. The simulation results obtained for the proposed EMS are shown in Section 6. In Section 7, the experimental validation of the proposed strategy is provided.

2. Microgrid Description, Modeling, and Constraints

The MG considered in this paper is based on a small-scale UK community which includes photovoltaic (PV) generation system and a BESS. Also, the MG is connected to the main electricity grid to import any additional energy required. Figure 2 shows a simplified representation of the small-scale MG architecture.
To apply the proposed EMS to the MG the equations that represent the correct model of the MG need to be formulated.

2.1. Microgrid Power Balance Equation

The active power balance equation for the MG is formulated as
P   Main _ grid ( t ) = P l o a d ( t ) P PV ( t ) P BESS ( t )
where t is the time interval, P   Main _ grid ( t ) is the power drawn by the MG from the main electrical grid at a time interval “t” (kW), where a +ve value means that the MG imports power from the main grid, and a -ve value means that the MG exports power to the main grid, P l o a d ( t ) is the electrical load demand of the MG at a time interval “t” (kW), P PV ( t ) is the power generated by the PV system located at the MG at a time interval “t” (kW), and P BESS ( t ) is the electrical power discharged/charged by the BESS at a time interval “t” (kW), where a +ve value means that the HESS discharges, and a -ve value means that the HESS charges.

2.2. Model of the Battery Energy Storage System

The BESS used in this research is represented by the following equations
E ( t ) = { E ( t 1 ) Δ T × P b ( t ) η d , P b ( t ) > 0 E ( t 1 ) Δ T × η c × P b ( t ) , P b ( t ) 0
SOC ( t ) = E ( t ) B Capacity
A power converter is used to control the BESS and acts as an interface between the BESS and the MG. The following equation represents the power converter used in this research
P BESS ( t ) = {   P b ( t ) × η Conv P con _ const , P b ( t ) > 0 P b ( t ) η Conv + P con _ const , P b ( t ) 0
where E ( t ) , E ( t 1 ) are the stored energy in the BESS at a time interval “t” and “t − 1” respectively (kWh), and P b ( t ) is the discharge/charge power from/to the battery at a time interval “t” (kW), (+ve value for battery discharging, -ve value for charging), η d ,   η c are the efficiencies of the battery discharging and charging processes respectively, B Capacity is the battery capacity (kWh), SOC ( t ) is the state of charge of the battery at a time interval “t”, P conv ( t ) is the converter output power at a time interval “t” (kW), η Conv is the converter efficiency, and P con _ const is the constant power losses in the power converter (kW).

2.3. System Constraints

There are constraints associated with the operation of the MG. These constraints reflect the limits of the generation units within the MG and also define the operating framework for the MG.

2.3.1. BESS Power Output

Constraint (5) is added to reflect the maximum power that can be charged/discharged by the BESS over a fixed time interval. This constraint reflects the operating limits of the BESS. This constraint must be considered in the optimization process to avoid solutions based on assumed values for BESS charge/discharge power that cannot be actually realised because they are outside the power limits of the BESS.
P BESS   max P BESS ( t )   P BESS   max
where P BESS   max is the maximum power that can be produced by the BESS (kW) at time interval “t”, +P means the maximum discharge power, −P means the maximum charge power.

2.3.2. BESS State of Charge (SOC)

Maximum and minimum SOC level constraints (6) have been added to avoid overcharging or deep discharge of the BESS to maximise the lifetime of the BESS. Overcharging and deep discharging of the BESS significantly reduce battery lifetime.
SOC min SOC ( t )   SOC max  
where SOC max and SOC min are the maximum and the minimum state of charge limits of the BESS respectively.

2.3.3. BESS Rate of Change of Power Output

This constraint (7) reflects the maximum ramp up/down rate for the BESS power output between two consecutive time slots. This constraint is added to keep the change of the BESS charge/discharge power between two consecutive time slots within certain limits to ensure smooth control and avoid large power changes that could affect the stability of the BESS.
Δ P BESS ( t )   Δ P BESS max
where Δ P BESS ( t ) is the variation of the BESS power output between two consecutive time slots and Δ P BESS max is the maximum acceptable variation of the BESS power output for both the charging and discharging stages.

2.3.4. Power Drawn from the Main Grid

There is a constraint over the power drawn by the MG from the main electrical grid. This constraint is used to minimize the imported power from the main grid and increase self-consumption of the RES. This constraint enables the MG operator to control the limit of the power drawn from the main grid throughout the day. In this way, the MGEM can achieve lower operating costs.
P   Main _ G ( t )   P   Main _ G ,   MAX
where P   Main _ G ,   MAX is the maximum power that can be drawn from the main electrical grid at a time interval “t” (kW). For this research, this value is considered to be a constant value determined by the distribution network operators.

3. High-Level Energy Management

This section describes the high-level energy management (HLEM) which focuses on minimizing the daily cost of the energy drawn by the MG from the main electrical grid and increasing the self-consumption of the RES. This target is achieved by using a BESS and a (TOU) tariff scheme. The BESS will be charged during the off-peak time where the tariff for buying electricity from the main grid is low, and this will be used to feed the load during the peak tariff periods. Any available PV generation is used to feed the MG loads. If the PV generation exceeds the load demand, the excess energy is stored in the BESS to be used later during the peak period. In this way, the daily energy drawn from the main grid is reduced and also the local PV generation is consumed by the MG without being exported to the main grid.
The target is formulated as an objective function considering the system constraints, and an optimization problem is formulated. Then, mixed integer linear programming is used to solve this optimization problem.

3.1. Objective Function Formulation

The objective function is formulated to minimize the daily cost of the energy drawn from the main grid “ C M i c r o _ G ” and to increase the self-consumption of the RES located within the MG. This cost can be developed in terms of payments and incomes. The payments include the cost of the electricity purchased from the main grid; incomes consider the revenue of the energy sold to the main grid (i.e., the excess electricity produced by the MG PV generation after satisfying the MG’s demand and charging the BESS). The daily cost of the energy drawn from the main grid can be formulated as
C M i c r o _ G = C M i c r o b u y + C M i c r o s e l l
C M i c r o b u y = { Δ T × t o T Tariff buy ( t ) × P   Main _ grid ( t ) , P   Main _ grid ( t ) > 0 0 , P   Main _ grid ( t ) 0
C M i c r o s e l l = { Δ T × t o T Tariff sell ( t ) × P   Main grid ( t ) , P   Main grid ( t ) < 0 0 , P   Main grid ( t ) 0
where C M i c r o _ G is the daily cost of the energy drawn by the MG from the main electrical grid (£/day), C M i c r o b u y is the daily cost of the electrical energy purchased from the main electrical grid (£/day), C M i c r o s e l l is the daily income from the exported electrical energy to the main electrical grid (£/day), Δ T is the sampling time (hour), Tariff buy ( t ) is the electricity purchase tariff from the main grid (£/kWh), Tariff sell ( t ) is the tariff for selling electricity to the main electrical grid (£/kWh).

3.2. Mixed Integer Linear Programming

Mixed integer linear programming (MILP) is the mathematical optimization process that has been used to solve the optimization problem. The role of the optimization is to find the best solution for the objective function in the set of solutions that satisfy the constraints (constraints can be equations, inequalities or linear restrictions on the type of a variable) [28,29]. The mathematical formulation of the MILP problem is expressed as
Objective :   m i n i m i z e = C x Constraints :   A · x b x m i n x x m a x
where x Z n C, b are vectors and A is a matrix,
A solution that satisfies all constraints is called a feasible solution. Feasible solutions that achieve the best objective function value are called optimal solutions.
There are three different approaches which are used for solving MILP problems, namely, branch-and-bound, cutting plane, and feasibility pump. MILP problems are generally solved using a branch-and-bound algorithm. Basic LP-based branch-and-bound algorithms (known as tree search) can be described as follows. Start with the original mixed integer linear problem and remove all restrictions: the resulting problem is called ‘linear programming relaxation’ of the original problem, which is solved using the tree search algorithm. The tree is built using three main steps. (1) Branch: pick a variable and divide the problem into two subproblems at this variable; (2) bound: solves the LP-relaxation to determine the best possible objective value for the node; (3) prune: prune the branch of the tree (i.e., the tree will not develop any further in this node) if the subproblem is infeasible [30].

4. Short Term Energy Forecasting for the MG’s Load and Generation Profiles

Electrical load demand forecasting, as well as RES generation forecasting, are cornerstone topics in MGEM. Minimizing the daily cost of the energy drawn by the MG from the main grid and determining the best operating points that achieve this target, require accurate forecasting for the load demand and the renewable energy generation profiles for one day ahead. Also, these profiles have to be of high resolution (i.e., small sample time), especially for small scale MGs, as in this paper, to accurately follow the actual changes in load demand or RES generation.
Short term energy forecasting (STEF) algorithms are used to predict the load demand and the renewable energy generation for a period of an hour up to 1 week ahead [31]. STEF plays an important role in unit commitment problems and optimal MG operation [32]. AI techniques have received increasing attention as a powerful computational tool for STEF forecasting since 1980. These techniques cover artificial neural networks (ANN), adaptive neuro-fuzzy inference systems (ANFIS), fuzzy systems (FS), evolutionary computation, and swarm intelligence [33]. AI techniques are able to solve nonlinear problems, and complex relationships, and can be used for adaptive control and decision making under uncertainty [32].
The short-term load forecasting (STLF) techniques used for EMS of the small scale MGs should be characterized by two features: first, use an adaptive approach -this is due to the nature of the loads in the small scale MGs, which change over time with the installation of new equipment such as electric vehicle chargers, heating, and other devices [34]; adaptive forecasting techniques (compared to non-adaptive techniques), can produce better results if the system changes [35]. Secondly, the forecasted profiles should have a short sampling time (i.e., 15 min, half an hour or at maximum one hour) to reflect the actual load changes through the day [36]. In this paper, an adaptive neuro-fuzzy inference system (ANFIS) is used to forecast the MG’s load demand for one day ahead with a sample time of 15 min.
The forecasting of PV generation is essential for the MGEM because the forecasted PV generation profile has a direct effect on the optimization process and on the EM behaviour [37]. In this paper, real data available at the PVOutput.org website [38] for the generation profiles of 22 kW PV station located at the University of Nottingham has been used to evaluate the EMS. A mean average percentage error (MAPE) of 3.6% has been added to the real generation PV profiles to create the forecasted PV generation profiles.

4.1. Adaptive Neuro-Fuzzy Inference System for Short Term Energy Forecasting

ANFIS is a type of artificial neural network (ANN) that is based on the Takagi–Sugeno fuzzy inference system [39]. ANFIS is an adaptive network, which allows the implementation of a neural network topology together with fuzzy logic and utilizes the characteristics of both methods. This method uses a combination of least squares estimation and backpropagation for parameter estimation for the membership functions [35], and can deal with linear, nonlinear, and complex problems [40].
ANFIS is used for STEF as a method for tuning an existing rule base of a fuzzy system, with a learning algorithm based on a collection of training data found in an ANN. As the parameters are of a fuzzy system rather than a conventional ANN, the ANFIS is trained faster and more accurately than conventional ANNs. An ANFIS corresponding to a Sugeno type fuzzy model with two inputs and a single output is shown in Figure 3 [40]. It is obvious from the figure that the ANFIS structure is multi-layer. The function of each layer is described in Table 1.
The common rule set of two fuzzy ‘if-then’ rules used for a Sugeno fuzzy model is
Rule   1 :   If   k 1   is   A 1   and   k 2   is   B 1 ,   then   F 1 = p 1 k 1 + q 1 k 2 + r 1 Rule   2 :   If   k 2   is   A 2   and   k 2   is   B 2 ,   then   F 2 = p 2 k 1 + q 2 k 2 + r 2

4.2. Load Forecasting Using ANFIS

The historical load profiles used for STLF using ANFIS are for the period from 1 January 2014 to 1 February 2015 (i.e., 13 months of data). The load profiles used are for a UK based community and have been created using a model from the Centre for Renewable Energy Systems Technology (CREST) (Richardson and Thompson [41]) based on actual measurements. The weather data used (i.e., temperature and humidity) is actual data obtained from the SODA site for solar energy services for the city of Nottingham, UK for the period between 1 January 2014 and 1 February 2015 [42].
The ANFIS model used for load forecasting consists of seven input variables:
-
Time of the day (i.e., every quarter hour);
-
Weather data (temperature °C);
-
Weather data (humidity %);
-
Day of the year: used for differentiating between different seasons;
-
Type of the day: working day, weekend or a public holiday;
-
Previous day same time load (kW);
-
Previous week same day same time load (kW).
Each input variable has three membership functions. The membership functions are defined by training the ANFIS using a large set of data for historical load profiles. Also, 10 epochs are used for each training phase. The ANFIS model is trained with one year of data (from 1 January 2014 to 31 December 2014), and tested for one month of data (from 1 January 2015 to 1 February 2015). All the data have a 15 min sample time.
To evaluate the use of this approach in STEF, the mean absolute error (MAE) and the mean absolute percentage error (MAPE) are used for studying the performance of the data output.
M . A . E = 1 N t o T | A t F t |
M . A . P . E = 1 N t o T | A t F t A t | × 100
where A t is the actual point, F t is the forecasted point and N is the number of observation points.
The sharpness of the load profiles for small communities, in addition to using a short sample time to reflect the actual load changes that occur, make STLF for this type of load a great challenge. Figure 4a shows a comparison between both the forecasted load and the actual load for one month (from 1 January 2015 and 1 February 2015). Also, Figure 4b shows the difference between the actual and the forecasted load demand. The MAPE of the forecasted loads over this month is 8.9% and the MAE is 0.38 kW. These values are acceptable for this type of kW load profile (for small scale MGs), compared to MAPE and MAE values obtained when forecasting MW loads for large grids [43]. Figure 5 shows a comparison between both the forecasted and the actual load demand for a working day using a sample time of 15 min. The MAPE for the forecasted load is 8.03% and the MAE is 0.35 kW. The results obtained demonstrate the capability of the proposed ANFIS in achieving good results for STLF in a small-scale MG.

4.3. Comparison between Using ANFIS Versus ANN in Short Term Load Forecasting for Small Scale MGs

One of the drawbacks of using an ANN in load forecasting is not being an adaptive forecasting method. The ANN is trained to forecast a certain system with a certain load profile. If the system changes or the loads increase/decrease, the ANN will not be able to generate accurate forecasted profiles. The ANFIS is an adaptive forecasting technique that can adapt to systems that constantly change.
In small scale MGs, system changes have a great effect on the load profile, (for example by adding new equipment such as electric vehicle chargers and/or heating devices [34], or if one or more of the community houses are not used for a long time) and this has a detrimental effect on the forecasting process. Table 2 shows a comparison between using an ANFIS versus an ANN in STLF for the small-scale MG used in this paper. The table shows the resulting MAPE for the forecasted loads when the load demand is changed from the original one used in the training of the forecasting model. This change is achieved by increasing or decreasing the input variables used for forecasting—previous day, same time load and previous week, same day, same time load—using a randomly generated multiplying factor. The percentage change is shown in Table 2 (first column), as well as the effect of this change on the MAPE of the new forecasted load.
It can be seen from Table 2 that ANFIS shows success in dealing with system changes. The results obtained from Table 2 demonstrate that ANFIS can be used in load forecasting for small scale MGs without being trained again when the system changes. The results show that, with up to 20% increase or decrease in the system demand (i.e., increase/decrease in a random manner), the ANFIS still forecasts the load for the next day with nearly the same accuracy compared to the ANN that losses accuracy quickly with any load changes.

5. Real-Time Predictive Controller

This section presents the real-time predictive controller (RTPC) that controls the settings of the BESS in real time to ensure the MG follows its reference value obtained from the HLEM layer.

5.1. Real-Time Predictive Controller Operation Algorithm

The RTPC is a real-time controller that controls the settings of the BESS in real time, in a way that makes the MG follow the reference values for the power drawn from the main electric grid. The RTPC depends on a rolling horizon base and a predictive technique. The operating principle of the RTPC is based on determining the correct setting of the BESS over the next time step (the time step is one minute) by predicting accurately the net demand of the MG (load demand minus PV generation) over the next time step and comparing it with the reference values for the power drawn from the main electric grid (obtained from the HLEM stage). This process is repeated over a rolling horizon with a 1 min sample time. The operation is completed using very short-term forecasting of load and PV generation, as well as the model of the BESS. Figure 6 shows the complete operating process of the RTPC as a part of the whole operating algorithm of the proposed EMS. Figure 6a shows the HLEM stage used to determine the reference value, Figure 6b shows the adaptive autoregression forecasting algorithm used to feed the RTPC with the required data (which will be described in details in Section 2), Figure 6c shows the operating procedure of the RTPC.
The novelty in using a real-time predictive controller based on an autoregression forecasting algorithm appears in the integration of a simple and fast forecasting technique such as autoregression (AR) and a rule-based controller, all within a rolling horizon environment, to achieve real-time control of the BESS. This controller performs as a model predictive controller but without using the system’s state space model.
Where Pnet f o r e c _ m i n u t e ( t + 1 ) is the forecasted net demand of the MG for the next minute, P   load f o r e c _ m i n u t e ( t + 1 ) is the forecasted load demand of the MG for the next minute, P   pv f o r e c _ m i n u t e ( t + 1 ) is the forecasted PV generation of the MG for the next minute, and Pdrawn ref ( t + 1 ) is the reference value for the power drawn from the main electric grid in the next minute (obtained from the HLEM stage). The actual SOC of the BESS is measured every sample time (i.e., 1 min) and is used to calculate the SOC of the BESS for the next minute. This step is used to keep the RTPC updated with the actual SOC of the BESS.

5.2. Integration of the Adaptive Autoregression Algorithm and the Real-Time Predictive Controller

The RTPC depends on the forecasted net demand for the next minute to calculate the correct BESS settings. From this point of view, it is essential to select an appropriate algorithm to feed the RTPC with the required data with high accuracy.
The forecasting of the load demand and PV generation for the next minute or minutes is called very short-term energy forecasting (VSTEF). An autoregression (AR) algorithm is one of the most popular algorithms in VSTEF [44]. In this paper, an adaptive AR algorithm is used to accurately forecast the load demand of the MG and the PV generation for the next minute. AR is a simple method that can be used to obtain accurate forecasts for time series problems. Energy forecasting using the AR model is based on using a time series model that depends on stochastic calculations in which the future values are predicted based on past values. As the model uses data from the same input variable at previous time steps to forecast the next value, it is termed autoregression. Adaptive AR forecasting is used in this paper as it is a simple method, has a fast execution time (only 1 s for forecasting the next point), is adaptive and can be trained easily for the time series used.
The AR model used in this research is defined by the equation
y t = Φ + ψ 1 y t 1 + ψ 2 y t 2 + + ψ p y t p + A t
where y t is the forecasted value, ψ 1 , ψ 2 , ψ p and Φ are coefficients found by optimizing the model on training data, y t 1 ,   y t 2 ,   . y t p are the past series values (lags), P is the order of the AR model and A t is white noise, is assumed zero in this paper. Figure 6b shows the adaptive autoregression algorithm to forecast the load demand and the PV generation for the next minute.

6. High-Level Energy Management Simulation Results and Performance Analysis

In this section, the simulation results for the HLEM stage of the MG are presented. The simulation process is performed using the parameters shown in Table 3, and the algorithm executed using a script operating in MATLAB. The tariff scheme used is a time of use (TOU) tariff for purchasing electrical energy from the main grid, and a fixed tariff for selling electric energy to the main grid [45,46,47]. Table 4 shows the values of the tariff periods used.
To demonstrate the capability of the proposed EM strategy for dealing with different scenarios, the EMS has been evaluated for all four seasons, and for both weekdays and weekends.

6.1. Spring

In this part, a day in spring has been simulated. Figure 7a shows that the proposed EMS managed to reduce the energy that is imported from the main grid at the peak time (between 4 pm and 8 pm) by enabling the BESS to feed the majority of the MG’s needs during this time period. This can be compared to the case where no EMS or BESS is used, where the MG will consume all available PV generation when it can, and then import all additional power from the main electric grid, usually at peak tariff which leads to high daily operating costs. From the simulation results, the proposed EM strategy was able to decrease the estimated daily cost of the energy drawn by the MG from the main grid from £10.9 before using any management techniques or storage system, to £7.1 after using the proposed EM strategy with the BESS (i.e., the reduction percentage is 35% per day).
Figure 7a,b shows that the proposed EMS managed to store the excess PV generation in the BESS and avoided exporting any to the main grid. This appears in the period between 11:00 a.m. and 12:30 p.m. Figure 7c shows that the BESS charges at off-peak time (between 12:00 a.m. and 7:00 a.m.) when the purchase tariff of the electrical energy from the main grid is low, to be used later at peak tariff times. Also, it is observed from the same figure that the proposed strategy managed to keep the SOC of the BESS within limits (between 20% and 90%) while reducing the daily cost of the energy drawn from the main grid.

6.2. Summer

A day of the summer season was also simulated. In summer seasons, the EMS faces a different challenge as the generated PV energy in many of the summer days is greater than the load consumption during the day, and the EMS should prioritize the capture of excess PV energy to be consumed in the MG. Figure 8b shows the load demand and PV generation profiles for a summer day and Figure 8a demonstrates that the EMS prioritizes self-consumption of the PV energy, as no power is exported to the main grid during the periods that have excess PV generation (8:00 a.m. to 10:30 a.m., and 12:00 p.m. to 4:30 p.m.). Figure 8c shows that the BESS only receives minimal charging overnight (in contrast to spring); instead, it charges during the periods that have excess PV generation.
From the simulation results, the proposed EMS decreases the estimated daily cost of the energy drawn by the MG from £5.5 before using any management strategy or storage system, to £2.2 after using the proposed EM strategy with the BESS (i.e., reduction of 60% per day). The reduction of cost in the summer compared to spring is clearly due to efficiently capturing the extra PV energy now available.

6.3. Autumn

This EMS/BESS behaviour for autumn resembles the behavior for spring, but with lower PV generation. Figure 9 shows that the EM strategy managed to determine the reference values for the power drawn by the MG from the main grid, in a way that: (1) minimizes the purchased energy during the peak times; (2) maximizes the self-consumption of the RES; (3) makes a good use of the BESS, keeping it within its limits. In this way, the estimated daily cost of the energy drawn by the MG decreased from £10.9 (without EMS, BESS), to £6.5 (i.e., reduction of 40% per day). Figure 9c shows that the BESS is charged at off-peak times, and then discharged at peak times.

6.4. Winter

Figure 10b shows forecasted consumption and generation during a weekend day in winter—studied to demonstrate that the proposed EMS can deal with different load profiles. It is obvious that the electricity demand is more in winter than in other seasons, due to the increased use of heating and lighting systems. Figure 10a shows that the BESS feeds most of the load at peak time, but it could not feed the whole load due to the BESS power limits. Figure 10c shows that the SOC of the BESS falls to its minimum value (i.e., 20%) at 8 pm, and this point shows the importance of selecting the best size for the BESS to be used—a bigger BESS capacity may be of benefit for a few days in winter, but may not be cost effective when considering its performance over a full year. The optimal sizing of a BESS is not studied in this paper. The large difference between demand and generation can be mainly avoided using a proper sizing for generation units (e.g., battery energy storage and photovoltaic system) to be able to feed the loads almost all the time. Also, it is clear that the EMS does not allow the BESS to supply any loads during the mid-peak times (from 7:00 a.m. to 4:00 p.m.), and instead, energy from the main grid is used to supply the load during this time period. This is to keep the BESS at a maximum SOC (90%) to be used at the peak times where the purchasing tariff of the energy from the main grid is about twice its value during the mid-peak times.
The EMS/BESS was able to reduce the estimated daily cost of the energy drawn from the main grid by 21% (i.e., from £16.9 before using any management or storage system, to £13.3 after using the proposed EMS with the BESS).

6.5. Economic Analysis

The overhead incurred by using a very short sampling time can be summarized in terms of payments and incomes. Payments include the cost of the required infrastructure for data collection and processing for a sample time of 1 min. The income is the extra reduction in daily operating costs that can be achieved compared to previous methods with a long sample time.
For the proposed EMS, the required infrastructure needed for data collection and processing is the same as that used for any other MGEM system. This infrastructure consists of measurement devices, data aggregators, signal processing servers, and a communication network. The only difference for the case of using the proposed EMS is that the data collection and processing needs to be achieved in a 1 min sample time. This can still be achieved using relatively low-cost data acquisition and communications equipment.
Table 5 shows a comparison between the seasonal costs of the energy drawn by the small-scale MG from the main electrical grid, as well as the yearly amount of PV self-consumption when using the proposed EMS compared to other control approaches.
When evaluating the proposed EMS for the whole year, the yearly cost of the energy drawn by the MG from the main grid is estimated to be £3182 without the EMS/BESS. The cost saving when using the proposed EMS/BESS is estimated to be £1145 (i.e., 36% saving per year). The local self-consumption of the RES within the small-scale MG increases from 54.33% (without EMS, BESS) to 91.75% after using the proposed EMS/BESS. The results obtained encourage investment in the EMS/BESS as it ensures a reduction in the total operating cost of the MG.

7. Experimental Verification

The whole EMS was implemented experimentally in real time. This included the high-level EM stage which determines the control signals for the BESS settings and the periodic measurement of the real SOC of the BESS. The aim of this experiment was to: (1) ensure that the proposed EMS can be applied in a real system without any difficulties; (2) Observe the system response while using a real BESS; (3) Ensure that the proposed strategy will operate correctly in the presence of a real communication system which can introduce a time-lag in the control signals.

7.1. Laboratory-Based Microgrid Architecture and Parameters

The experimental system was implemented in the University of Nottingham FlexElec Laboratory, using the microgrid shown in Figure 11 and Figure 12. The components of the MG and the parameters of the BESS are listed in Appendix A. The software development packages used in this experiment are: LABVIEW software—which is used as a graphical user interface GUI and a control tool to implement the proposed control algorithm, and MATLAB software—which is used to run the optimization algorithm that is used in the high level EM stage and perform the forecasting process.
The microgrid is connected to an isolated busbar. The main source for this MG is a 90 kVA Triphase converter [48] which is a programmable source acting as the main grid connection. Two 10 kW bidirectional Gendrive power converters are connected between the main utility bus and the MG: these inject or absorb active power and reactive power into the MG according to references received from a CANBUS communication interface [49,50]. They are used to emulate the load and the PV profiles by following references (generated using the same load and PV data used for the simulation work) sent from the central control platform. A 24 kWh battery system is also connected to the MG using a 7 kW Triphase power converter. The reference for the battery is received from the central control platform via a CANBUS interface. The central control platform is the hierarchical control structure (EMS) presented in this paper, implemented using LABVIEW on a PC and communicating with all MG elements.

7.2. Experimental Results Using the Proposed EMS

The HLEM stage is implemented using LABVIEW software which includes embedded MATLAB functions for short term load forecasting, short term PV generation forecasting and the MILP optimization process. The reference setting obtained from the high level stage is updated and passed to the RTPC every 15 min using a CAN communication system [49,50]. The RTPC is implemented using LABVIEW software and is executed every minute such that: (1) It receives the measured SOC of the BESS using the CAN system; (2) it updates the forecasted load and the forecasted PV generation for the next minute using the integrated adaptive AR algorithm; (3) it sends the optimal power setting to the BESS. The CAN communication system plays an important role in delivering the settings to the BESS and receiving the SOC at a high sample rate (less than 20 ms). Figure 13 shows the net time required for measuring, computing, and communicating through high-level energy management layer and real-time predictive controller layer respectively.
It is obvious from Figure 13a that the net time required for measuring, computing and communicating through high-level energy management layer is only 13 s. This time is very short and does not affect the EMS results-compared to the time period in which this layer is updated (i.e., updated every 15 min). Figure 13b shows that the net time required for measuring, computing and communicating through the real-time predictive controller layer is 4.12 s. As this layer is repeated every 1 min, the time used for measuring, computing and communicating is acceptable and does not affect the accuracy of the results.
In this experiment, the control system runs in real time but the time slot of the PV generation profile, load consumption profile, and the control signals are scaled down from 1 min to 30 s [24,27]. This enables the experimental emulation of a whole day in 12 h only instead of 24 h. Also, the capacity of the battery used has been scaled in the same proportion, to be 24 kWh (i.e., the battery used in the experiment) instead of 48 kWh as in the real system. The relation used in the scaling process is
B Capacity exp = B Capacity real   system × 30 60
Figure 14a shows the actual and the reference values for the power drawn by the small-scale MG from the main electricity grid. Figure 14b shows the actual electrical load and PV generation profiles used in the experiment. Figure 15a shows the settings sent to the BESS. Figure 14b shows the measured state of charge of the BESS. Figure 14 and Figure 15 are of 1 min sample time. It is obvious from Figure 14a that the proposed EMS succeeded in forcing the small scale MG to follow the reference value for the power drawn from the main electricity grid (obtained from the HLEM) wherever possible. The MAPE of the actual power drawn away from the desired reference values is 4.85%. (i.e., the major part of this error is due to the BESS reaching its SOC limits and not from the RTPC itself or its predictive mechanism). The adaptive AR forecasting method integrated with the RTPC forecasts the load demand for the next minute with a MAPE of 6%, and the PV generation for the next minute with MAPE of 2.5%.
Between 8:30 p.m. and 9:00 p.m., the RTPC has not followed the reference values for the power drawn from the main grid as the BESS has reached its minimum SOC limit as shown in the highlighted zoom in Figure 14a and Figure 15b. The reason for this is that the forecasted load which is used to determine the reference values for the power drawn in the high-level EM stage does not exactly match the actual load. Figure 15b demonstrates the capability of the EMS to keep the SOC of the BESS within limits (between 20% and 90%). The experimental results demonstrate feasibility for implementation of the proposed EMS for real Energy MG systems using 1 min sample time and neither the computation nor the communication time have a significant effect on the results.
Figure 16a–d show a comparison between the actual power drawn by the MG from the main electricity grid when using the proposed two-layer EMS compared to using an EMS of longer sampling time and a single layer. Figure 16e shows the state of charge curve of the BESS, and Figure 16f shows the electrical load and PV generation profiles (1 min sample time).
Figure 16a–d show that the proposed EMS using the two-layer structure (HLEM and RTPC) managed to minimize the power drawn from the main grid during the peak-time tariff period and avoids exporting the extra energy to the main grid, compared to the other EMS systems which have a longer sampling time and only a single layer, which suffer from inaccurate results.
Figure 16a shows that using an EMS with a 2 h sampling time and a single layer could not manage to minimize the power drawn from the main grid during the peak-time tariff period or increase the self-consumption of the PV generation within the MG which is obvious from the circled areas (1-a) and (2-a). It is obvious from circle (1-a) that in the case of using EMS of 2 h sampling time, the MG exports power to the main grid although the BESS is not fully charged (Figure 16e). The EMS should save this power to be used later to feed the loads at peak tariff times instead of exporting it to the main electrical grid. Also, it is obvious from circle (2-a) that in the case of using EMS of 2 h sampling time, the MG imports power from the main grid during the peak tariff time, which increases the daily cost of the power drawn from the main grid. The reason for this undesired imported/exported power appearing in circles (1-a) and (2-a) is that using an EMS with a 2 h sampling time updates the BESS settings every 2 h, so if the load or the PV generation changed during this period, no action can be taken.
It is also obvious from circles (1-b), (1-c), and (1-d) that the value of the undesired exported power to the main grid decreases by using a shorter sampling time. Also, from circles (2-b), (2-c), and (2-d), the undesired imported power by the MG from the main grid at peak tariff time is reduced when using shorter sampling time.

8. Conclusions

A new hierarchical energy management system has been proposed for energy communities. It comprises a high-level energy management system which uses a mixed integer linear programming approach to solving the MG optimization problem which aims to minimize the cost of electricity for the small scale MG and maximise self-consumption of the locally generated PV energy. The HLEM provides a reference for the grid power drawn by the small-scale MG and this is then controlled using a low-level real-time predictive controller which uses very short-term predictions of load and PV generation to control a battery energy storage system.
The proposed EMS succeeds in reducing the daily cost of the energy drawn by the small-scale MG and increasing the self-consumption of the RES and has been shown to work successfully in each of the four seasons. A daily cost reduction of 21 to 60% can be achieved depending on the season, the tariff scheme used, and on the BESS capacity. The local self-consumption of the RES within the small-scale MG increases to 91% after using the proposed EMS/BESS.
The use of the RTPC enables the small scale MG to follow the reference values for the power drawn from the main electricity grid with high accuracy, and hence, the main electric grid can consider the small scale MG as one controllable unit that imports/exports power based on a predefined scenario, in a way that works for the benefit of the whole grid. Also, the use of ANFIS for short term energy forecasting shows great success in forecasting the highly fluctuating load demand with high accuracy.
The proposed methodology successfully dealt with small scale MGs using a very short sample time of 1 min. This short sample time enables the proposed methodology to observe and respond to the small changes in the load and generation throughout the day, which achieves a better profit for MG customers.
The experimental results demonstrate the proposed strategy can work in real time with a real communication system providing an interconnect between the system elements.

Author Contributions

Conceptualization, M.S. and D.T.; Methodology, M.S.; Simulation, M.E.; Experimental Validation, M.E.; Investigation and Analysis, M.E.; Writing—Original Draft Preparation, M.E.; Writing—Review and Editing, M.S. and D.T.

Funding

This work is supported by the University of Nottingham (through Hermes Funding), the Egyptian Government- ministry of higher education (cultural affairs and missions sector) and the British Council through Newton-Mosharafa fund.

Acknowledgments

I would like to thank Richard Davies, Research Associate at the University of Nottingham for his assistance within the experimental work.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

EMSEnergy management system
EMEnergy management
MGMicrogrid
RESRenewable energy resources
DERsDistributed energy resources
ESSEnergy storage systems
MGEMMicrogrid energy management
MILPMixed integer linear programming
BESSBattery energy storage system
TOUTime of use tariff
PVPhotovoltaic
SOCState of charge
HLEMSHigh level energy management
STEFShort-term energy forecasting
AIArtificial intelligence
ANNArtificial neural networks
ANFISAdaptive neuro-fuzzy inference system
FSFuzzy system
STLFShort-term load forecasting
MAPEMean average percentage error
CRESTCenter for Renewable Energy Systems Technology
MAEMean absolute error
RTPCReal-time predictive controller
VSTEFVery short-term energy forecasting
ARAutoregression algorithm
CANController area network
AIArtificial intelligent
ANNArtificial neural networks

Appendix A

Table A1. Components of the MG used in this experiment.
Table A1. Components of the MG used in this experiment.
EquipmentDescription
2 busbars, 2000 A eachOne busbar is used as the MG busbar, and the other one represents the utility (i.e., main grid)
6 disconnecting switches, 63 A eachUsed to protect the whole MG
2 Gendrive converters, 10 kW eachUsed as emulators to emulate the load profile and the PV generation profile
Battery energy storage system (BESS)One BESS consists of a 24 kWh Li-ion battery and a 7 kW power converter to interface with the MG
CANbus communication system, Speed 1 MbpsController Area Network (CAN) is the communication system used in this experiment, it represents the nervous system that enables the communication between all MG’s parts
1 PCCore i3-7100 CPU, 3.91 GHz, 8 GB RAM
Nominal system voltage/frequency380 V/50 HZ
Table A2. Parameters of the battery energy storage system used.
Table A2. Parameters of the battery energy storage system used.
ParameterRatingParameterRating
Nominal battery capacity24 kWh SOC min 20%
Nominal battery voltage400 V SOC max 90%
Battery efficiency ( η d )90%BESS power converter (rated power)±7 kW
Battery ramp-up rate7 kW/1 minConverter efficiency ( η Conv )95%
Battery ramp-down rate7 kW/1 minConverter fixed losses ( P C _ conv )0.33 kW

References

  1. Bartels, G. Global Smart Grid Federation Report. In Global Smart Grid Federation; 2012; pp. 8–11. Available online: https://www.smartgrid.gov/files/Global_Smart_Grid_Federation_Report.pdf (accessed on 1 July 2019).
  2. Nejabatkhah, F.; Li, Y.W. Overview of power management strategies of hybrid AC/DC microgrid. IEEE Trans. Power Electron. 2015, 30, 7072–7089. [Google Scholar] [CrossRef]
  3. Worku, M.Y.; Hassan, M.A.; Abido, M.A. Real Time Energy Management and Control of Renewable Energy based Microgrid in Grid Connected and Island Modes. Energies 2019, 12, 276. [Google Scholar] [CrossRef]
  4. Jeong, B.-C.; Shin, D.-H.; Im, J.-B.; Park, J.-Y.; Kim, Y.-J. Implementation of Optimal Two-Stage Scheduling of Energy Storage System Based on Big-Data-Driven Forecasting—An Actual Case Study in a Campus Microgrid. Energies 2019, 12, 1124. [Google Scholar] [CrossRef]
  5. Ebrahimi, M.R.; Amjady, N. Adaptive robust optimization framework for day-ahead microgrid scheduling. Int. J. Electr. Power Energy Syst. 2019, 107, 213–223. [Google Scholar] [CrossRef]
  6. Iqbal, M.; Azam, M.; Naeem, M.; Khwaja, A.; Anpalagan, A. Optimization classification, algorithms and tools for renewable energy: A review. Renew. Sustain. Energy Rev. 2014, 39, 640–654. [Google Scholar] [CrossRef]
  7. Shi, W.; Xie, X.; Chu, C.-C.P.; Gadh, R. Distributed Optimal Energy Management in Microgrids. IEEE Trans. Smart Grid 2015, 6, 1137–1146. [Google Scholar] [CrossRef]
  8. Mirzania, P.; Andrews, D.; Ford, A.; Maidment, G. Community Energy in the UK: The End or the Beginning of a Brighter Future? In Proceedings of the 1st International Conference on Energy Research and Social Science, Melia Sitges, Spain, 2–5 April 2017. [Google Scholar]
  9. Parra, D.; Norman, S.A.; Walker, G.S.; Gillott, M. Optimum community energy storage for renewable energy and demand load management. Appl. Energy 2017, 200, 358–369. [Google Scholar] [CrossRef]
  10. Mercurio, A.; Di Giorgio, A.; Quaresima, A. Distributed control approach for community energy management systems. In Proceedings of the 2012 20th Mediterranean Conference on Control & Automation (MED), Barcelona, Spain, 3–6 July 2012; pp. 1265–1271. [Google Scholar]
  11. Koirala, B.P.; Koliou, E.; Friege, J.; Hakvoort, R.A.; Herder, P.M. Energetic communities for community energy: A review of key issues and trends shaping integrated community energy systems. Renew. Sustain. Energy Rev. 2016, 56, 722–744. [Google Scholar] [CrossRef] [Green Version]
  12. Strickland, D.; Varnosfederani, M.A.; Scott, J.; Quintela, P.; Duran, A.; Bravery, R.; Corliss, A.; Ashworth, K.; Blois-Brooke, S. A review of community electrical energy systems. In Proceedings of the 2016 IEEE International Conference on Renewable Energy Research and Applications (ICRERA), Birmingham, UK, 20–23 November 2016; pp. 49–54. [Google Scholar]
  13. Bahramirad, S.; Reder, W.; Khodaei, A. Reliability-constrained optimal sizing of energy storage system in a microgrid. Perspectives 2012, 1, 3. [Google Scholar] [CrossRef]
  14. Moradi, H.; Esfahanian, M.; Abtahi, A.; Zilouchian, A. Optimization and energy management of a standalone hybrid microgrid in the presence of battery storage system. Energy 2018, 147, 226–238. [Google Scholar] [CrossRef]
  15. Pfeifer, A.; Dobravec, V.; Pavlinek, L.; Krajačić, G.; Duić, N. Integration of renewable energy and demand response technologies in interconnected energy systems. Energy 2018, 161, 447–455. [Google Scholar] [CrossRef]
  16. Tenfen, D.; Finardi, E.C. A mixed integer linear programming model for the energy management problem of microgrids. Electric Power Syst. Res. 2015, 122, 19–28. [Google Scholar] [CrossRef]
  17. Elkazaz, M.H.; Hoballah, A.; Azmy, A.M. Optimizing distributed generation operation for residential application based on automated systems. In Proceedings of the 2015 4th International Conference on Electric Power and Energy Conversion Systems (EPECS), Sharjah, UAE, 24–26 November 2015; pp. 1–6. [Google Scholar]
  18. Roldán-Blay, C.; Escrivá-Escrivá, G.; Roldán-Porta, C.; Álvarez-Bel, C. An optimisation algorithm for distributed energy resources management in micro-scale energy hubs. Energy 2017, 132, 126–135. [Google Scholar] [CrossRef]
  19. Nemati, M.; Braun, M.; Tenbohlen, S. Optimization of unit commitment and economic dispatch in microgrids based on genetic algorithm and mixed integer linear programming. Appl. Energy 2018, 210, 944–963. [Google Scholar] [CrossRef]
  20. Farsangi, A.S.; Hadayeghparast, S.; Mehdinejad, M.; Shayanfar, H. A novel stochastic energy management of a microgrid with various types of distributed energy resources in presence of demand response programs. Energy 2018, 160, 257–274. [Google Scholar] [CrossRef]
  21. Elma, O.; Taşcıkaraoğlu, A.; İnce, A.T.; Selamoğulları, U.S. Implementation of a dynamic energy management system using real time pricing and local renewable energy generation forecasts. Energy 2017, 134, 206–220. [Google Scholar] [CrossRef]
  22. Parisio, A.; Rikos, E.; Glielmo, L. A model predictive control approach to microgrid operation optimization. IEEE Trans. Control. Syst. Technol. 2014, 22, 1813–1827. [Google Scholar] [CrossRef]
  23. Elsied, M.; Oukaour, A.; Youssef, T.; Gualous, H.; Mohammed, O. An advanced real time energy management system for microgrids. Energy 2016, 114, 742–752. [Google Scholar] [CrossRef]
  24. Luna, A.C.; Diaz, N.L.; Graells, M.; Vasquez, J.C.; Guerrero, J.M. Mixed-integer-linear-programming-based energy management system for hybrid PV-wind-battery microgrids: Modeling, design, and experimental verification. IEEE Trans. Power Electron. 2016, 32, 2769–2783. [Google Scholar] [CrossRef]
  25. Marzband, M.; Yousefnejad, E.; Sumper, A.; Domínguez-García, J.L. Real time experimental implementation of optimum energy management system in standalone microgrid by using multi-layer ant colony optimization. Int. J. Electr. Power Energy Syst. 2016, 75, 265–274. [Google Scholar] [CrossRef]
  26. Marzband, M.; Sumper, A.; Ruiz-Álvarez, A.; Domínguez-García, J.L.; Tomoiagă, B. Experimental evaluation of a real time energy management system for stand-alone microgrids in day-ahead markets. Appl. Energy 2013, 106, 365–376. [Google Scholar] [CrossRef]
  27. Luna, A.C.; Meng, L.; Diaz, N.L.; Graells, M.; Vasquez, J.C.; Guerrero, J.M. Online energy management systems for microgrids: Experimental validation and assessment framework. IEEE Trans. Power Electron. 2018, 33, 2201–2215. [Google Scholar] [CrossRef]
  28. Jünger, M.; Liebling, T.M.; Naddef, D.; Nemhauser, G.L.; Pulleyblank, W.R.; Reinelt, G.; Rinaldi, G.; Wolsey, L.A. 50 Years of Integer Programming 1958–2008: From the Early Years to the State-of-the-Art; Springer Science & Business Media: Berlin, Germany, 2009. [Google Scholar]
  29. Vielma, J.P. Mixed integer linear programming formulation techniques. SIAM Rev. 2015, 57, 3–57. [Google Scholar] [CrossRef]
  30. Smith, J.C.; Taskin, Z.C. A Tutorial Guide to Mixed-Integer Programming Models and Solution Techniques. Optim. Med. Biol. 2008, 521–548. Available online: https://pdfs.semanticscholar.org/3dba/4ce1e3265e480da88f76d00e53909e775513.pdf (accessed on 1 July 2019).
  31. Hong, T.; Fan, S. Probabilistic electric load forecasting: A tutorial review. Int. J. Forecast. 2016, 32, 914–938. [Google Scholar] [CrossRef]
  32. Raza, M.Q.; Khosravi, A. A review on artificial intelligence based load demand forecasting techniques for smart grid and buildings. Renew. Sustain. Energy Rev. 2015, 50, 1352–1372. [Google Scholar] [CrossRef]
  33. Amber, K.; Ahmad, R.; Aslam, M.; Kousar, A.; Usman, M.; Khan, M. Intelligent techniques for forecasting electricity consumption of buildings. Energy 2018, 157, 886–893. [Google Scholar] [CrossRef]
  34. Yuill, W.; Kgokong, R.; Chowdhury, S.; Chowdhury, S. Application of Adaptive Neuro Fuzzy Inference System (ANFIS) based short term load forecasting in South African power networks. In Proceedings of the Universities Power Engineering Conference (UPEC), 2010 45th International, Cardiff, UK, 31 August–3 September 2010; pp. 1–5. [Google Scholar]
  35. Akarslan, E.; Hocaoglu, F.O. A novel short-term load forecasting approach using Adaptive Neuro-Fuzzy Inference System. In Proceedings of the 2018 6th International Istanbul Smart Grids and Cities Congress and Fair (ICSG), Istanbul, Turkey, 25–26 April 2018; pp. 160–163. [Google Scholar]
  36. De Andrade, L.C.M.; da Silva, I.N. Very short-term load forecasting using a hybrid neuro-fuzzy approach. In Proceedings of the 2010 Eleventh Brazilian Symposium on Neural Networks (SBRN), Sao Paulo, Brazil, 23–28 October 2010; pp. 115–120. [Google Scholar]
  37. Antonanzas, J.; Osorio, N.; Escobar, R.; Urraca, R.; Martinez-de-Pison, F.; Antonanzas-Torres, F. Review of photovoltaic power forecasting. Sol. Energy 2016, 136, 78–111. [Google Scholar] [CrossRef]
  38. ETB_UoN_Notts_UK. Daily ETB_UoN_Notts_UK 22kW. Available online: https://pvoutput.org (accessed on 1 December 2016).
  39. Jang, J.-S. ANFIS: Adaptive-network-based fuzzy inference system. IEEE Trans. Syst. Man Cybern. 1993, 23, 665–685. [Google Scholar] [CrossRef]
  40. Al-Mayyahi, A.; Wang, W.; Birch, P. Adaptive neuro-fuzzy technique for autonomous ground vehicle navigation. Robotics 2014, 3, 349–370. [Google Scholar] [CrossRef]
  41. Richardson, I.; Thomson, M. Domestic Electricity Demand Model-Simulation Example. (CREST Software). Available online: https://dspace.lboro.ac.uk/dspace-jspui/handle/2134/5786 (accessed on 1 June 2018).
  42. Nottingham Weather Data. Available online: http://www.soda-pro.com/web-services/radiation/helioclim-3-archives-for-free (accessed on 1 June 2018).
  43. Hernández, L.; Baladrón, C.; Aguiar, J.M.; Carro, B.; Sánchez-Esguevillas, A.; Lloret, J. Artificial neural networks for short-term load forecasting in microgrids environment. Energy 2014, 75, 252–264. [Google Scholar] [CrossRef]
  44. Baharudin, Z.; Kamel, N. Autoregressive method in short term load forecast. In Proceedings of the PECon 2008-2008 IEEE 2nd International Power and Energy Conference, Bahru, Malaysia, 1–3 December 2008; pp. 1603–1608. [Google Scholar]
  45. Purchasing Electricity Tariffs in UK. Available online: https://www.greenenergyuk.com (accessed on 1 June 2019).
  46. Tariff Information Label. Available online: https://www.thegreenage.co.uk/first-time-of-use-tariff-introduced/ (accessed on 1 May 2019).
  47. Selling Electricity Tariffs in UK. Available online: https://www.gov.uk/feed-in-tariffs (accessed on 1 June 2019).
  48. Triphase Converter Data. Available online: https://triphase.com/microgrid-converters/ (accessed on 1 July 2019).
  49. Li, F.; Wang, L.; Liao, C. CAN (Controller Area Network) bus communication system based on Matlab/Simulink. In Proceedings of the 4th International Conference on Wireless Communications, Networking and Mobile Computing (WiCOM 2008), Dalian, China, 2 March 2008; pp. 1–4. [Google Scholar]
  50. Ran, L.; Junfeng, W.; Haiying, W.; Gechen, L. Design method of CAN BUS network communication structure for electric vehicle. In Proceedings of the IFOST 2010: International Forum on Strategic Technology, Ulsan, Korea, 13–15 October 2010; pp. 326–329. [Google Scholar]
Figure 1. Hierarchical scheme of the microgrid energy management system.
Figure 1. Hierarchical scheme of the microgrid energy management system.
Energies 12 02712 g001
Figure 2. Simplified representation of the microgrid architecture.
Figure 2. Simplified representation of the microgrid architecture.
Energies 12 02712 g002
Figure 3. Adaptive Neuro-Fuzzy Inference system structure.
Figure 3. Adaptive Neuro-Fuzzy Inference system structure.
Energies 12 02712 g003
Figure 4. (a) The actual and the forecasted load demand for one month; (b) the difference between the actual and the forecasted load demand.
Figure 4. (a) The actual and the forecasted load demand for one month; (b) the difference between the actual and the forecasted load demand.
Energies 12 02712 g004
Figure 5. Forecasted and the actual load demand for a day ahead using a sample time of 15 min.
Figure 5. Forecasted and the actual load demand for a day ahead using a sample time of 15 min.
Energies 12 02712 g005
Figure 6. (a) High level EM stage; (b) adaptive autoregression forecasting algorithm; (c) operating procedure for the RTPC.
Figure 6. (a) High level EM stage; (b) adaptive autoregression forecasting algorithm; (c) operating procedure for the RTPC.
Energies 12 02712 g006
Figure 7. (a) Reference values for the power drawn by the MG from the main grid for spring; (b) MG’s forecasted load and PV generation profiles; (c) Resultant state of charge curve of the BESS.
Figure 7. (a) Reference values for the power drawn by the MG from the main grid for spring; (b) MG’s forecasted load and PV generation profiles; (c) Resultant state of charge curve of the BESS.
Energies 12 02712 g007
Figure 8. (a) Reference values for the power drawn by the MG from the main grid for summer; (b) MG’s forecasted load and PV generation profiles; (c) Resultant state of charge curve of the BESS.
Figure 8. (a) Reference values for the power drawn by the MG from the main grid for summer; (b) MG’s forecasted load and PV generation profiles; (c) Resultant state of charge curve of the BESS.
Energies 12 02712 g008
Figure 9. (a) Reference values for the power drawn by the MG from the main grid for autumn; (b) MG’s forecasted load and PV generation profiles; (c) Resultant state of charge curve of the BESS.
Figure 9. (a) Reference values for the power drawn by the MG from the main grid for autumn; (b) MG’s forecasted load and PV generation profiles; (c) Resultant state of charge curve of the BESS.
Energies 12 02712 g009
Figure 10. (a) Reference values for the power drawn by the MG from the main grid for winter; (b) MG’s forecasted load and PV generation profiles; (c) Resultant state of charge curve of the BESS.
Figure 10. (a) Reference values for the power drawn by the MG from the main grid for winter; (b) MG’s forecasted load and PV generation profiles; (c) Resultant state of charge curve of the BESS.
Energies 12 02712 g010
Figure 11. The microgrid at the University of Nottingham Laboratory.
Figure 11. The microgrid at the University of Nottingham Laboratory.
Energies 12 02712 g011
Figure 12. The complete architecture of the microgrid at the University of Nottingham Laboratory.
Figure 12. The complete architecture of the microgrid at the University of Nottingham Laboratory.
Energies 12 02712 g012
Figure 13. Net time required for measuring, computing, and communicating through (a) high-level energy management layer (repeated every 15 min); (b) real-time predictive controller layer (repeated every 1 min).
Figure 13. Net time required for measuring, computing, and communicating through (a) high-level energy management layer (repeated every 15 min); (b) real-time predictive controller layer (repeated every 1 min).
Energies 12 02712 g013
Figure 14. (a) Actual and the reference values for the power drawn by the MG from the main electricity grid; (b) Electrical load and PV generation profiles (1 min sample time).
Figure 14. (a) Actual and the reference values for the power drawn by the MG from the main electricity grid; (b) Electrical load and PV generation profiles (1 min sample time).
Energies 12 02712 g014
Figure 15. (a) Optimal settings sent to the BESS using 1 min sample time; (b) The measured state of charge of the BESS.
Figure 15. (a) Optimal settings sent to the BESS using 1 min sample time; (b) The measured state of charge of the BESS.
Energies 12 02712 g015
Figure 16. Actual power drawn by the MG from the main electricity grid in case of using the proposed two-layer EMS comparing to: (a) Single layer EMS of 2 h sample time; (b) Single layer EMS of 1 h sample time; (c) Single layer EMS of 30 min sample time; (d) Single layer EMS of 15 min sample time; (e) The state of charge curve of the BESS; (f) Electrical load and PV generation profiles (1 min sample time).
Figure 16. Actual power drawn by the MG from the main electricity grid in case of using the proposed two-layer EMS comparing to: (a) Single layer EMS of 2 h sample time; (b) Single layer EMS of 1 h sample time; (c) Single layer EMS of 30 min sample time; (d) Single layer EMS of 15 min sample time; (e) The state of charge curve of the BESS; (f) Electrical load and PV generation profiles (1 min sample time).
Energies 12 02712 g016
Table 1. ANFIS layer description.
Table 1. ANFIS layer description.
LayerKnown AsFunction
Layer 1Fuzzification layerThe input data are fuzzified and neuron values are represented by parameterized membership functions.
Layer 2Rule layerEach node in this layer represents the number of rules generated by the Sugeno fuzzy logic inference system.
Layer 3Normalization layerEach node accepts all nodes coming from the rule layer as input values and calculates the normalized value of each rule.
Layer 4Defuzzification layerThe weighted result values of a given rule are calculated at each node. The consequent part is obtained via linear regression or multiplication between the normalized level and the output of the respective rule.
Layer 5Summing layerThe real value of the ANFIS is produced by an algebraic sum over all rules outputs.
Table 2. Comparison between using ANFIS versus ANN in STLF for a small MG and the resultant MAPE.
Table 2. Comparison between using ANFIS versus ANN in STLF for a small MG and the resultant MAPE.
Percentage Change in Load DemandMAPE of the Forecasted Load:Percentage Change in Load DemandMAPE of the Forecasted Load:
Using ANNUsing ANFISUsing ANNUsing ANFIS
No change9.98%8.43%Decrease by (0–5%)10.1%8.85%
Increase by (0–5%)10.5%8.6%Decrease by (6–10%)11.16%9.88%
Increase by (6–10%)11.7%8.9%Decrease by (11–20%)15.1%14.4%
Increase by (11–20%)14.11%12.3%Decrease by (21–40%)29.3%25.7%
Increase by (21–40%)22.45%20.5%
Table 3. Microgrid parameters used in the simulation process.
Table 3. Microgrid parameters used in the simulation process.
ParameterValueParameterValue
Sample time ( Δ T )15 min P con _ const 0.33 kW
Battery Capacity48 kWh η Conv 95%
SOC min 20% Δ P BESS max 7 kW
SOC max 90% η c , η d 90%
P BESS   max 7 kW P   Main _ G ,   MAX 10 kW
Table 4. Purchasing and selling electricity tariffs.
Table 4. Purchasing and selling electricity tariffs.
Tariff TypeTime AppliedValue
Off-peak purchasing tariffFrom 12 am to 7 am4.99 pence/kWh
Mid-peak purchasing tariffFrom 7 am to 4 pm11.99 pence/kWh
Peak purchasing tariffFrom 4 pm to 8 pm24.99 pence/kWh
Mid-peak purchasing tariffFrom 8 pm to 12 am11.99 pence/kWh
Fixed selling tariffAll day4.85 pence/kWh
Table 5. Seasonal costs of the energy drawn by the small-scale MG from the main electrical grid as well as the yearly PV self-consumption percent using the proposed EMS and other control approaches.
Table 5. Seasonal costs of the energy drawn by the small-scale MG from the main electrical grid as well as the yearly PV self-consumption percent using the proposed EMS and other control approaches.
CaseSeasonal Cost of the Small-Scale MG (£)Yearly PV Self-Consumption
Summer SeasonWinter SeasonAutumn SeasonSpring Season
Without using EMS or storage system379.31267.8795.4739.654.33%
Using EMS of 2 h sample time + Forecasted profiles *167.1989.05533.1499.0878.95%
Using EMS of 1 h sample time + Forecasted profiles *161.2980.2524.06480.982.7%
Using EMS of half an hour sample time + Forecasted profiles *157.9971.9517.9463.183.6%
Using EMS of 15 min sample time + Forecast profiles *153.6964.1509.3441.588.64%
Using the proposed two-layer EMS + RTPC+ ANFIS forecasting146.8957.6498.5434.191.75%
Best case (EMS of 1 min + Perfect forecasting) **131.8944.5486.6423.396.67%
* The forecasted profiles for load demand and PV generation are assumed to be the real profiles with Gaussian white noise to represent the forecasting errors. Also, the percentage change in load demand (as shown in Table 2) has been considered in these cases to reflect the nature of the loads of a small-scale MG throughout the year. ** the best case is the ideal case in which the forecasted profiles are 100% accurate and the EMS is performed using the minimum possible sampling time.

Share and Cite

MDPI and ACS Style

Elkazaz, M.; Sumner, M.; Thomas, D. Real-Time Energy Management for a Small Scale PV-Battery Microgrid: Modeling, Design, and Experimental Verification. Energies 2019, 12, 2712. https://doi.org/10.3390/en12142712

AMA Style

Elkazaz M, Sumner M, Thomas D. Real-Time Energy Management for a Small Scale PV-Battery Microgrid: Modeling, Design, and Experimental Verification. Energies. 2019; 12(14):2712. https://doi.org/10.3390/en12142712

Chicago/Turabian Style

Elkazaz, Mahmoud, Mark Sumner, and David Thomas. 2019. "Real-Time Energy Management for a Small Scale PV-Battery Microgrid: Modeling, Design, and Experimental Verification" Energies 12, no. 14: 2712. https://doi.org/10.3390/en12142712

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop