Next Article in Journal
Optimizing Beam Stiffness and Beam Modal Response with Variable Spacing and Extrusion (VaSE)
Previous Article in Journal
Mechanical Design of a Novel Functionally Graded Lattice Structure for Long Bone Scaffolds
Previous Article in Special Issue
Optimal Configuration Strategy Design for Offshore Wind Farm Energy Storage Systems Considering Primary Frequency Regulation and Black-Start Support Capabilities
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Hybrid Adaptive Sheep Flock Optimization and Gradient Descent Optimization for Energy Management in a Grid-Connected Microgrid

by
Sri Harish Nandigam
1,2,
Krishna Mohan Reddy Pothireddy
3,
K. Nageswara Rao
1 and
Surender Reddy Salkuti
4,*
1
Department of Electrical and Electronics Engineering, Hindustan Institute of Technology and Science, Chennai 603103, Tamilnadu, India
2
Sri Vasavi Engineering College, Pedatadepalli, Tadepalligudem 534101, Andhra Pradesh, India
3
Department of Electrical Engineering, National Institute of Technology, Tadepalligudem 534101, Andhra Pradesh, India
4
Department of Railroad and Electrical Engineering, Woosong University, Daejeon 34606, Republic of Korea
*
Author to whom correspondence should be addressed.
Designs 2025, 9(3), 63; https://doi.org/10.3390/designs9030063
Submission received: 30 March 2025 / Revised: 9 May 2025 / Accepted: 14 May 2025 / Published: 16 May 2025

Abstract

Distributed generation has emerged as a viable solution to supplement traditional grid problems and lessen their negative effects on the environment worldwide. Nevertheless, distributed generation issues are unpredictable and intermittent and impede the power system’s ability to operate effectively. Moreover, the problems associated with outliers and denial of service (DoS) attacks hinder energy management. Therefore, efficient energy management in grid-connected microgrids is critical to ensure sustainability, cost efficiency, and reliability in the presence of uncertainties, outliers, denial-of-service attacks, and false data injection attacks. This paper proposes a hybrid optimization approach that combines adaptive sheep flock optimization (ASFO) and gradient descent optimization (GDO) to address the challenges of energy dispatch and load balancing in MG. The ASFO algorithm offers robust global search capabilities to explore complex search spaces, while GDO safeguards precise local convergence to optimize the dispatch schedule and energy cost and maximize renewable energy utilization. The hybrid method ASFOGDO leverages the strengths of both algorithms to overcome the limitations of standalone approaches. Results demonstrate the efficiency of the proposed hybrid algorithm, achieving substantial improvements in energy efficiency and cost reduction compared to traditional methods like interior point optimization, gradient descent, branch and bound, and a population-based algorithm named Golden Jackal optimization. In case 1, the overall cost in scenario 1 and scenario 2 was reduced from 1620.4 rupees to 1422.84 rupees, whereas, in case 2, the total cost was reduced from 12,350 rupees to 12,017 rupees with the proposed hybrid ASFOGDO algorithm. Further, a detailed impact of attacks and outliers on scheduling, operational cost, and reliability of supply is presented in case 3.

1. Introduction

