Abstract
The integration of microgrids into the existing power system framework enhances the reliability and efficiency of the utility grid. This manuscript presents an innovative mathematical paradigm designed for the optimization of both the structural and operational aspects of a grid-connected microgrid, leveraging the principles of Demand-Side Management (DSM). The focus of this work lies in a comprehensive exploration of the implications brought about by the Renewable Generation-Based Dynamic Pricing Demand Response (RGDP-DR) mechanism, particularly in terms of its influence on the optimal microgrid configuration, considering perspectives from end-users and the utility entity. This inquiry is rooted in a holistic assessment that encompasses technical and economic performance benchmarks. The RGDP-induced DR framework adeptly addresses the needs of the consumer base, showcasing notable efficiency and economic feasibility. To address the intricate nonlinear optimization challenge at hand, we employ an evolutionary algorithm named the "Dandelion Algorithm" (DA). A rigorous comparative study is conducted to evaluate the efficacy of four optimization techniques, affirming the supremacy of the proposed DA. Within this discourse, the complexity of microgrid sizing is cast as a dual-objective optimization task. The twin objectives involve minimizing the aggregate annual outlay and reducing emissions. The results of this endeavor unequivocally endorse the superiority of the DA over its counterparts. The DA demonstrates exceptional proficiency in orchestrating the most cost-effective microgrid and consumer invoice, surpassing the performance of alternative optimization methodologies.
Subject terms: Electrical and electronic engineering, Energy grids and networks, Power distribution, Power stations, Batteries, Solar energy, Wind energy
Introduction
In contemporary energy landscapes, there has been a noteworthy upswing in the integration of Renewable Energy Sources (RES) with the grid, driven by a commitment to reduce greenhouse gas emissions from conventional fossil fuel-based power plants1. This transformative era has witnessed the ascendancy of decentralized RES, strategically positioned to optimize clean energy generation across extensive geographical domains, culminating in the emergence of Microgrid (MG) concepts as compact-scale networks2.
Energizing the paradigm of Demand-Side Management (DSM), this paper underscores the imperative for customers to manipulate their energy consumption patterns. The effective application of DSM brings multifaceted benefits, including enhanced system reliability, improved efficiency, reduced microgrid operational costs, optimized load patterns, minimized power outages, decreased carbon emissions, and increased customer satisfaction. Within Demand Response (DR), specifically, load modification strategies, a subset of DSM, various tactics such as strategic load growth, load shifting, valley filling, peak clipping, strategic conservation, and flexible load shaping are employed3. These strategies fall into two main approaches: incentive-based and price-based paradigms4. The former encompasses initiatives such as demand buyback/bidding schemes5, curtailable /interruptible services6, ancillary service programs7, emergency DR programs8, capacity market programs9, and direct load control mechanisms10. Conversely, the latter embraces strategies: Time-of-Use (TOU), fixed pricing, real-time pricing, and critical peak pricing models11.
In the microgrid planning scope, two pivotal factors—the operator perspective and the client outlook—significantly influence the effectiveness of DSM deployment. From the client's standpoint, electricity bill expenditure is ameliorated, while on the operator's side, DSM engenders a reduction in microgrid overheads and mitigates risks entailed by power deficits12. The literature summarizes an array of techniques and mathematical formulations underpinning DSM within MG applications13, with a notable exploration into the comparative assessment of diverse Energy Storage Systems (ESS) for DSM through industrial installations detailed in14.
However, the intricate challenge of microgrid sizing, entangled with non-linear constraints, necessitates the integration of DR programs. Recent initiatives explored in references15–17 investigated Incentive-Based Demand Response Programs (IDRPs) employing the Sparrow Algorithm, Black Widow Algorithm (BWA), and Whale Algorithm to reduce operational expenses. The practice of load shifting was examined using Mixed-Integer Linear Programming (MILP), Genetic Algorithm (GA), and Augmented ε-Constraint techniques to optimize overall expenditures18–20. TOU strategies are featured with BWA, GA, hybrid optimization multi-energy resource, and pseudo-gravitational algorithm to drive cost reduction21–24.
In25–28, the optimal sizing of various microgrids considering energy management techniques using several optimization algorithms has been discussed.
In 2020, Renewable Generation-Based Dynamic Pricing (RGDP) DR was proposed in29 to minimize the total MG cost of an isolated microgrid using MILP. RGDP-DR achieves a zero reduction in energy consumption and maximum customer satisfaction. However, this paper adopts RGDP DR to minimize life cycle emissions and the overall cost of grid-tied MG using the Dandelion Algorithm (DA).
Given the aforementioned investigations, the commonality across prior studies is the trade-off between DR-driven energy reduction and customer satisfaction. This research addresses this gap by introducing a novel DR strategy termed RGDP DR, designed for rescheduling load demands within grid-connected MGs while prioritizing customer satisfaction. To effectively handle this intricate challenge, a novel meta-heuristic approach called the Dandelion Algorithm (DA) is proposed. The primary objective of this algorithm is to determine optimal capacities for distributed energy sources within the microgrid, taking into account the complexities of DSM. A comprehensive comparative analysis is undertaken, comparing the performance of the DA against three alternative optimization methods within the context of grid-connected MGs influenced by the RGDP DR strategy. Through the utilization of MATLAB/M-files simulation software, a mathematical model of the grid-connected MG is established, incorporating the RGDP DR strategy and various optimization techniques. This model serves to demonstrate the effectiveness of the proposed approach in contrast to its counterparts.
Moreover, the modifications introduced in our study are crucial for the specific context of grid-connected microgrids. While the original mathematical model29 was formulated for an isolated microgrid, we have diligently adapted and validated the model to align with the distinctive characteristics of a grid-tied microgrid. This adaptation encompasses the inclusion of considerations for energy exchange with the utility grid—a facet not explicitly addressed in earlier literature focused on isolated microgrids. The cost functions have been appropriately modified to account for this interaction with the utility grid. More precisely, we have incorporated the price of energy exchanged with the utility grid into the cost functions. This refinement ensures a more precise representation of the economic dynamics and operational constraints inherent in grid-connected microgrids. By doing so, our study provides a comprehensive perspective on the optimization challenges and opportunities specifically applicable to the context of grid-connected microgrids.
The prime contributions of this study are concisely summarized as follows:
Pioneering the integration of a groundbreaking price-based DR paradigm, namely RGDP DR, designed to ensure maximal customer contentment at a reduced operational outlay, within the context of grid-connected MGs.
Developing an innovative mathematical framework that seamlessly integrates the Demand Response (DR) approach into the optimization challenge of identifying the most efficient dimensions for grid-connected microgrids. This framework aims to achieve two simultaneous goals: the reduction of overall costs and the mitigation of emissions.
Introducing a cutting-edge metaheuristic algorithm, DA, specifically designed to adeptly address the complexities associated with optimizing the size of grid-connected microgrids. The algorithm capitalizes on technical and economic metrics to effectively navigate the inherent intricacies of this optimization problem.
The subsequent sections of the paper are systematically organized as follows: Section “Modeling and configuration of system components” provides a concise explanation of the configuration and modeling complexities related to the proposed grid-connected MG. Section “Problem formulation” presents the formulation of the optimization challenge, incorporating the system's inherent constraints. In Section “RGDP-DR program”, a comprehensive depiction of the RGDP DR strategy is provided, along with its intricate modeling. The methodologies underlying the utilization of four distinct optimization techniques to address the optimization problem are concisely summarized in Section “Optimization techniques”. Moving forward, Section “Results and discussion” serves as a platform for a thorough examination and discussion of the simulation outcomes across four distinct scenarios. Bringing the discussion to a close, Section “Conclusion” summarizes the cumulative conclusion of this study.
Modeling and configuration of system components
Figure 1 illustrates the arrangement of the proposed MG as described. This MG design incorporates a trio of RES: photovoltaic (PV) panels, battery storage units, and Wind Turbines (WTs). Additionally, a converter is incorporated into the setup to establish a connection between the AC and DC buses. On a specified day, MG registers a peak demand of 2115.4 kW, with a corresponding energy consumption of roughly 21,117.7 kWh. The detailed model for each RES will be discussed in the following subsections:
Figure 1.
The studied grid-tied MG.
PV modeling
The PV-generated power can be computed using Eq. (1) 30.
| 1 |
where is the number of PV modules, is the PV power rating at STC (kW), is the PV module reduction factor, and is the global solar irradiance (W/m2).
WT modeling
WT output power can be defined using Eq. (2)31.
| 2 |
where is the WT’s rated power, and is the number of WTs.
Modeling of the battery energy storage system
Recently, the utilization of lithium-ion batteries has become prevalent in MG applications due to their remarkable characteristics, including high power density, significant energy density, and prolonged lifespan. Battery Energy Storage Systems (BESS) function through three distinct operational modes: charging, discharging, and idle mode.
Charging mode
In instances where the power generated by MG sources exceeds load requirements, the excess power is directed toward charging the battery. Consequently, the methodology outlined below is employed to calculate the accumulated energy from this charging process32,33:
| 3 |
where is the power being charged at time , signifies the load power of the scenario indexed as the at time , and subscript indicates the specific scenarios under consideration. represents the energy being charged during the time interval , which is typically an hour. The efficiencies of the converter and charging processes are denoted as and , respectively.
The battery State of Charge () is calculated as:
| 4 |
where and are states of charge at two successive time instants of and , respectively.
When the calculated is greater than ( − ), the power can be sold to the connected grid and calculated as:
| 5 |
where refers to the maximum SOC of the battery.
Discharging mode
In cases where the energy demand of a load exceeds the output power of PV and WTs, the battery is discharged. The subsequent energy discharged and the corresponding SOC can be approximated using the following approach32,33:
| 6 |
| 7 |
where is battery discharging power at time , stands for discharging energy. is the discharging efficiency.
In the event of a battery power shortage, the purchased grid power can be defined as:
| 8 |
where is the battery minimum permissible SOC.
Ideal mode
Upon reaching full charge, the surplus MG-generated power can be sold back to the grid. This situation is depicted as follows34:
| 9 |
Once the battery's maximum discharge capacity is reached, any additional power needed will be procured from the grid. This scenario can be articulated as follows:
| 10 |
Problem formulation
This section outlines the technical constraints on the system as well as the optimization problem's objective functions.
The objective functions (OFs)
The study addresses the comprehensive OF inherent in the optimization challenge of microgrid (MG) sizing. The primary objective of this Objective Function (OF) is to simultaneously minimize the Total Annual Cost (TAC) as presented in Eq. (12) and reduce Life Cycle Emissions (LCE) as defined in Eq. (17) within the context of grid-interconnected MG. The optimization process considers operational constraints delineated in Eqs. (18) to (24). Consequently, the overarching objective function is composed of two metrics, each of which is characterized by a specific weight ratio. Therefore, the formulation of the OF is presented as follows:
| 11 |
where represents a vector containing optimization parameters: the power output of sources, storage, and converter. stands for the penalty associated with CO2 emissions ($/ton). The assigned values for and are both set to 0.5.
TAC minimization
It can be calculated as follows29:
| 12 |
where , , , and are MG annual capital costs of the MG components, replacement costs, operating and maintenance costs, and salvage costs, respectively.
Components’ capital costs
The total yearly MG components' capital cost can be determined using Eq. (13)35:
| 13 |
where indicates the number of component units, is the capacity in kW of component, is the component initial cost in ($/kW), is the number of system components, indicates the reduction rate (%), is the project's lifetime, and indicates the MG components, which are WT, BESS, PV, and converter.
Replacement costs
If the lifetimes of microgrid (MG) components are shorter than the lifespan of the project, they need to be replaced. The overall annual cost of replacing MG components can be calculated using Eq. (14)36:
| 14 |
where indicates the number of component replacements, is the lifetime in years, and is the cost of unit replacement ($/kW).
Operating and maintenance O&M costs
Annual O&M costs can be described as29,30:
| 15 |
where is the component annual O&M costs in $/kW/Year, is the per-unit buying grid power cost at hour in $/kW/Year, (kW) is the purchased power from the utility during the hour, is the price of the grid sold power in $/kW/Year, and (kW) is the utility sold power.
Salvage costs
The annual MG components’ salvage cost can be written as37:
| 16 |
Minimizing LCE
In kilograms of CO2-equivalent per year represents the cumulative carbon dioxide (CO2) emissions from microgrid components over their complete lifecycle. This value can be computed using the formula outlined in reference32:
| 17 |
where is the component annual CO2 emissions in kgCO2-eq/kWh and is the annual generated energy in kWh. MG's detailed characteristics are presented34.
Operational parameters of MG components must adhere to established limits to ensure the integrity and dependability of the power supply infrastructure.
The technical constraints
Operational parameters of MG components must adhere to established limits to ensure the integrity and dependability of the power supply infrastructure. Inequality and power balance constraints should be calculated and considered, as will be described in the following paragraphs.
The inequality constraints
Maximum and minimum boundaries of MG sources should be satisfied, as follows34:
| 18 |
| 19 |
| 20 |
| 21 |
where is storage power. , , and are RESs and converter capacities, respectively. and represent the maximum battery charging and maximum battery discharging, respectively.
The SOC of the battery must be maintained within the acceptable range, as deep discharges and overcharging can both lead to a reduction in battery lifespan, as explained below32,33:
| 22 |
At time , the RGDP electrical cost must be within the allowable limits as follows29:
| 23 |
where and are the minimum and maximum prices, respectively.
The power balance constraints
Power equilibrium can be achieved through the utilization of the subsequent expression34:
| 24 |
RGDP-DR program
An energy management strategy that enables the modification of load patterns is known as DR, where electricity consumption is modified by shifting it from high-demand to low-demand periods or by reducing usage during peak periods. Conventional DR approaches often lead to reduced energy consumption, though they might impact customer satisfaction. On the contrary, the RGDP-DR program distinguishes itself by achieving optimal equilibrium. This program guarantees no reduction in energy consumption, thereby achieving the utmost customer satisfaction, as expounded in this section.
The self-elasticity coefficient refers to the sensitivity of hour demand to hour price and can be expressed using Eq. (25) as follows29:
| 25 |
where is the initial electrical cost, is the initial demand, represents the demand variance during period , and indicates the cost fluctuation during the i period.
The cross-elasticity coefficient reflects the demand sensitivity to price and is calculated using Eq. (26) as follows29:
| 26 |
Table 1 shows the applied cross- and self-elasticities of the demand load in this research.
Table 1.
Cross and self-elasticity coefficients38.
| Peak | Off-peak | Valley | |
|---|---|---|---|
| Peak | − 0.100 | 0.0160 | 0.0120 |
| Off-peak | 0.0160 | − 0.100 | 0.010 |
| Valley | 0.0120 | 0.010 | − 0.100 |
RGDP signifies an advanced evolution of time-based Demand Response (DR) programs. This advancement arises from the shift in the DR electricity price, moving from a variable independent of microgrid (MG) configuration to a dynamic value linked to the disparity between energy demand and the Renewable Energy Source (RES) output. Furthermore, RGDP's primary objective is to mitigate customer dissatisfaction while simultaneously enhancing utility for the electricity provider.
Consequently, the price structure offered motivates participants to simply reschedule energy usage patterns. As specified in Eq. (27), the comprehensive energy consumption of a participant should remain comparatively consistent both before and after the RGDP DR program's implementation29.
| 27 |
The RGDP tariff is quantified as follows29:
| 28 |
The RGDP economic load model is acquired by29:
| 29 |
Optimization techniques
Four optimization techniques applied in this paper are mathematically modelled in this section.
PSO algorithm
Eberhart and Kennedy first presented PSO39. This algorithm draws inspiration from the flocking behavior of birds aiming to reach a target, with each individual's actions influencing the group's collective movement. In PSO, particles symbolize potential solutions dispersed within the search space to address a given problem. The PSO methodology encompasses five fundamental stages:
Initialization The initial setup of particles and their attributes.
Evaluation The assessment of each particle's fitness based on the defined objective function.
Updating Particle Best (Pbest) Individual particles update their personal best solution based on their current fitness.
Updating Global Best (Gbest) The best solution among all particles is updated.
Updating Velocity and Location Particles adjust their velocity and position, guided by both Pbest and Gbest, iteratively moving towards a globally optimal solution.
Particles in PSO emulate the trajectories set by Pbest and Gbest, dynamically altering their directions to progressively converge towards the problem's global optimal solution.
Kepler optimization algorithm (KOA)
KOA draws inspiration from Kepler's planetary motion laws, utilizing them for forecasting the planets' positions and velocities at any specific moment40. Within the KOA framework, individual planets, characterized by their respective positions, assume the role of candidate solutions. These planetary positions are iteratively adjusted during the optimization process, referencing the best solution achieved thus far (analogous to the Sun in the solar system). The operational steps of the KOA are visually depicted in the provided flow chart, Fig. 2, illustrating the algorithm's computational procedures and its systematic optimization approach.
Figure 2.
The flowchart of the KOA algorithm.
According to Fig. 2, KOA can be summarized as follows:
Initialization process
The initial population of planets will be generated randomly within the defined boundaries of the search space, according to Eq. (30):
| 30 |
where represents the th planet of th decision variable in the search space. and denote the maximum and minimum bounds, respectively.
The orbital th planet eccentricity () is initialized using Eq. (31):
| 31 |
The orbital th planet period () is initialized using Eq. (32):
| 32 |
where is a random number produced using the normal distribution.
Defining the Euclidian distance
The Euclidian distance () between the Sun and a planet is defined as:
| 33 |
where stands for the problem dimension.
Defining the gravitational force
The gravitational force () can be calculated using Eq. (34):
| 34 |
where and refer to the normalized mass quantities of the Sun and planet, respectively. is a small number. is the constant of universal gravity. is a random number ranging from 0.0 to 1.0. is the normalized value of .
Calculating planets’ velocity
The planet's orbital speed as it orbits the Sun is defined as:
| 35 |
where , , and are random numbers ranging from 0.0 to 1.0. and depict randomly chosen solutions from the population. serves as an indicator to reorient the search.
Updating planets’ positions
The new position of each planet is updated using Eq. (36):
| 36 |
Updating the distance between the planets and the Sun
The Sun's distance from each planet is updated using Eq. (37):
| 37 |
where is a variable used to regulate how far the Sun is from the planet .
Elitism
The elitist strategy is described as
| 38 |
Nutcracker optimization algorithm (NOA)
NOA models its behavior after Clark's nutcrackers, delineated by two distinct techniques: the foraging and storage technique and the cache-search and recovery technique41. The algorithm's operational processes are graphically outlined in the accompanying flow chart, depicted in Fig. 3. This flow chart offers a visual representation of the sequential steps undertaken by the NOA, aligning with the algorithm's emulation of the nutcrackers' natural behaviors.
Figure 3.
The NOA algorithm flowchart.
NOA is summed up in the following steps:
Initialization process
The NOA population is initialized by
| 39 |
where indicates the th nutcracker (feasible solution) of the th decision variable in generation . and denote the th decision variable maximum and minimum bounds, respectively. represents a random vector ranging from 0.0 to 1.0.
Foraging and storage technique
This technique replicates the initial conduct observed in nutcrackers, manifesting during the summer and autumn seasons to gather pine seeds and hoard them. As a result, this technique can be bifurcated into two principal stages: foraging and storage. These stages are expounded upon below:
Foraging stage
Every nutcracker starts by examining the cone containing the seeds, as shown in Eq. (40).
| 40 |
where is a randomly produced number based on the levy flight. , , and are three indicators chosen at random from the population. , , , and are random numbers ranging from 0.0 to 1.0. is the average of all solutions in iteration . is a number produced using random numbers ranging from 0 to 1, levy-flight, and normal distribution. is the likelihood of nutcrackers travelling across the entire search space to look for unreachable locations.
Storage stage
Nutcrackers start by moving the food acquired in the earlier stage to temporary storage facilities, which can be expressed as follows:
| 41 |
where denotes a new location in the nutcrackers’ storage region in iteration . indicates the best solution obtained even now. is a number produced based on levy flight. is a linearly decreasing factor from 1.0 to 0.0.
The interchange between the foraging and storage stages is adopted using Eq. (42):
| 42 |
where refers to a random number ranging from 0.0 to 1.0, and represents a linearly decreasing probability value from 1.0 to 0.0.
Cache-search and recovery technique
This technique simulates the second behavior of nutcrackers, which involves looking for and retrieving storage spaces during winter and spring. Therefore, this technique can be bifurcated into two principal stages: cache search and recovery. These stages are expounded upon below:
Cache-search stage
The nutcrackers start to identify their caches using a spatial memory methodology. For simplicity, NOA supposes that there are just two Reference Points () (objects) per cache. as shown in Eq. (43).
| 43 |
where and represent of th nutcracker cache position in generation .
The and are described as follows:
| 44 |
| 45 |
where linearly decreases from one to zero. is the th nutcracker cache position in iteration . stands for the nutcracker angle of view, which is randomly selected between 0 and π. is a random position.
Nutcracker's new position can be updated via :
| 46 |
If the nutcracker is unable to recall where he buried his food utilizing , will be used. Therefore, is used to update Nutcracker spatial memory via Eq. (47):
| 47 |
The exchange between and is achieved as follows:
| 48 |
Recovery stage
When the nutcracker can recall the cache location using either or , there are two outcomes for each: either there is food or there isn't. This process can be expressed as follows:
| 49 |
where , , , , , and are random numbers ranging from 0.0 to 1.0.
The interchange between the cache-search and recovery stages is adopted using Eq. (50):
| 50 |
where corresponds to a probability value of 0.2.
Nutcracker's current position can be enhanced as follows:
| 51 |
Dandelion algorithm
The Dandelion Algorithm (DA) emulates the prolonged aerial voyage of dandelion seeds, a journey characterized by three distinct phases: ascent, descent, and settlement42. The computational procedures of the algorithm are graphically depicted in the accompanying flowchart, Fig. 4, serving as an illustrative overview of the DA's operational process.
Figure 4.
The suggested DA algorithm flowchart.
DA is summed up in the following steps.
Initialization and configuration of algorithm parameters
The initial population of dandelion seeds is generated using the following equation:
| 52 |
where indicates the th dandelion seed (feasible solution). represents a random value between [0, 1]. and represent the decision variables’ maximum and minimum bounds, respectively.
Ascending phase
Dandelion seeds disperse from their parent plant once they attain a suitable height. This stage comprises two potential scenarios for the movement of dandelion seeds, which are contingent on factors such as wind speed, air resistance, and humidity.
Case 1
With increasing wind strength, the dandelion achieves greater height and scatters its seeds over a wider range. This scenario can be mathematically represented as follows:
| 53 |
where represents the position of the seed at iteration t. denotes the seed position at iteration t + 1. signifies a random location within the search space. The term represents the logarithmic normal distribution. represents a random number falling within the range of [− π, π]. represents the maximum number of iterations.
Case 2
Under rainy conditions, dandelion seeds encounter challenges in achieving optimal ascent against the wind. This situation can be expressed mathematically as follows:
| 54 |
Descent phase
This phase promotes the exploration process and can be mathematically represented as follows:
| 55 |
where represents Brownian motion and is a random number drawn from a normal distribution. is the population size.
Landing phase
The landing phase facilitates the exploitation process and can be defined by the following equation:
| 56 |
where indicates the seed's optimal position during iteration. set at a fixed value of 0.01. and are random numbers within the range of [0, 1]. is fixed at 1.5.
Termination
The DA algorithm concludes its execution and provides the optimal solution vector after a certain number of iterations (T).
Results and discussion
The microgrid model proposed in this study is situated in the city of Benban, located within the Aswan Governorate. Geographically, Benban is positioned at a longitude of 32.870°E and a latitude of 24.440°N. Figure 5 displays the consistent fluctuation of wind speed throughout this period, reaching its peak value of 12.4470 m/s at 6 p.m.43. This value then gradually diminishes to reach zero by 5 p.m., remaining at this level until 6 a.m. the following day44. In contrast, Fig. 6 illustrates a gradual and nonlinear rise in solar irradiance throughout the day, starting from zero at 6 a.m. and peaking at noon with a maximum recorded value of 1187.59 W/m2.
Figure 5.

