Next Article in Journal
Life Cycle Assessment of Energy Production from Solid Waste Valorization and Wastewater Purification: A Case Study of Meat Processing Industry
Next Article in Special Issue
Predictive Energy Management of a Building-Integrated Microgrid: A Case Study
Previous Article in Journal
Towards Energy Efficient Wireless Sensing by Leveraging Ambient Wi-Fi Traffic
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Forecast-Based Energy Management for Optimal Energy Dispatch in a Microgrid

by
Francisco Durán
1,
Wilson Pavón
2 and
Luis Ismael Minchala
1,*
1
Department of Electrical Engineering, Electronics, and Telecommunications, Universidad de Cuenca, Avenue 12 de Abril, Cuenca 010101, Ecuador
2
Engineering Department, Universidad Politécnica Salesiana, Quito 170146, Ecuador
*
Author to whom correspondence should be addressed.
Energies 2024, 17(2), 486; https://doi.org/10.3390/en17020486
Submission received: 23 November 2023 / Revised: 10 January 2024 / Accepted: 12 January 2024 / Published: 19 January 2024

Abstract

:
This article describes the development of an optimal and predictive energy management system (EMS) for a microgrid with a high photovoltaic (PV) power contribution. The EMS utilizes a predictive long-short-term memory (LSTM) neural network trained on real PV power and consumption data. Optimal EMS decisions focus on managing the state of charge (SoC) of the battery energy storage system (BESS) within defined limits and determining the optimal power contributions from the microgrid components. The simulation utilizes MATLAB R2023a to solve a mixed-integer optimization problem and HOMER Pro 3.14 to simulate the microgrid. The EMS solves this optimization problem for the current sampling time  ( t )  and the immediate sampling time  ( t + 1 ) , which implies a prediction of one hour in advance. An upper-layer decision algorithm determines the operating state of the BESS, that is, to charge or discharge the batteries. An economic and technical impact analysis of our approach compared to two EMSs based on a pure economic optimization approach and a peak-shaving algorithm reveals superior BESS integration, achieving 59% in demand satisfaction without compromising the life of the equipment, avoiding inexpedient power delivery, and preventing significant increases in operating costs.

Graphical Abstract

1. Introduction

With the increasing demand for electrical energy in recent years, the use of fossil fuels in conventional power generation plants has increased significantly. As a result, there has been an increase in the amount of greenhouse gases released into the atmosphere and a critical depletion of the Earth’s non-renewable natural resources. Consequently, centralized generation systems are making way for small decentralized plants (microgrids) with a high penetration of renewable energy sources (RES), especially solar and wind energy, which globally account for 91% of the power produced from alternative sources [1,2,3].
Microgrids benefit from BESSs and EMSs, thereby enhancing the integration of RES and reducing costs. There are several EMS deployment strategies, including decision-based algorithms and dispatch methods. Consequently, the objective of an EMS when operating microgrids is to maximize the integration of RES, minimize operational costs, and preserve the life of the equipment, especially batteries [4,5].
In the literature, several approaches to deploying EMSs can be found. For example, in [6,7,8], the proposed EMSs characterize the most significant and least demanding hours, defining scenarios by the amount of power available. In this way, the algorithm obtains each element’s operating limits, and a multi-objective optimization problem uses this information to minimize voltage fluctuations and energy losses. The authors of [9] discussed the simulation results of various configuration scenarios related to heating and energy storage within the vision of China’s 2030 hybrid systems. The analysis focused on determining the optimal combination of these components by studying costs, oil consumption, and  CO 2  emissions. The results demonstrate that adding a heated pump and pumped hydro storage with double gates to the individual heating and electricity network is an economically attractive option, reducing fuel consumption and emissions.
The dispatch strategy in [10] involved electric energy tariffs to reduce the operational costs of thermal units, photovoltaic power generation units, and BESSs through an optimization problem that considers two scenarios characterized by energy costs during peak and off-peak hours. Similarly, the strategy in [11] focused on power management through dynamic pricing strategies.
Decision-based algorithms are also quite prevalent in the literature. For instance, in [12,13,14,15], the strategies prioritize battery charging when the available power exceeds demand. However, when renewable resources cannot meet the load, dispatching the available energy from batteries could cover this power deficit. Alternatively, a third auxiliary system, such as a generator set, can be integrated. Reference [16] presented a similar approach, with the difference being the use of a peak-shaving strategy. The authors established the maximum operating power of the BESS based on the consumption peak.
An increasingly popular strategy is optimization through a mixed-integer model, as discussed in [5,17]. This type of model incorporates all the costs associated with using each component into the objective function, while the operational limits of each component are set as constraints. Meanwhile, the integer part of the problem determines whether, at the current time instant, it is optimal to charge or discharge the BESS. The authors of [18] presented a derivation of this model, where the objective is to minimize the net present value through flexible energy flow control while also considering parameters such as variation in energy costs and equipment degradation, among other factors. Reference [4] proposed a similar optimization framework but incorporated stochastic models that could address the variability of RES.
Other studies focus on varying the battery SoC limits, as discussed in [19]. The authors utilized an artificial neural network to predict the available photovoltaic power, aiming to increase battery integration during times of lower resource availability, including the potential participation of the electrical grid. The strategy discussed in [20] was similar, with the difference being the use of a stochastic model to obtain information on the availability of the photovoltaic resource.
References [1,19] developed prediction algorithms to forecast the meteorological conditions that influence wind and solar generation processes, aiming to provide input to theoretical models that can estimate the available electrical power throughout the day. This information, together with a linear optimization problem, can prevent the BESS from charging or discharging at inconvenient intervals. Reference [21] highlighted that incorporating a microgrid’s photovoltaic power and consumption forecast can generate cost savings between 2% and 7%. Additionally, microgrid sizing under the assumption of forecast-based operation can significantly reduce operating costs. On the other hand, [22] proposed a deep learning-based forecasting method for microgrid operation, considering uncertainties in RES, load, and daily price to reduce electricity consumption during periods of high demand. This approach results in a final operating cost that differs by only 2% from the actual value without considering the predictive approach.
This literature review outlines three approaches to designing an EMS responsible for power management and optimal energy dispatch in microgrids: control algorithms based on operational limits, mixed-integer optimization algorithms, and a mixed approach involving prediction techniques. The latter approach holds more potential, but there are fewer contributions in the literature. Additionally, one characteristic of a substantial proportion of previous works is the need for a more extensive discussion about the performance evaluation of the algorithm, for instance, on the resulting time series. Consequently, other evaluation metrics, such as the percentage of integration of renewable sources and BESSs, the net present cost, and the operating cost, must be used. These metrics are crucial for selecting between algorithms within a real-world scenario.
In this context, this study proposes an energy dispatch strategy for a microgrid located in Cuenca, Ecuador. The proposal involves an algorithm that predicts photovoltaic power and energy demand over a time interval of a single sample ( T = 1  h). A mixed-integer optimization problem processes this information, yielding the optimal power contributions of each component within the microgrid. Simultaneously, the current photovoltaic power and load demand are introduced into the optimization problem, and by comparing the results from the current and one-sample-forward predicted values, the algorithm corrects (if necessary) the operational state of the BESS. In objective terms, the proposed EMS seeks to integrate all microgrid equipment to optimally and synergistically satisfy demand. This approach focuses mainly on greater integration of the BESS to minimize the impact on the useful life of the equipment and avoid significant increases in the operating costs of the system as a whole.
The contributions of this study are as follows:
  • An optimal energy dispatch strategy based on predictions using LSTM neural networks and mixed-integer optimization.
  • A technical and financial analysis of the proposed dispatch algorithm.
  • A comparison of the proposed technique with the three management approaches reported in [5,14,15].
