Next Article in Journal
External Costs to Agriculture Associated with Further Open Pit Lignite Mining from the Bełchatów Deposit
Previous Article in Journal
The Effect of Agricultural Biogas Plants on the Quality of Farm Energy Supply
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Economic Dispatch for a Shared Energy Storage System Using MILP Optimization: A Case Study of a Moroccan Microgrid

1
Green Energy Park, Regional Road Kelaa Km 3, R206, Benguerir 43150, Morocco
2
Engineering for Smart and Sustainable Systems Research Centre, Mohammadia School of Engineers, Mohammed V University in Rabat, Rabat 10090, Morocco
3
LSIB Laboratory, FST, University of Hassan II, Mohammedia 28806, Morocco
4
Electrical Engineering and Intelligent Systems Laboratory, ENSET Mohammedia, Hassan II University of Casablanca, Mohammedia 28830, Morocco
5
Korea Institute of Energy Research, 152 Gajeong-ro, Yuseong-gu, Daejeon 34129, Republic of Korea
*
Author to whom correspondence should be addressed.
Energies 2023, 16(12), 4601; https://doi.org/10.3390/en16124601
Submission received: 8 April 2023 / Revised: 24 May 2023 / Accepted: 5 June 2023 / Published: 8 June 2023
(This article belongs to the Section A1: Smart Grids and Microgrids)

Abstract

:
Energy storage systems are an effective solution to manage the intermittency of renewable energies, balance supply, and demand. Numerous studies recommend adopting a shared energy storage system (ESS) as opposed to multiple single ESSs because of their high prices and inefficiency. Thus, this study examines a shared storage system in a grid-connected microgrid. By modifying the power outputs of the energy resources, this work intends to implement an economic dispatch of a shared ESS in order to satisfy the power balance and lower the overall cost of electricity. In this context, an optimization problem was formulated and developed using a mixed-integer linear programming (MILP) model. Furthermore, a pilot project (the Solar Decathlon Africa Village) in the Green & Smart Building Park (GSBP), Benguerir, Morocco, was employed to evaluate and verify the proposed approach. Some comparable scenarios were therefore run in a MATLAB environment. The collected findings demonstrate the efficacy of the developed algorithm in terms of optimizing energy cost reductions and enhancing the integration of renewable resources into the Moroccan energy mix.

1. Introduction

The significant incorporation of renewable energy sources (RES) into the energy mix is a result of the pressing need to reduce greenhouse gas emissions, which is the primary reason for global warming [1]. Utilizing these new resources has become a sustainable strategy for overcoming ecological changes and simultaneously satisfies the rising demand for energy [2].
However, the integration of renewable resources into the existing power grid poses challenges to grid operators. The most challenging issue regarding the penetration of these energy systems is grid instability. Because energy production that is based on renewable generators is heavily reliant on unpredictable weather conditions (solar radiation, wind speed), their power outputs are constantly varying, which may increase the degree of demand–supply imbalance and negatively impact grid stability and reliability. Moreover, voltage fluctuations are seen as another problematic aspect of integrating renewable energies [3]. Their changing nature influences voltage amplitude and leads to voltage increases and drops. These voltage variations affect the power quality and may cause damage to grid equipment. In addition, high-RES interconnection could generate power losses. For example, when the production of distributed generators exceeds the available demand, this creates power losses in the network lines [4].
To tackle the RES penetration challenges, energy storage systems (ESSs) are employed to control their erratic character in order to counter the fluctuation of renewable resources, decrease the discrepancy between output and demand, and lower electricity costs. Studies have proven that using one single shared ESS can be more beneficial than using multiple individual energy storage systems in a microgrid, in terms of cost reductions and energy storage use enhancements [5,6,7]. According to Ref. [5], the average daily cost decreases by 13.82% when shared energy storage is utilized rather than individual energy storage. The authors of Ref. [6] studied a model of a set of residential loads collaboratively sharing an energy storage system. The results revealed that the consumption costs of each household were reduced by 19.11–22.25%.
Furthermore, to provide lower energy services, energy storage sharing could be combined with the implementation of a demand response (DR) program. DR management is considered an effective alternative to satisfy the supply–demand balance and reduce energy costs [8]. Furthermore, demand response management enables consumers to schedule the operational time of their energy consumption according to supply availability and market price [9]. The authors of Ref. [10] showed that using a shared ESS alone, without DR management, reduced energy costs by 30%, but the reduction value could rise to 33% when a DR program was implemented.
Moreover, recent studies revealed that the advanced control of a shared ESS using optimization-based techniques could significantly minimize energy costs and reduce main grid dependence. According to Ref. [10], a reduction of 36% in energy costs was achieved by developing a real-time pricing model for a shared ESS. In Ref. [11], a distributed control algorithm for energy storage sharing was proposed. Based on the Lyapunov technique, the developed algorithm reduced the average monthly energy cost by 25.29%. The authors of Ref. [12] developed a demand response strategy using the backtracking search algorithm (BSA). Consequently, the obtained results showed a reduction in the utility bills of residential, commercial, and industrial areas of 16%, 21%, and 24%, respectively. In Ref. [13], the authors developed a scheduling model of ESS based on mixed-integer linear programming (MILP), and it was proven that the annual energy profit increased by 34.4%. In addition, in Ref. [14], a MILP model for RES and ESS was developed. The simulation results showed an energy cost minimization of 34.8%.
Further, the authors of Refs. [15,16] demonstrated the potential of the MILP technique in reducing the total cost of the development of a distribution power network. The MILP model was utilized by the authors of Ref. [16] to create a comprehensive optimization that took into account the allocation and sizing of renewable energy sources and energy storage systems, as well as the curtailment of RES generation and the extension of the network lines. They proved the validity of the MILP approach by lowering capital and operational costs by 48%. Additionally, compared to the genetic algorithm in Ref. [17], the MILP approach has proven its performance in finding the optimal solution with the lowest gap.
These ambitious studies have pushed countries to adopt practical approaches in order to increase RES integration into the grid. In Belgium, a demand response program has been implemented. The consumers, with installations equal to or less than 10 kW, can sell their excess energy through a net-metering scheme. Consequently, they receive remuneration for surplus energy and profit from a reduction in their electricity bills [18]. In France, the self-consumption ordinance N°2016-1019 encourages self-consumers to generate and sell their excess renewable energy directly to the electricity market or through aggregators [19]. According to this ordinance, the French Energy Regulatory Commission defines specific tariffs for power projects under 100 kW [20]. Further, in Germany, the 2017 act relating to Renewable Energy Sources allows consumers to benefit from certain support schemes such as the market premium and the tenant electricity surcharge, depending on the installed capacities [21,22].
Morocco is one of the first MENA (Middle East/North Africa) countries to adopt renewable energy programs. Morocco has implemented an innovative energy strategy in order to promote the penetration of renewable resources. By 2030, the country aims to increase its renewable energy production to 52%. To fulfill this national energy transition, a profound legislative framework has been established to facilitate the insertion of renewable sources [23]. For example, law N°13-09, which is related to liberalizing the renewable energy market, encouraged public and private entities to use renewable energy as a source of energy production. In addition, law N°58-15, the new updated version of law N°13-09, authorized selling 20% of the excess annual production from renewable sources to grid operators. Moreover, law N°82-21 on self-production allows the generation of electricity for self-consumption, regardless of the voltage level and the installed capacity [24].
The Moroccan energy policy aims to create a competitive, resilient, and sustainable electricity market by authorizing private sector participation in the energy market and promoting self-production based on renewable sources. Through this significant reform, Morocco would be able to meet its ambitious 2030 goal and become a leader in the field of renewable energy [25].
However, the possibility of selling surplus power for installations connected to medium and low voltage is not applicable yet. This paper aims to evaluate the potential of exporting excess energy production in improving renewable resource deployment while minimizing electricity costs. Hence, the main contributions of this work are defined as follows:
  • The development of an economic dispatch for shared ESS using the MILP model.
  • Performing some comparative scenarios on MATLAB/Simulink to analyze their impact on energy cost savings.
  • Testing the performance of the developed algorithm on a pilot project (Solar Decathlon Africa Village) implemented on the Smart Campus—Green & Smart Building Park, Benguerir, Morocco.