Conventional sources of energy, such as coal, oil, and natural gas, cause environmental pollution through high carbon emissions, contributing to climate change [1]. They are non-renewable, leading to resource depletion and energy security concerns [2]. Additionally, their operational costs fluctuate due to fuel price volatility and geopolitical factors [3]. However, the penetration of renewable energy sources (RESs) like solar (PV), wind turbines (WT), and hydropower is transforming the energy sector by offering environmental, reliable, and profitable alternatives [4]. A microgrid (MG) is a small-scale energy system that may function both disjointedly and in tandem with the utility [5]. It includes distributed energy resources such as diesel generators (DG), fuel cells (FC), microturbines (MT), PV, WT, and battery energy storage systems (BESS).
MG energy management (EM) faces significant challenges due to volatility in RESs, load demand, electricity prices, and component failures [6]. These uncertainties require advanced optimization and control strategies to ensure reliable and cost-effective operation. The output power from PV and WT is intermittent due to weather conditions. MG uses renewable and non-renewable sources to generate power and batteries and other storage technologies to help balance supply and demand. It has advanced controllers to manage energy distribution and optimize performance [7]. MG provides backup power during grid failures, improves energy security, improves energy efficiency, reduces transmission losses by generating power close to the load, and optimizes energy use with renewables and storage, reducing reliance on expensive grid electricity and lowering greenhouse gas emissions by integrating clean energy sources. An MG’s energy management system (EMS) maximizes generation, storage, and consumption to improve sustainability, reliability, and efficiency [8]. It schedules DERs, anticipates load demand and renewable energy availability, and optimizes grid energy exchange based on electricity price to reduce operating costs. Through real-time monitoring and control, the EMS lowers emissions, improves power quality, and guarantees voltage and frequency stability [9]. EMS reduces the losses and maximizes the use of RESs and system resilience, demand response, peak load management, and network reconfiguration [10]. Minimization of operational cost [11], energy cost reduction [12], maximization of renewable energy utilization [13], grid exchange cost minimization [14], demand response integration, emission reduction, maximization of energy storage utilization, etc., are a few of the objectives to be accomplished by the EMS [15]. In [16], the authors considered the optimal sizing and placement of PV for reducing the operational cost minimization problem.
Deterministic optimization is a mathematical approach employed to optimize MG operations under known and fixed conditions. Unlike stochastic or robust optimization [17], it assumes that all parameters are precisely known without any uncertainties. In [18], the authors considered a robust optimization algorithm by considering the uncertainties in RESs, whereas in [19], a fuzzy prediction is employed. It assumes no variability in demand, generation, or market prices and provides one best solution based on given inputs. Since it does not involve any randomness in the system, it solves problems faster than stochastic or robust methods [20]. However, these are less flexible and therefore not suitable for handling real-world problems having uncertainties. Few deterministic optimization techniques, such as linear programming, which is used for cost minimization and economic dispatch; mixed-integer linear programming, which handles discrete and continuous variables, i.e., ON/OFF status of generators, charge or discharge status of BESS, ON/OFF status of controllable loads, etc.; a non-linear programming technique that optimizes systems with non-linear constraints, i.e., battery charge and discharge dynamics; dynamic programming, which optimizes sequential decision-making problems; and convex programming, when the constraint set is convex [21]. However, these cannot handle uncertainty, assuming all parameters (e.g., load, renewable generation, prices) are known, making them unsuitable for real-world fluctuating conditions [22]. Further, they lack robustness and provide a single optimal solution that may become infeasible when actual conditions deviate from expected values; they cannot adapt dynamically to unforeseen variations, requiring frequent re-optimization [23]. To consider the uncertainties, the authors in [24] consider uncertainty in load demand, and uncertainty in RESs by the authors in [25], both in [26], and the authors in [27], employing stochastic optimization. The authors in [28] perform EM in a grid-connected MG considering load variability, whereas in [29] the authors employed an isolated MG.
Exact optimization methods ensure finding the optimal solution by exhaustively searching the search space. They are mainly used in MG EM; however, they may become computationally expensive for large-scale and complex problems. Branch and Bound (B&B) is employed to solve the integer and MI problems, but this method is slow for large-scale systems due to exponential time complexity and necessitates significant computational power. Branch and cut optimization is used to solve the MILP problems more efficiently than B&B. The performance of this technique depends on the effectiveness of the cutting planes used. However, it is still computationally demanding for large systems.
Heuristic optimization methods are problem-solving approaches that find good solutions efficiently. Unlike exact methods, heuristics trade off accuracy for speed, making them useful for complex, high-dimensional, or real-time applications like MG EM [30]. Nevertheless, they may provide a near-optimal solution but not the absolute best, as it requires fine-tuning for different problem types; some heuristics struggle with complex landscapes and may get stuck, and their performance depends heavily on selecting proper algorithm parameters. Although heuristic methods are faster than exact methods, some heuristics can be slow for large-scale problems. Metaheuristic optimization methods are cutting-edge heuristics designed to efficiently explore large and complex search spaces [31]. They balance investigation and exploitation to evade getting stuck in local optima. These methods are widely used in MG EM, especially for multi-objective and uncertain environments [32]. Genetic algorithm is an evolutionary-based optimization using selection, crossover, and mutation; particle swarm optimization (PSO) is a swarm-based technique inspired by bird flocking behavior [33]; Grey Wolf optimizer (GWO) mimics wolf pack leadership for efficient searching; ant colony optimization is based on ant foraging behavior for pathfinding problems; and simulated annealing uses temperature-based probabilistic searches to escape local optima. Differential evolution uses the mutation-based evolutionary algorithm for continuous optimization. A hybrid PSO and class topper optimization in [34], a modified GWO in [35], a whale optimization algorithm in [36], and a hybrid whale and sine cosine algorithm in [37]. Yet, solutions are often near-optimal but not necessarily the best; some methods require multiple iterations, increasing processing time. The performance of metaheuristics depends on selecting proper algorithm parameters, such as learning rates and population size. No universal metaheuristic works best for all problems, as stated by the no free lunch theorem [38]. Depending on the objective function’s nature, some have a single optimum, while others have several optimums, depending on unimodal, multimodal, convex, non-convex, linear, or non-linear, as well as the number of discontinuities present. The presence of inequality constraints restricts the search space from a set of infinite solutions to finite solutions; this excluded area is sometimes referred to as the infeasible region. Because of these limitations, the method produces a variety of solutions. Sheep flock optimization (SFO) is a nature-inspired meta-heuristic optimization algorithm that mimics the exploration and exploitation phases of the sheep flock. However, the majority of sheep follow the leader in this behavior, which might result in early convergence at a local optimum. As a result, SFO might become stuck in local optimal solutions, particularly for multimodal operations. Furthermore, in complicated, high-dimensional problems, the algorithm may either explore too extensively, which results in sluggish convergence, or exploit too aggressively, which results in solution stagnation. These challenges can be addressed by hybridizing two metaheuristic algorithms or by hybridizing the exact optimization methods with metaheuristic algorithms. Metaheuristics like PSO, GWO, or class topper rely on stochastic updates, which do not guarantee a strict refining path nearer to the optimal solution. However, exact methods like gradient descent optimization (GDO), B&B, B&C, etc., follow a deterministic improvement path, moving directly toward the optimal point using mathematical gradients. Therefore, it is necessary to hybridize two algorithms, namely, exact optimization and metaheuristic, to reduce the operational cost of the MG. Metaheuristics identify diverse solutions, while gradient methods fine-tune them for higher precision. Gradient-based methods accelerate convergence near optimal points, reducing computational costs. Hybrid metaheuristic algorithms combine the strengths of different optimization techniques to improve performance in terms of convergence speed, accuracy, and robustness. One such approach is integrating ASFO with GD. Therefore, this paper proposes a hybrid ASFO with GDO to handle the challenges stated above. SFO handles exploration, while GD fine-tunes solutions; GD accelerates local search, reducing iterations required, and hybridization enhances precision compared to standalone metaheuristics. SFO prevents premature convergence, while GD ensures refinement. It may be employed for complex, high-dimensional problems like MG EM.
  • This work contributes in the following ways:
  • This study thoroughly examines a range of strategies that efficiently manage uncertainties and reduce power imbalances in the context of renewable energy sources. Each strategy is thoroughly examined, including in-depth evaluations and recommendations for EM in situations when there are significant disparities between power generation and demand.
  • Improves the solution accuracy and convergence speed by leveraging the strengths of both methods, i.e., ASFO and GDO, and optimizes the scheduling of distributed generation units and grid exchange under uncertain PV and wind conditions.
  • Further, it demonstrates faster and more accurate solution discovery compared to traditional methods like GDO, B&B, interior point optimization, and Golden Jackal optimization to validate its effectiveness.
  • At last, addressed the impact of DOS attacks, FDI attacks, and the presence of outliers on operational expenditure and also considered the uncertainties in PV, WT, and load demand.

2. Microgrid Modeling

The integration of non-dispatchable and dispatchable sources in modern MGs presents a challenge, particularly in MGs with a high placement of RESs. While non-dispatchable sources contribute to cleaner energy and lower carbon emissions, their intermittency can lead to grid instability. Therefore, it is necessary to mix dispatchable sources with RESs, which act as a backup during periods of low RE generation [39]. Moreover, energy systems often incorporate BESS to store excess RE during peak production times and release it when demand is high or renewable output is low. Successful integration of these sources necessitates advanced EMS and optimization algorithms to ensure the reliable, efficient, and sustainable operation of the MG. Figure 1 indicates the mix of MG resources and their structure, along with power flow directions.

2.1. Non-Dispatchable Sources

Non-dispatchable sources refer to energy generation that is dependent on external factors and cannot be controlled, such as PV and WT power. These sources generate electricity based on natural conditions, like sunlight or wind speed, which are stochastic and unpredictable [40]. Equation (1) is used to predict the power generation from WT depending on the velocity of wind speed. If the velocity is less than the cut-in speed, the power generation is zero. If it is more than the cut-out speed, the power generation is restricted to zero. Because of this stochasticity, non-dispatchable sources are limited in their application to meet demand at all times, particularly throughout periods of low generation. As a result, they often require backup generation from other MG sources or BESS to ensure the reliability of the supply. Equation (2) represents the power generation through PV at the time ‘t’, which depends on the irradiance of the sunlight.   P W i n d t is the wind power generated at time ‘t’, P W i n d r is the rated power,   v c i n is the cut-in velocity, v c o u t is the cut-out velocity.   P S t is the solar power generated, R r is the rated irradiance, P S r is the rated power generated by the solar panel, R s t a n d is the standard radiation and R c is the critical radiation.
P W i n d t = 0                                                                                                   v < v c i n             P W i n d r v 3 v c i n 3 v r 3 v c i n 3                               v c i n < v < v r   P W i n d r                                             v r < v < v c o u t                                       0                                                                                                                         v > v c o u t .
P S t = P S r R r R S t a n d R c                                                           0 R R c P S r R R S t a n d                                                 R c R R s t a n d P S r                                                                                                 R s t a n d   R       .

2.2. Dispatchable Sources