This document is structured as follows. Section 2 presents the methodology for the development of an optimal and predictive EMS. Section 3 describes the results of the time series obtained, the technical and financial analysis, and the comparison with the other three EMSs. Section 4 presents the conclusions of this work.

2. Methodology

Figure 1 shows the operation of the proposed EMS. Three crucial components are discernible: the predictor, the optimization problem, and the decision algorithm. The following sections discuss each of these components.

2.1. Description of the Simulation Scenario with a Focus on the Case Study

2.1.1. Description of the Microgrid

The case study for this work corresponds to the microgrid of the University of Cuenca, Ecuador, located at geographical coordinates (−2.891, −79.036). This system is interconnected with the electrical distribution grid and incorporates clean generation technologies, including photovoltaic, wind, hydro, and hydrogen cells. The microgrid operates in grid-connected mode, using the power obtained from the primary grid and photovoltaic panels, which have an installed capacity of 35 kW [23]. Regarding the storage system, various types of batteries with different operating principles are present, including vanadium flow, lead-acid, supercapacitors, and lithium-ion. Lithium-ion batteries with a capacity of 44 kWh are used for this study. Figure 2 describes the configuration of this microgrid, illustrating the feasible power flows within the system with arrows. Specifically, solar energy captured by the PV array is converted into photovoltaic power through power converters. Conversely, the maximum power point tracking (MPPT) algorithm governs the power converter to identify the optimal power point of the PV system. The point of common coupling (PCC) facilitates power exchange between the microgrid and the primary grid.

2.1.2. Description of the Simulation Scenario

The proposed EMS is implemented and validated using MATLAB and HOMER Pro to obtain the microgrid time series over one year, with a time step of 1 h, equivalent to 8760 samples. The economic and technical impact of using the proposed EMS is also analyzed. Finally, for the simulation, the consumption profile recorded over the 31 days of March 2022 is used, with an average power consumption of 8.33 kW and a peak power of 26.63 kW. This profile includes the energy used to charge electric vehicles, the energy supply to a data center, tests with programmable loads, and the building lighting system.
The simulation scenario developed for this work involves interconnecting MATLAB and HOMER Pro. Figure 3 shows the information flow between the two simulation platforms.
It is essential to identify the functions through which the exchange of information between the two simulation platforms is carried out. In this context, three functions stand out that run in different MATLAB m-files:
  • MatlabStartSimulation: This function is responsible for checking possible problems in the communication interface before each simulation and initializing the variables created by the user.
  • MatlabDispatch: In this function, the user’s dispatch technique is programmed and called at each sampling instant to update the state of the variables, such as the power delivered to the network and the power extracted from the batteries.
  • MatlabEndSimulation: This function is called at the end of each sampling instant that has been simulated. In this way, if it finds any error or warning, it is stored in the variable myerr and is presented at the end of the entire simulation.

2.2. Forecast of the Photovoltaic Power and Load Consumption

The data related to the time series of photovoltaic power and consumption load were collected with a sampling period of 1 min over the 31 days of March 2022, resulting in a total of 44,640 observations. However, as is common in any time series, there are missing data associated with instrument failure or disconnections. Therefore, these missing data are imputed through the mean values in similar time intervals, as indicated in [24].
Since the microgrid simulation in HOMER Pro is performed with a sampling time of 1 h, the entire design of the EMS in this work is restricted to this time interval. Consequently, to maintain consistency with this restriction and the time horizon associated with the predictor system, the data set is reduced so that the value for a specific hour is the average of the 60 min comprising that hour. In this way, the predictor is trained with data separated by one-hour time intervals, allowing predictions with this step size.
Two LSTM neural networks are used for the prediction system to forecast load and photovoltaic power over a time horizon of one hour (1 sample). Reference [24] discusses the network structure in detail, which consists of an input layer followed by an LSTM layer with 200 hidden units. To prevent network overtraining, a dropout layer with a dropout rate of 0.5 is connected to the output, which connects to a fully connected layer. Finally, a layer regression performs the prediction and calculates the root-mean-square error (RMSE). The advantage of this network lies in its continual learning ability, which means that each time it makes a prediction, it updates the states of the memory and forgetfulness cells.
For the training of the LSTM networks, real photovoltaic power and load data are used, extracted from the microgrid under study. Thus, 70% of the total data set (44,640 samples) is used for the network training process, whereas the remaining 30% is used as a validation set to determine the quality of the forecast. In this context, the training phase is carried out with the help of the MATLAB Deep Learning Toolbox, using the training options shown in Table 1. The LSTM network yielded an RMSE of 0.199 with a training time of 950 s for the photovoltaic power adjustment process, whereas for the load prediction, an RMSE of 0.588 kW and a time of 975 s were obtained.
The validation process evaluates the quality of the predictions using a closed-loop system. In other words, the network states are initialized with 1440 data from the validation set (equivalent to 1 full day), and the remaining data in the set are predicted from this information. Consequently, the validation predictions reached an RMSE of 0.3189 kW for the PV power and 0.6170 kW for the demand. Figure 4 depicts the data adjustment of the predictor, and although there are slight differences between the actual data and the forecast, the trend is similar. Furthermore, although the predictor operates within the proposed EMS, the LSTM network will constantly update its memory states for each prediction.
When evaluating the forecast quality through the simulation in HOMER Pro, the RMSE for the prediction signals was 1.7251 kW for the PV and 3.111 kW for the load, which are good results considering the high stochastic behavior of these variables. As shown in Figure 5, the predictions made on a 1 h prediction horizon reasonably follow the trend of the time series. Consequently, they can provide a good approximation of the total available power at the upcoming sampling time. In particular, the increase in the RMSE of these predictions compared to the validation is more pronounced because the prediction covers an entire year, as opposed to the two days used to validate the model; in addition, it should be considered that HOMER generates synthetic simulation data, which can influence the forecasts of the LSTM network.