Monthly wind speed.
Figure 6.

Monthly solar irradiance.
The associated costs for electricity transactions in this microgrid scenario are as follows: purchasing electricity from the utility grid costs 0.20 $/kWh from midnight to 8 a.m., 0.50 $/kWh from 8 a.m. to 4 p.m., and 0.30 $/kWh from 4 p.m. to midnight, while selling electricity back to the utility is priced at 0.06685 $/kWh45. Additionally, Fig. 7 displays the monthly distribution of load demand throughout the year, indicating a peak demand of 2115.40 kW at 5:00 p.m. and a minimum demand of 290.0 kW at 10:00 a.m.46. The initial price of electricity remains constant at 0.5 $/kWh within each respective period.
Figure 7.

Monthly demand profile.
To evaluate the effectiveness of the proposed optimization technique, a comparative analysis of performance is conducted. Four distinct operational scenarios (each corresponding to different optimization techniques) are explored for the microgrid model incorporating RGDP DR. This investigation aims to elucidate the impact of the recommended optimization strategy.
Across all scenarios, crucial metrics including energy consumption, decrease in energy consumption, incentives, and penalties result in values of 707,959 kWh, zero, zero, and zero, respectively. The pricing framework encompasses maximum and minimum boundaries set at 0.550 and 0.450 $/kWh, respectively. Figure 8 illustrates the transformation in economic load demand profiles, both before and after the implementation of RGDP DR. Furthermore, the alteration in electricity pricing resulting from RGDP DR is visually presented in Fig. 9, calculated using Eq. (28). The results of implementing optimization techniques for obtaining the optimal size of RES for the microgrid will be discussed in the following subsections.
Figure 8.
RGDP DR demand profile.
Figure 9.
The generated electricity cost with RGDP DR deployment.
Scenario 1: DA algorithm
The proposed microgrid configuration entails capacities for PV, wind, battery, and converter set at 6579 kW, 937 kW, 3482 kW, and 3212 kW, respectively. These designations align with the life cycle emissions of 2,696,972 kgCO2-eq/Year, the total microgrid cost of 1,246,864 $/Year, and the customer bill totaling 3,845,911 $/Year, as elucidated within Table 2. The hourly output power from each Renewable Energy Source (RES) throughout 24 h is visually illustrated in Fig. 10, employing the Dandelion Algorithm (DA).
Table 2.
Overall comparison of the studied scenarios.
| DA | PSO | NOA | KOA | |
|---|---|---|---|---|
| PV capacity (kW) | 6579 | 6566 | 6542 | 6551 |
| Wind capacity (kW) | 937 | 926 | 924 | 908 |
| Battery capacity (kW) | 3482 | 3523 | 3537 | 3617 |
| Converter capacity (kW) | 3212 | 3211 | 3192 | 3241 |
| Life cycle emissions (LCE) (kgCO2-eq/yr) | 2,696,972 | 2,694,292 | 2,690,314 | 2,683,489 |
| Emission cost ($/year) | 53,940 | 53,886 | 53,807 | 53,670 |
| Components cost ($/year) | 1,192,924 | 1,192,980 | 1,193,064 | 1,193,235 |
| Total cost of microgrid ($/year) | 1,246,864 | 1,246,866 | 1,246,871 | 1,246,905 |
| Customer bill ($/year) | 3,845,911 | 3,846,043 | 3,846,108 | 3,846,235 |
Figure 10.
Scenario 1 of MG.
Scenario 2: PSO algorithm
The capacities of PV, wind, battery, and converter are 6566 kW, 926 kW, 3523 kW, and 3211 kW, respectively. The life cycle emissions amount to 2,694,292 kgCO2-eq/Year, the total microgrid cost is 1,246,866 $/Year, and the customer bill reaches 3,846,043 $/Year, as detailed in Table 2. The output power of each RES for each hour over a single day is depicted in Fig. 11 through the application of PSO.
Figure 11.
Scenario 2 of MG.
Scenario 3: NOA algorithm
The capacities of PV, wind, battery, and converter are 6542 kW, 924 kW, 3537 kW, and 3192 kW, respectively. The life cycle emissions amount to 2,690,314 kgCO2-eq/Year, the total microgrid cost is 1,246,871 $/Year, and the customer bill reaches 3,846,108 $/Year, as detailed in Table 2. The output power of each RES for each hour over a single day is illustrated in Fig. 12, utilizing the NOA.
Figure 12.
Scenario 3 of MG.
Scenario 4: KOA algorithm
The capacities of PV, wind, battery, and converter are 6551 kW, 908 kW, 3617 kW, and 3241 kW, respectively. The life cycle emissions amount to 2,683,489 kgCO2-eq/Year, the total microgrid cost is 1,246,905 $/Year, and the customer bill reaches 3,846,235 $/Year, as detailed in Table 2. The output power of each Renewable Energy Source (RES) for each hour over a single day is depicted in Fig. 13 using the KOA.
Figure 13.
Scenario 4 of MG.
Conclusion
This paper introduces an innovative methodology for determining the optimal size of a grid-connected microgrid (MG) through an energy management framework with two primary objectives: minimizing the total annual cost and reducing life cycle emissions. The devised microgrid architecture incorporates distributed energy resources such as Battery Energy Storage Systems (BESS), wind turbines (WT), and photovoltaics (PV). A comprehensive mathematical model is presented, integrating the RGDP-DR approach to ascertain the optimal grid-connected MG size. The RGDP DR strategy is devised to address the disparities between demand load and renewable energy source (RES) generation.
The study conducts a thorough comparative analysis involving four optimization techniques: Dandelion Algorithm (DA), Particle Swarm Optimization (PSO), Nature-Inspired Optimization Algorithm (NOA), and Knowledge Optimization Algorithm (KOA). The evaluation metrics encompass life cycle emissions, the optimal microgrid cost, and customer billing. Simulation results demonstrate the superiority of the proposed DA in achieving the lowest microgrid cost and customer bill, outperforming the other optimization methods. Importantly, this evaluation considers only 10% of the load in the management strategy.
DA demonstrates a minimal total annual cost of $1,246,864, leading to a marginal difference compared to other techniques. PSO closely follows, with a total annual cost of $1,246,866, showing comparable performance to DA. NOA and KOA yield similar results, with total annual costs of $1,246,871 and $1,246,905, respectively. In terms of the annual customer bill, DA results in the lowest at $3,845,911, showcasing a distinct advantage over other optimization methods. PSO closely trails DA, with an annual customer bill of $3,846,043, indicating competitive performance. NOA and KOA exhibit comparable annual customer bills, standing at $3,846,108 and $3,846,235, respectively.
In conclusion, this research establishes that the proposed framework offers an optimal approach for developing a sustainable microgrid driven by renewable energy sources. The numerical evidence supports the claim of the Dandelion Algorithm's effectiveness, particularly in minimizing both microgrid cost and customer billing, even when considering only 10% of the load in the management strategy.
In future research, the proposed RGDP-based DR may be employed on interconnected multi-nano grids and microgrids to find the optimal configuration and size of these interconnected microgrids, considering MG configurations, load types, and uncertainties.
List of symbols
The number of PV modules
PV reduction factor
Scenario load power (kW)
The initial electricity price ($)
The initial load demand (kW)
Self-elasticity
Cross-elasticity
The RGDP electricity price ($/kWh).
The final economic RGDP load model (kWh)
The orbital eccentricity for the th planet.
The Euclidian distance
The th planet velocity.
A random number between zero and one.
A number produced based on levy flight.
An indicator to reorient the search.
A variable used to regulate how far the Sun is from the planet .
Battery state of charge (kWh)
Emissions penalty ($/ton)
Annual replacement cost
Annual operating and maintenance cost
Real discount rate (%)
Component number of units
Component rated capacity (kW)
Component initial cost ($/kW)
Component number of replacements
Component lifetime (years)
Component emissions (kgCO2-eq/kWh)
Component produced energy (kWh)
The dandelion seed's best position
The th planet orbital period
The attraction force
A number produced using random numbers ranging from 0 to 1, levy-flight, and normal distribution.
A linearly decreasing factor from 1.0 to 0.0.
The likelihood of nutcrackers travelling across the entire search space to look for unreachable locations
Author contributions
R.E.: Conceptualization, Methodology, Software, Formal analysis, Investigation, Resources, Data curation, Writing—original draft, Visualization. A.T.A.: Conceptualization, Methodology, Software, Formal analysis, Validation, Investigation, Resources, Data curation, Writing—review & editing, Visualization. A.A.A.: Validation, Investigation, Writing—review & editing, Visualization, Supervision.
Funding
Open access funding provided by The Science, Technology & Innovation Funding Authority (STDF) in cooperation with The Egyptian Knowledge Bank (EKB).
Data availability
The datasets generated during the current study are available from the corresponding author upon reasonable request.
Competing interests
The authors declare no competing interests.
Footnotes
Publisher's note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
References
- 1.Salah SI, Eltaweel M, Abeykoon C. Towards a sustainable energy future for Egypt: A systematic review of renewable energy sources, technologies, challenges, and recommendations. Clean. Eng. Technol. 2022;8:100497. doi: 10.1016/j.clet.2022.100497. [DOI] [Google Scholar]
- 2.Albalawi H, Eisa A, El Aggoune H. Bankruptcy problem in energy warehouse: Applications and challenges. Ain Shams Eng. J. 2022;1:102011. [Google Scholar]
- 3.Jasim AM, Jasim BH, Neagu BC, Alhasnawi BN. Efficient optimization algorithm-based demand-side management program for smart grid residential load. Axioms. 2023;12:33. doi: 10.3390/axioms12010033. [DOI] [Google Scholar]
- 4.Aybar-Mejía M, Villanueva J, Mariano-Hernández D, Santos F, Molina-García A. A review of low-voltage renewable microgrids: Generation forecasting and demand-side management strategies. Electronics. 2021;10:2093. doi: 10.3390/electronics10172093. [DOI] [Google Scholar]
- 5.Qiu D, et al. Strategic retail pricing and demand bidding of retailers in electricity market: A data-driven chance-constrained programming. Adv. Appl. Energy. 2022;7:100100. doi: 10.1016/j.adapen.2022.100100. [DOI] [Google Scholar]
- 6.Battula AR, Vuddanti S, Salkuti SR. A day ahead demand schedule strategy for optimal operation of microgrid with uncertainty. Smart Cities. 2023;6:491–509. doi: 10.3390/smartcities6010023. [DOI] [Google Scholar]
- 7.Ribó-Pérez D, Larrosa-López L, Pecondón-Tricas D, Alcázar-Ortega M. A critical review of demand response products as resource for ancillary services: International experience and policy recommendations. Energies. 2021;14:846. doi: 10.3390/en14040846. [DOI] [Google Scholar]
- 8.Chreim B, Esseghir M, Merghem-Boulahia L. Recent sizing, placement, and management techniques for individual and shared battery energy storage systems in residential areas: A review. Energy Rep. 2024;11:250–260. doi: 10.1016/j.egyr.2023.11.053. [DOI] [Google Scholar]
- 9.Elazab R, Abdelnaby AT, Ali AA. Impacts of multiple demand-side management strategies on microgrids planning: A literature survey. Clean Energy. 2024;8:36–54. doi: 10.1093/ce/zkad057. [DOI] [Google Scholar]
- 10.Moradi-Sarvestani S, Jooshaki M, Fotuhi-Firuzabad M, Lehtonen M. Incorporating direct load control demand response into active distribution system planning. Appl. Energy. 2023;339:120897. doi: 10.1016/j.apenergy.2023.120897. [DOI] [Google Scholar]
- 11.Enrich J, Li R, Mizrahi A, Reguant M. Measuring the impact of time-of-use pricing on electricity consumption: Evidence from Spain. J. Environ. Econ. Manage. 2024;123:102901. doi: 10.1016/j.jeem.2023.102901. [DOI] [Google Scholar]
- 12.Oskouei MZ, et al. A critical review on the impacts of energy storage systems and demand-side management strategies in the economic operation of renewable-based distribution network. Sustainability. 2022;14:2110. doi: 10.3390/su14042110. [DOI] [Google Scholar]
- 13.Kanakadhurga D, Prabaharan N. Demand side management in microgrid: A critical review of key issues and recent trends. Renew. Sustain. Energy Rev. 2022;156:111915. doi: 10.1016/j.rser.2021.111915. [DOI] [Google Scholar]
- 14.Elio J, Phelan P, Villalobos R, Milcarek RJ. A review of energy storage technologies for demand-side management in industrial facilities. J. Clean. Prod. 2021;307:127322. doi: 10.1016/j.jclepro.2021.127322. [DOI] [Google Scholar]
- 15.Phani Raghav L, Seshu Kumar R, Koteswara Raju D, Singh AR. Analytic hierarchy process (AHP): Swarm intelligence based flexible demand response management of grid-connected microgrid. Appl. Energy. 2022;306:118058. doi: 10.1016/j.apenergy.2021.118058. [DOI] [Google Scholar]
- 16.Seshu Kumar R, Phani Raghav L, Koteswara Raju D, Singh AR. Impact of multiple demand side management programs on the optimal operation of grid-connected microgrids. Appl. Energy. 2021;301:117466. doi: 10.1016/j.apenergy.2021.117466. [DOI] [Google Scholar]
- 17.Mohammadjafari M, Ebrahimi R, Parvin Darabad V. Optimal energy management of a microgrid incorporating a novel efficient demand response and battery storage system. J. Electr. Eng. Technol. 2020;15:571–590. doi: 10.1007/s42835-020-00345-5. [DOI] [Google Scholar]
- 18.Hajiamoosha P, Rastgou A, Bahramara S, Bagher Sadati SM. Stochastic energy management in a renewable energy-based microgrid considering demand response program. Int. J. Electr. Power Energy Syst. 2021;129:106791. doi: 10.1016/j.ijepes.2021.106791. [DOI] [Google Scholar]
- 19.Mulleriyawage UGK, Shen WX. Impact of demand side management on optimal sizing of residential battery energy storage system. Renew. Energy. 2021;172:1250–1266. doi: 10.1016/j.renene.2021.03.122. [DOI] [Google Scholar]
- 20.Kumar M, Tyagi B. Optimal energy management and sizing of a community smart microgrid using demand side management with load uncertainty. ECTI Trans. Comput. Inf. Technol. 2021;15:186–197. [Google Scholar]
- 21.Kumar RS, Raghav LP, Raju DK, Singh AR. Customer-oriented energy demand management of grid connected microgrids. Int. J. Energy Res. 2021;45:18695–18712. doi: 10.1002/er.6984. [DOI] [Google Scholar]
- 22.Astriani Y, Shafiullah GM, Shahnia F. Incentive determination of a demand response program for microgrids. Appl. Energy. 2021;292:116624. doi: 10.1016/j.apenergy.2021.116624. [DOI] [Google Scholar]
- 23.Hakimi SM, Hasankhani A, Shafie-khah M, Lotfi M, Catalão JPS. Optimal sizing of renewable energy systems in a microgrid considering electricity market interaction and reliability analysis. Electr. Power Syst. Res. 2022;203:107678. doi: 10.1016/j.epsr.2021.107678. [DOI] [Google Scholar]
- 24.Yu ZX, Li MS, Xu YP, Aslam S, Li YK. Techno-economic planning and operation of the microgrid considering real-time pricing demand response program. Energies. 2021;14:4597. doi: 10.3390/en14154597. [DOI] [Google Scholar]
- 25.Das S, Barik AK. Opposition-based competitive swarm optimizer for optimal sizing and siting of DG units in radial system. Lect. Not. Electr. Eng. 2022;823:269–282. doi: 10.1007/978-981-16-7472-3_21. [DOI] [Google Scholar]
- 26.Jadoun VK, et al. Optimal scheduling of dynamic pricing based V2G and G2V operation in microgrid using improved elephant herding optimization. Sustainability. 2021;13:7551. doi: 10.3390/su13147551. [DOI] [Google Scholar]
- 27.Duan H, Li Q, Li Y, Zhang J, Xie Y. Comparative Study of Microgrid Optimal Scheduling Under Multi-optimization Algorithm Fusion. Springer; 2023. [Google Scholar]
- 28.Balasubramanyam P, Sood VK. Dynamic energy management system of microgrid using AI techniques: A comprehensive & comparative study. DC Microgrids. 2021;1:101–120. [Google Scholar]
- 29.Kiptoo MK, et al. Integrated approach for optimal techno-economic planning for high renewable energy-based isolated microgrid considering cost of energy storage and demand response strategies. Energy Convers. Manag. 2020;215:112917. doi: 10.1016/j.enconman.2020.112917. [DOI] [Google Scholar]
- 30.Gamil MM, et al. Optimal multi-objective sizing of a residential microgrid in Egypt with different ToU demand response percentages. Sustain. Cities Soc. 2021;75:103293. doi: 10.1016/j.scs.2021.103293. [DOI] [Google Scholar]
- 31.Kumar RS, Raghav LP, Raju DK, Singh AR. Intelligent demand side management for optimal energy scheduling of grid connected microgrids. Appl. Energy. 2021;285:116435. doi: 10.1016/j.apenergy.2021.116435. [DOI] [Google Scholar]
- 32.Hassan A, Al-Abdeli YM, Masek M, Bass O. Optimal sizing and energy scheduling of grid-supplemented solar PV systems with battery storage: Sensitivity of reliability and financial constraints. Energy. 2022;238:121780. doi: 10.1016/j.energy.2021.121780. [DOI] [Google Scholar]
- 33.Zaki Diab AA, El-Rifaie AM, Zaky MM, Tolba MA. Optimal sizing of stand-alone microgrids based on recent metaheuristic algorithms. Mathematics. 2022;10:140. doi: 10.3390/math10010140. [DOI] [Google Scholar]
- 34.Elazab R, Abdelnaby AT, Keshta HE, Ali AA. Optimal techno-economic feasibility analysis of a grid-tied microgrid considering demand response strategy. Electr. Power Syst. Res. 2023;224:109768. doi: 10.1016/j.epsr.2023.109768. [DOI] [Google Scholar]
- 35.ZakiDiab AA, Sultan HM, Mohamed IS, KuznetsovOleg N, Do TD. Application of different optimization algorithms for optimal sizing of pv/wind/diesel/battery storage stand-alone hybrid microgrid. IEEE Access. 2019;7:119223–119245. doi: 10.1109/ACCESS.2019.2936656. [DOI] [Google Scholar]
- 36.Paliwal P, Patidar NP, Nema RK. Determination of reliability constrained optimal resource mix for an autonomous hybrid power system using particle swarm optimization. Renew. Energy. 2014;63:194–204. doi: 10.1016/j.renene.2013.09.003. [DOI] [Google Scholar]
- 37.Kumari, J., Subathra, P., Edwin Moses, J. & Shruthi, D. Economic analysis of hybrid energy system for rural electrification using homer. in Proceedings of IEEE International Conference on Innovations in Electrical, Electronics, Instrumentation and Media Technology, ICIEEIMT 2017, 151–156 (2017).
- 38.Bakhshaei P, Askarzadeh A, Arababadi R. Operation optimization of a grid-connected photovoltaic/pumped hydro storage considering demand response program by an improved crow search algorithm. J. Energy Storage. 2021;44:103326. doi: 10.1016/j.est.2021.103326. [DOI] [Google Scholar]
- 39.Eberhart, R. & Kennedy, J. New optimizer using particle swarm theory. in Proceedings of the International Symposium on Micro Machine and Human Science, 39–43 (1995).
- 40.Abdel-Basset M, Mohamed R, Azeem SAA, Jameel M, Abouhawwash M. Kepler optimization algorithm: A new metaheuristic algorithm inspired by Kepler’s laws of planetary motion. Knowl. Based Syst. 2023;268:110454. doi: 10.1016/j.knosys.2023.110454. [DOI] [Google Scholar]
- 41.Abdel-Basset M, Mohamed R, Jameel M, Abouhawwash M. Nutcracker optimizer: A novel nature-inspired metaheuristic algorithm for global optimization and engineering design problems. Knowl. Based Syst. 2023;262:110248. doi: 10.1016/j.knosys.2022.110248. [DOI] [Google Scholar]
- 42.Zhao S, Zhang T, Ma S, Chen M. Dandelion optimizer: A nature-inspired metaheuristic algorithm for engineering applications. Eng. Appl. Artif. Intell. 2022;114:105075. doi: 10.1016/j.engappai.2022.105075. [DOI] [Google Scholar]
- 43.Renewables.ninja. https://www.renewables.ninja/.
- 44.JRC Photovoltaic Geographical Information System (PVGIS): European Commission. https://re.jrc.ec.europa.eu/pvg_tools/en/.
- 45.Elazab R, Saif O, Amin Metwally AMA, Daowd M. New smart home energy management systems based on inclining block-rate pricing scheme. Clean Energy. 2022;6:503–511. doi: 10.1093/ce/zkac016. [DOI] [Google Scholar]
- 46.Angizeh, F., Ghofrani, A. & Jafari, M. A. Dataset on hourly load profiles for a set of 24 facilities from industrial, commercial, and residential end-use sectors. Mendeley Data (2020).
- 47.Elazab R, Abdelnaby AT, Ali AA. Impacts of multiple demand-side management strategies on microgrids planning: a literature survey. Clean Energy. 2024;8:36–54. doi: 10.1093/ce/zkad057. [DOI] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
The datasets generated during the current study are available from the corresponding author upon reasonable request.