Dispatchable sources can be controlled and scheduled by operators to meet the imbalance of power as needed. These sources use fuels like gas, uranium, and coal, and they can be turned on or off, and the output can be adjusted, depending on the load demand. Since they are reliable and flexible, dispatchable sources play a vital role in safeguarding grid reliability to meet demand, even when non-dispatchable sources are not generating at full capacity. These play a crucial role in balancing the intermittency produced by RESs and preserving supply-demand equilibrium [41].

2.2.1. Diesel Generators

DGs generate power by combining internal combustion engines with alternators. They generate mechanical energy using diesel as fuel, which is then converted to electricity. DGs are reliable and able to run constantly with different loads. They are appropriate for peak load management or backup power since they can be quickly brought online. Due to its high energy density, diesel fuel may be stored in small spaces [42]. However, the DGs have a quadratic cost function, which increases the operational cost of the MG. Moreover, these sources produce carbon dioxide, sulfur, and nitrogen oxide emissions, which impact the environment, leading to global warming. C D G t indicates the total operational cost of DG, P D G t is the power generated by DG, and z 0 , z 1 and z 2 are the cost coefficients for DG. These are dispatchable types of sources, with the minimum rating considered as 4 kW and the maximum rating as 45 kW. Equation (3) indicates the incremental fuel cost of DG, which is represented by the quadratic cost function.
C D G t = z 0 P D G t 2 + z 1 P D G t + z 2 .

2.2.2. Fuel Cell

FC uses hydrogen and oxygen in an electrochemical process to generate power. They produce power with fewer emissions than traditional combustion methods. When utilizing pure hydrogen, the main byproducts are heat and water. FCs are more efficient than outdated combustion engines, particularly under partial loads. Further, the cost function is linear, and hence the operational expenditure is low. C F C t in Equation (4) indicates the total operational cost of FC, P F C t is the power generated by FC, and x 0 and x 1 are the cost coefficients for FC. A fuel cell is a dispatchable source; the minimum rating is considered to be 6 kW and the maximum rating 30 kW.
C F C t = x 0 P F C t + x 1 .

2.2.3. Microturbine

Small-scale gas turbines that produce heat and power are called MTs. They are appropriate for scattered generations due to their small size. Capable of using a variety of fuels, including renewable gases, to function [43]. Equation (5) represents the cost coefficients of MT. Compared to DGs, these require less operational expenditure. From the above discussion, it is clear that it is better to schedule FC, MT, and DG in ascending order, respectively, for mitigating climate change, increasing the imbalance of power, and reducing the operational expenditure on the system. C M T t indicates the total operational cost of MT, P M T t is the power generated by MT, and y 0 and y 1 are the cost coefficients for MT. MT is of dispatchable source; the minimum rating is considered as 3 kW and the maximum rating as 30 kW.
C M T t = y 0 P M T t + y 1 .

3. Problem Formulation

This section introduces the problem formulation and the associated constraint set to be safeguarded. The objective is to minimize the total cost of the MG by considering the limits on generators, BESS, and utility. The objective function, therefore, can be stated as represented in Equation (6). O C M G t represents the operational cost of the MG, C E e x c h a n g e t represents the cost of energy exchange between the grid and MG, and P D A t represents the price for energy exchange at time ‘t’. The amount of energy exchange E e x t with the grid depends on the energy balance constraint. Equation (7) represents the cost for energy exchange, and Equation (8) represents the amount of energy exchange, which is the difference between load demand and the available power generation. Equation (9) represents the total power generation at time ‘t’, including power generation through renewable sources and dispatchable sources. Equation (10) represents the total operational cost of the day-ahead phase, which comprises the energy exchange cost and the operational cost of the dispatchable sources. Equation (11) indicates the incremental fuel cost function of the generator, which is a quadratic cost function. Equation (12) indicates the shortage of power, which is the difference between the load demand and the generated power at time ‘t’.
min t T O C M G = t = 1 24 O C M G t + C E e x c h a n g e t   .
C E e x t = E e x t P D A t   .
E e x t = L D D A t G D A t   .
G D A t = G 1 , D A t + G 2 , D A t + G 3 , D A t + R G D A t .
T O C D A t = O C G 1 , D A t + O C G 2 , D A t + O C G 3 , D A t + C E e x t   .
O C G 1 , D A t = a o G 1 , D A t 2 + a 1 G 1 , D A t + a 2 .
S h o r t a g e   p o w e r = G D A t L D D A t .

3.1. Equality Constraint

According to Equation (13), the total power demand on the MG [43] must meet the real-power generation of all the available sources that are committed.
P d i e s + P m i c r o + P f u e l + P w i n d + P s o l a r = P l o a d .

3.2. Inequality Constraints

As seen in Equations (14)–(18), inequality constraints are the limits placed on each generator. The source’s rating determines the upper limit, whereas DG and MT’s flame instability determine the lower limit [44]. I d i e s t in Equation (14) is the on or off status of the DG, and P d i e s t is the amount of power generated by the DG.   P d i e s m a x and P d i e s m i n are the maximum and minimum limits on DG. I M T t in Equation (15), I F C t in Equation (16), I s o l a r t in Equation (17), and I W T t in Equation (18) are the statuses of generators.   P s o l a r m i n and P W T m i n , in general, these values are zeros. It means the minimum power generated from wind and solar is zero, whereas for diesel and other sources, the minimum power generation cannot be zero to satisfy flame instability or to meet ramp-up limits or start-up costs, etc.
P d i e s m i n I d i e s t P d i e s t P d i e s m a x I d i e s t .
P M T m i n I M T t P M T t P M T m a x I M T t .
P F C m i n I F C t P F C t P F C m a x I F C t .
P W T m i n I W T t P W T t P W T m a x I W T t .
P s o l a r m i n I s o l a r t P s o l a r t P s o l a r m a x I s o l a r t .

3.2.1. BESS Constraints [42]

P B E S S   t = P B E S S   d i s t + P B E S S   c h t .
0 P B E S S   c h t P B E S S   c h max x t .
0 P B E S S   d i s t P B E S S   d i s max y t .
S O C B E S S t ,   m i n S O C B E S S t S O C B E S S t ,   m a x .
S O C B E S S t = S O C B E S S t 1 + β c h a r g e P B E S S t 1 + 1 β d i s c h a r g e P B E S S t 1 .
X t , s S , c h + X t , s S , d c h 1   t .
X t S , c h 0,1   t .
X t , s S , d c h 0,1   t .
Equations (19)–(26) are the BESS constraints. Equation (19) indicates the rating of BESS, and Equation (20) and Equation (21) limit the charge and discharge power of BESS, respectively. Equation (22) limits the SoC, and Equation (23) is the SoC at the current hour. Equation (24) is that the BESS should either charge or discharge at a single time. Equation (25) and Equation (26) are the statuses of charging ( X t S , c h ) and discharging ( X t , s S , d c h ). If X t , s S , d c h is 1, it indicates the BESS is discharging; 0 indicates the BESS is not discharging. β c h a r g e and β d i s c h a r g e are the charge and discharge efficiencies. The maximum energy limit supplied is considered to be 30 kW, and the maximum limit on the energy received is considered to be 30 kW. The minimum SoC is 20%, and the maximum SoC is considered to be 80%. The initial energy is considered as 50% of the rating.