2.3. Mixed-Integer Linear Optimization Problem Formulation

To ensure an optimal power contribution from each element of the microgrid, based on the approach proposed by [5], we formulate a mixed-integer linear optimization problem. It involves guaranteeing that the demand will be met while selecting the operational state of the batteries (integer decision variable) with the lowest possible cost while adhering to constraints that ensure operation within allowed limits. The following is an explanation of each equation in the model.

2.3.1. Objective Function

The objective function models the total dispatch cost at a specific time. In this context, it comprises several terms associated with the cost of the power generated by a given equipment. For our microgrid, the objective function must consider the cost of purchasing power from the public grid ( C g r i d ) and the cost of using the battery system ( C B E S S c h , C B E S S d c h ). However, the objective function does not consider PV power because it is a variable that is available in one way or another at all times. In this context, the function to be minimized is as follows:
J = ( C g r i d · P s + C B E S S c h · P B E S S c h + C B E S S d i s c h · P B E S S d i s c h ) · Δ t
where  P s , P B E S S c h , and  P B E S S d i s c h  are the power purchased from the grid, the charging power of the batteries, and the discharging power of the batteries, respectively. The parameter  Δ t  represents the time step between two sampling times, which, for this work, is 1 h.

2.3.2. Active Power Balance Constraint

An active power balance ensures that the supplied power precisely matches the demand. In this scenario, the power of the generation units within the microgrid that contribute to meeting demand must be equal to the load. Additionally, power that cannot be stored or used to satisfy demand at a given time must be sold to the public grid and can be treated as consumed power. The energy balance constraint is as follows:
P s + P P V + P B E S S d i s c h = P L + P B E S S c h + P V
incorporating three additional variables into the problem: photovoltaic power ( P P V ), load power ( P L ), and power sold to the grid ( P V ).

2.3.3. Battery System Model

This model accounts for the SoC and prevents operation near limits that could affect the equipment’s lifespan. It is an energy balance equation where the charging energy equals the discharging energy, and an optional self-discharge term can be included if necessary. This operational constraint is expressed by Equation (3):
E A E t 1 + α · Δ t · P B E S S d i s c h P B E S S c h · Δ t α β · E A E t E A E t = 0
where  E A E t 1  is the battery SoC at the previous time step, and  E A E t  is the SoC at the current moment, resulting from the charging or discharging process. The coefficients  α  and  β  correspond to the battery’s storage efficiency and self-discharge rate, respectively.

2.3.4. Operational Limits Constraints

To ensure that the supply or storage power of the batteries does not exceed the permitted limits of the equipment, the constraints in Equations (4) and (5) are incorporated. These equations include an additional term,  e A E , a binary variable that selects the operational state of the BESS, where 1 represents discharging and 0 represents charging. Furthermore,  P ¯ B E S S d i s c h m a x  and  P ¯ B E S S c h m a x  represent the maximum discharging and charging powers that the BESS can handle.
P B E S S d i s c h P ¯ B E S S d i s c h m a x · e A E
P B E S S c h P ¯ B E S S c h m a x · ( 1 e A E )
e A E { 0 , 1 } t
A similar situation occurs with the battery SoC. Due to usage recommendations, the operational range cannot fall below 10% or exceed 90% of the maximum capacity of the BESS. Therefore, Constraint (7) is used. Here,  E ̲ A E  and  E ¯ A E  denote the operational limits of the SoC.
E ̲ A E E A E t E ¯ A E
Lastly, to reduce consumption of the primary grid, Equation (8) is introduced to constrain the purchase of energy from the interconnected system while maintaining the capacity to supply demand during high consumption hours and when there is low availability of renewable resources. This set point is established based on the approach presented in [14], which defines the maximum penetration of the backup unit considering the maximum power it can provide and a critical operating point.
In this case study, the maximum power extractable from the grid is 400 kW, whereas the maximum load is 26.63 kW. Assuming that this consumption occurs at a critical moment when renewable resources are unavailable and the battery does not allow discharging, the grid must meet this demand, representing only 7% of its capacity. In this context, the limit  γ  is set at 0.07 of the maximum power extractable from the grid  ( P ¯ g r i d ) .
P s γ · P ¯ g r i d

2.4. Decision Algorithm

Directly using the optimization problem leads to at least two fundamental issues. Since this approach only considers current time instances, selling excess power becomes inevitable. However, this surplus power could be used in future instances when a deficit occurs. Another occurrence arises when the grid tariffs are flat and there is no peak-hour consumption penalty. This results in the problem of satisfying the demand only from the grid and selling renewable power in all instances (this is the current operational scenario of the microgrid studied due to the regulatory framework of Ecuador).
In light of the issues discussed, Figure 6 introduces the algorithm that integrates prediction, optimization, and BESS state correction components. Based on the previous ideas, this algorithm is a significant advancement in addressing the challenges in microgrid operation.
The proposed EMS initially samples the charging, photovoltaic, and available energy in the BESS. The first two data inputs are fed into the LSTM networks, generating forecasts for these variables over a 1 h prediction horizon. The optimization problem solves two scenarios: one related to the current time (t) and the other to the next time instance ( t + 1 ). Furthermore, the discharging cost is negative, to encourage battery integration for meeting demand. The overall approach to solving these two problems is to prevent power sales when they are detrimental to the system’s health or cause unnecessary discharging of the BESS at the current time. Therefore, the algorithm integrates two redundant conditions to ensure that energy delivery at time t is not unnecessary at  t + 1 . In this context, Condition 1 verifies whether the power purchased from the grid at  t + 1  is more significant than that at t if the distribution at t occurs during hours of sunlight. If this resource is greater than the load, it is because if at t, the resource is not sufficient to meet the demand, it is not convenient to store it for the next instance. The second condition checks whether the battery’s SoC allows storage. If both of these conditions are met, the battery’s SoC is enforced by setting its cost as unfavorable and propagating this solution into the system. Otherwise, the solution calculated at the beginning of the algorithm is retained.

2.5. Peak-Shaving Algorithm (Complementary)