Thus, this paper is organized as follows. Section 2 presents Solar Decathlon Africa and power system modeling, including the SDA general model. It also describes the methodology used in this study. Section 3 presents the problem formulation regarding the studied approach and the different parameters and components of the approach. Thus, it presents the MILP algorithm and its development regarding the available data and following the methodology. Finally, before the conclusion and recommendations, Section 4 elaborates and analyzes the simulation results of the Moroccan case study following three comparative scenarios.

2. System Modeling and Method

2.1. Solar Decathlon Africa Village

Currently, there is growing interest in renewable energy resources because of climate change. People around the world have a greater conscience about environmental issues and energy supply constraints. Power generation systems based on renewable energy sources (RES) have several advantages such as easy implementation and scalability. These technologies have received much attention in recent years, and they are commonly present in buildings throughout microgrids around the world. Indeed, the recent growth in microgrids, which integrate renewable energy resources into conventional grids, has taken advantage of these generation characteristics.
Microgrids are defined as localized distribution networks with decentralized management that combine distributed energy resources [26]. A microgrid’s design may contain energy storage, backup generators, uninterruptible power supplies (UPS), and controllable generation such as fuel cells and combined heat and power (CHP) fueled by natural gas. It may also incorporate non-controllable generation, such as photovoltaic generation. The microgrid management system balances load and generation. Through the points of common coupling, the microgrid communicates with either the local distribution network or the other microgrids connected to the power system [27].
The Solar Decathlon Africa (SDA) project consists of a variety of buildings implemented in the Green & Smart Building Park Platform of the Green Energy Park [28,29]. This project contains small living labs with their own energy production sources (mainly PV). Thus, some of these living labs will contribute as microgrids connected to the main power grid to support the test and validation of advanced microgrid control strategies and energy management systems (EMSs).
The proposed microgrid within SDA includes several technologies, which are listed below:
  • Advanced control strategies for energy management;
  • A shared energy storage system;
  • An intelligent outdoor lighting system;
  • Smart electric vehicle charging stations.
The services proposed for the microgrid cover demand, production, and flexible management to ensure the maximum energy consumption from renewable energy sources.

2.2. SDA Modeling

2.2.1. Power System Modeling

Power system modeling essentially entails creating a mathematical, coded, or schematic representation of the actual physical system. This tool can aid in analysis, testing, and the identification of power system specifications and faults. The ability to test new technologies, management systems, and controllers without interfering with the actual system will be made possible by having a complete model of the power system.
There are several tools for power system modeling:
  • Mathematical modeling: Usually, this is the heart of modeling, where all the components of the microgrid are modeled using a set of variables, equations, and functions that establish the relationship between the different components of the power system.
  • Software modeling: Software, which is now commonly used, can make it simple to model power systems using pre-existing blocks and units created by a company. A power system analysis, such as a short-circuit analysis, a power flow analysis, a system defect detection, etc., can also be provided by this method.
  • Coded modeling: This technique, which is relatively new to the field of power system modeling, entails developing an electrical system model utilizing codes and syntax based on predefined libraries. This tool makes it simple to introduce optimization and machine learning technologies.

2.2.2. SDA Model