3.2.2. Utility Constraints

The energy exchange cost ( E X C t u t i l i t y ) amid the grid and MG can be stated as presented in Equation (27). The quantity of power taken from or given to the utility at time ‘t’ is denoted by P t U t i l i t y , and E P t U t i l i t y is the electricity price of the grid [43]. Equation (28) denotes a limit on the amount of power exchange with the utility, and Equation (29) indicates one-way flow of power, i.e., the utility may not send or receive power at the same time. Equation (30) indicates that if the E X C t u t i l i t y > 0 , it means that the excess power is sold back to the grid on similar lines; if it is less than zero, power is received from the grid, as shown in Equation (31). The upper limit on power absorbed, P t U t i l i t y ,   a b s o r b = 30 , and supplied by the utility to the MG at time ‘t’ can be considered as P t U t i l i t y ,   s u p p l y = 30 [40]. The quantity of power exchange between the MG and the grid is limited. P E x p G r i d and P i m p G r i d are the amounts of power exported or imported to the grid, respectively. Allow the DERs to create as much energy as possible and feed the surplus power back into the grid on the spot market if the price of electricity for power taken from the grid is higher than the price of power generated in the MG. The quantity of power exchange between the grid ( P E x c G r i d ) and the MG is displayed by Equations (32) and (33), and the corresponding cost for power exchange ( C E x c G r i d ) is shown by Equation (36) as well. Equation (34) and Equation (35) indicate the price for energy exchange and the difference in cost from energy exchange, respectively.
E X C t u t i l i t y = P t U t i l i t y E P t U t i l i t y .
P t U t i l i t y ,   a b s o r b P t U t i l i t y P t U t i l i t y ,   s u p p l y .
P t U t i l i t y ,   a b s o r b P t U t i l i t y ,   s u p p l y = 0 .
E X C t u t i l i t y > 0 ,   e n e r g y   s o l d   t o   g r i d .
E X C t u t i l i t y < 0 ,   e n e r g y   b o u g h t   f r o m   g r i d .
P I m p G r i d > 0 .
P E x p G r i d < 0 .
C I m p G r i d = P I m p G r i d .
P E x c G r i d = P I m p G r i d P E x p G r i d .
C E x c G r i d = C I m p G r i d C E x p G r i d .

4. Proposed Methodology

This section introduces the SFO and GDO separately; later, it hybridizes the two algorithms to improve the effectiveness and convergence characteristics. Table 1 indicates the pseudo-code of the proposed hybrid methodology.

4.1. Sheep Flock Optimization

SFO is a nature-inspired metaheuristic algorithm that mimics the collective movement and decision-making behavior of a sheep flock [45]. It is designed for optimization problems where exploration and exploitation must be balanced effectively. In nature, sheep exhibit intelligent herding behavior, where individuals adjust their positions based on interactions with the flock leader, neighboring sheep, and environmental factors. This dynamic self-organization enables the flock to move efficiently towards safer or more resource-rich locations. Inspired by these principles, the SFO model’s solution search processes are based on three key behaviors, namely, following behavior, scattering behavior, and guarding behavior, as shown in Figure 2.
x i = x m i n + r x m a x x m i n .

4.1.1. Following Behavior

Sheep move towards the best (leader) solution with a controlled step size and are formulated as represented in Equation (38).
x i t + 1 = x i t + r 1 ( x l e a d e r x i t ) .

4.1.2. Scattering Behavior

Exploration is introduced by moving some sheep away from the leader, as presented in Equation (39).
x i t + 1 = x i t + r 1 D s c a t t e r ,
where γ is the scattering factor, U is a random vector uniformly distributed within the bounds, α and β are scaling factors, and R is a random perturbation vector.

4.1.3. Lamb Reunion

If any sheep are isolated from the group or move outside the search space, will be repositioned into the group to maintain diversity presented in Equation (40).
x i = max ( min x i ,   x m a x , x min ) .

4.2. Shortcomings in SFO

The following behavior causes most sheep to move towards the leader, which may lead to early convergence at a local optimum. Therefore, SFO may get trapped in suboptimal solutions, especially in multimodal functions. Moreover, the algorithm may either explore too much, causing slow convergence, or exploit too aggressively, leading to stagnation of the solution, which makes the algorithm inefficient in complex, high-dimensional problems.

4.3. Adaptive ASFO

It introduces dynamic adaptation mechanisms to improve the balance between exploration and exploitation, reducing premature convergence and enhancing search efficiency. The step size for the following behavior is dynamically adjusted to balance exploration and exploitation. Initially, larger step sizes allow wide exploration, and over time, step sizes decrease to fine-tune the solution. The formula for adaptive step size is represented in Equation (41).
In traditional SFO, the step size for sheep movement is static, which may lead to premature convergence or slow exploration. In ASFO, the step size ‘αt’ is dynamically adjusted according to the iteration number ‘i’, allowing large exploration steps in the early stages and fine-tuning near convergence. The sheep position is updated not just based on random movement but guided towards the best-known position, Xbest, improving exploitation efficiency while maintaining diversity through a random perturbation term. In the original SFO, the scattering behavior is fixed. ASFO introduces an adaptive scattering distance, Dscatter, which shrinks over time. Initially, wide scattering promotes exploration; later, narrow scattering refines solutions around promising regions.
α t = α m a x ( t T ) ( α m a x α m i n ) .
x n e w = x c u r r e n t + α t x b e s t x c u r r e n t + β R .
D s c a t t e r = D m a x ( t T ) ( D m a x D m i n ) .

4.4. Gradient Descent Optimization

Gradient descent (GD) is a first-order optimization algorithm widely used for minimizing functions [46]. It operates by iteratively updating parameters in the direction of the negative gradient of the function, ensuring movement towards the local or global minimum. The fundamental principle behind GD is to find the optimal solution by gradually adjusting variables based on how steeply the function is changing at a given point, as shown in Figure 3. After several iterations of SFO, select the best solutions, i.e., the top 10% of sheep to refine using GD. Use the gradient ∇f(x) to iteratively update the position:
x n e w = x c u r r e n t η f ( x c u r r e n t ) ,
where η is the learning rate, ∇f(x) is the gradient of f(x), which can be computed analytically or numerically. Table 1 indicates the initialization parameters employed for the study. Table 2 represents the application of the hybrid ASFOGDO to the energy management problem. Equation (44) indicates the updating rule of the GDO algorithm.

5. Results and Discussions