Although the peak-shaving algorithm is not part of the proposal in this work, it is used as a contrasting case to assess the effectiveness of the proposed algorithm. Therefore, a brief description of this approach is provided to enhance the reader’s understanding. In the following, the peak-shaving approach is presented, as described in [14,15].
The algorithm proposed by [14,15] consists of a series of nested conditionals that define different operational modes based on the availability of the photovoltaic resource. Consequently, the first condition verifies the presence of photovoltaic power. Two macro-scenarios are defined: one where the sun is absent and the photovoltaic energy is zero, and another where the system operates during sunlight hours.
In this context, each scenario has its own control algorithm. Thus, the nighttime operation of the system is regulated by the five operating modes described below.
  • Mode 1: Operation of the system when the load power is greater than the optimal microgrid generation  ( P L > γ P ¯ g r i d )  and the state of charge of the battery is above its minimum value  ( S o c > S o C m i n ) . Thus, the demand is met through the discharge of the BESS and the main grid, and it is governed by the active power balance given by Equation (9):
    P ¯ g r i d = P L P ¯ B E S S d i s c h m a x
  • Mode 2: This mode operates when the load is greater than the optimal operating point of the microgrid but less than the sum of the extractable power from the grid and the BESS  ( γ P ¯ g r i d P L > P ¯ g r i d + P ¯ B E S S d i s c h m a x ) . In this context, the grid fully satisfies the demand while also charging the batteries, thereby governing the power balance through Equation (10):
    P ¯ g r i d = P L + P ¯ B E S S c h m a x
  • Mode 3: This mode is activated when the load power exceeds the combined power of the grid and the battery bank but is less than the extractable capacity from the grid  ( P ¯ g r i d + P ¯ B E S S d i s c h m a x P L > P ¯ g r i d ) , and the state of charge of the BESS is above its minimum level. The demand power is solely covered through the discharge of the storage system, and dispatch is carried out using Equation (11):
    P L = P ¯ B E S S d i s c h m a x
  • Mode 4: This scenario occurs when the sum of the consumption power and the power needed to charge the battery is less than the extractable power from the grid  ( P ¯ B E S S c h m a x + P L < P ¯ g r i d ) . Thus, if the state of charge of the battery is below its maximum limit, the power balance equation is given by (12):
    P ¯ g r i d = P L + P ¯ B E S S c h m a x
  • Mode 5: This operating mode defines a state of inactivity for the BESS equipment. It is activated when the sum of the consumption power plus the battery charging power exceeds the maximum extractable power from the main distribution grid. Additionally, the BESS does not allow discharge, as it is below its minimum operating level. Thus, the microgrid solely meets the demand, and the battery remains resting. The equation for the active power balance is reduced to (13):
    P ¯ g r i d = P L
Under the assumption that the renewable resource is available, the algorithm undergoes a complete change and is governed by three distinct operating modes that consider the power of the photovoltaic renewable resource. Here is a brief description of the operating modes:
  • Mode 1: In this operating mode, if the load  ( P L )  is greater than the optimal operating point of the microgrid plus the available photovoltaic power  ( γ P ¯ g r i d + P P V ) , it is assumed that the renewable resource is not sufficient to meet demand. Therefore, the battery power is integrated, and it is verified whether this can cover demand. If possible, demand is fulfilled using these two components, as indicated by the energy balance in Equation (14):
    P L = P P V + P ¯ B E S S d i s c h m a x
On the other hand, if these two resources are not sufficient, demand is met through the integration of the main distribution system, and it is governed by Equation (15):
P L = P P V + P ¯ B E S S d i s c h m a x + P ¯ g r i d
  • Mode 2: In this scenario, it is verified whether it is possible to meet demand using renewable resources. Otherwise, if the SoC of the battery allows discharge, the battery power is integrated into the dispatch. If demand can still not be fully met, the remaining part is supplied through the integration of the main distribution system. The following three conditions govern this mode:
    1.
    P P V P L , with the power balance given by Equation (16):
    P L = P P V
    2.
    P P V < P L & & S o C > S o C m i n & & P P V + P ¯ B E S S d i s c h m a x P L . In this scenario, energy dispatch occurs through the active power balance described by Equation (17):
    P L = P P V + P ¯ B E S S d i s c h m a x
    3.
    P P V + P ¯ B E S S d i s c h m a x P L . This case is satisfied by the active power balance given by Equation (18):
    P L = P P V + P ¯ B E S S d i s c h m a x + P ¯ g r i d
  • Mode 3: This mode is activated when the photovoltaic solar resource exceeds the load  ( P P V P L )  and the battery SoC is below its maximum. In this scenario, the surplus photovoltaic power charges the BESS. Thus, the power balance adheres to Equation (19):
    P L + P ¯ B E S S c h m a x = P P V + P ¯ g r i d
Power dispatch is executed to fulfill demand by verifying each condition defining the operational modes. Dispatch revolves around a straightforward power balance. Consequently, the comparison algorithm utilized in our work combines these operating modes, optimizing resources via a mixed-integer optimization model. This model considers the energy balance of the batteries, their operational constraints, and the costs associated with purchasing energy from the main distribution grid.

3. Results and Discussion

