1. Introduction
One of the strategic goals of the electrical energy sector is to use energy in an optimal and efficient way. Therefore, increasing the efficiency of the existing capacity will have a very favorable effect in the field of cost reduction and investment in the generation, transmission, and distribution of electric energy. With the continuation of the evolution of storage technologies, the use of battery energy storage systems (BESSs) in distribution networks has attracted the attention of system operators, and their use in the power system is finding economic justification. These systems provide a wide range of applications to the power grid, such as improving control, reducing fluctuation and outage problems of renewable energy resources (RESs), voltage and frequency stability, peak load management, improving power quality, and postponing system upgrades. The high investment costs of BESSs require accurate modeling and setting their optimal size in order to meet the economic justification of these systems and also prevent their under- or over-utilization.
Conventional power systems around the world face problems such as the gradual reduction in fossil fuel resources, low energy efficiency, and the emission of environmental pollutants. These problems led to a new approach in the use of energy resources known as distributed energy resources (DERs). Moreover, a microgrid is a small-scale, localized energy system that can operate independently or in conjunction with the larger electrical grid. It typically consists of DERs such as RESs, BESSs, and controllable loads, all interconnected to provide electricity to a specific area, facility, or community. Microgrids are designed to increase energy reliability, reduce greenhouse gas emissions, and improve energy resilience. Microgrids offer a promising solution for improving energy reliability, sustainability, and resilience in a wide range of applications, from urban environments to remote communities and critical infrastructure. Their ability to combine various DERs and advanced control systems makes them a valuable tool in the transition to a cleaner and more reliable energy future [1,2,3,4,5].
At the same time that storage technologies are progressing, the use of a BESS in future networks is attracting the attention of system operators more than before. It provides the power network operator with many advantages, such as improving the control system, reducing fluctuation concerns and intermittent problems regarding RESs [6,7,8], demand management [9], voltage and frequency control and stability [10,11], maximum load control, improving power quality [12,13], and postponing system upgrades. Nevertheless, the high investment costs are economically justified by the accurate modeling and determination of the optimal size of the BESS and prevent its under- or over-use. An accurate and practical BESS model which is optimally operated by the means of a battery management system (BMS) improves system operation modeling both economically and security-wise. Therefore, adopting BESSs with appropriate control and management schemes is necessary for microgrids.
Additionally, capacitor bank placement is a strategic tool for enhancing the performance of microgrids, offering several significant benefits. In a microgrid, which is a localized and often renewable energy-based electrical distribution system, the integration of capacitor banks can optimize power quality [12,14] and overall grid reliability [15]. Since DERs are responsible for voltage regulation by supporting and injecting reactive power, Q-compensators can significantly release the effective capacity of DERs and improve the system’s efficiency [16]. By strategically locating capacitor banks within a microgrid, operators can improve the power factor, reduce voltage fluctuations, and mitigate voltage sags and surges, all of which contribute to a stable and efficient energy supply. This enhanced power quality not only ensures the reliable operation of critical loads but also allows for better integration of RESs like solar and wind, where intermittent power generation can be offset by the rapid response of capacitors. Moreover, the efficient management of reactive power through capacitor banks reduces energy losses [17], enhances system efficiency, and potentially lowers operational costs. Thus, capacitor bank placement within microgrids is a valuable asset for achieving sustainable, resilient, and cost-effective energy distribution.
The optimization of BESS operation strategies in microgrids has been explored in existing research [18,19,20,21]. However, several research gaps remain in the literature, and some of these shortcomings are discussed below.
The uncertainty of RESs should be considered in the optimization problems to achieve accurate and reliable results; therefore, stochastic and robust optimization methods are used [20,22]. The problem with the robust optimization method is that the solution is conservative [23]. In ref. [24], a two-stage robust optimization approach is proposed to reduce energy costs in multi-energy microgrids. A multistage dispatch of energy storage systems is proposed in ref. [25] that takes into account the variability and uncertainty of renewable resources to enhance energy storage scheduling using a distributionally robust dispatch method. While these methods hedge the solution against uncertainties, they fail to provide insights into how the solution behaves across different scenarios within the uncertainty range, making it harder to understand the trade-offs and variations between the extremes. On the other hand, the problem with stochastic methods is computational costs [26]. A stochastic programming model is formulated in ref. [27] for the optimal restoration of a multi-energy distribution system with joint district network reconfiguration. A progress hedging (PH) method is utilized which decomposes the original large-scale problem into several small sub-problems, to reduce computation burdens and save solution time. To cope with the large number of uncertainty scenarios of the stochastic model in this study, an optimal scenario reduction approach is utilized to reduce computational burden.
Microgrid optimization problems are inherently nonlinear due to numerous complexities such as power flow equations and the integration of various distributed energy resources. However, nonlinear optimization methods often suffer from computational intractability and convergence issues, especially in large-scale systems. Therefore, many studies have opted for linear approximation approaches to simplify the problem. In ref. [28], a mixed integer linear programming (MILP) approach is adopted for the energy management system (EMS) for battery storage systems in grid-connected microgrids, which, while computationally efficient, tends to oversimplify the nonlinearities, leading to suboptimal solutions. In contrast, convex optimization, specifically mixed-integer second-order conic programming (MISOCP), offers a promising alternative by providing a balance between computational tractability and accurate representation of the system’s nonlinearities. Recent studies, such as refs. [29,30,31], demonstrate the efficacy of MISOCP in achieving near-global optimal solutions for microgrid optimization problems, making it a robust choice for addressing the complexities of modern microgrids.
The convexity optimization problem is crucial for the efficient and optimal operation of BESSs in microgrids. Convex optimization ensures that the solution obtained is globally optimal, which is particularly important in the complex and multi-variable environment of microgrids. One of the key challenges is to formulate the optimization problem in convex programming, which can be quite difficult due to the non-linear and non-convexity characteristics of power flow equations and various components within the microgrid, such as RESs and load demands. Convex optimization allows for the incorporation of various operational constraints, including those related to voltage stability, power balance, and BESS operational limits [32]. By leveraging advanced mathematical techniques and tools, such as convex cone programming, the optimization problem can be simplified and made more tractable, ensuring that the BESS operates in an optimal and efficient manner [33,34].
In this paper, an optimization-based approach is presented to model a purely RES-based microgrid operation as a milestone toward emission-free, net-zero power systems. Since the microgrid is fossil fuel-free, the objective function is power loss reduction. However, the following limitations are imposed. For this purpose, (1) microgrid capabilities must be identified first. The technical limitations of the studied microgrid’s units, i.e., solar cell unit, BESS, mini hydroelectric power generator, and capacitor bank, should be clarified and precisely modeled; (2) power flow equations must be accurately modeled, which results in nonlinear and nonconvex problems. Therefore, a comprehensive and computationally efficient framework, combining an accurate AC optimal power flow model (formulated as MISOCP) with a robust optimization approach, co-optimization of BESS scheduling and capacitor bank placement, and consideration of multiple RESs are considered in the proposed method.
The contributions of this paper to handle the stated problems are listed as follows:
This paper considers the simultaneous optimal operation of BESS and capacitor placement for Q-compensation. To this end, the RESs such as PV and hydro stations, and the corresponding uncertainties are precisely modeled.
To achieve the optimal solution while handling uncertainties, stochastic optimization is used. To reduce the time complexity corresponding to a large number of scenarios, a fast backward + forward optimal scenario reduction method is utilized.
The analytical optimization problem is developed by presenting an efficient and accurate AC optimal power flow model formulated as a MISOCP problem after applying appropriate convex relaxations.
The MISOCP is introduced as a method to solve the minimization problem for microgrid losses. Subsequently, charging and discharging of the BESS are scheduled in such a way that the losses of the microgrid are minimized. Finally, the impact of optimal capacitor Q-placement and operation on the microgrid’s loss reduction is studied along with the optimal BESS scheduling strategy.
The remainder of this paper is organized so that in Section 2 the proposed model for microgrid loss reduction is described and the mathematical formulation of the model is presented. The proposed solution to the optimization problem is presented in Section 3. In Section 4, the validity of the model is tested numerically. In Section 5, the main results are highlighted, and the article is concluded.
2. Mathematical Formulation
Because they guarantee the global optimal solution, analytical optimization methods have received special attention. In this section, the mathematical formulation for minimizing the microgrid’s energy losses is presented as a mixed-integer second-order cone programming (MISOCP) model.
2.1. Objective Function
The objective of the proposed model is the microgrid’s power loss minimization through optimal charge/discharge scheduling of the energy storage system.
$$\mathrm{Minimize}:Loss={\displaystyle \sum}_{t}{P}^{loss}(t)$$
where $t$ is the index of scheduling time periods and ${P}^{loss}\left(t\right)$ indicates the active and reactive power losses.
2.2. Battery Energy Storage System
The state of charge (SOC) of a BESS represents the current energy level of the battery as a percentage of its total capacity. The SOC is a crucial parameter in managing the operation of a BESS, and its formulation typically involves energy balance equations considering charging, discharging, and efficiency factors. The SOC of a BESS can be calculated as follows:
$$SOC\left(t+\Delta t\right)=SOC\left(t\right)\left(1-{\eta}_{self.dis}\right)+{\beta}^{ch}\left(t\right){\eta}_{ch}{P}^{ch}\left(t\right)\Delta t-{\beta}^{dis}\left(t\right){\displaystyle \frac{{P}^{dis}\left(t\right)}{{\eta}_{dis}}}\Delta t$$
where $t$ and $\mathsf{\Delta}t$ show the time and duration of each time step, respectively; $SOC$ denotes the state of charge of the BESS; ${P}^{ch}$ and ${P}^{dis}$ are the charging and discharging power of the BESS, respectively; ${\eta}_{self.dis}$ is the BESS’s self-discharging rate; ${\eta}_{ch}$ and ${\eta}_{dis}$ are the charging and discharging efficiencies, respectively; and ${\beta}^{ch}$ and ${\beta}^{dis}$ indicate the binary variables corresponding to the charging and discharging states, respectively, of the BESS in each time step.
In each time step, the BESS is scheduled so that it is in either a charging or discharging state. The two states do not occur at the same time. This is shown in the following equation:
$${\beta}^{ch}\left(t\right)+{\beta}^{dis}\left(t\right)\le 1$$
The state of charge of the BESS is constrained by specific operational limits, defined as the minimum and maximum allowable SOC values. These boundaries are crucial for maintaining battery health, ensuring safety, and optimizing performance. The SOC of the BESS is limited to its minimum and maximum allowable value. This is stated in the following equation:
$$SO{C}^{min}\le SOC\left(t\right)\le SO{C}^{max}$$
To ensure safe operation and longevity, BESSs have strict limits on both input and output power flows. Equations (5) and (6) limit the input and output power of the BESS:
$${P}^{min}\le {P}^{ch}\left(t\right)\le {P}^{max}$$
$${P}^{min}\le {P}^{dis}\left(t\right)\le {P}^{max}$$
2.3. PV, Load, and Hydro Generator Modeling
The output power of the solar cell is uncertain due to its high dependence on environmental variables, and specifically, changes in the environment continuously change the output power of the solar cell. To show the characteristics of the working conditions of a solar cell, the effect of solar irradiation and ambient temperature on it is investigated. The effect of temperature is entered into its mathematical model through the temperature coefficient ${T}_{co}$, expressed in terms $1/c\xb0$. The following relationship expresses the output power of the solar cell in terms of the ambient temperature and the amount of solar irradiation:
$${P}_{pv}={\eta}_{pv}{P}_{rate}\left({\displaystyle \frac{G}{{G}_{0}}}\right)\left(1-{T}_{co}\left({T}_{A}-{25}^{\xb0}\right)\right){\eta}_{inv}{\eta}_{rel}$$
where ${P}_{pv}$ is the output power of the solar cell, ${\eta}_{pv}$ is the number of PV modules, ${P}_{rate}$ is the output power of each module, and $G$ is the amount of irradiation and standard irradiation, respectively, of the PV surface in terms of $w\backslash {m}^{2}$. ${T}_{co}$ is the temperature coefficient for the maximum power output, ${T}_{A}$ is the ambient temperature, ${\eta}_{inv}$ is the inverter’s efficiency, and ${\eta}_{rel}$ is the efficiency of the PV’s module.
Photovoltaics consists of several cells that convert the radiant energy of the sun into electrical energy. The electric power produced by PV depends on some factors. For example, the number of cells, their arrangement, weather conditions, and ambient temperature [7]. Since solar radiation is a variable with uncertainty and it changes with the change in weather conditions, PV production power will also have uncertainty. The best probability distribution function for modeling the probabilistic behavior of solar radiation is through beta distribution [8].
$$f\left(s\right)=\left\{\begin{array}{cc}{\displaystyle \frac{\mathsf{\Gamma}\left(\alpha +\beta \right)}{\mathsf{\Gamma}\left(\alpha \right)+\mathsf{\Gamma}\left(\beta \right)}}\times {s}^{\alpha -1}\times {\left(1-s\right)}^{\beta -1};& 0\le s\le 1,\alpha \ge 1,\beta \ge 1\\ 0;& Otherwise\end{array}\right.$$
where and $\alpha $ and $\beta $ are beta distribution function parameters, and $s$ shows the amount of solar radiation in $\mathrm{k}\mathrm{W}/{\mathrm{m}}^{3}$. The parameters $\alpha $ and $\beta $ are calculated through the mean and variance of sunlight [9].
$$\beta =\left(1-\mu \right)\times \left({\displaystyle \frac{\mu \left(1+\mu \right)}{{\sigma}^{2}}}-1\right)$$
$$\alpha ={\displaystyle \frac{\mu \beta}{1-\mu}}$$
where $\mu $ and ${\sigma}^{2}$ are mean and variance of the solar irradiance.
The behavior of subscribers regarding the consumption of electric energy on different days and hours of the day and night is variable and uncertain due to various reasons such as weather conditions, holidays, and even popular sports competitions. Uncertainty in subscriber load can be modeled through normal probability distribution [10].
$${f}_{n}\left(l\right)={\displaystyle \frac{l}{\sqrt{2\pi}\sigma}}{e}^{-{\displaystyle \frac{{\left(l-\mu \right)}^{2}}{2{\sigma}^{2}}}}$$
where the mean and variance values of the probability function are obtained from load forecasting and analyzing historical data.
The power generation in a hydroelectric power plant is calculated through the following equation:
$$P=\left(hrg\right){\eta}_{t}{\eta}_{g}$$
where $P$ is the generated power in terms of $\mathrm{k}\mathrm{W}$, $h$ is the dam height in $m$, $r$ is the amount of water flow in ${\mathrm{m}}^{3}/\mathrm{s}$, $g$ is the gravitational acceleration, and ${\eta}_{t}$ and ${\eta}_{g}$ are the hydro turbine and generator efficiencies, respectively.
2.4. Capacitor Bank
Optimal capacitor bank placement in microgrids involves strategically positioning capacitors to improve voltage stability, reduce power losses, and enhance overall system efficiency. By placing capacitors at specific locations, microgrids can achieve better voltage regulation and minimize energy losses, leading to more reliable and cost-effective operation. This approach helps in balancing reactive power and maintaining optimal performance across the grid. The equations ruling the optimal placement and switching are as follows:
$${Q}^{Cap}\left(i,s,t\right)\le {C}^{Cap}\times {\beta}^{Cap}(i);\forall i,s,t,$$
$${Q}^{Cap}(i,s,t)={N}^{step}(i,s,t)\times {Q}^{step};\forall i,s,t,$$
$$\sum _{i}{\beta}^{Cap}\left(i\right)}=1,$$
$$0\le {N}^{step}(i,s,t)\le 15;\forall i,s,t,$$
where ${C}^{Cap}$ is the capacity of the capacitor bank, ${\beta}^{Cap}$ is the binary for the location of the capacitor bank, ${N}^{step}$ is the integer capacitor’s steps, and ${Q}^{step}$ is the reactive power of each step. Equation (13) restricts the capacitor’s injection of reactive power into the installed capacity. Equation (14) determines the optimal reactive power injection at each time step and for each scenario by evaluating the possible switching actions. Equation (15) specifies that only one capacitor bank can be installed in the microgrid. Equation (16) imposes a limit on the number of switching actions, which helps to manage the operational complexity and minimize wear and tear on the switching equipment.
3. Proposed Solution to the Optimization Problem
3.1. Power Flow Constraints
Power flow equations are used to analyze the distribution of electrical power throughout the grid. They are essential for determining how power is transmitted and consumed within the system. In order to calculate loss in the microgrid, the power flow equations should be taken into account first. AC OPF formulations are presented as follows.
$${S}_{i,j}={V}_{i}{I}_{i,j}^{*}$$
$${S}_{j}^{G}-{S}_{j}^{D}={{\displaystyle \sum}}_{k:j\to k}{S}_{j,k}-{{\displaystyle \sum}}_{i:i\to j}\left({S}_{i,j}-{Z}_{i,j}{\left|{I}_{i,j}\right|}^{2}\right)+{y}_{j}^{*}{\left|{V}_{j}\right|}^{2}$$
$${V}^{min2}\le {V}_{j}{V}_{j}^{*}\le {V}^{max2}$$
$${S}_{i,j}{S}_{i,j}^{*}\le {S}^{max2}$$
where subscripts $i$ and $j$ denote indices for network buses and scenarios, respectively, and asterisk (*) denotes conjugate operator. The indices $G$ and $D$ indicate the generation of demand at the bus. $V$, $I,$ and $S$ are voltage, current, and apparent power, respectively. ${Z}_{i,j}$ is the impedance of line $ij$.
Equations (21) and (22) represent the power balance constraints. These equations must be maintained for all network buses, except the reference bus, and through all time periods and scenarios.
$$\begin{array}{ll}{P}^{Dis}\left(i,s,t\right)-{P}^{Ch}\left(i,s,t\right)+{P}^{PV}\left(i,s,t\right)+{P}^{Hydro}\left(i,s,t\right)& ={P}^{Load}\left(i,s,t\right)+{\displaystyle {\displaystyle \sum}_{j;{A}_{i,j}=1}}{P}^{l}\left(i,j,s,t\right),\\ & \forall i,j,s,t;{A}_{i,j}=1,i\ne slack\end{array}$$
$$\begin{array}{ll}{Q}^{Hydro}\left(i,s,t\right)+{Q}^{Cap}\left(i\right)={Q}^{Load}\left(i,s,t\right)& +{\displaystyle {\displaystyle \sum}_{i;{A}_{i,j}=1}}{Q}^{l}\left(i,j,s,t\right);\\ & \forall i,j,s,t;{A}_{i,j}=1,i\ne slack\end{array}$$
where ${A}_{i,j}$ denotes the microgrid’s power network adjacency matrix so that if buses $i$ and $j$ are connected through a direct power line, the ${\left[A\right]}_{ij}$ entry is one, and zero otherwise. $slack$ indicates the reference bus. ${P}^{Ch}$ and ${P}^{Dis}$ are the charging and discharging power of the BESS, respectively. ${P}^{Load}$ and ${P}^{PV}$ are the load demand and generated power of the PV, respectively. ${P}^{Hydro}$ and ${Q}^{Hydro}$ denote the active and reactive generated powers of the hydropower units, and ${Q}^{Cap}$ is the reactive power injection of the capacitor bank.
Lines’ power losses are calculated using the network power flow variables, as stated in (23):
$${P}^{loss}\left(t\right)={\displaystyle \sum _{s}\left(P\left(s\right)\times {\displaystyle \sum _{i,j}{P}^{l}\left(i,j,s,t\right)}\right)}$$
where $P\left(s\right)$ is the probability of scenario $s$.
The power losses are calculated from the mismatch between the power at the beginning and end of the lines.
3.2. Mixed-Integer Cone Programming
Stochastic mixed-integer linear programs that utilize approximate (linearized) power flow equations are commonly solved using off-the-shelf mixed MIP solvers. However, when mixed-integer nonlinear models incorporating AC power flow equations are used, they are typically solved using heuristic methods, which do not guarantee optimal operational solutions.
A major challenge is the numerous nonlinear AC power flow constraints that arise with stochastic scenarios. The formulation of such a large-scale mixed-integer nonlinear programming problem generally exceeds the solution capacity of commercial mixed-integer solvers. Even though mixed-integer linear models are frequently used for microgrid operation, there is a lack of analytical methods to systematically support the optimal operation of convex AC microgrids in the presence of uncertainties. To tackle this issue in the research of optimal BESS scheduling in renewable-based microgrids, the AC-OPF Equations (17)–(20) are reformulated as an efficient stochastic MISOCP problem. To this end, by taking (18) and multiplying both sides with their complex conjugates, we will have
$${\left|{V}_{j}\right|}^{2}={\left|{V}_{i}\right|}^{2}+{\left|{Z}_{i,j}\right|}^{2}{\left|{I}_{i,j}\right|}^{2}-\left({Z}_{i,j}{S}_{i,j}^{*}+{Z}_{i,j}^{*}{S}_{i,j}\right)$$
Replacing ${\left|V\right|}^{2}$ and ${\left|I\right|}^{2}$ with new variables, $U$ and $l$ [35], yields
$$\begin{array}{r}U\left(i,s,t\right)-U\left(j,s,t\right)=2\times \left\{\begin{array}{l}{R}_{i,j}^{l}{P}^{l}\left(i,j,s,t\right)\\ +{X}_{i,j}^{l}{Q}^{l}\left(i,j,s,t\right)\end{array}\right\}-\left\{{\left({R}_{i,j}^{l}\right)}^{2}+{\left({X}_{i,j}^{l}\right)}^{2}\right\}\times l\left(i,j,s,t\right)?\\ \forall i,j,s,t;{A}_{i,j}=1\end{array}$$
where $I$ is the squared value of the lines’ currents and $U$ is the squared value of the microgrid’s bus voltage magnitude. ${R}_{i,j}^{l}$ and ${X}_{i,j}^{l}$ represent the microgrid lines’ resistance and reactance, respectively. ${P}^{l}$ and ${Q}^{l}$ are active and reactive powers flowing through network lines. Also, for (17), with similar operations we have
$$U\times l=S{S}^{*}$$
which represents a cone surface that is a non-convex space. Extending the solution space to the inside of the cone, the last equality constraint is convexified by relaxing to inequality as follows:
$$l\left(i,j,s,t\right)\times U\left(i,s,t\right)\ge {\left({P}^{l}\left(i,j,s,t\right)\right)}^{2}+{\left({Q}^{l}\left(i,j,s,t\right)\right)}^{2},\forall i,j,s,t;{A}_{i,j}=1$$
Power losses are calculated based on
$${P}^{l}\left(i,j,s,t\right)+{P}^{l}\left(j,i,s,t\right)={R}_{i,j}^{l}\times l\left(i,j,s,t\right),\forall i,j,s,t;{A}_{i,j}=1$$
$${Q}^{l}\left(i,j,s,t\right)+{Q}^{l}\left(j,i,s,t\right)={X}_{i,j}^{l}\times l\left(i,j,s,t\right),\forall i,j,s,t;{A}_{i,j}=1$$
3.3. Scenario Generation and Reduction
Due to uncertainty, some input data of the problem are available as a probability distribution and not as a single number. To consider the effect of the uncertainty of these parameters in the simulations, a scenario-based method has been used. In this way, by using probability distribution functions introduced for uncertain parameters (predicted value of hourly load and output power of PV unit), thousands of random numbers are generated every hour to create thousands of scenarios as a result. These random numbers are generated based on the probability distributions introduced in Section 2, with the mean values according to their normalized profiles, and with a standard deviation of 0.1. The probability of each scenario occurring in this case is 0.001.
It is clear that at this stage, the greater the number of scenarios, the closer this approximation will be to the initial probability distribution function related to the parameter. On the other hand, increasing the dimensions of optimization problems to this extent has a great impact on their solvability and may even make it impossible. This issue is the reason for proposing ways to reduce the dimensions of the problem by reducing the number of initial scenarios. In fact, scenario reduction methods are used to approximate the continuous probability distribution function with a smaller number of scenarios. In these methods, an optimization problem is solved by answering two questions. First, which scenarios should be selected as final scenarios, and which scenarios should be eliminated? Second, with what probability should the final selected scenarios be considered?
In this paper, a fast backward + forward (FBF) method [36,37] is used for optimal scenario reduction. Its working principle to reduce the number of scenarios is as follows.
Using this method, the initial 1000 generated scenarios are reduced to 40 scenarios. Optimal scenario reduction involves choosing a smaller group of scenarios from a larger set to maintain key characteristics while minimizing computational demands and resource needs. The aim is to balance simplifying the problem with keeping the crucial elements necessary for analysis, decision-making, and optimization. The reduced scenarios, unlike the initial ones, have varied probabilities of occurring that are determined using the FBF method. These probabilities play a crucial role in evaluating risk–return trade-offs and enhancing decision-making quality.
4. Case Studies
4.1. Studied Microgrid and Input Data
The microgrid considered in this study includes equipment such as loads, feeders, generator components, etc., which are available for use in renewable energy studies in Thailand [38]. The microgrid has three main generation units: two mini-hydro generators with rated powers of 2 and 1.2 $\mathrm{MW}$, and a PV generation source with a rated power of 3 $\mathrm{MW}$, along with a BESS with a nominal power of $4\mathrm{MW}$, as shown in Figure 1.
This microgrid can be connected to another distribution network or any other microgrid by means of a coupling switch. This point can turn the microgrid into an island state in case of fault or network repairs.
In the studied network, the optimal placement of DERs and BESS has already been achieved. Therefore, the goals are to obtain the optimal pattern of BESS charging and discharging, along with the optimal placement and switching pattern of the capacitor bank for a daily period. The technical parameters of BESS and capacitor units are stated in Table 1.
The final scenarios for the parameters of the load demand and PV generation along with their normalized profiles are shown in Figure 2 and Figure 3, where the bars are the normalized mean values that correspond to input data for the deterministic method, and lines are associated with the final scenarios for the stochastic method.
4.2. Simulation Results
In order to assess the effectiveness of the proposed model on the microgrid’s loss reduction, five case studies are designed. In each case, the model is solved for both deterministic (certain) and stochastic (uncertain) data inputs.
4.2.1. Case 1: Base Case with No BESS or Capacitor
In this case, the microgrid’s power losses are calculated without any decision variable to minimize the objective function. The energy loss during the studied period is 0.569 MWh for the deterministic method, and the expected energy loss is 0.587 MWh for the stochastic method.
4.2.2. Case 2: BESS with No Management Strategy
In this case, the microgrid’s power losses are calculated in the presence of the BESS, but without considering a BMS. Therefore, the BESS is operating independently, and the system operator has no control over the charging/discharging scheduling of the battery. The energy loss is 0.571 MWh for the deterministic method, and the expected energy loss is 0.590 MWh for the stochastic method. Figure 4 and Figure 5 show the charging/discharging pattern of the BESS.
It can be seen that the operation of the BESS in this case not only does not improve network losses, but also slightly increases the total energy losses.
4.2.3. Case 3: Optimal BESS Scheduling
In this case, the BESS’s charging/discharging is optimally scheduled using a BMS to minimize the power losses. Figure 6 and Figure 7 show the optimal charging/discharging pattern of the BESS.
The energy loss during the studied period is 0.517 MWh for the deterministic method, and the expected energy loss is 0.531 MWh for the stochastic method. Figure 8 shows the microgrid’s power exchange with the upstream grid. It is observed that optimal BESS scheduling has also reduced the microgrid’s power exchange with the upstream grid.
4.2.4. Case 4: Optimal Capacitor Placement and Scheduling
This case comprises two microgrid enhancement techniques that are simultaneously optimized: the optimal location and the optimal switching strategy of a capacitor bank. Based on the solution to the optimization problem, bus 12 is found to be the optimal location for the capacitor. The optimal switching strategy of the capacitor bank is illustrated as shown in Figure 9.
The energy in this case is reduced to 0.550 MWh for the deterministic method, and the expected energy loss is 0.563 MWh for the stochastic method.
Given the fact that capacitors inject only reactive power and are usually utilized for other purposes such as improving the voltage profile, increasing the network lines’ active capacity and power factor control, it can be seen that the capacitor also has a noticeable impact on the microgrid’s active power losses.
4.2.5. Case 5: Optimal BESS and Capacitor
In this case, capacitor placement and scheduling are co-optimized with BESS scheduling. Again, bus 12 is found to be the optimal location for the capacitor, and the optimal switching strategy is found, as shown in Figure 10 and Figure 11. The energy in this case is reduced to 0.550 MWh for the deterministic method, and the expected energy loss is 0.563 MWh for the stochastic method.
It can be seen that optimal placement and operation of the capacitor bank also efficiently improves the microgrid voltage profile as shown in Figure 12.
In Table 2, the results related to the objective function of the minimization of microgrid losses in different cases and using different methods are provided for comparison. As can be inferred from the numbers in this table, the purposeful operation of the BESS and optimal planning of the capacitor bank can significantly reduce the microgrid losses so that in the simulations, the total energy losses are reduced by 12% in deterministic method, and up to 14% in the stochastic method.
5. Conclusions
In this paper, a mixed-integer second-order conic programming model was presented for the optimal planning and operation of emission-free microgrids. The proposed optimization model aimed at minimizing energy losses through utilizing the BESS management system, and the optimal placement and switching strategy of the capacitor bank. The uncertainties of load and generation parameters were modeled through scenario generation using probability distribution functions and scenario reduction processes. The model’s performance was tested on a typical microgrid, and the simulation results show a noticeable loss reduction for both deterministic and stochastic methods in each case study. Future studies could explore the interaction of multiple microgrids within large-scale distribution systems, focusing on the energy transactions between them. Another intriguing direction would be to evaluate the energy efficiency of multi-carrier microgrids by incorporating district heating and gas networks. Deep (reinforcement) learning techniques and modern AI tools, such as generative pre-trained transformer (GPT) neural networks, can be used to assist in handling the time complexities of convex programming in complicated systems.
Author Contributions
Conceptualization, M.M.; Methodology, M.M., M.E.; Software, M.M.; Formal analysis, M.M., M.E.; Data curation, M.M.; Writing—original draft, M.M.; Writing—review & editing, M.E.; Visualization, M.M.; Supervision, M.E. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
Data is contained within the article.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Jain, D.; Saxena, D. Comprehensive review on control schemes and stability investigation of hybrid AC-DC microgrid. Electr. Power Syst. Res. 2023, 218, 109182. [Google Scholar] [CrossRef]
- Jalilian, A.; Mohammadyari, M.; Azad, S.; Ameli, M.T.; Ghanbari, E. Operational Coordination to Boost Efficiency of Complex Heat and Electricity Microgrids. In Coordinated Operation and Planning of Modern Heat and Electricity Incorporated Networks; Wiley: Hoboken, NJ, USA, 2022; pp. 345–372. [Google Scholar]
- Sandelic, M.; Peyghami, S.; Sangwongwanich, A.; Blaabjerg, F. Reliability aspects in microgrid design and planning: Status and power electronics-induced challenges. Renew. Sustain. Energy Rev. 2022, 159, 112127. [Google Scholar] [CrossRef]
- Shirkhani, M.; Tavoosi, J.; Danyali, S.; Sarvenoee, A.K.; Abdali, A.; Mohammadzadeh, A.; Zhang, C. A review on microgrid decentralized energy/voltage control structures and methods. Energy Rep. 2023, 10, 368–380. [Google Scholar] [CrossRef]
- Thirunavukkarasu, G.S.; Seyedmahmoudian, M.; Jamei, E.; Horan, B.; Mekhilef, S.; Stojcevski, A. Role of optimization tech-niques in microgrid energy management systems—A review. Energy Strategy Rev. 2022, 43, 100899. [Google Scholar] [CrossRef]
- Song, X.; Zhang, H.; Fan, L.; Zhang, Z.; Peña-Mora, F. Planning shared energy storage systems for the spatio-temporal co-ordination of multi-site renewable energy sources on the power generation side. Energy 2023, 282, 128976. [Google Scholar] [CrossRef]
- Yang, Y.; Bremner, S.; Menictas, C.; Kay, M. Modelling and optimal energy management for battery energy storage systems in renewable energy systems: A review. Renew. Sustain. Energy Rev. 2022, 167, 112671. [Google Scholar] [CrossRef]
- Yang, Y.; Bremner, S.; Menictas, C.; Kay, M. Battery energy storage system size determination in renewable energy systems: A review. Renew. Sustain. Energy Rev. 2018, 91, 109–125. [Google Scholar] [CrossRef]
- Ramos, F.O.; Pinheiro, A.L.; Lima, R.N.; Neto, M.M.; Junior, W.A.; Bezerra, L.G. A real case analysis of a battery energy storage system for energy time shift, demand management, and reactive control. In Proceedings of the 2021 IEEE PES Innovative Smart Grid Technologies Conference-Latin America (ISGT Latin America), Lima, Peru, 15–17 September 2021; IEEE: New York, NY, USA, 2021; pp. 1–5. [Google Scholar]
- Adewuyi, O.B.; Shigenobu, R.; Ooya, K.; Senjyu, T.; Howlader, A.M. Static voltage stability improvement with battery energy storage considering optimal control of active and reactive power injection. Electr. Power Syst. Res. 2019, 172, 303–312. [Google Scholar] [CrossRef]
- Alsharif, H.; Jalili, M.; Hasan, K.N. Power system frequency stability using optimal sizing and placement of Battery Energy Storage System under uncertainty. J. Energy Storage 2022, 50, 104610. [Google Scholar] [CrossRef]
- Islam, F.R.; Lallu, A.; Mamun, K.A.; Prakash, K.; Roy, N.K. Power Quality Improvement of Distribution Network Using BESS and Capacitor Bank. J. Mod. Power Syst. Clean Energy 2020, 9, 625–632. [Google Scholar] [CrossRef]
- Ovaskainen, M.; Öörni, J.; Leinonen, A. Superposed control strategies of a BESS for power exchange and microgrid power quality improvement. In Proceedings of the 2019 IEEE International Conference on Environment and Electrical Engineering and 2019 IEEE Industrial and Commercial Power Systems Europe (EEEIC/I&CPS Europe), Genova, Italy, 11–14 June 2019; IEEE: New York, NY, USA, 2019; pp. 1–6. [Google Scholar]
- Rajamand, S. Loss cost reduction and power quality improvement with applying robust optimization algorithm for optimum energy storage system placement and capacitor bank allocation. Int. J. Energy Res. 2020, 44, 11973–11984. [Google Scholar] [CrossRef]
- Pranitha, M.P.; Chandrakala, K.R.M.V. Optimal Capacitor Placement based Improved Reliability Assessment of a Distribution System. In Proceedings of the 2017 International Conference on Intelligent Computing and Control (I2C2), Coimbatore, India, 23–24 June 2017; IEEE: New York, NY, USA, 2017; pp. 1–6. [Google Scholar] [CrossRef]
- Eskandari, M.; Li, L.; Moradi, M.H.; Wang, F.; Blaabjerg, F. A Control System for Stable Operation of Autonomous Networked Microgrids. IEEE Trans. Power Deliv. 2019, 35, 1633–1647. [Google Scholar] [CrossRef]
- de Araujo, L.R.; Penido, D.R.R.; Carneiro, S.; Pereira, J.L.R. Optimal unbalanced capacitor placement in distribution systems for voltage control and energy losses minimization. Electr. Power Syst. Res. 2018, 154, 110–121. [Google Scholar] [CrossRef]
- Sun, Z.; Eskandari, M.; Zheng, C.; Li, M. Handling Computation Hardness and Time Complexity Issue of Battery Energy Storage Scheduling in Microgrids by Deep Reinforcement Learning. Energies 2022, 16, 90. [Google Scholar] [CrossRef]
- Amiri, F.; Eskandari, M.; Moradi, M.H. Virtual Inertia Control in Autonomous Microgrids via a Cascaded Controller for Battery Energy Storage Optimized by Firefly Algorithm and a Comparison Study with GA, PSO, ABC, and GWO. Energies 2023, 16, 6611. [Google Scholar] [CrossRef]
- Mansouri, M.; Eskandari, M.; Asadi, Y.; Siano, P.; Alhelou, H.H. Pre-Perturbation Operational Strategy Scheduling in Microgrids by Two-Stage Adjustable Robust Optimization. IEEE Access 2022, 10, 74655–74670. [Google Scholar] [CrossRef]
- Moradi, M.H.; Eskandari, M.; Hosseinian, S.M. Operational Strategy Optimization in an Optimal Sized Smart Microgrid. IEEE Trans. Smart Grid 2014, 6, 1087–1095. [Google Scholar] [CrossRef]
- Garcia-Torres, F.; Bordons, C.; Tobajas, J.; Real-Calvo, R.; Santiago, I.; Grieu, S. Stochastic Optimization of Microgrids with Hybrid Energy Storage Systems for Grid Flexibility Services Considering Energy Forecast Uncertainties. IEEE Trans. Power Syst. 2021, 36, 5537–5547. [Google Scholar] [CrossRef]
- Conejo, A.J.; Wu, X. Robust optimization in power systems: A tutorial overview. Optim. Eng. 2022, 23, 2051–2073. [Google Scholar] [CrossRef]
- Zhang, R.; Chen, Y.; Li, Z.; Jiang, T.; Li, X. Two-stage robust operation of electricity-gas-heat integrated multi-energy microgrids considering heterogeneous uncertainties. Appl. Energy 2024, 371, 123690. [Google Scholar]
- Zheng, X.; Khodayar, M.E.; Wang, J.; Yue, M.; Zhou, A. Distributionally Robust Multistage Dispatch with Discrete Recourse of Energy Storage Systems. IEEE Trans. Power Syst. 2024, 1–14. [Google Scholar] [CrossRef]
- Wang, S.; Gangammanavar, H.; Eksioglu, S.D.; Mason, S.J. Stochastic Optimization for Energy Management in Power Systems with Multiple Microgrids. IEEE Trans. Smart Grid 2017, 10, 1068–1079. [Google Scholar] [CrossRef]
- Li, Z.; Xu, Y.; Wang, P.; Xiao, G. Restoration of multi energy distribution systems with joint district network recon figuration by a distributed stochastic programming approach. IEEE Trans. Smart Grid 2024, 15, 2667–2680. [Google Scholar] [CrossRef]
- Sigalo, M.B.; Pillai, A.C.; Das, S.; Abusara, M. An Energy Management System for the Control of Battery Storage in a Grid-Connected Microgrid Using Mixed Integer Linear Programming. Energies 2021, 14, 6212. [Google Scholar] [CrossRef]
- Qiu, H.; Gooi, H.B. Identifying Differential Scheduling Plans for Microgrid Operations Under Diverse Uncertainties. IEEE Trans. Sustain. Energy 2022, 14, 309–324. [Google Scholar] [CrossRef]
- Wang, S.; Hui, H.; Ding, Y.; Zhai, J. Decentralized Demand Response for Energy Hubs in Integrated Electricity and Gas Systems Considering Linepack Flexibility. IEEE Internet Things J. 2024, 11, 11848–11861. [Google Scholar] [CrossRef]
- Zhou, A.; Khodayar, M.E.; Wang, J. Distributionally Robust Optimal Scheduling with Heterogeneous Uncertainty Information: A Framework for Hydrogen Systems. IEEE Trans. Sustain. Energy 2024, 15, 1933–1945. [Google Scholar] [CrossRef]
- Eskandari, M.; Rajabi, A.; Savkin, A.V.; Moradi, M.H.; Dong, Z.Y. Battery energy storage systems (BESSs) and the econo-my-dynamics of microgrids: Review, analysis, and classification for standardization of BESSs applications. J. Energy Storage 2022, 55, 105627. [Google Scholar] [CrossRef]
- Ben-Tal, A.; El Ghaoui, L.; Nemirovski, A. Robust Optimization; Princeton University Press: Princeton, NJ, USA, 2009. [Google Scholar]
- Boyd, S.; Vandenberghe, L. Convex Optimization; Cambridge University Press: Cambridge, MA, USA, 2004. [Google Scholar]
- Farivar, M.; Clarke, C.R.; Low, S.H.; Chandy, K.M. Inverter VAR control for distribution systems with renewables. In Proceedings of the 2011 IEEE International Conference on Smart Grid Communications (SmartGridComm), Brussels, Belgium, 17–20 October 2011; IEEE: New York, NY, USA, 2011; pp. 457–462. [Google Scholar]
- Dupacová, J.; Gröwe-Kuska, N.; Römisch, W. Scenario Reduction in Stochastic Programming: An Approach using Probability Metrics; Humboldt-Universität zu Berlin, Mathematisch-Naturwissenschaftliche Fakultät: Berlin, Germany, 2000. [Google Scholar]
- Heitsch, H.; Römisch, W. Scenario Reduction Algorithms in Stochastic Programming. Comput. Optim. Appl. 2003, 24, 187–206. [Google Scholar] [CrossRef]
- Kerdphol, T.; Fuji, K.; Mitani, Y.; Watanabe, M.; Qudaih, Y. Optimization of a battery energy storage system using particle swarm optimization for stand-alone microgrids. Int. J. Electr. Power Energy Syst. 2016, 81, 32–39. [Google Scholar] [CrossRef]
Figure 1. The studied microgrid system.
Figure 1. The studied microgrid system.
Figure 2. Load profile and scenarios; bars are the normalized mean values for the deterministic method, and lines are associated with the final scenarios for the stochastic method.
Figure 2. Load profile and scenarios; bars are the normalized mean values for the deterministic method, and lines are associated with the final scenarios for the stochastic method.
Figure 3. PV generation profile and scenarios; bars are the normalized mean values for the deterministic method, and lines are associated with the final scenarios for the stochastic method.
Figure 3. PV generation profile and scenarios; bars are the normalized mean values for the deterministic method, and lines are associated with the final scenarios for the stochastic method.
Figure 4. BESS charge/discharge pattern (MW) in deterministic method in case 2.
Figure 4. BESS charge/discharge pattern (MW) in deterministic method in case 2.
Figure 5. BESS charge/discharge pattern (MW) in the stochastic method in case 2; lines are associated with the final scenarios for the stochastic method.
Figure 5. BESS charge/discharge pattern (MW) in the stochastic method in case 2; lines are associated with the final scenarios for the stochastic method.
Figure 6. BESS charge/discharge pattern (MW) in deterministic method in case 3.
Figure 6. BESS charge/discharge pattern (MW) in deterministic method in case 3.
Figure 7. BESS charge/discharge pattern (MW) in the stochastic method in case 3; lines are associated with the final scenarios for the stochastic method.
Figure 7. BESS charge/discharge pattern (MW) in the stochastic method in case 3; lines are associated with the final scenarios for the stochastic method.
Figure 8. Microgrid’s power (MW) exchange with the grid.
Figure 8. Microgrid’s power (MW) exchange with the grid.
Figure 9. Optimal switching strategy for reactive (MVAr) injection of the capacitor.
Figure 9. Optimal switching strategy for reactive (MVAr) injection of the capacitor.
Figure 10. Optimal switching strategy for reactive (MVAr) injection of the capacitor in deterministic method.
Figure 10. Optimal switching strategy for reactive (MVAr) injection of the capacitor in deterministic method.
Figure 11. Optimal switching strategy for reactive (MVAr) compensation of the capacitor in the stochastic method; lines are associated with the final scenarios for the stochastic method.
Figure 11. Optimal switching strategy for reactive (MVAr) compensation of the capacitor in the stochastic method; lines are associated with the final scenarios for the stochastic method.
Figure 12. Minimum voltage magnitudes (p.u.) of the microgrid in the deterministic method.
Figure 12. Minimum voltage magnitudes (p.u.) of the microgrid in the deterministic method.
Table 1. BESS and capacitor characteristics.
Table 1. BESS and capacitor characteristics.
Parameter | Value | |
---|---|---|
BESS | Unit capacity | 4 MW |
Maximum charging state | 4 MW | |
Minimum charging state | 0 | |
Self-loss coefficient | 3% per hour | |
Charging efficiency | 95% | |
Discharging efficiency | 95% | |
Capacitor | Total capacity | 1.5 MVar |
Switching steps | 15 | |
Switching step capacity | 100 kVAr |
Table 2. Simulation summary.
Table 2. Simulation summary.
Deterministic Energy Loss (MWh) | (%) | Stochastic Expected Energy Loss (MWh) | (%) | |
---|---|---|---|---|
Case 1 | 0.569 | - | 0.587 | - |
Case 2 | 0.571 | −0.35 | 0590 | −0.51 |
Case 3 | 0.517 | 9.13 | 0.531 | 9.54 |
Case 4 | 0.550 | 3.34 | 0.563 | 4.09 |
Case 5 | 0.501 | 11.95 | 0.505 | 13.96 |
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. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).