This section discusses the results and discussions that assess the proposed methodology by considering two case studies, namely, IEEE-18 bus and IEEE-33 bus systems. Further, this study also considers the impact of the DOS attack and the presence of outliers on the operational expenditure of the MG. The uncertainties in power generation from PV and WT and the uncertainty in load demand are considered. By employing a scenario generation technique, namely Monte Carlo simulation (MCS), the authors have generated 100 scenarios for each uncertain parameter. The inputs to MCS are probability distribution parameters like shape factor, scale factor for wind, and mean and standard deviation for PV and load demand. Weibull distribution is considered for wind, beta distribution for PV, and normal distribution for load demand [40]. However, handling such a large set of uncertainties is difficult since the uncertainty set becomes (100)3 and the associated scheduling algorithm struggles to incorporate all the uncertain sets, and the computational burden increases. Therefore, a scenario reduction technique, namely K-means clustering, was employed to reduce the uncertain space into simpler solvable sets. The output of MCS is fed to the K-means clustering algorithm, which reduces the uncertain space to (10)3. The k-means clustering algorithm is easy to handle, and the inputs are the number of clusters, centroids, and uncertain space [42]. However, this formulation does not account for the volatility in energy prices.
  • Case 1: Application to an IEEE-18 bus system.
The imbalanced power distribution system, as shown in Figure 4, which operates at a minimum voltage of 230 V and a rated voltage of 20 kV, was considered as the subject of this investigation. This research focuses on distribution-level MGs, where integrating small WTs makes sense and is feasible. This research focuses on the unique advantages and challenges of assimilating smaller-scale WTs straight into the distribution system, even though it is standard that large WTs are often related at the transmission level, basically utilizing HVDC connections. Monocrystalline solar panels, which are composed of silicon single crystals, are renowned for their endurance and great efficiency. Their output power ranges from 0 to 25 kW, and their efficiency usually falls between 15 and 22%. Because of their high energy density, long lifespan, low self-discharge rate, and effective charging and discharging, lithium-ion batteries are used. The BESS rating is 100 kWh, and the batteries have charge and discharge efficiencies of 90% each. The min. and max. SoCs are 20% and 80%, respectively, and the initial state of charge is 50%. They use horizontal axis WTs, which have 3 m/s and 25 m/s as cut-in and cut-out speeds, respectively. They can produce rated power at 12 m/s with an efficiency of 30–40%.
Table 3 indicates the generator details, i.e., whether it is dispatchable or non-dispatchable, the minimum and maximum generation limit, the cost coefficients of generators, offer cost details of the grid, and lower and upper limits on power generation. Figure 5 indicates the uncertainty of wind, PV, and load demand. Figure 6 indicates the total load demand on the system. The minimum, maximum, and average demands are 42, 86.8, and 66.8 kW, respectively.
Figure 7 indicates the electricity price, and Figure 8 indicates the power generation through RESs. DGs are scheduled to last to preserve the climate and to reduce operational expenditure. Employing the hybrid methodology on this 18-bus system results in the dispatch schedule as shown in Figure 9, Figure 10 and Figure 11. In scenario 1, shown in Figure 9, the MG sources and utility are dispatched with BESS always in discharging mode; in scenario 2, shown in Figure 10 and Figure 11, the MG sources, utility, and BESS are dispatched with the assumption that the energy exchange from the utility is bi-directional (i.e., it supplies/absorbs energy based on the grid electricity price), and BESS charges and discharges.
In order to balance generation and demand inside the MG, the BESS is essential. It delivers energy at times of high demand and stores excess energy produced during times of low demand. In order to offset the rise in operating costs, the suggested hybrid technique schedules hours 9–11 and 13, when the price of MG is above the price of the grid, to minimize the amount of power produced by diesel generators during peak hours. The sum of the energy exchange, BESS, and MG fuel costs is the overall operating cost. Increased use of RESs consciously lowers operating costs by reducing dependency on the grid and fossil fuels.
When the price of grid power exceeds the OC of MT, the FC will be scheduled since the OC of FC is lower than the OC of MT. When grid electricity prices drop, MT’s power generation will be constrained. Since the generator with the highest operating costs generates the most power when the grid’s energy price is at its highest, there is no economic operation. As a result, the TOC is higher than in the other scenarios for meeting the system’s load requirement. When compared to all of the sources in the test system, the MT generates a greater amount of emissions.
  • Case 2: Application to a 33-bus radial distribution network.
This case is to verify and assess that the proposed methodology is still performing well, and it is compared with the other optimization algorithms for checking the time to convergence. Load demand, PV, and WT power generation for an IEEE-33 bus system are shown in Figure 12. The uncertainty error in PV and WT power is depicted in Figure 13. The dispatch schedule of controllable sources is presented in Figure 14. It has a wind generator, a PV, and three diesel generators along with a BESS with a capacity of 20 kWh; the minimum and maximum SoC are considered as 4 and 16 kWh, respectively. Moreover, the initial SoC is considered to be 10 kWh. The power ratings of PV and WT are 200 kW and 250 kW, respectively. The peak, minimum, and average loads on the system are 830 kW, 182.2 kW, and 580 kW, respectively. More details about the generator cost functions and limits can be found in [42].
Figure 15 suggests the energy exchange by the MG with the grid, in which it is clear that the amount of power drawn from the grid is maximum when the electricity price is low and the power delivered to the grid is maximum when the cost of energy is higher from the utility.
Figure 16 indicates the operational cost of the MG. From the dispatch schedule of MG resources, it is clear that generator 2 is scheduled last. Generator 1 and generator 3 have less incremental fuel cost when compared to generator 2; therefore, the generator is scheduled last. Even the BESS is charged during low electricity prices and discharged during high electricity prices. Figure 17 indicates the OC, EEC, and TC of the MG.
Utilizing this hybrid approach, the MG’s overall operating cost is 12,017 rupees, whereas utilizing the gradient descent method and SFO, the MG’s total cost is 12,350 rupees and 12,332 rupees, respectively. Condensed emissions are a result of the DG’s extended dispatch schedule and the increased usage of RES, which is consistent with environmental sustainability objectives. The population size of the SFO and the number of iterations are two factors that should be optimized for metaheuristic algorithms, which are population-based iterative techniques. As represented in Figure 18, five hundred iterations were used to implement the hybrid model. Because of its thorough search process, which requires a substantial amount of computational time and resources, particularly for big and complicated problems, the B&B approach has the greatest operating expenses. The interior point method is more effective than B&B, but it still requires a lot of calculation, which results in modest operating expenses. This strategy works well for large-scale optimization issues, but it might not be the best choice for non-convex problems. In contrast, the hybrid SFO and GDO methodology provides a decent trade-off between cost and performance. It uses fewer resources and is quicker than precise approaches, which lowers total operating expenses. Table 4 indicates the comparison of the proposed with existing algorithms.
Though it does a good job of approximating the global optimum, it cannot always be as precise as exact approaches. Consequently, the mean, median, and standard deviation of all meta-heuristic methods must be calculated after 30 trials.
  • Case 3: Impact of DOS attack and outliers on the operational expenditure.