In this study, MATLAB/Simulink software was used to develop the microgrid model. The units and tools needed are provided by this software in its Simscape Electrical library. The model contains:
  • An AC power source designed with the same specification of the local distribution network;
  • Distribution lines and transformers;
  • Photovoltaic power generation systems;
  • Shared Energy Storage system;
  • Five living labs (residential loads).
An illustrated schematic of the whole microgrid model is shown in Figure 1.
The main output of the model is the different measurements of power, voltage, and current in the various components and nodes of the microgrid. These measurements will help analyze the behavior of the microgrid generation and production regarding the energy management system.

2.2.3. Methodology

Data gathering was the initial phase of this research project because the major objective was to design an economic dispatch algorithm for a shared energy storage system within a studied microgrid in Morocco. Therefore, by using the smart meters included in the different living laboratories of the SDA, the necessary information including the various photovoltaic production profiles, information on energy consumption, and various energy costs (such as energy costs, penalties, bi-hourly energy charges, etc.) was gathered and used in the simulation process following the assessment process in Figure 2a. The parameters of the optimization problem were established following the data provided. The objective function, constraints, and equations for the optimization problem were all included in the problem description.
To evaluate the optimization approach, the mathematical equations and the objective function were further transformed into a MATLAB-based code that was then loaded into a Simulink block for simulations.
Once all the parameters had been modified in the algorithm, the simulation began with a time step of 10 min for both energy consumption and PV production during a summer day. Additionally, the bi-hourly taxes for high-voltage A (HVA) in Morocco were used to comment on the relative costs of energy usage. As a result, the simulation encountered various important performance metrics, such as the amount of PV generated and injected into the main grid, the performance of the shared energy storage system, the PV curtailment, and the profile of load consumption. Once more, the energy cost reduction, which includes the cost both before and after the optimization, is the study’s most significant finding. Therefore, the validation of the algorithm was later performed regarding the results of both costs.
This methodology was used in order to compare the algorithm’s viability in light of the respective Moroccan energy frameworks. Additionally, the method was used to gather suggestions that could aid in the Moroccan energy transition without impacting the parties involved in the electricity market. The methodology’s primary steps are displayed in Figure 2b.

3. Problem Formulation

3.1. Problem Description

Each household of our system contains loads and PV generators. Living labs’ loads consume power (Pload) and PV generators generate power (PPV). If a mismatch between Pload and PPV occurs, there are four options to satisfy the power balance, as shown in Figure 3.
  • Main grid: supplying or consuming power mismatch. When Pload > PPV, the electricity should be supplied from the main grid. Similarly, when Pload < PPV, the exceeding electricity returns to the main grid.
  • Loads: positive and negative demand responses to make up for a power imbalance. By scheduling the operation time of the flexible loads, the consumption profile can be controlled corresponding to the PV power output.
  • PV generators: curtailment when PPV > Pload. The PV curtailment occurs when the PV generation is greater than the electricity demand.
  • Shared ESS: charging or discharging to compensate for power mismatch. The surplus energy is utilized to charge the ESS when the PV power output exceeds the load consumption. Likewise, the ESS discharges to supply the households’ needs when the PV power cannot match the load demand.
By optimally determining the power outputs of each option, electricity cost minimization can be achieved.

3.2. Formulation of the Optimization Problem

The main objective of this study is to reduce electricity costs during the day. To achieve overall cost minimization, optimal values of exchanged powers should be required. In this context, an optimization problem is considered.

3.2.1. Objective Function

The power mismatch between Pload and PPV is defined as follows:
PloadPPV = ΔPmis
As explained above, there are four options to compensate for the power mismatch. Thus, the power balance equation can be formulated as:
ΔPmis + ΔPcurt + ∑ΔP+ DRi − ∑ΔPDri + ΔPESS − ΔPmain = 0
The objective function to be minimized is the total cost of electricity. It is evaluated as the sum of the costs attributable to PV curtailment, positive and negative demand response, energy storage sharing, and main grid connection. It is presented below:
Min(ccurt ΔPcurt + ∑c+DRi ΔP+DRi + ∑cDRi ΔPDri + cESS ΔPESS + cmain ΔPmain)
ΔPmain can be expressed as follows:
ΔPmain = ΔP+main − ΔPmain
where ΔP+main and ΔPmain are the positive and the negative main grid output, respectively.
Households pay for the consumed electricity (ΔP+main) with cmain. The power injected to the main grid (ΔPmain) is paid with cpenalty. Then, the objective function is modified as:
Min(ccurt ΔPcurt + ∑c+DRi ΔP+DRi + ∑cDRi ΔPDri + cESS ΔPESS + cmain ΔP+main + cpenaltyΔPmain)
To consider asynchronous charging and discharging efficiency, the ESS power ΔPESS has been separated using charging power ΔPchar and discharging power ΔPdis. Thus, ΔPESS can be represented by:
ΔPESS = ΔPchar − ΔPdis
Cost occurs only during discharge. Thus, the objective function is expressed as follows:
Min(ccurt ΔPcurt + ∑c+DRi ΔP+DRi + ∑cDRi ΔPDri + cESS ΔPdis + cmain ΔP+main + cpenaltyΔPmain)

3.2.2. Constraints

There are several conditions and constraints that should be considered. For each option, the constraints that must be satisfied are presented below:
  • Shared ESS:
-
ESS cannot be charged and discharged simultaneously; if ESS is charging, the discharging output should be zero. If ESS is discharging, the charging output should be zero. Therefore, by using integer slack variables (bdis and bchar) as follows, ESS cannot be charged and discharged at the same time:
bchar + bdis ≤ 1
-
Note that if bdis (bchar) is zero, ΔPdisPchar) should be zero. Furthermore, ΔPchar and ΔPdis should be positive and not exceed the rated power of ESS. Thus, the following constraints should be satisfied:
0 ≤ ΔPcharbchar × PESS,max
0 ≤ ΔPdisbdis × PESS,max
  • Main Grid:
-
Supplying and consuming the power mismatch by the main grid cannot happen simultaneously. To express this constraint, we use integer slack variables (b+main and bmain) as the positive and negative main grid slack variables, respectively.
b+main + bmain ≤ 1
-
The power exchanged with the main grid (ΔP+main and ΔPmain) should be positive and limited by the rated power of the main grid transformer PTR. This constraint is expressed by Equations (12) and (13):
0 ≤ ΔP+mainb+main × PTR
0 ≤ ΔPmainbmain × PTR
  • PV generator:
-
Maximum curtailment is equal to PPV.
0 ≤ ΔPcurtbPV × PPV
where bPV is the PV slack variable.
-
Curtailment is only allowable when ΔPmis (Equation (1)) is negative. The Big-M method is used to formulate logical expression as a mixed-integer linear program form.
ΔPmis ≥ −bPV × M
  • Loads:
-
It is assumed that positive and negative demand responses (DRs) are only allowable for ε% of individual loads. Thus, the number of positive and negative DRs is limited by the ε% of individual loads, as expressed in the following equations:
0     Δ P + DRi     ε 100 × P load , i
0     Δ P DRi     ε 100 × P load , i
-
Positive and negative DRs cannot participate simultaneously. The positive and the negative DR integer slack variables (b+DR,i, bDR,i) are used to express this constraint. Thus, positive and negative DRs can be expressed as follows:
0     Δ P + DRi     b + DR , i   ε 100 × P load , i
0     Δ P DRi     b DR , i   ε 100 × P load , i
b+DR,i + bDR,i ≤ 1

3.3. Algorithm Development

3.3.1. MILP Algorithm Presentation

The mixed-integer linear programming (MILP) problems were presented, for the first time, by Nemhauser and Wolsey in 1988 [30]. MILP methods have been widely adopted for solving energy supply problems, such as sizing energy storage systems and distributed generators [31,32,33], minimizing energy costs and CO2 emissions [34,35], and the allocation of renewable sources in the distribution network [36].
Based on the branch and bound technique, the MILP model solves a specific class of optimization problems, which have [30]:
  • Linear objective functions;
  • Linear equality constraints and/or linear inequality constraints;
  • Integrality restrictions on some optimization variables (some optimization variables have integer values).
Mathematically, a mixed-integer linear problem can be expressed by the following formulation:
Minimize :       F T . x Subject   to :   C . x d C e q . x = d e q L b < x < U b
FT.x represents the objective function to be optimized; F is a vector of constants; and x is an optimization variable vector.
The matrices (C and Ceq) and the corresponding vectors (d and deq) encode the linear inequalities and linear equalities, respectively.
Lb and Ub are the vectors of lower and upper boundaries, respectively.

3.3.2. Development of MILP Algorithm

The optimization problem is a mixed-integer linear problem (MILP), as shown in Figure 4. Thus, the MILP solver in MATLAB (e.g., intlinprog) was used [17] to obtain the optimal power values for minimizing costs. The main steps followed in the MILP algorithm are summarized in Figure 5.

4. Simulations and Results

In this section, the parameters and the model defined in the last section are transformed into a MATLAB environment in order to execute the simulations regarding the Moroccan data. Thus, to evaluate and verify the approach used in this study, the simulation horizon is one day divided into 144 sampling intervals with a time step of 10 min.
Furthermore, to be able to compare the results regarding the different case studies, we opted for three scenarios for simulation. The first one is the actual situation in Morocco, the second one introduces a simulation using the MILP optimization approach, and the last scenario provides a simulation using the energy management system (EMS) and involving the DR for all the five living labs.

4.1. Model Parameters and Data

4.1.1. Costs

Table 1 provides an illustration of the researched system’s parameters. However, the quantity of PV power placed in each living lab affects the various prices of DR. As a result, the price changes according to how much energy each household contributes to the demand response.

4.1.2. Load Profile

The total load profile of the living labs for the day 7 July 2022 is presented in Figure 6. As can be noticed, the load demand is low during the night and it starts increasing at 07:20 a.m. Moreover, the energy consumption peaks between 11:00 h and 13:00 h and in the evening, at 21:30 h.

4.1.3. PV Generation

Figure 7 shows the PV production profile of the studied system on 7 July 2022. As can be observed, the PV output has a typical production curve with a maximum value of 16.95 kW reached in the afternoon period.

4.1.4. Electricity Rate

In Morocco, the electricity rate is defined by the power system utility. The electricity prices are applied according to the voltage level (high, medium, low) and the used sector (industry, commerce, and residence).
For medium voltage, the applied electricity rate is defined as time-of-use (ToU) pricing, which consists of billing the consumed energy at different tariffs according to three hourly periods: on-peak, off-peak, and full hours. The ToU pricing by season is described in Table 2.

4.2. Scenario N°1: Simulation without EMS and without DR

In this instance, the simulation was run without taking the methodology employed in this study into account. This section, therefore, relates to the current state of Morocco’s power grid. The meter used in the investigated microgrid collects data on the energy consumption in a unidirectional manner and retrieves billing information, in contrast to the Green & Smart Building Park, where the pricing of power is elaborated using meters installed in each facility. The meter, however, counts the energy surplus that is delivered to the grid as consumed. As a result, the cost of energy that is injected into the electrical system is the same as the one consumed.
Figure 8 presents the findings when the simulation is finished for a day of data. Three key outputs were offered by the results: main grid power, power from shared energy storage, and power curtailment. Considering the PV and the load profiles presented in the preceding section, the energy provided to the microgrid was mainly imported from the grid. Therefore, the amount of energy absorbed/injected in the power system is considered as consumed.

