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.
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
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.
where
is the actual point,
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.
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.
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.