This section presents the simulation results related to the proposed dispatch technique, along with a comparison with the techniques reported in [5,14]. Initially, the proposed algorithm is evaluated through an analysis of time series. For a clear visualization, a small portion of this series is presented, demonstrating various scenarios regarding resource availability. Two specific days were selected: 3 July, where photovoltaic power significantly exceeds the load, and 4 July, where the opposite occurs. These distinctions are visible in Figure 7.
Figure 7a illustrates how the dispatch algorithm schedules battery charging during the early hours when consumption and rates are typically low. It is noteworthy that on 3 July, battery charging occurs during high renewable resource availability periods, almost obviating the need for purchasing electrical energy. Consequently, the surplus can be injected into the distribution system. On the other hand, when solar power decreases toward the end of the day, the integration of the BESS is evident. It discharges without dropping below its lower limit, providing the system with a continuous autonomy of 7 h, during which integration with the primary distribution system is practically negligible. Finally, the grid system covers the supply when the battery reaches its minimum charge, at around 21:00 h.
On the other hand, in more critical scenarios, where the load exceeds the renewable resource, such as on July 4th, the predictive effect of the algorithm becomes evident. From 11:00 AM to 1:00 PM, the battery can meet demand or sell surplus renewable resources. However, its discharge is extended until after 2:00 PM, when solar power is significantly lower than in earlier periods. Unlike the previous day, the penetration of the BESS is much lower. However, it is essential to consider the insufficient photovoltaic power available for storage or extend the use of BESS beyond four consecutive hours of microgrid autonomy.
Figure 7b shows the results of the technique based on solving a mixed-integer optimization problem for each time instance. The primary characteristic of this dispatch is the repetitive battery charging and discharging processes, with or without the presence of renewable resources. This cyclical operation has two critical consequences: a severe impact on the useful life of the BESS due to cyclic stress and significant power wastage through energy purchases, even when solar resource availability could fully meet the system’s requirements during specific time intervals. It is also noticeable that during the period with the highest availability of renewable resources, the amount of energy stored is significantly lower in the optimization-based approach than in our proposed algorithm. This discrepancy arises because the optimization approach prioritizes the sale of power over storage for subsequent instances. The power-sold diagrams reflect this distinction: in the proposed algorithm, the sale occurs only when there is an excess of solar resources, whereas in the optimization approach, all surplus power, both from batteries and photovoltaic panels, is sold.
Figure 7c shows the time series using the approach presented in [14]. Observing how the BESS loses integration within the microgrid, where the photovoltaic power and the primary distribution system cover demand, is intriguing. This decision is linked to the inherent nature of the algorithm, as it is a dispatch solely based on predefined scenarios to cover demand using the optimal combination of elements (PV, BESS, or the grid). As a result, the relevant options tend to be grid or photovoltaic power, except in particular situations where the load exceeds the capacity, leading to a marginal involvement of the BESS. In conclusion, this algorithm must precisely configure its set points to achieve higher penetration of renewable resources and fully utilize the BESS. However, defining specific operational points becomes challenging in the studied scenario, where the load exhibits significant variability. The many possible scenarios constitute a combinatorial problem that could overlook certain situations, leading to ill-timed dispatch decisions.
Lastly, Figure 7d illustrates the fourth comparative case, the original development of the authors. It combines the optimization-based algorithm with the condition-based one. The distinction lies in that once the current scenario is determined along with the state of the BESS, the set points for each device are calculated by solving the optimization problem. The notable feature of this algorithm is the charging of the BESS during periods of scarcity of renewable resources, resulting in increased energy purchases from the primary distribution system.
Figure 8 shows the time series related to the SoC of the energy storage system and the sales made to the grid system. In the case of the EMS solely based on an optimization algorithm, it becomes apparent that the energy stored at a given time is immediately sold in the subsequent period. This action has a pronounced impact on the SoC because of the constant cycling of the battery. On the other hand, the peak-shaving algorithm has a lesser impact on the SoC, as it only utilizes the available energy in the BESS in specific consumption circumstances. In contrast, optimal algorithms that focus on peak shaving and prediction (proposed in this work) have a lower impact on the SoC. They perform a controlled charging and discharging process that aligns with periods of high solar availability (charging) and resource scarcity (discharging). Furthermore, the sale of energy only occurs when charging the battery or meeting the demand is not feasible.
However, performance over only two days is not representative of behavior over an entire year. Therefore, Figure 9 shows heat maps illustrating the frequency with which the battery engages in dispatch decisions, considering the demand and available solar resources throughout the year (8760 h). Thus, the proposed algorithm uses the battery approximately 59% of the time to meet demand when the renewable resource is scarce. On the other hand, about 24% of the time is allocated to storage, specifically when there is a surplus of renewable energy compared to consumption. About 6% of the time, the battery engages in storage processes even when the solar resource is lower than the load. This action is directly related to the predictive component of the algorithm. In such cases, the algorithm predicts that the power purchased in time  t + 1  would be higher than that purchased in time t, prompting the choice of battery charging. Finally, 11% of the time, the BESS goes into idle mode because it reaches the maximum SoC limits. Therefore, it does not allow charging or discharging under any consumption condition. When these metrics are compared with those of other algorithms, it becomes evident that the proposed algorithm achieves a higher effective integration of the batteries. For example, in algorithms with a focus on peak shaving, batteries spend more time in a resting state than contributing to demand coverage, accounting for only 18% of the time.
Regarding the pure optimization approach, batteries achieve 78% integration in energy management, which might initially seem significant. However, upon closer examination, charging and discharging processes are prioritized when renewable resources are scarce. This management results in additional power purchases from the grid, which is more impractical, as the same power is immediately dispatched in the subsequent instance.
Another result of interest is the amount of  CO 2  emissions generated by each EMS when operating the microgrid. Figure 10 shows that the proposed technique produces 25,766 kg/year of  CO 2 , demonstrating a reduction of at least 3. 58% compared to the peak-shaving approaches and an impressive 33% compared to the pure optimization approach. These results highlight the importance and effectiveness of the proposed technique in minimizing greenhouse gas emissions. This achievement can be directly attributed to the planned storage of excess photovoltaic energy, which was made possible by the accurate forecast provided by the LSTM network. The ability to anticipate and efficiently manage surplus energy contributes to the reduction in  CO 2  emissions, thus consolidating the environmental and sustainable relevance of the proposed approach.
In a different context, the economic aspect is also crucial for evaluating the performance of an algorithm. Therefore, Figure 11 and Figure 12 depict the amount of energy purchased and sold to the primary grid compared to the penetration level of renewable sources in each algorithm. In this context, the proposed algorithm achieves 52% integration of photovoltaic energy, with a purchase of 40,770 kWh/year and sales of 11,435 kWh/year. Therefore, it is the algorithm with the second-highest integration of renewable energy, surpassed only by the peak-shaving approach, which achieves 62% renewable integration. However, it is essential to note that the integration percentage is measured on the basis of the load covered solely by renewable energy, without considering the BESS. As a result, since photovoltaic power is surplus most of the time it is available, the load is covered by this energy, and the remaining power is sold to the grid. However, according to the time-series data, it is evident that these two metrics favor the algorithm with low battery usage. Despite this, with greater integration of the BESS, the proposed algorithm only results in about a 20% increase in purchases from the grid. Furthermore, there is no dispatching of excess solar energy, as most of it is stored to meet demand in other instances, consequently leading to a considerable reduction in energy sold to the grid.
In Figure 13, the annual operating cost is compared to each algorithm’s renewable penetration level. In this aspect, it becomes evident that the operating cost decreases as the percentage of renewable penetration increases. Consequently, the proposed algorithm has the third-lowest operating cost at USD 17,149, which is 22% higher than that of the peak-shaving algorithms. It is essential to note that this cost difference is insignificant when considering two crucial factors: the significantly higher integration of batteries in the proposed algorithm compared to the other three techniques, and due to this higher integration, the use, maintenance, and replacement of the BESS contribute to the operating cost of the microgrid. Additionally, the peak-shaving algorithm does not consider the self-discharge effect of the battery. According to the heat map presented in Figure 9, the BESS can retain stored energy for several days without loss, which is unrealistic and could lead to significant power losses. Consequently, the benefit of this EMS for the microgrid in this case study translates into a greater integration of the storage system into energy management without exerting an aggressive impact on its charging cycle, which reduces the costs associated with the operation, maintenance, and replacement of the BESS.
On the other hand, it is crucial to consider the poor economic performance of the approach based on pure optimization. This performance can be explained by the formulation that seeks to keep the SoC within its operating limits while supplying demand using all possible energy sources. However, this strategy charges the battery at any time, even when the renewable resource is unavailable. As a result, in addition to meeting demand, the grid must satisfy the battery requirement, generating unnecessary additional costs. Then, when the battery has sufficient energy, it is discharged to meet demand or delivered to the grid as surplus power. This constant loop of unnecessary charging and discharging results in an increase in the operating cost of the system, as it implies a continuous and inopportune use of the batteries at all times.
Figure 14 summarizes the costs associated with the capital, replacement, operation, and benefits of the microgrid components, considering a project duration of 25 years. The capital cost is identical in all four cases since the microgrid uses the same architecture. The BESS represents a significant investment at a cost of USD 13,200, together with the photovoltaic panels costing USD 87,500.
However, there is a significant expenditure in terms of replacement costs, mainly generated by the BESS. As observed, with the optimization algorithm, the continuous and cyclical action of the state of charge results in significant battery degradation. Consequently, its replacement occurs more frequently compared to the other algorithms. There is also the opposite scenario where the battery has minimal influence on the system, as seen in the case of the peak-shaving algorithm, leading to a relatively low replacement cost for the equipment. The optimal peak-shaving algorithm and the proposed EMS maintain average and similar costs. However, it should be remembered that the proposed algorithm integrates the BESS to a greater extent than the peak-shaving algorithm. The proposed algorithm involves more battery usage to meet demand while preserving the useful life of the equipment.
Regarding operating costs, it is evident that the grid plays a significant role within the system in all four scenarios. This behavior is expected due to the nature of the resource. The grid comes into play when the renewable resource is at its minimum and the energy stored in the BESS is insufficient to meet the demand.
The global summary in Table 2 presents an exhaustive comparison of all metrics evaluated in the four algorithms presented. The proposed algorithm stands out for solidly integrating the operation of the BESS, reaching 59% efficiency, with an increase of only 22% in operating and replacement costs compared to other available techniques. It is crucial to note that given the growing concern about the decarbonization of the planet, the predictive optimization approach achieves a notable reduction of 4% in  CO 2  emissions. This balance between efficiency, operability, and sustainability positions the proposal as a valuable option in the search for advanced energy solutions.
The proposed EMS is easily scalable and adaptable to different microgrid topologies. For example, when considering a possible expansion plan that involves integrating loads, storage systems, and RES, the formulation of the optimization problem can be adjusted. In this process, the costs associated with using the new equipment can be incorporated, and the new energy contributions can be added to the active power balance, considering the operating limits of the BESS. Regarding prediction systems, it is possible to implement a single neural network with as many inputs as there are variables to be predicted. This approach allows for the use of a deep learning network to identify relationships between different variables and improve the quality of forecasts.
However, in the decision-making algorithm, the total power of all renewable energy sources is considered, as well as the SoCs of all storage systems. When integrating new components into the algorithm, a systematic approach should be taken to ensure computational efficiency, involving adjusting the optimization problem and training the neural network with the new information available while maintaining the capacity to efficiently solve the problem. Furthermore, to obtain a quality forecast, it is essential to have a sufficiently extensive data history specifically for the geographical area of the microgrid.