4.3. Scenario N°2: Simulation with EMS and without DR

Without including demand response in our algorithm, the MILP technique was expanded in this scenario while adding the predefined functions and the other parameters discussed earlier. In terms of main grid power contribution and ESS generation, Figure 9 depicts the simulation’s results, where the energy storage system anticipates charging and discharging scenarios throughout the afternoon. However, the energy storage is fully charged, and the surplus of energy is returned as a curtailment in accordance with the load profile between the hours 2:00 p.m. and 5:00 p.m., when the PV production is highest.
It is also important to note that, in this instance, it is clear that no electricity has been injected into the power grid due to the non-intervention of DR strategies.

4.4. Scenario N°3: Simulation including EMS and DR

The MILP plan and the DR strategy are developed in the final scenario in accordance with the previously updated framework of law N°82-21, which permits a self-production of 20% of total energy from renewable resources. The findings, displayed in Figure 10, show a PV power injection of almost 3 kW into the power system, which is roughly equal to 20% of the PV capacity.
It can also be seen that there is no curtailment in PV generation because the surplus energy could be exploited and injected into the main grid.
Regarding demand response strategy, it can be observed from Figure 11 that during the consumption peaks, almost all the households contribute to demand response when decreasing their energy demand in order to shave the peak load.
Further, when the demand is lower than the PV production in the afternoon, a positive demand response occurred for household one by increasing its consumption. In fact, household one was more favorable to participate in a positive DR due to its low attributing cost (c+DR,1 = 0.0001 MAD/kWh). The costs of DR contribution were established in a different manner for the purpose of revealing the best DR contribution scenario.

4.5. Cost Reduction

This study’s primary goal is to develop a generalized economic dispatch for a microgrid with a shared ESS. Thus, the study’s goal is to introduce DR techniques while reducing the cost of energy. The MILP optimization approach determined the cost of energy for each of the many scenarios. It is clear from the chart below that the second and final scenarios would result in lower costs. The second scenario introduced an important cost decrease with a 31% cost reduction but did not permit the injection of extra power into the grid. However, the final scenario, which combines DR and a MILP optimization strategy, lowered the cost of energy by almost 51%, validating the goal of the study.

4.6. Discussion

According to the simulation results, the first scenario presents the actual Moroccan situation, without the implementation of the proposed approach or the demand response strategy. As can be observed in Figure 12, during the on-peak hours when the energy demand reached almost 22 KWh, the cost related to the amount of energy consumed during that period of time rose to approximately 32 MAD.
However, in the second scenario, where the MILP optimization approach was implemented, the cost was reduced by approximately 31%.
Furthermore, the last scenario, where both the demand response strategy and the MILP optimization approach were integrated, presented a significant cost reduction of almost 52% of the energy cost.
Therefore, the approach established in this study has demonstrated a very significant cost reduction when employing the energy management system and including demand response strategies in all the residences of the SDA. However, the validity of the methodology depends not only on the outcome but also on how well it represents the Moroccan energy framework.
From another perspective, the study has demonstrated another crucial element that promotes the maximum use of renewable energies. This approach has proven to result in a significant decrease in the amount of power consumed from the grid, where in the first scenario, the microgrid was relying on the power system for almost 52% of its power demand during the day. However, in scenario two and scenario three, grid dependency was reduced to 21.88% and 12.81%, respectively, which encourages the use of energy produced by renewable energies.
Hence, the results demonstrate that the combination of a shared ESS installation and DR implementation is more beneficial in reducing utility bills, maximizing RES production among microgrids, and enhancing energy management systems. Additionally, the strategy has demonstrated that the previous law on auto-injection, N°13-09, has placed significant restrictions on supporting the integration of RES into the electrical system in Morocco. However, the last scenario, which is complied with the updated law (law N°58-15), has illustrated the validity of this energy policy regarding RES penetration into the power grid.

5. Conclusions and Recommendation

Shared energy storage systems have an essential role in improving the penetration of renewable energies into the existing power grid. In this paper, an economic dispatch for shared ESS was developed using the MILP model. The algorithm manages the power outputs of a shared ESS, PV generators, controllable loads, and the main grid in order to satisfy the power balance and reduce energy costs. The developed approach was demonstrated on a pilot project (SDA), and comparative scenarios were conducted in MATLAB/Simulink for a horizon of 24 h. The obtained findings reveal a significant energy cost reduction evaluated to be 52% when implementing the MILP technique and the demand response strategy.
This study highlights the importance of using a shared ESS and implementing a demand response mechanism in increasing RES systems’ profitability. By combining shared storage systems and injecting surplus energy, users could reduce their grid dependence, avoid PV curtailment, and increase their cost savings.
This developed approach could take advantage of a large-scale proof of concept (POC) in order to study its feasibility and validity in a large-scale power system with high penetration of RES and greater ESS capacities. This would allow the parties involved to develop a pre-study of the proposed approach for further implementation. Consequently, this would encourage more large- and small-scale RES projects to be developed and would absolutely increase the share of renewable energies in the Moroccan energy mix.
However, regarding the self-production framework, the approach has proven its validity using various parameters and data including demand response costs, when they were applied in an arbitrary manner, which is considered a limitation to this study regarding the actual Moroccan power system. Therefore, the energy framework should include more details regarding the demand response costs, the different constraints related to the power system, the costs of penalties in terms of exceeding 20% of the energy production to the main grid, etc. The availability of these parameters would help consumers and industries to implement the approach in their facilities.
Finally, the method developed in this study was tested in a simulated environment. As a result, it has been decided that the next stage of the study will be implemented in a laboratory equipped with a real-time simulator, and the power hardware-in-the-loop simulation method will be used for simulation to introduce different grid parameters and constraints before applying the approach to the real microgrid.