This case is employed to assess the impact of a DoS attack, the presence of outliers in the historical wind data, and FDI attacks on the operational cost of the MG for the same test system considered in case 1. Figure 19 indicates the DoS attack on the generated power of PV and WT. It is clear that the power generation from PV and WT becomes zero between the scheduling hours 13 and 16 due to the DoS attack. Due to the sudden drop in power from RESs, the optimization algorithm chooses other possible generators to meet the load demand, or possibly the power exchange from the grid might increase, or the algorithm demands to discharge the BESS. Due to this, the operational expenditure on the MG increases in turn, increasing the consumer tariff. In practical microgrid environments, communication networks are vulnerable to cyber-attacks, particularly DoS attacks. These attacks can block or delay the transmission of critical measurement and control signals, leading to suboptimal or outdated decisions in energy management. To model the impact of a DoS attack, we introduce a binary indicator function a(t) at each time instant t.
a t = 1 ,   i f   c o m m u n i c a t i o n   i s   s u c c e s f u l 0 ,   i f   f a i l s .
Under a DoS attack, the system’s available state information, x ~ ( t ) , is modeled as follows:
x ~ t = a t x t + ( 1 a t x t 1 ) .
x(t) is the true system attack modeled as a Bernoulli random process,
P(a(t) = 0) = p, P(a(t) = 1) = 1 − p,
where p denotes the probability of a DoS attack occurring at any time step.
Outliers are the specific patterns that do not follow the actual patterns. These are generated due to measurement errors, data entry errors, sampling errors, instrumental errors, and data manipulation. These can be generated through DoS attacks or FDI attacks as well [47]. Figure 20 indicates the presence of outliers in the historical data, which was detected using the K-means clustering algorithm. K-means can be employed for both clustering and scenario reduction applications. Figure 21 indicates the impact of FDI on the load demand of the MG. If the injected false data are higher than the actual load demand, the generators have to generate more, and the amount of energy exchanged with the grid increases, which may necessitate turning on the uncommitted generator. If the FDI-injected data are less than the actual load demand, it may turn off the committed generators sometimes, which may lead to a blackout.

6. Conclusions

This study proposed a hybrid SFO and GDO approach that effectively combines SFO’s global exploration capability with GDO’s local optimization precision, enabling enhanced energy dispatch and cost management. Moreover, it also considered the uncertainties in PV, WT, and load demand using beta distribution, Weibull distribution, and normal distribution, respectively, by employing MCS and K-means clustering algorithms. Numerical simulations demonstrated that it achieved a 13.8% reduction in total energy cost compared to conventional optimization methods from scenario 1 to scenario 2. The convergence time of the hybrid algorithm was also reduced by 18%, indicating its computational efficiency. These findings highlight the hybrid optimization approach as a robust and practical solution for EM in modern grid-connected MGs, particularly in scenarios involving dynamic load demands and high penetration of renewable energy sources. RESs are geographically diversified; hence, there is a chance of outlier generation in the data received by the MG operator. The presence of these outliers impacts the EMS and hinders the forecasting techniques. Further, this paper also proposes a detailed impact of outliers, DoS attacks, and FDI attacks on the operational expenditure of the MG. In the future, a methodology will be proposed to address these challenges by detecting the outliers and imputing them with the mean or median. Further, a novel demand response program will be proposed to assess the impact of load rescheduling on the operational cost of the MG.

Author Contributions

Conceptualization, S.H.N., K.M.R.P., K.N.R. and S.R.S.; methodology, K.M.R.P. and S.R.S.; software, S.H.N., K.N.R. and S.R.S.; validation, S.H.N., K.N.R. and K.M.R.P.; formal analysis, S.H.N., K.M.R.P., K.N.R. and S.R.S.; investigation, K.N.R. and S.H.N.; resources, S.R.S. and K.M.R.P.; data curation, S.H.N., K.N.R. and S.R.S.; writing—original draft preparation, S.H.N., K.M.R.P., K.N.R. and S.R.S.; writing—review and editing, S.H.N., K.M.R.P., K.N.R. and S.R.S.; visualization, S.R.S. and K.N.R.; supervision, S.R.S. and K.N.R. All authors have read and agreed to the published version of the manuscript.

Funding