4. Conclusions

In this study, an EMS was successfully developed for a microgrid using an optimization approach based on the prediction of load and photovoltaic power within a time horizon of one hour. An analysis of the time-series data demonstrates that the proposed algorithm achieves greater integration of the BESS, which accounts for 59% of the demand coverage. It effectively utilizes surplus renewable resources by storing energy for dispatch during more opportune times (when solar resources are scarce). Despite the continuous charge and discharge cycles of the algorithm, its impact on the storage system’s lifespan is minimal, resulting in reasonable replacement costs compared to those of a pure optimization approach. Specifically, the total cost of operating the microgrid using the proposed technique is only 7.63% more expensive than the peak-shaving approach but achieves greater integration of the storage system to meet demand and reduces greenhouse gas emissions by 3.58%.
The proposed algorithm achieves a penetration of renewable energy of 52%, with a total energy purchase of 40,000 kWh and sales of 12,000 kWh per year. Compared to other dispatch techniques, these metrics are deemed acceptable. For example, the pure optimization algorithm acquires approximately 50% more electrical energy from the grid, with a renewable integration that does not exceed 40%. On the other hand, the optimal peak-shaving algorithm achieves 62% integration of clean energy; however, it squanders all renewable energy by selling it to the primary interconnection system rather than utilizing storage for later dispatch. For this reason, the amount of energy sold to the grid is higher, and purchased energy decreases. Additionally, algorithms based on peak shaving tend to supply demand through a combination of RES and the network, isolating the use of the storage system to only 20% participation in dispatch tasks. This level of intervention is significantly lower compared to the 59% participation achieved by the proposed algorithm.
The economic results demonstrate that despite having a storage system that efficiently accumulates surplus power, the intervention of the primary grid remains significant in the case study, up to approximately 40%. This penetration is mainly due to the absence of technologies that can address the power deficit during hours when solar resources are unavailable. Potential options to address this problem include using the available hydropower and wind generation within the microgrid.
An analysis of the projected costs over the 25-year duration of the project reveals that the algorithm based on a mixed-integer optimization problem exhibits the lowest economic efficiency. This suboptimal performance is primarily attributed to the frequent necessity of battery replacement, leading to a significant escalation in replacement costs. In contrast, the proposed algorithm significantly reduces operational and replacement costs. This improved efficiency is due to its ability to mitigate the impact on the lifespan of the BESS without aggressive repercussions, along with a concurrent reduction in electrical consumption from the grid during peak demand periods.

Author Contributions

Conceptualization, methodology, software, resources, validation, and formal analysis, F.D., W.P. and L.I.M.; investigation and writing—original draft preparation, F.D. and L.I.M.; writing—review and editing and supervision, W.P. and L.I.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data presented in this study are available on request from the corresponding author. The data are not publicly available due to privacy.

Conflicts of Interest

The authors declare no conflicts of interest. We also confirm that our paper has not been previously published and is not currently under consideration by any other journals.

Abbreviations

The following abbreviations are used in this manuscript:
RESRenewable Energy Sources
PVPhotovoltaic Power
LSTMLong Short-Term Memory
BESSBattery Energy Storage System
SoCState of Charge
  S o C m i n Minimum State of Charge
EMSEnergy Management System
RMSERoot-Mean-Square Error
  C g r i d Rate per Kw/h for purchasing energy from the grid
  C B E S S c h Rate per Kw/h for charging the battery
  C B E S S d i s c h Rate per Kw/h for discharging the battery
  P s Power supplied from the grid
  P ¯ g r i d Maximum extractable power from the main distribution grid
  P B E S S c h Battery’s charging power
  P B E S S d i s c h Battery’s discharging power