Author Contributions

Conceptualization, B.E.B., M.L., A.R. and A.B.; Methodology, M.L. and B.E.B.; Software, J.-w.C., M.L., B.E.B. and A.R.; Supervision, A.B., M.O., M.K. and H.J.; Writing—original draft, B.E.B. and M.L.; Writing—review and editing, A.B., M.O., M.K. and H.J. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Korea International Cooperation Agency (KOICA) (PMC budget).

Data Availability Statement

Not applicable.

Acknowledgments

This work is performed in the framework of the Green Grid project funded by the Research Institute for Solar Energy and New Energies (IRESEN). It is jointly developed by the Green Energy Park (GEP), IRESEN, and the Korea Institute of Energy Research (KIER). Additionally, this study is supported by the Korea International Cooperation Agency (KOICA) under the title of “Comprehensive Assistance Program of PMC Service for Green Technology R&D in Morocco” between 2019 and 2022 (No. P2018-00107-1).

Conflicts of Interest

The authors declare no conflict of interest.

Notations

Constants
ccurtOperating cost of PV curtailment
c+DROperating cost of positive DR
cDROperating cost of negative DR
cESSOperating cost of ESS
cpenaltyPenalty cost for reverse power flow
MLarge value for big-M
PESS,maxRated power of ESS
PTRRated power of main grid transformer
Input Variables
cmainElectricity rate
PloadTotal loads
Pload,iith household load
PPVTotal PV generation
Decision variables
ΔPcurt Amount of PV curtailment
ΔP+DR,i Amount of ith positive DR
ΔPDR,i Amount of ith negative DR
ΔPdis ESS discharging output (slack variable)
ΔPchar ESS charging output (slack variable)
ΔP+main Main grid positive output (slack variable)
ΔPmain Main grid negative output (slack variable)
b+DR[integer variable] positive DR slack variable
bDR[integer variable] negative DR slack variable
bdis[integer variable] ESS (discharging) slack variable
bchar[integer variable] ESS (charging) slack variable
b+main[integer variable] main grid (positive) slack variable
bmain[integer variable] main grid (negative) slack variable
bPV[integer variable] PV slack variable
Other variables
ΔPESS ESS output
ΔPmainMain grid output
ΔPmisPower mismatch

Abbreviations

DRDemand Response
EMSEnergy Management System
ESSEnergy Storage System
GSBPGreen & Smart Building Park
IRESENResearch Institute for Solar Energy and New Energies
KIERKorea Institute of Energy Research
KOICAKorea International Cooperation Agency
MAD Moroccan Dirhams
MGMicrogrid
MILP Mixed-Integer Linear Programming
PVPhotovoltaic
POCProof of Concept
R&DResearch and Development
RES Renewable Energy Sources
SDA Solar Decathlon Africa
ToU Time-of-Use