This research work was funded by the Woosong University’s Academic Research Funding—2025.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Ali, R.; Sajjad, F.; Mahmud, F.; Moein, M. Decentralized transactive energy management of multi-microgrid distribution systems based on ADMM. Int. J. Electr. Power Energy Syst. 2021, 132, 107126. [Google Scholar]
  2. Cao, Y. Optimal Energy Management for Multi-Microgrid Under a Transactive Energy Framework with Distributionally Robust Optimization. IEEE Trans. Smart Grid 2022, 13, 599–612. [Google Scholar] [CrossRef]
  3. Ma, W.; Wang, J.; Gupta, V.; Chen, C. Distributed Energy Management for Networked MG Using Online ADMM with Regret. IEEE Trans. Smart Grid 2018, 9, 847–856. [Google Scholar] [CrossRef]
  4. Liu, Y.; Beng Gooi, H.; Xin, H. Distributed energy management for the multi-microgrid system based on ADMM. In Proceedings of the 2017 IEEE Power & Energy Society General Meeting, Chicago, IL, USA, 16–20 July 2017; pp. 1–5. [Google Scholar]
  5. Zheng, Y.; Song, Y.; Hill, D.J.; Zhang, Y. Multiagent System Based Microgrid Energy Management via Asynchronous Consensus ADMM. IEEE Trans. Energy Convers. 2018, 33, 886–888. [Google Scholar] [CrossRef]
  6. Zhao, D. Differential Privacy Energy Management for Islanded Microgrids with Distributed Consensus-Based ADMM Algorithm. IEEE Trans. Control. Syst. Technol. 2023, 31, 1018–1031. [Google Scholar] [CrossRef]
  7. Leeuwen, G.; AlSkaif, T.; Gibescu, M.; van Sark, W. An integrated blockchain-based energy management platform with bilateral trading for microgrid communities. Appl. Energy 2020, 263, 114613. [Google Scholar] [CrossRef]
  8. Amjad Anvari, M.; Alireza, S.; Taher, N.; Mohammad, P. Multi-objective operation management of a renewable MG (micro-grid) with back-up micro-turbine/fuel cell/battery hybrid power source. Energy 2011, 36, 6490–6507. [Google Scholar]
  9. Nikmehr, N.; Najafi-Ravadanegh, S. Optimal operation of distributed generations in micro-grids under uncertainties in load and renewable power generation using heuristic algorithm. IET Renew. Power Gener. 2019, 9, 982–990. [Google Scholar] [CrossRef]
  10. Hamid, H.; Alireza, J. Optimal sizing and location of renewable energy based DG units in distribution systems considering load growth. Int. J. Electr. Power Energy Syst. 2018, 101, 356–370. [Google Scholar]
  11. Sharmistha, S.; Subhadeep, B.; Aniruddha, B. Operation cost minimization of a Micro-Grid using Quasi-Oppositional Swine Influenza Model Based Optimization with Quarantine. Ain Shams Eng. J. 2018, 9, 45–63. [Google Scholar] [CrossRef]
  12. Morteza, Z.; Navid, G.; Ali, J. Optimal sizing of battery energy storage systems in off-grid micro grids using convex optimization. J. Energy Storage 2019, 23, 44–56. [Google Scholar]
  13. Sharma, S.; Bhattacharjee, S.; Bhattacharya, A. Grey wolf optimisation for optimal sizing of battery energy storage device to minimise operation cost of microgrid. IET Gener. Transm. Distrib. 2018, 10, 625–637. [Google Scholar] [CrossRef]
  14. Bahman, B.; Rasoul, A. Optimal sizing of battery energy storage for micro-grid operation management using a new improved bat algorithm. Int. J. Electr. Power Energy Syst. 2014, 56, 42–54. [Google Scholar] [CrossRef]
  15. Ahmed, F.; Almoataz, Y. Abdelaziz Grey Wolf Optimizer for Optimal Sizing and Siting of Energy Storage System in Electric Distribution Network. Electr. Power Compon. Syst. 2017, 45, 601–614. [Google Scholar]
  16. Ammar, M.; Abubakr, H.; Elsayed, T. Optimal Sizing and Location of Solar Capacity in an Electrical Network Using Lightning Search Algorithm. Electr. Power Compon. Syst. 2017, 47, 14–15. [Google Scholar]
  17. Melhem, F. Energy Management in Electrical Smart Grid Environment Using Robust Optimization Algorithm. IEEE Trans. Ind. Appl. 2018, 54, 2714–2726. [Google Scholar] [CrossRef]
  18. Rajaei, S. Developing a Distributed Robust Energy Management Framework for Active Distribution Systems. IEEE Trans. Sustain. Energy 2021, 12, 1891–1902. [Google Scholar] [CrossRef]
  19. Valencia, F. Robust Energy Management System for a Microgrid Based on a Fuzzy Prediction Interval Model. IEEE Trans. Smart Grid 2016, 7, 1486–1494. [Google Scholar] [CrossRef]
  20. Lara, J.; Olivares, D.; Cañizares, C. Robust Energy Management of Isolated Microgrids. IEEE Syst. J. 2019, 13, 680–691. [Google Scholar] [CrossRef]
  21. Giraldo, J.; Castrillon, J.; López, C.; Rider, M.; and Castro, C. Microgrids Energy Management Using Robust Convex Programming. IEEE Trans. Smart Grid 2019, 10, 4520–4530. [Google Scholar] [CrossRef]
  22. Liu, Y. Distributed Robust Energy Management of a Multimicrogrid System in the Real-Time Energy Market. IEEE Trans. Sustain. Energy 2019, 10, 396–406. [Google Scholar] [CrossRef]
  23. Zhang, Y.; Gatsis, G.; Giannakis, G. Robust Energy Management for Microgrids with High-Penetration Renewables. IEEE Trans. Sustain. Energy 2013, 4, 944–9530. [Google Scholar] [CrossRef]
  24. Xiang, Y.; Liu, Y.; Liu, Y. Robust Energy Management of Microgrid with Uncertain Renewable Generation and Load. IEEE Trans. Smart Grid 2016, 7, 1034–1043. [Google Scholar] [CrossRef]
  25. Bazmohammadi, N.; Anvari-Moghaddam, A.; Tahsiri, A.; Madary, A.; Vasquez, J.C.; Guerrero, J.M. Stochastic Predictive Energy Management of Multi-Microgrid Systems. Appl. Sci. 2020, 10, 4833. [Google Scholar] [CrossRef]
  26. Pouria, H.; Abdollah, R.; Salah, B.; Muhammad, S. Stochastic energy management in a renewable energy-based microgrid considering demand response program. Int. J. Electr. Power Energy Syst. 2021, 129, 106791. [Google Scholar]
  27. Alireza, F. A novel stochastic energy management of a microgrid with various types of distributed energy resources in presence of demand response programs. Energy 2018, 160, 257–274. [Google Scholar]
  28. Arezoo, H.; Seyed, H. Stochastic energy management of smart microgrid with intermittent renewable energy resources in electricity market. Energy 2021, 219, 19668. [Google Scholar]
  29. Silani, A.; Yazdanpanah, M. Distributed Optimal Microgrid Energy Management with Considering Stochastic Load. IEEE Trans. Sustain. Energy 2019, 10, 729–737. [Google Scholar] [CrossRef]
  30. Olivares, D.; Lara, J.; Cañizares, C.; Kazerani, M. Stochastic-Predictive Energy Management System for Isolated Microgrids. IEEE Trans. Smart Grid 2015, 6, 2681–2693. [Google Scholar] [CrossRef]
  31. Ahmed, D.; Ebeed, M.; Ali, A.; Alghamdi, A.S.; Kamel, S. Multi-Objective Energy Management of a Micro-Grid Considering Stochastic Nature of Load and Renewable Energy Resources. Electronics 2021, 10, 403. [Google Scholar] [CrossRef]
  32. Gao, H.; Liu, J.; Wang, L.; Wei, Z. Decentralized Energy Management for Networked Microgrids in Future Distribution Systems. IEEE Trans. Power Syst. 2018, 33, 3599–3610. [Google Scholar] [CrossRef]
  33. Xu, H.; Caramanis, C.; Mannor, S. Sparse Algorithms Are Not Stable A No-Free-Lunch Theorem. IEEE Trans. Pattern Anal. Mach. Intell. 2012, 34, 187–193. [Google Scholar]
  34. Amita, M.; Vishnu, P.; Saroj, R. Economic dispatch using particle swarm optimization: A review. Renew. Sustain. Energy Rev. 2009, 13, 2134–2141. [Google Scholar]
  35. Amponsah, A.A.; Han, F.; Ling, Q.H.; Kudjo, P.K. An enhanced class topper algorithm based on particle swarm optimizer for global optimization. Appl. Intell. 2021, 51, 1022–1040. [Google Scholar] [CrossRef]
  36. Vatankhah Barenji, R.; Ghadiri Nejad, M.; Asghari, I. Optimally sized design of a wind/photovoltaic/fuel cell off-grid hybrid energy system by modified-gray wolf optimization algorithm. Energy Environ. 2018, 29, 1053–1070. [Google Scholar] [CrossRef]
  37. Ling, W.; Vigna, K.; Sara, L.; Taylor, P. Optimal placement and sizing of battery energy storage system for losses reduction using whale optimization algorithm. J. Energy Storage 2019, 26, 100892. [Google Scholar]
  38. Mostafa, A. Considerations on optimal design of hybrid power generation systems using whale and sine cosine optimization algorithms. J. Electr. Syst. Inf. Technol. 2018, 5, 312–325. [Google Scholar]
  39. Pothireddy, K.M.R.; Vuddanti, S.; Salkuti, S.R. Impact of Demand Response on Optimal Sizing of Distributed Generation and Customer Tariff. Energies 2022, 15, 190. [Google Scholar] [CrossRef]
  40. Pothireddy, K.M.R.; Vuddanti, S. Alternating direction method of multipliers based distributed energy scheduling of grid connected microgrid by considering the demand response. Discov. Appl. Sci. 2024, 6, 343. [Google Scholar] [CrossRef]
  41. Raju, B.A.; Pothireddy, K.M.R.; Sandeep, V. Leveraging hybrid energy storage for distributed secondary frequency regulation with consensus-driven event-triggered approach. Electr. Eng. 2024, 107, 4241–4256. [Google Scholar] [CrossRef]
  42. Pothireddy, K.M.R.; Vuddanti, S. Novel demand response-based stochastic optimisation in a grid-connected microgrid considering outlier detection and imputation. IJAE 2024, 46, 2442602. [Google Scholar] [CrossRef]
  43. Pothireddy, K.M.R.; Vuddanti, S. A Hybrid Lagrangian and Improved Class Topper Optimization for Optimal Sizing of Battery Energy Storage System. SGSE 2025, 10, 8. [Google Scholar] [CrossRef]
  44. Pothireddy, K.M.R.; Vuddanti, S.; Salkuti, S.R. Optimal assortment of methods to mitigate the imbalance power in the day-ahead market. Electr. Eng. 2025, 107, 1–22. [Google Scholar] [CrossRef]
  45. Vetriveeran, D.; Sambandam, R.K.; Venkatachalam, A. Optimized Multi-Scale Attention Convolutional Neural Network for Micro-Grid Energy Management System Employing in Internet of Things. Optim. Control Appl. Meth 2025, 46, 381–845. [Google Scholar] [CrossRef]
  46. Li, Y. Distributed Resilient Double-Gradient-Descent Based Energy Management Strategy for Multi-Energy System Under DoS Attacks. IEEE Trans. Netw. Sci. Eng. 2022, 9, 2301–2316. [Google Scholar] [CrossRef]
  47. Sun, Q.; Wang, B.; Feng, X.; Hu, S. Small-signal stability and robustness analysis for microgrids under time-constrained DoS attacks and a mitigation adaptive secondary control method. Sci. China Inf. Sci. 2022, 65, 162202. [Google Scholar] [CrossRef]