PCCPoint of common coupling
  P P V Photovoltaic energy generated by the panels
  P L Load power
  P v Power sold to the grid
  E A E t 1 Battery’s state of charge at the previous time step
  α Battery’s storage efficiency
  Δ t Time step between two time instances
  β Battery’s self-discharge rate
  E A E t Battery state of charge at the current time step
  P ¯ B E S S d i s c h m a x Battery’s maximum discharging power
  P ¯ B E S S c h m a x Battery’s maximum charging power
  e A E Binary variable that selects the operational state of the BESS
  E ̲ A E Battery’s minimum state of charge
  E ¯ A E Battery’s maximum state of charge
  γ Coefficient limiting the maximum extractable power from the main distribution grid

References

  1. Kheiter, A.; Souag, S.; Chaouch, A.; Boukortt, A.; Bekkouche, B.; Guezgouz, M. Energy Management Strategy Based on Marine Predators Algorithm for Grid-Connected Microgrid. Int. J. Renew. Energy Dev. 2022, 11, 751–765. [Google Scholar] [CrossRef]
  2. Mirhoseini, P.; Ghaffarzadeh, N. Economic battery sizing and power dispatch in a grid-connected charging station using convex method. J. Energy Storage 2020, 31, 101651. [Google Scholar] [CrossRef]
  3. Alvarado-Barrios, L.; Álvarez Arroyo, C.; Escaño, J.; Gonzalez-Longatt, F.; Martinez-Ramos, J. Two-level optimisation and control strategy for unbalanced active distribution systems management. IEEE Access 2020, 8, 197992–198009. [Google Scholar] [CrossRef]
  4. Shouman, N.; Hegazy, Y.; Omran, W. Battery Energy Storage System for Stochastic Based Power Dispatch Incorporating Renewable Energy Sources Uncertainty. In Proceedings of the 2022 International Conference on Electrical, Computer and Energy Technologies, Prague, Czech Republic, 20–22 July 2022; Institute of Electrical and Electronics Engineers Inc.: Piscataway, NJ, USA, 2022. [Google Scholar] [CrossRef]
  5. Dratsas, P.; Psarros, G.; Papathanassiou, S. Feasibility of Behind-the-Meter Battery Storage in Wind Farms Operating on Small Islands. Batteries 2022, 8, 275. [Google Scholar] [CrossRef]
  6. Gantayet, A.; Dheer, D. A data-driven multi-objective optimization framework for optimal integration planning of solid-state transformer fed energy hub in a distribution network. Eng. Sci. Technol. Int. J. 2022, 36, 101278. [Google Scholar] [CrossRef]
  7. Patnaik, S.; Nayak, M.; Viswavandya, M. Optimal Battery Energy Storage System Management with Wind Turbine Generator in Unbalanced Low Power Distribution System. Adv. Electr. Electron. Eng. 2023, 20, 523–536. [Google Scholar] [CrossRef]
  8. Pavon, W.; Inga, E.; Simani, S.; Nonato, M. A Review on Optimal Control for the Smart Grid Electrical Substation Enhancing Transition Stability. Energies 2021, 14, 8451. [Google Scholar] [CrossRef]
  9. Tahir, M.F.; Chen, H.; Javed, M.S.; Jameel, I.; Khan, A.; Adnan, S. Integration of Different Individual Heating Scenarios and Energy Storages into Hybrid Energy System Model of China for 2030. Energies 2019, 12, 2083. [Google Scholar] [CrossRef]
  10. Day-Ahead DSM-Integrated Hybrid-Power-Management-Incorporated CEED of Solar Thermal/Wind/Wave/BESS System Using HFPSO. Sustainability 2022, 14, 1169. [CrossRef]
  11. Kang, W.; Chen, M.; Lai, W.; Luo, Y. Distributed real-time power management for virtual energy storage systems using dynamic price. Energy 2021, 216, 119069. [Google Scholar] [CrossRef]
  12. Eltamaly, A.; Alotaibi, M.; Elsheikh, W.; Alolah, A.; Ahmed, M. Novel Demand Side-Management Strategy for Smart Grid Concepts Applications in Hybrid Renewable Energy Systems. In Proceedings of the 2022 4th International Youth Conference on Radio Electronics, Electrical and Power Engineering (REEPE), Moscow, Russia, 17–19 March 2022; Institute of Electrical and Electronics Engineers Inc.: Piscataway, NJ, USA, 2022. [Google Scholar] [CrossRef]
  13. Uwineza, L.; Kim, H.G.; Kleissl, J.; Kim, C. Technical Control and Optimal Dispatch Strategy for a Hybrid Energy System. Energies 2022, 15, 2744. [Google Scholar] [CrossRef]
  14. Rana, M.M.; Romlie, M.F.; Abdullah, M.F.; Uddin, M.; Sarkar, M.R. A novel peak load shaving algorithm for isolated microgrid using hybrid PV-BESS system. Energy 2021, 234, 121157. [Google Scholar] [CrossRef]
  15. Uddin, M.; Romlie, M.F.; Abdullah, M.F.; Tan, C.K.; Shafiullah, G.M.; Bakar, A.H. A novel peak shaving algorithm for islanded microgrid using battery energy storage system. Energy 2020, 196, 117084. [Google Scholar] [CrossRef]
  16. Huang, Z.; Ma, P.; Wang, M.; Fang, B.; Zhang, M. A Hierarchical Strategy for Multi-Objective Optimization of Distribution Network Considering DGs and V2G-Enabled EVs Integration. Front. Energy Res. 2022, 10, 869844. [Google Scholar] [CrossRef]
  17. Pal, P.; Krishnamoorthy, P.; Rukmani, D.; Joseph Antony, S.; Ocheme, S.; Subramanian, U.; Elavarasan, R.; Das, N.; Hasanien, H. Optimal dispatch strategy of virtual power plant for day-ahead market framework. Appl. Sci. 2021, 11, 3814. [Google Scholar] [CrossRef]
  18. Li, Y.; Peng, J.; Jia, H.; Zou, B.; Hao, B.; Ma, T.; Wang, X. Optimal battery schedule for grid-connected photovoltaic-battery systems of office buildings based on a dynamic programming algorithm. J. Energy Storage 2022, 50, 104557. [Google Scholar] [CrossRef]
  19. Asef, P.; Taheri, R.; Shojafar, M.; Mporas, I.; Tafazolli, R. SIEMS: A Secure Intelligent Energy Management System for Industrial IoT Applications. IEEE Trans. Ind. Inform. 2023, 19, 1039–1050. [Google Scholar] [CrossRef]
  20. Wang, B.; Zhang, C.; Li, C.; Li, P.; Dong, Z.; Lu, J. Hybrid Interval-Robust Adaptive Battery Energy Storage System Dispatch with SoC Interval Management for Unbalanced Microgrids. IEEE Trans. Sustain. Energy 2022, 13, 44–55. [Google Scholar] [CrossRef]
  21. Mazzola, S.; Vergara, C.; Astolfi, M.; Li, V.; Perez-Arriaga, I.; Macchi, E. Assessing the value of forecast-based dispatch in the operation of off-grid rural microgrids. Renew. Energy 2017, 108, 116–125. [Google Scholar] [CrossRef]
  22. Kim, H.; Kim, M. A novel deep learning-based forecasting model optimized by heuristic algorithm for energy management of microgrid. Appl. Energy 2023, 332, 120525. [Google Scholar] [CrossRef]
  23. Espinoza, J.L.; González, L.G.; Sempértegui, R. Micro grid laboratory as a tool for research on non-conventional energy sources in Ecuador. In Proceedings of the 2017 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC), Ixtapa, Mexico, 8–10 November 2017; pp. 1–7. [Google Scholar] [CrossRef]
  24. Duran, J.F.; Minchala, L.I. A Comparative Study on Time Series Prediction of Photovoltaic-Power Production Through Classic Statistical Techniques and Short-Term Memory Networks. In Proceedings of the 2023 9th International Conference on Control, Decision and Information Technologies (CoDIT), Rome, Italy, 3–6 July 2023; pp. 1512–1517. [Google Scholar] [CrossRef]