References

  1. Elmouatamid, A.; NaitMalek, Y.; Bakhouya, M.; Ouladsine, R.; Elkamoun, N.; Zine-Dine, K.; Khaidar, M. An Energy Management Platform for Micro-Grid Systems Using Internet of Things and Big-Data Technologies. Proc. Inst. Mech. Eng. Part I J. Syst. Control Eng. 2019, 233, 904–917. [Google Scholar] [CrossRef]
  2. Boulakhbar, M.; Lebrouhi, B.; Kousksou, T.; Smouh, S.; Jamil, A.; Maaroufi, M.; Zazi, M. Towards a Large-Scale Integration of Renewable Energies in Morocco. J. Energy Storage 2020, 32, 101806. [Google Scholar] [CrossRef]
  3. Ourahou, M.; Ayrir, W.; EL Hassouni, B.; Haddi, A. Review on Smart Grid Control and Reliability in Presence of Renewable Energies: Challenges and Prospects. Math. Comput. Simul. 2020, 167, 19–31. [Google Scholar] [CrossRef]
  4. Iweh, C.D.; Gyamfi, S.; Tanyi, E.; Effah-Donyina, E. Distributed Generation and Renewable Energy Integration into the Grid: Prerequisites, Push Factors, Practical Options, Issues and Merits. Energies 2021, 14, 5375. [Google Scholar] [CrossRef]
  5. Walker, A.; Kwon, S. Analysis on Impact of Shared Energy Storage in Residential Community: Individual versus Shared Energy Storage. Appl. Energy 2021, 282, 116172. [Google Scholar] [CrossRef]
  6. Zhu, H.; Ouahada, K. A Distributed Real-Time Control Algorithm for Energy Storage Sharing. Energy Build. 2021, 230, 110478. [Google Scholar] [CrossRef]
  7. Zhong, W.; Xie, K.; Liu, Y.; Yang, C.; Xie, S.; Zhang, Y. Online Control and Near-Optimal Algorithm for Distributed Energy Storage Sharing in Smart Grid. IEEE Trans. Smart Grid 2020, 11, 2552–2562. [Google Scholar] [CrossRef]
  8. Rochd, A.; Benazzouz, A.; Ait Abdelmoula, I.; Raihani, A.; Ghennioui, A.; Naimi, Z.; Ikken, B. Design and Implementation of an AI-Based & IoT-Enabled Home Energy Management System: A Case Study in Benguerir—Morocco. Energy Rep. 2021, 7, 699–719. [Google Scholar] [CrossRef]
  9. Wang, Z.; Gu, C.; Li, F.; Bale, P.; Sun, H. Active Demand Response Using Shared Energy Storage for Household Energy Management. IEEE Trans. Smart Grid 2013, 4, 1888–1897. [Google Scholar] [CrossRef]
  10. Steriotis, K.; Tsaousoglou, G.; Efthymiopoulos, N.; Makris, P.; Varvarigos, E. Real-Time Pricing in Environments with Shared Energy Storage Systems. Energy Effic. 2019, 12, 1085–1104. [Google Scholar] [CrossRef]
  11. Zhu, H.; Ouahada, K. Cost Minimization Energy Storage Sharing Management. In Proceedings of the 2019 IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids (SmartGridComm), Beijing, China, 21–23 October 2019. [Google Scholar] [CrossRef]
  12. Azaroual, M.; Ouassaid, M.; Maaroufi, M. An Optimal Energy Management of Grid-Connected Residential Photovoltaic-Wind-Battery System Under Step-Rate and Time-of-Use Tariffs. Int. J. Renew. Energy Res. 2020, 10, 1829–1843. [Google Scholar] [CrossRef]
  13. Park, Y.G.; Kim, C.W.; Park, J.B. MILP-Based Dynamic Efficiency Scheduling Model of Battery Energy Storage Systems. J. Electr. Eng. Technol. 2016, 11, 1063–1069. [Google Scholar] [CrossRef] [Green Version]
  14. Moradzadeh, M.; Abdelaziz, M.M.A. A New MILP Formulation for Renewables and Energy Storage Integration in Fast Charging Stations. IEEE Trans. Transp. Electrif. 2020, 6, 181–198. [Google Scholar] [CrossRef]
  15. Andrychowicz, M. Comparison of the Use of Energy Storages and Energy Curtailment as an Addition to the Allocation of Renewable Energy in the Distribution System in Order to Minimize Development Costs. Energies 2020, 13, 3746. [Google Scholar] [CrossRef]
  16. Andrychowicz, M. RES and ES Integration in Combination with Distribution Grid Development Using MILP. Energies 2021, 14, 383. [Google Scholar] [CrossRef]
  17. Kuendee, P.; Janjarassuk, U. A Comparative Study of Mixed-Integer Linear Programming and Genetic Algorithms for Solving Binary Problems. In 2018 5th International Conference on Industrial Engineering and Applications (ICIEA); IEEE: Singapore, 2018; pp. 284–288. [Google Scholar] [CrossRef]
  18. Inês, C.; Guilherme, P.L.; Esther, M.G.; Swantje, G.; Stephen, H.; Lars, H. Regulatory Challenges and Opportunities for Collective Renewable Energy Prosumers in the EU. Energy Policy 2020, 138, 111212. [Google Scholar] [CrossRef]
  19. Roulot, J.; Raineri, R. The Impacts of Photovoltaic Electricity Self-Consumption on Value Transfers between Private and Public Stakeholders in France. Energy Policy 2018, 122, 459–473. [Google Scholar] [CrossRef]
  20. Ordonnance n° 2016-1019 du 27 Juillet 2016 Relative à L’autoconsommation D’électricité—Légifrance. Available online: https://www.legifrance.gouv.fr/jorf/id/JORFTEXT000032938257/ (accessed on 14 February 2023).
  21. Saurer, J.; Monast, J. Renewable Energy Federalism in Germany and the United States. Transnatl. Environ. Law 2021, 10, 293–320. [Google Scholar] [CrossRef]
  22. 2017 Amendment of the Renewable Energy Sources Act (EEG 2017)—Policies—IEA. Available online: https://www.iea.org/policies/6125-2017-amendment-of-the-renewable-energy-sources-act-eeg-2017 (accessed on 14 February 2023).
  23. Choukri, K.; Naddami, A.; Hayani, S. Renewable Energy in Emergent Countries: Lessons from Energy Transition in Morocco. Energy Sustain. Soc. 2017, 7, 25. [Google Scholar] [CrossRef]
  24. Adoption du Projet de loi n° 82.21 Relatif à L’autoproduction D’énergie Electrique par la Chambre des Représentants. Available online: https://www.mem.gov.ma/Pages/actualite.aspx?act=358 (accessed on 14 February 2023).
  25. Examen Réglementaire du Marché de L’électricité au Maroc: Vers une Attraction des Investissements du Secteur Privé. Available online: https://repository.uneca.org/handle/10855/49032 (accessed on 14 February 2023).
  26. Sachs, T.; Gründler, A.; Rusic, M.; Fridgen, G. Framing Microgrid Design from a Business and Information Systems Engineering Perspective. Bus. Inf. Syst. Eng. 2019, 61, 729–744. [Google Scholar] [CrossRef] [Green Version]
  27. Microgrids—Center for Climate and Energy SolutionsCenter for Climate and Energy Solutions. Available online: https://www.c2es.org/content/microgrids/ (accessed on 14 February 2023).
  28. SDA—Solar Decathlon Africa 2019. Available online: https://www.solardecathlonafrica.com/ (accessed on 14 February 2023).
  29. Green Energy Park. Available online: https://www.greenenergypark.ma/ (accessed on 14 February 2023).
  30. Jain, V.; Grossmann, I.E. Algorithms for Hybrid MILP/CP Models for a Class of Optimization Problems. INFORMS J. Comput. 2001, 13, 258–276. [Google Scholar] [CrossRef] [Green Version]
  31. Marocco, P.; Ferrero, D.; Martelli, E.; Santarelli, M.; Lanzini, A. An MILP Approach for the Optimal Design of Renewable Battery-Hydrogen Energy Systems for off-Grid Insular Communities. Energy Convers. Manag. 2021, 245, 114564. [Google Scholar] [CrossRef]
  32. Wu, X.; Zhao, W.; Wang, X.; Li, H. An MILP-Based Planning Model of a Photovoltaic/Diesel/Battery Stand-Alone Microgrid Considering the Reliability. IEEE Trans. Smart Grid 2021, 12, 3809–3818. [Google Scholar] [CrossRef]
  33. Farrokhifar, M.; Aghdam, F.H.; Alahyari, A.; Monavari, A.; Safari, A. Optimal Energy Management and Sizing of Renewable Energy and Battery Systems in Residential Sectors via a Stochastic MILP Model. Electr. Power Syst. Res. 2020, 187, 106483. [Google Scholar] [CrossRef]
  34. Andrychowicz, M.; Dudek, M. The Impact of Energy Storage along with the Allocation of RES on the Reduction of Energy Costs Using MILP. Energies 2021, 14, 3783. [Google Scholar] [CrossRef]
  35. Steen, D.; Stadler, M.; Cardoso, G.; Groissböck, M.; DeForest, N.; Marnay, C. Modeling of Thermal Storage Systems in MILP Distributed Energy Resource Models. Appl. Energy 2015, 137, 782–792. [Google Scholar] [CrossRef] [Green Version]
  36. Ok, Y.; Atak, M. Allocation of Distributed Energy Systems at District-Scale over Wide Areas for Sustainable Urban Planning with a MILP Model. Math. Probl. Eng. 2018, 2018, 4208415. [Google Scholar] [CrossRef] [Green Version]
  37. Site Web Officiel de l’ONEE—Branche Electricité. Available online: http://www.one.ma/FR/pages/interne.asp?esp=1&id1=2&id2=35&id3=10&t2=1&t3=1 (accessed on 14 February 2023).