Figure 1. MG architecture.
Figure 1. MG architecture.
Designs 09 00063 g001
Figure 2. Working principle of the sheep flock optimization algorithm.
Figure 2. Working principle of the sheep flock optimization algorithm.
Designs 09 00063 g002
Figure 3. Gradient descent curve.
Figure 3. Gradient descent curve.
Designs 09 00063 g003
Figure 4. Test system under consideration.
Figure 4. Test system under consideration.
Designs 09 00063 g004
Figure 5. (ac) Uncertainties in wind, PV, and load demand, respectively. Green, red and blue indicates the reduced scenarios and grey represents generated scenarios.
Figure 5. (ac) Uncertainties in wind, PV, and load demand, respectively. Green, red and blue indicates the reduced scenarios and grey represents generated scenarios.
Designs 09 00063 g005
Figure 6. Load demand in kW.
Figure 6. Load demand in kW.
Designs 09 00063 g006
Figure 7. Electricity price in rupees.
Figure 7. Electricity price in rupees.
Designs 09 00063 g007
Figure 8. Renewable power output.
Figure 8. Renewable power output.
Designs 09 00063 g008
Figure 9. Dispatch schedule in kW.
Figure 9. Dispatch schedule in kW.
Designs 09 00063 g009
Figure 10. Dispatch schedule in kW.
Figure 10. Dispatch schedule in kW.
Designs 09 00063 g010
Figure 11. Energy exchange and battery exchange in kW.
Figure 11. Energy exchange and battery exchange in kW.
Designs 09 00063 g011
Figure 12. Load demand for the 33-bus system.
Figure 12. Load demand for the 33-bus system.
Designs 09 00063 g012
Figure 13. PV and wind with error.
Figure 13. PV and wind with error.
Designs 09 00063 g013
Figure 14. Dispatch schedule in kW.
Figure 14. Dispatch schedule in kW.
Designs 09 00063 g014
Figure 15. Energy exchange with the grid and BESS.
Figure 15. Energy exchange with the grid and BESS.
Designs 09 00063 g015
Figure 16. Operational cost in rupees.
Figure 16. Operational cost in rupees.
Designs 09 00063 g016
Figure 17. Total cost of MG.
Figure 17. Total cost of MG.
Designs 09 00063 g017
Figure 18. Total cost comparison with other optimization techniques.
Figure 18. Total cost comparison with other optimization techniques.
Designs 09 00063 g018
Figure 19. Impact of DoS attack on power generation from RESs.
Figure 19. Impact of DoS attack on power generation from RESs.
Designs 09 00063 g019
Figure 20. Outliers: (a) outlier detection in the upper centroid; (b) outlier detection in the lowest centroid; (c) outlier detection in both, respectively.
Figure 20. Outliers: (a) outlier detection in the upper centroid; (b) outlier detection in the lowest centroid; (c) outlier detection in both, respectively.
Designs 09 00063 g020aDesigns 09 00063 g020b
Figure 21. False data injection into the load demand.
Figure 21. False data injection into the load demand.
Designs 09 00063 g021
Table 1. Initialization parameters.
Table 1. Initialization parameters.
ParametersValues
No. of agents30
Maximum iteration100
No. of decision variables5
Dimension of the problem24 × 5 = 120
Attraction towards the leader0.5 to 1.0
Random movement0 to 1
Table 2. Pseudo code of the proposed methodology to MG problems.
Table 2. Pseudo code of the proposed methodology to MG problems.
Algorithm: Global Problem
Designs 09 00063 i001
Table 3. Cost coefficients of generators.
Table 3. Cost coefficients of generators.
SourceCost CoefficientsGenerator Limits
a0a1a2PminPmax
DG2.5841.0730.38445
MT0.4570.294--630
PAFC0.961.65--330
PV------025
WT------015
BESS0.10.00750.001−3030
UtilityRefer Figure 7−3030
Table 4. Comparison of the proposed method with the other existing methods.
Table 4. Comparison of the proposed method with the other existing methods.
MethodologyIEEE-18 Bus SystemIEEE-33 Bus System
Total Cost in
Rupees
Computational Time in SecondsTotal Cost in RupeesComputational Time in Seconds
GD optimization1661.70.48312,3501.23
GJO optimization1660.80.48012,3321.08
BB optimization1636.70.43012,4481.07
Interior point
optimization
1679.40.53112,4121.12
Proposed method16120.48312,0171.02
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Nandigam, S.H.; Pothireddy, K.M.R.; Rao, K.N.; Salkuti, S.R. Hybrid Adaptive Sheep Flock Optimization and Gradient Descent Optimization for Energy Management in a Grid-Connected Microgrid. Designs 2025, 9, 63. https://doi.org/10.3390/designs9030063

AMA Style

Nandigam SH, Pothireddy KMR, Rao KN, Salkuti SR. Hybrid Adaptive Sheep Flock Optimization and Gradient Descent Optimization for Energy Management in a Grid-Connected Microgrid. Designs. 2025; 9(3):63. https://doi.org/10.3390/designs9030063

Chicago/Turabian Style

Nandigam, Sri Harish, Krishna Mohan Reddy Pothireddy, K. Nageswara Rao, and Surender Reddy Salkuti. 2025. "Hybrid Adaptive Sheep Flock Optimization and Gradient Descent Optimization for Energy Management in a Grid-Connected Microgrid" Designs 9, no. 3: 63. https://doi.org/10.3390/designs9030063

APA Style

Nandigam, S. H., Pothireddy, K. M. R., Rao, K. N., & Salkuti, S. R. (2025). Hybrid Adaptive Sheep Flock Optimization and Gradient Descent Optimization for Energy Management in a Grid-Connected Microgrid. Designs, 9(3), 63. https://doi.org/10.3390/designs9030063

Article Metrics

Back to TopTop