Figure 1. Outline of proposed EMS.
Figure 1. Outline of proposed EMS.
Energies 17 00486 g001
Figure 2. Microgrid configuration.
Figure 2. Microgrid configuration.
Energies 17 00486 g002
Figure 3. Information flow between MATLAB and HOMER Pro.
Figure 3. Information flow between MATLAB and HOMER Pro.
Energies 17 00486 g003
Figure 4. Comparison of real data and predictions through an LSTM neural network with the validation data set.
Figure 4. Comparison of real data and predictions through an LSTM neural network with the validation data set.
Energies 17 00486 g004
Figure 5. Comparison of real data and predictions through an LSTM neural network in the HOMER simulation.
Figure 5. Comparison of real data and predictions through an LSTM neural network in the HOMER simulation.
Energies 17 00486 g005
Figure 6. Flowchart of the proposed EMS algorithm.
Figure 6. Flowchart of the proposed EMS algorithm.
Energies 17 00486 g006
Figure 7. A segment of the time series: (a) Dispatch based on the proposed optimization and forecasting algorithm, (b) dispatch algorithm with a pure optimization approach, (c) dispatch algorithm with the peak-shaving technique, and (d) dispatch algorithm based on a combination of the peak-shaving technique and the optimization scenario.
Figure 7. A segment of the time series: (a) Dispatch based on the proposed optimization and forecasting algorithm, (b) dispatch algorithm with a pure optimization approach, (c) dispatch algorithm with the peak-shaving technique, and (d) dispatch algorithm based on a combination of the peak-shaving technique and the optimization scenario.
Energies 17 00486 g007
Figure 8. Time series related to SoC and energy selling to the primary distribution grid.
Figure 8. Time series related to SoC and energy selling to the primary distribution grid.
Energies 17 00486 g008
Figure 9. Heat map associated with the number of charge/discharge events during a year of operation (8760 h), implying the same number of EMS-related decisions.
Figure 9. Heat map associated with the number of charge/discharge events during a year of operation (8760 h), implying the same number of EMS-related decisions.
Energies 17 00486 g009
Figure 10. Amount of  CO 2  emissions from each EMS.
Figure 10. Amount of  CO 2  emissions from each EMS.
Energies 17 00486 g010
Figure 11. Total purchased energy from the main grid for each dispatch technique.
Figure 11. Total purchased energy from the main grid for each dispatch technique.
Energies 17 00486 g011
Figure 12. Total energy supplied to the main grid for each dispatch technique.
Figure 12. Total energy supplied to the main grid for each dispatch technique.
Energies 17 00486 g012
Figure 13. Operating cost of each dispatch technique.
Figure 13. Operating cost of each dispatch technique.
Energies 17 00486 g013
Figure 14. Summary of costs generated by the microgrid components.
Figure 14. Summary of costs generated by the microgrid components.
Energies 17 00486 g014
Table 1. LSTM network training options.
Table 1. LSTM network training options.
OptionValueDescription
Training algorithmAdamAdaptive moment estimation algorithm. Adjusts learning rates by optimizing the loss function, with consideration of a moment term.
MaxEpochs100Maximum number of epochs.
GradientThreshold1Limits gradient burst to avoid training divergence.
InitialLearnRate0.005Specifies the initial learning rate of the training.
LearnRateSchedulepiecewiseUpdates the learning rate every certain number of epochs.
LearnRateDropPeriod50Specifies the number of epochs for modifying the learning rate based on the previous parameter.
LearnRateDropFactor0.2Learning rate reduction factor.
SequencePaddingDirectionrightRight truncation direction to prevent later time units from influencing earlier time predictions.
ValidationFrequency10The frequency with which the algorithm performs validation tests.
Table 2. Comparison of the evaluation metrics obtained in the four dispatch algorithms.
Table 2. Comparison of the evaluation metrics obtained in the four dispatch algorithms.
AlgorithmOptimizationPeak ShavingOptim. Peak ShavingForecast and Optimization
RE penetration (%)38.451.361.351.7
CO 2  emission (kg/year)38,49527,19626,72525,766
Purchased energy (kWh/year)60,91043,03133,85640,770
Sold energy (kWh/year)25,85115,41614,67211,435
Operation cost (USD)210,107155,800117,823150,351
Capital cost (USD)100,700100,700100,700100,700
fReplacement cost (USD)188,56917,65968,84461,555
fSalvage cost (USD)02257305544
BESS penetration (%)38.525.2717.9759.25
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

Durán, F.; Pavón, W.; Minchala, L.I. Forecast-Based Energy Management for Optimal Energy Dispatch in a Microgrid. Energies 2024, 17, 486. https://doi.org/10.3390/en17020486

AMA Style

Durán F, Pavón W, Minchala LI. Forecast-Based Energy Management for Optimal Energy Dispatch in a Microgrid. Energies. 2024; 17(2):486. https://doi.org/10.3390/en17020486

Chicago/Turabian Style

Durán, Francisco, Wilson Pavón, and Luis Ismael Minchala. 2024. "Forecast-Based Energy Management for Optimal Energy Dispatch in a Microgrid" Energies 17, no. 2: 486. https://doi.org/10.3390/en17020486

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