Figure 1. SDA microgrid schematic illustration with distributed energy resources.
Figure 1. SDA microgrid schematic illustration with distributed energy resources.
Energies 16 04601 g001
Figure 2. Process assessment. (a) Data gathering; (b) following methodology.
Figure 2. Process assessment. (a) Data gathering; (b) following methodology.
Energies 16 04601 g002
Figure 3. Satisfying power balance options.
Figure 3. Satisfying power balance options.
Energies 16 04601 g003
Figure 4. Formulation of MILP optimization.
Figure 4. Formulation of MILP optimization.
Energies 16 04601 g004
Figure 5. Flow chart of the adopted MILP algorithm.
Figure 5. Flow chart of the adopted MILP algorithm.
Energies 16 04601 g005
Figure 6. Load profile of 7 July 2022.
Figure 6. Load profile of 7 July 2022.
Energies 16 04601 g006
Figure 7. PV generation profile of 7 July 2022.
Figure 7. PV generation profile of 7 July 2022.
Energies 16 04601 g007
Figure 8. Scenario N1: Simulation without EMS and without DR.
Figure 8. Scenario N1: Simulation without EMS and without DR.
Energies 16 04601 g008
Figure 9. Scenario 2: Simulation with EMS and without DR.
Figure 9. Scenario 2: Simulation with EMS and without DR.
Energies 16 04601 g009
Figure 10. Scenario N3: Simulation including EMS and DR.
Figure 10. Scenario N3: Simulation including EMS and DR.
Energies 16 04601 g010
Figure 11. Demand response contribution within the microgrid.
Figure 11. Demand response contribution within the microgrid.
Energies 16 04601 g011
Figure 12. Cost reduction.
Figure 12. Cost reduction.
Energies 16 04601 g012
Table 1. Simulation parameters.
Table 1. Simulation parameters.
ParameterDefinitionValue
ccurtCost of Curtailment0.01 MAD/kWh
c+DR,1Cost of DR 1 plus0.0001 MAD/kWh
cDR,1Cost of DR 1 minus0.1 MAD/kWh
c+DR,2Cost of DR 2 plus0.04 MAD/kWh
cDR,2Cost of DR 2 minus0.03 MAD/kWh
c+DR,3Cost of DR 3 plus0.06 MAD/kWh
cDR,3Cost of DR 3 minus0.01 MAD/kWh
c+DR,4Cost of DR 4 plus0.05 MAD/kWh
cDR,4Cost of DR 4 minus0.02 MAD/kWh
c+DR,5Cost of DR 5 plus0.02 MAD/kWh
cDR,5Cost of DR 5 minus0.015 MAD/kWh
cESSCost of ESS0.5 MAD/kWh
cpenaltyCost of penalty1.01 MAD/kWh
PTRPower of transformer1250 kW
PESS,maxPower of ESS7 kW
εAmount of energy injected20%
M 10,000
Table 2. Morocco’s Electricity Rate [37].
Table 2. Morocco’s Electricity Rate [37].
PeriodWinter (1 October–31 March)Summer (1 April–30 September)Price (MAD/kWh)
Off-peak22 h–7 h23 h–7 h0.7398
Full hour7 h–17 h7 h–18 h1.0101
On-peak17 h–22 h18 h–23 h1.4157
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

El Barkouki, B.; Laamim, M.; Rochd, A.; Chang, J.-w.; Benazzouz, A.; Ouassaid, M.; Kang, M.; Jeong, H. An Economic Dispatch for a Shared Energy Storage System Using MILP Optimization: A Case Study of a Moroccan Microgrid. Energies 2023, 16, 4601. https://doi.org/10.3390/en16124601

AMA Style

El Barkouki B, Laamim M, Rochd A, Chang J-w, Benazzouz A, Ouassaid M, Kang M, Jeong H. An Economic Dispatch for a Shared Energy Storage System Using MILP Optimization: A Case Study of a Moroccan Microgrid. Energies. 2023; 16(12):4601. https://doi.org/10.3390/en16124601

Chicago/Turabian Style

El Barkouki, Bouthaina, Mohamed Laamim, Abdelilah Rochd, Jae-won Chang, Aboubakr Benazzouz, Mohammed Ouassaid, Moses Kang, and Hakgeun Jeong. 2023. "An Economic Dispatch for a Shared Energy Storage System Using MILP Optimization: A Case Study of a Moroccan Microgrid" Energies 16, no. 12: 4601. https://doi.org/10.3390/en16124601

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