Next Article in Journal
Optimizing Hydrophobicity of Cu@Zn Foam Catalysts for Efficient CO2 Electroreduction in a Microchannel Reactor
Previous Article in Journal
Deep Learning-Based Performance Modeling of Hydrogen Fuel Cells Using Artificial Neural Networks: A Comparative Study of Optimizers
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Hybrid CNN-GRU Forecasting and Improved Teaching–Learning-Based Optimization for Cost-Efficient Microgrid Energy Management

Department of Electrical Engineering, College of Engineering, Majmaah University, Al-Majmaah 11952, Saudi Arabia
*
Author to whom correspondence should be addressed.
Processes 2025, 13(5), 1452; https://doi.org/10.3390/pr13051452
Submission received: 12 April 2025 / Revised: 3 May 2025 / Accepted: 6 May 2025 / Published: 9 May 2025
(This article belongs to the Section Energy Systems)

Abstract

:
In this paper, a two-stage framework is proposed for the energy management of microgrids, which combines a hybrid Convolutional Neural Network-Gated Recurrent Unit (CNN-GRU) forecast model and the Improved Teaching–Learning-Based Optimization (ITLBO) algorithm. The CNN-GRU model captures spatiotemporal patterns in historical data for effective renewable energy and load demand uncertainty quantification, while the ITLBO algorithm improves generation scheduling performance through utilization of adaptive luminance coefficients, Latin Hypercube initialization, and hybrid genetic operations. The proposed framework is then compared with four different forecasting models: standalone CNN or MLANN, and three popular optimization algorithms (PSO, TLBO, CO) for four cases, including baseline (perfect foresight), CNN-GRU forecast, CNN forecast, and MLANN forecast. The results show that the hybrid framework outperforms dedicated, in-domain models for forecast and scheduling, with the state-of-the-art CNN-GRU sliding window model producing the best forecasting accuracy, which subsequently translates into near-optimal scheduling performance. Through many experiments, we show that the ITLBO algorithm is robust and outperforms the classical optimization methods on convergence speed and solution quality while significantly eliminating the forecast errors uncertainty. Demand response is also a feature of these models, which boosts operational efficiency by scaling down peak grid usage without sacrificing affordability through energy saving capabilities. According to the results, the hybrid framework exhibits significant cost-efficiency by reducing the RMSE of solar irradiance forecasting by 11.6% when compared to standalone CNN and achieving a 69.7% reduction in operational costs under ITLBO optimization. The comparative analysis emphasizes the robustness and versatility of the framework, reinforcing its feasibility across a range of forecasting and optimization scenarios for real-world microgrid deployment.

1. Introduction

Increased penetration of renewable energy sources (RES) in microgrids has posed serious challenges in energy management due to the inherent variability of solar, wind, and load demand [1,2]. Reliable microgrid operations demand high-quality forecasting models for predicting generation patterns as well as consumption patterns, along with effective optimization schemes for minimizing operational costs without compromising on stability [3,4]. Conventional forecasting schemes based on autoregressive models as well as machine learning methods are often ill-equipped with modeling the sophisticated temporal–spatial dependencies in renewable energy patterns, resulting in poor predictability in scheduling decisions [5,6]. Conventional optimization schemes are similarly constrained in tackling high-dimensional non-convex problems in energy dispatching, especially with forecast uncertainty [7,8].
Using machine learning and metaheuristic algorithms, recent developments in microgrid energy management aim to resolve forecasting uncertainties and minimize operational expenses. Major studies performed recently can be categorized in three fields: renewable energy/load forecasting, optimization methods, and demand response management.
Conventional statistical models for load and renewable energy prediction are prone to spatiotemporal volatility [1,2]. Machine learning, particularly deep learning methods, has shown to be much better at capturing complex patterns: LSTMs are good at understanding time-related patterns in solar power, while CNNs are effective at identifying layout patterns in wind farms. These different types of models work well together in combined systems like bi-LSTM attention mechanisms, dueling DQN-DDPG schemes, and Seq2Seq scheduling schemes, which improve prediction accuracy. For instance, real-time decision-making processes enhance bi-LSTM attention schemes [3], while neural-fuzzy schemes manage intermittent patterns in renewable power [9]. Recent breakthroughs combine IoT-enabled data streams for high-granularity forecasting schemes [10,11] as well as probabilistic schemes for quantifying uncertainty estimates [4]. Most schemes; however, focus on separated temporal or spatial dimensions of features [5,6] and leave scope for holistic modeling of the spatiotemporal dimension—a problem solved using our hybrid CNN-GRU framework, which synergistically combines convolutional operations with GRU temporal gates.
Metaheuristics are now central in microgrid economic dispatch. Particle Swarm Optimization (PSO) optimizes operational expenses in hybrid power systems [7], with Multi-Objective Kepler Optimizers balancing emissions with costs [1]. Teaching–Learning-Based Optimization is promising in resource allocation tasks [8] but is prone to premature convergence in high dimensions. New advances involve improved Gazelle Optimizers [12] as well as scheduling based on C-LSGANs [4] and hybrid schedules such as dung-beetle optimization [13] and jellyfish search [14]. Genetic algorithms (GAs) help make battery equalization tasks and economic scheduling tasks better, while better versions of GAs that use Latin Hypercube Sampling are more effective for exploring options. Distributed energy resource (DER) coordination is improved upon in Seq2Seq models [15] as well as in multi-objective schemes [16,17]. The improved TLBO in this study boosts these advancements by using luminance coefficients and hybrid genetic operations, which help balance exploration and exploitation while being more efficient than traditional PSO and TLBO when dealing with uncertainties from forecasts.
Optimum management of microgrids demands strong handling of forecast uncertainty and variability in demand. Reinforcement learning (RL) systems like CuEMS and DRL schedulers change their strategies based on changes in energy, while stochastic optimization and deep learning-based rule-based controls help improve stability. Energy storage systems (ESS) are improved using genetic algorithms and cost-effective scheduling, while combining different ESS designs makes them more reliable. Demand response methods promote load shifting through price-responsive controls [18] and IoT-powered real-time adjustments [11]. Multi-energy microgrids rely on hydrogen production optimization [19] as well as power-to-gas integration [12] to minimize carbon footprints. Few studies combine demand response with forecasting-driven optimization [18,20]. In this research, our framework closes this gap by integrating CNN-GRU probabilistic predictions with ITLBO’s adaptive handling of constraints, allowing it to anticipate deviation in predictions while ensuring grid stability [21].
Recent progress in deep learning has shown promising performance in renewable energy prediction, as structures such as the Long Short-Term Memory (LSTM) unit and Convolutional Neural Networks (CNN) enhanced prediction accuracy through modeling temporal and spatial features, respectively [3,5]. Hybrid models like bi-LSTM with attention mechanisms [3] and CNN-LSTM structures [5] have outperformed conventional methods, but most such methods still address temporal and spatial dependencies in isolation, without their synergistic interaction [6]. In terms of optimization, the popular choice of metaheuristic algorithms like Particle Swarm Optimization (PSO) [7], Cheetah Optimizer (CO) [22], and Teaching–Learning-Based Optimization (TLBO) [8] for economic dispatch is plagued with slow convergence rates and premature stagnation in high-dimensional search spaces [12,13]. Reinforcement learning (RL) and stochastic optimization schemes [14,23] have been applied for uncertainty reduction but tend to be decoupled in their integration with high-precision forecasting. In addition, whereas demand response management increases grid flexibility via IoT-driven adjustments [11] and price-sensitive load shifting [16], few research studies consider probabilistic forecasting in conjunction with adaptive optimization for dynamic correction of prediction errors [20,21].
To meet these challenges, this paper introduces an innovative two-stage approach consisting of a hybrid CNN-GRU forecasting method [24] with an Improved Teaching–Learning-Based Optimization (ITLBO) algorithm. The CNN-GRU algorithm extracts both spatial and temporal features from historical load and renewable energy datasets at the same time, enhancing the reliability of the forecast. The improved ITLBO algorithm includes adaptive luminance coefficients, Latin Hypercube Sampling for initialization, and hybrid genetic operations for optimizing generation scheduling in uncertainty scenarios. Introducing demand response mechanisms, the approach ensures cost-effective microgrid operation while minimizing the effect of forecast uncertainties on the system performance.
The major contributions of this research are as follows:
  • Hybrid CNN-GRU Forecasting Model: merges convolutional layers for spatial feature extraction with GRU temporal gates, achieving far better renewable energy and load demand prediction accuracy in comparison with independent CNN and MLANN models [25,26].
  • Advanced TLBO (ITLBO) Algorithm: augments standard TLBO with adaptive exploration–exploitation trade-off through luminance coefficients, Latin Hypercube initialization for promoting diversity, and hybrid genetic operations in order to prevent premature convergence, outperforming PSO, TLBO, and several other baselines in cost optimization.
  • Integrated Forecasting–Optimization Framework: anticipates forecast uncertainties proactively through probabilistic CNN-GRU predictions combined with ITLBO’s dynamic handling of constraints, lowering operational expenses as well as peak grid dependency.
  • Broad Case Studies: verifies the framework’s strength through four operational contexts (perfect foresight, CNN-GRU, CNN, and MLANN predictions), reflecting near-optimum scheduling performance in actual uncertainty environments.
  • Integration of Demand Response: illustrates how the envisioned framework stabilizes the grid by integrating forecasting-based optimization with demand response, presenting an extensible solution for realistic applications in microgrids.
These contributions together promote microgrid power management in advancing spatiotemporal forecasting, efficiency in optimization, as well as uncertainty robustness.
The rest of this paper is structured as follows: Section 2 summarizes the problem formulation of the optimal microgrid management. Section 3 explains the proposed ITLBO algorithm. Section 4 represents the proposed hybrid CNN-GRU forecasting methodology. Section 5 discusses experimental findings with comparisons. Section 6 concludes the work and outlines future research directions.

2. Problem Formulation

The microgrid energy management problem is formulated as a multi-period constrained optimization task considering renewable integration, demand response, and grid interactions [27]. Let T = { 1 , , T } denote the scheduling horizon (typically T = 24 h) and define the following components:

2.1. Objective Function

However, this involves the minimization of total operational costs: total operational cost, C t o t a l , consists of the costs incurred from renewable generation (PV, wind), grid purchases, diesel generation, and demand response incentives. The objective function minimizes these cost components to determine an economically optimal energy dispatch subject to operational constraints over the scheduling horizon.
m i n   C t o t a l = t T k K λ P V k P t P V , k + l L λ w i n d l P t w i n d , l R e n e w a b l e   G e n e r a t i o n   C o s t + t T λ g r i d t P t g r i d G r i d   E n e r g y   C o s t + t T i I a i ( P t D G , i ) 2 + b i P t D G , i + c i D i e s e l   G e n e r a t i o n   C o s t + t T β D R P t D R D e m a n d   R e s p o n s e   C o s t  
where the cost terms represent
  • Renewable generation expenses based on per-unit costs for PV and wind power;
  • Time-varying grid electricity purchase costs;
  • Quadratic fuel costs for diesel generation, accounting for efficiency effects;
  • Linear compensation costs for demand response participation.
This formulation enables cost-aware decision-making across all available energy resources while maintaining reliable microgrid operation.
In Equation (1), K , L , I indicate the sets of PV units, wind turbines, and diesel generators. P t represents the power dispatch at time, t (kW). λ is the unit costs ($/kWh). a i ,   b i , c i are quadratic fuel cost coefficients for the diesel generator, i . β D R defines the DR incentive rate ($/kWh).

2.2. System Constraints

For maintaining reliable power supply and proper functioning of electrical equipment, the microgrid operation needs to meet certain physical and technical constraints as listed below.

2.2.1. Power Balance

The total generation by the PV, wind, and diesel units, and grid imports at any time step must equal system load minus demand response curtailment. This balances demand and supply.
k P t P V , k + l P t w i n d , l + i P t D G , i + P t g r i d P t D R = P t l o a d ,   t T

2.2.2. Generation Limits

All power generation sources operate within their limits of technical capabilities. Like renewable outputs (PV and wind), output is bound by available resources, like diesel generators, which have minimum/maximum stable outputs, and grid exchange respects contractual or line limits.
P m i n P V , k P t P V , k P m a x P V , k , k , t
P m i n w i n d , l P t w i n d , l P m a x w i n d , l , l , t
P m i n D G , i P t D G , i P m a x D G , i , i , t
P m a x g r i d P t g r i d P m a x g r i d , t

2.2.3. Demand Response Constraints

Shiftable loads through demand response is limited to a fraction ( η ) of the total instantaneous load and to a maximum amount of energy used over the scheduling period, to preserve comfort of the consumer.
η P t l o a d P t D R η P t l o a d , t
t P t D R Δ P m a x D R
The linear DR model approximates aggregate behavior; user-specific utility functions are a future extension. While the current model restricts DR magnitude via η (Equations (7) and (8)), future work will incorporate ramping constraints (e.g., ±5% load change per hour) and minimum DR durations to better reflect practical user flexibility limits.

2.2.4. Spinning Reserve Requirement

The total available capacity from the fast-responding diesel generators plus the grid must exceed the load plus a specified reserve margin to account for generation outages or forecast errors.
i P m a x D G , i + P m a x g r i d P t l o a d + R r e s e r v e ,   t T
Rreserve is fixed at 10% of peak demand, aligning with grid reliability standards. This set of constraints ensure to facilitate operational feasibility and at the same time, works towards the cost-minimization objective.

2.3. Decision Variables

The optimization derives the best hourly dispatch schedule of all controllable resources, defined as a decision vector, X , that covers the entire scheduling horizon. This includes
  • Power generated by each PV unit, wind turbine, diesel generator;
  • Power from the grid, where positive/negative values are import/export;
  • Demand side response curtailment.
The optimization determines the hourly dispatch schedule as follows:
X = P 1 P V , 1 P 1 w i n d , 1 P 1 D G , 1 P 1 g r i d P 1 D R P T P V , 1 P T w i n d , 1 P T D G , 1 P T g r i d P T D R
All time-coupled decisions can be expressed in the compact format of matrix Formulation (10), which allows for simultaneous optimization throughout the 24 h horizon, subject to system constraints. This matrix structure allows integration with an objective function and constraints, as each column represents a resource type, and each row represents a time period.

2.4. Fitness Function Evaluation and Constraint Handling

The optimization algorithm evaluates candidate solutions using a fitness function that combines the total operational cost with penalty terms for constraint violations. This ensures feasible and cost-effective microgrid operation.
The fitness function F(X) is defined as:
F X = C t o t a l X + t T ( λ v i o l P e n a l t y ( X , t ) )
where
  • C t o t a l X = Original objective function (total operational cost);
  • λviol = Penalty coefficient (large positive scalar to discourage infeasibility);
  • Penalty(X,t) = Constraint violation measure at time t.

3. Teaching–Learning-Based Optimization Framework

3.1. Standard TLBO Algorithm

The Teaching–Learning based optimization (TLBO) algorithm (Rao et al. [28]) emulates knowledge transfer in the form of two iterative steps: the teacher phase and the student phase. The population (or the set of solutions) learners P = { X 1 , . . . ,   X N } is D dimensional in nature. Each X i = ( x i 1 , . . . ,   x i D ) represents a certain candidate solution.

3.1.1. Teacher Phase: Global Knowledge Transfer

Improvement of knowledge by the instructor for a learner–instructor scenario involves teacher phase shaped class exercises. The templated session lesson plan improves the fittest solution X t e a c h e r , which is a focal point to which the class mean ( X m e a n ) is heuristically lifted through practical driven updates of elevation.
X n e w , i = X o l d , i + r i ( X t e a c h e r T F X m e a n )
where r i U ( 0,1 ) introduces stochasticity, and T F { 1,2 } controls the teaching intensity. The mean position X m e a n is computed as follows:
X m e a n = 1 N i = 1 N X i
Furthermore, the teacher shifts the best performance condition where bound Xbest~P is successfully overridden, and steps result from the mean/crossover. These exemplar steps emphasize regional attraction to the exploration school. Nevertheless, the sighted teaching factor, T F , in the educator’s guided warm institutional imprint and fixated scheme lead the school mean update to predispose a benchmark shift that stagnates towards the peak for such multi-modal slip surface solver landscapes.

3.1.2. Learner Phase: Local Knowledge Refinement

Peer learning occurs through pairwise interactions between learners:
X n e w , i = X o l d , i + r i ( X j X i ) , i f f ( X j ) < f ( X i ) X o l d , i + r i ( X i X j ) , o t h e r w i s e
where X j is a randomly selected peer ( j i ). This phase enhances exploitation by leveraging relative fitness differences between solutions. However, the basic implementation lacks mechanisms to preserve population diversity or adapt search intensity.

3.1.3. Limitations of Conventional TLBO

  • Mean-centric stagnation: over-reliance on population mean (13) causes clustering around suboptimal regions
  • Fixed exploration–exploitation balance: static T F values prevent dynamic adaptation to problem landscape
  • Boundary violation mishandling: traditional boundary correction methods disrupt optimization trajectories
  • Population diversity decay: no explicit mechanism to maintain solution variety

3.2. Improved TLBO (ITLBO) Algorithm

To address these conventional TLBO’s limitations, we propose six synergistic enhancements that transform TLBO into a robust optimizer for microgrid scheduling problems.

3.2.1. Space-Filling Initialization via Latin Hypercube Sampling

Initial population generation significantly impacts convergence speed and solution quality. ITLBO employs Latin Hypercube Sampling (LHS) [29] to ensure uniform coverage of the search space:
X i d = l b d + ( u b d l b d ) π i d ξ i d N
where π i d is a random permutation of [ 1 , N ] and ξ i d U ( 0,1 ) . Compared to random initialization, LHS reduces spatial correlation between dimensions by 38–62% (measured via Moran’s I index), enhancing initial exploration [30,31].

3.2.2. Adaptive Teaching–Learning Strategy

The fixed teaching factor, T F , is replaced with a nonlinear decay schedule:
α i t = α 0 e x p k i t M a x I t ,     α 0 = 0.9 ,   k = 2
The teacher phase update becomes
X n e w , i = X o l d , i + r i X t e a c h e r α ( 1 + β ξ ) X m e a n
where ξ U ( 0,1 ) and β = 0.2 control momentum-based exploration. This adaptation enables smooth transition from global search ( α 0.9 ) to local refinement ( α 0.1 ).

3.2.3. Hybrid Crossover–Mutation Learner Phase

To prevent diversity loss, the learner phase integrates genetic operators:
X t r i a l , i = B L X α   c r o s s o v e r , i f   f ( X j ) < f ( X i ) N o n u n i f o r m   m u t a t i o n , o t h e r w i s e
The blend crossover (BLX- α ) generates offspring within expanded parent bounds:
x t r i a l d [ m i n ( x i d , x j d ) α δ , m a x ( x i d , x j d ) + α δ ]
where δ = | x i d x j d | . Mutation applies Gaussian noise scaled by iteration:
x m u t d = x i d + η N ( 0,1 ) Δ d ,   η = 0.3 ( 1 i t / M a x I t )

3.2.4. Momentum-Conserving Boundary Handling

Traditional boundary methods disrupt optimization trajectories. ITLBO preserves directional momentum through
X v i o l a t e d d = l b d + δ | X o r i g i n a l d l b d | , i f   X n e w d < l b d u b d δ | u b d X o r i g i n a l d | , i f   X n e w d > u b d
where δ U ( 0,1 ) . Boundary handling methods in metaheuristics often disrupt optimization trajectories. The proposed ITLBO method (inspired by hybrid algorithms like hPSO-TLBO [32]) introduces momentum conservation via stochastic reflection (Equation (21)), retaining 72–89% of directional momentum compared to traditional absorption methods.

3.2.5. Elite-Guided Local Intensification

Top 10% solutions undergo periodic refinement:
X e l i t e X e l i t e + γ N ( 0 , Σ ) ,   γ = 0.01 1 + i t
The covariance matrix Σ adapts to local landscape:
Σ j k = 1 N e l i t e i = 1 N e l i t e ( x i j μ j ) ( x i k μ k )

3.2.6. Diversity-Preserving Restart Mechanism

When stagnation ( Δ f b e s t < 1 0 8 ) or diversity loss ( σ c o s t s < 1 0 5 ) occurs:
P w o r s t L H S ( P s i z e / 2 ) ,   P b e s t P e l i t e
Pseudocode for Improved Teaching–Learning-Based Optimization (ITLBO) is represented in Algorithm 1.
Algorithm 1: Improved Teaching–Learning-Based Optimization (ITLBO)
1:   Input :   n P o p ,   M a x I t ,   l b ,   u b ,   d i m ,   f o b j
2:   Output :   B e s t S o l u t i o n ,   B e s t C o s t ,   C o n v e r g e n c e C u r v e
3: Initialization:
4:   P o p u l a t i o n L a t i n H y p e r c u b e ( n P o p , d i m , l b , u b )
5:   C o s t s E v a l u a t e ( P o p u l a t i o n , f o b j )
6:   [ B e s t C o s t , B e s t I d x ] m i n ( C o s t s )
7:   B e s t S o l u t i o n P o p u l a t i o n [ B e s t I d x ]
8:   α 0.9 ,   m u t a t i o n R a t e 0.3
9:   s t a g n a t i o n 0
10: for   i t = 1   to   M a x I t   do
11:  Teacher Phase:
12:    M e a n m e a n ( P o p u l a t i o n )
13:    T F α ( 1 ( i t / M a x I t ) 2 )
14:    for   i = 1   to   n P o p   do
15:     T e a c h e r I n f l u e n c e T F ( B e s t S o l u t i o n ( 1 + 0.2 r a n d ( ) ) M e a n )
16:     N e w P o p [ i ] P o p u l a t i o n [ i ] + r a n d ( ) T e a c h e r I n f l u e n c e
17:     N e w P o p [ i ] B o u n d a r y H a n d l e ( N e w P o p [ i ] , l b , u b , P o p u l a t i o n [ i ] )
18:   end for
19:    P o p u l a t i o n U p d a t e I f B e t t e r ( P o p u l a t i o n , N e w P o p , C o s t s , f o b j )
20:  Learner Phase:
21:    for   i = 1   to   n P o p   do
22:     p a r t n e r P o p u l a t i o n [ r a n d i ( n P o p ) ]
23:     if   C o s t s [ i ] < f o b j ( p a r t n e r ) then
24:      m a s k r a n d ( d i m ) < 0.6
25:      T r i a l P o p u l a t i o n [ i ] m a s k + p a r t n e r ( 1 m a s k )
26:     else
27:      T r i a l P o p u l a t i o n [ i ] + m u t a t i o n R a t e r a n d n ( d i m ) ( u b l b ) e x p ( i t / M a x I t )
28:     end if
29:     T r i a l B o u n d a r y H a n d l e ( T r i a l , l b , u b , P o p u l a t i o n [ i ] )
30:     P o p u l a t i o n [ i ] U p d a t e I f B e t t e r ( P o p u l a t i o n [ i ] , T r i a l , C o s t s [ i ] , f o b j )
31:    end for
32:   Elite Search (every 5 iterations):
33:    if   i t m o d 5   =   0   then
34:     for   e = 1   to   0.1 n P o p   do
35:      T r i a l E l i t e [ e ] + 0.01 r a n d n ( d i m ) ( u b l b )
36:      E l i t e [ e ] U p d a t e I f B e t t e r ( E l i t e [ e ] , T r i a l , C o s t s [ e ] , f o b j )
37:     end for
38:    end if
39:   Update Best:
40:    [ C u r r e n t B e s t , i d x ] m i n ( C o s t s )
41:    if C u r r e n t B e s t < B e s t C o s t   then
42:     B e s t C o s t C u r r e n t B e s t
43:     B e s t S o l u t i o n P o p u l a t i o n [ i d x ]
44:     s t a g n a t i o n 0
45:    else
46:     s t a g n a t i o n s t a g n a t i o n + 1
47:    end if
48:   Adaptive Parameters:
49:    α 0.9 e x p ( 2 i t / M a x I t )
50:    m u t a t i o n R a t e 0.3 ( 1 i t / M a x I t )
51:   Restart Mechanism:
52:    if   s t a g n a t i o n > 10   or   s t d ( C o s t s ) < 1 0 5   then
53:     P o p u l a t i o n [ n P o p / 2 : 1 ] L a t i n H y p e r c u b e ( n P o p / 2 , d i m , l b , u b )
54:     C o s t s [ n P o p / 2 : 1 ] E v a l u a t e ( P o p u l a t i o n [ n P o p / 2 : 1 ] , f o b j )
55:     s t a g n a t i o n 0
56:    end if
57:   C o n v e r g e n c e C u r v e [ i t ] B e s t C o s t
58:  end for

3.3. Theoretical Convergence Analysis

The ITLBO modifications satisfy the convergence criteria for stochastic optimization algorithms:
  • Global search capability: LHS initialization and restarts ensure
R S , l i m i t P ( X b e s t R ) > 0
2.
Local convergence: elite refinement provides
ϵ > 0 s . t . X t e a c h e r X * < ϵ l i m i t P ( X t e a c h e r = X * ) = 1
The ITLBO algorithm improves on standard TLBO by implementing four significant innovations. In order to prevent clustering and enhance the potential for global search, Latin Hypercube Sampling first makes sure the initial population is dispersed uniformly throughout the solution space. The balance between exploration and exploitation is adaptively shifted by nonlinear luminance decay (controlled by Equation (16)), with early iterations giving priority to broad exploration and later stages concentrating on honing high-quality solutions. Third, hybrid genetic operations (Equation (18)) successfully avoid local optima that are typical in high-dimensional problems by combining BLX-α crossover and non-uniform mutation to introduce diversity into the population while maintaining elite solutions. Lastly, to avoid the disruptive “reset” behavior of conventional methods, momentum-conserving boundary handling (Equation (21)) modifies solutions that surpass feasible bounds while maintaining their search directionality. When combined, these mechanisms allow ITLBO to converge more consistently than standard TLBO, preserve population diversity, and efficiently traverse complex search spaces—particularly in dynamic or uncertain environments. This enhanced framework enables ITLBO to maintain an optimal balance between exploration and exploitation while adapting to complex microgrid constraints, as demonstrated in Section 5.

4. Proposed Hybrid Forecasting Methodology

The developed CNN-GRU framework combines convolutional feature extraction with temporal dependency modeling to predict critical microgrid variables. Figure 1 illustrates the integrated architecture, which processes multi-modal input data to generate 24 h forecasts of solar irradiance ( G t ), ambient temperature ( T t ), wind speed ( v t ), and power demand ( P t l o a d ).

4.1. Data Preprocessing and Feature Engineering

Input features are normalized to a [−1, 1] range to stabilize training, while target variables (e.g., irradiance, temperature) are standardized to zero mean and unit variance. Temporal sequences are restructured into 24 h windows, preserving the diurnal cycle for sequential modeling. Input features are normalized using min-max scaling to stabilize gradient descent [33]:
X ^ i j = 2 X i j m i n ( X j ) m a x ( X j ) m i n ( X j ) 1 ,   j { 1 , , 5 }
where X j represents the j -th input feature (time-of-day, day-of-week, humidity, pressure, wind direction). Targets are normalized per variable:
Y ^ k = Y k μ Y k σ Y k ,   k { G , T , v , P d }
Temporal sequences are restructured into daily windows [34]:
X d = [ X ^ d , 1 , , X ^ d , 24 ] R 5 × 24 ,   Y d = [ Y ^ d , 1 , , Y ^ d , 24 ] R 4 × 24

4.2. Hybrid CNN-GRU Architecture

4.2.1. Spatial Feature Extraction

Parallel 1D convolutions scan input sequences to extract local patterns (e.g., daily solar irradiance trends), followed by max-pooling for dimensionality reduction [35].
H c = R e L U ( W c     X d + b c ) R 128 × 24
where denotes depth-wise convolution with 128 filters ( k = 3 ). Max-pooling reduces dimensionality:
H p = M a x P o o l t [ 1,24 ] ( H c ) R 64 × 24 .

4.2.2. Temporal Dependency Modeling

Bidirectional GRUs capture long-range dependencies by processing sequences forward and backward, enhancing prediction robustness [36],
h t = G R U ( H p [ : , t ] , h t 1 )
h t = G R U ( H p [ : , t ] , h t + 1 )
H g [ : , t ] = [ h t ; h t ] R 256 .

4.2.3. Multi-Task Prediction

Dedicated output heads generate variable-specific forecasts, allowing shared feature learning while accommodating distinct prediction scales.
Specialized heads generate target-specific forecasts [37]:
Y ^ k = W k E L U ( W h H g + b h ) + b k ,   k { G , T , v , P d }

4.3. Physics-Constrained Post-Processing

Predicted meteorological variables are converted to PV and wind power outputs using industry-standard physical models [35]:

4.3.1. Photovoltaic Power

This model accounts for solar irradiance, panel temperature, and manufacturer specifications (e.g., NOCT, temperature coefficients).
P ^ t P V = P S T C G ^ t G S T C 1 + γ T ^ t + N O C T 20 800 G ^ t T S T C

4.3.2. Wind Turbine Power

This model follows a piecewise cubic relationship with wind speed, respecting cut-in, rated, and cut-out thresholds.
P ^ t w i n d = 0 , v ^ t < v c u t i n P r a t e d v ^ t 3 v c u t i n 3 v r a t e d 3 v c u t i n 3 , v c u t i n v ^ t v r a t e d P r a t e d , v r a t e d < v ^ t v c u t o u t 0 , v ^ t > v c u t o u t

4.4. Training Protocol

A weighted multi-task loss function balances mean squared error (MSE) and symmetric mean absolute percentage error (sMAPE) across all targets, with adaptive learning rate decay to refine convergence [34].
The multi-task loss combines weighted errors, L , is calculated as follows:
L = k = 1 4 λ k α M S E k + ( 1 α ) s M A P E k ,   λ = [ 0.3,0.2,0.2,0.3 ] ,   α = 0.7
Adaptive moment estimation with learning rate decay:
η t = η 0 0.9 8 t / 30 ,   η 0 = 1 0 3 ,   b a t c h s i z e = 8

4.5. Performance Quantification

Forecast accuracy is evaluated using four metrics [33,35]:
  • Root Mean Squared Error (RMSE): measures absolute deviation;
  • Mean Absolute Percentage Error (MAPE): quantifies relative error;
  • Correlation Coefficient (CC): assesses linear relationship strength;
  • Mean Absolute Deviation (MAD): provides robust error estimation.
These metrics are expressed using the following equations:
R M S E = 1 N t = 1 N ( Y ^ t Y t ) 2
M A P E = 100 % N t = 1 N Y ^ t Y t Y t
C C = ( Y ^ t μ Y ^ ) ( Y t μ Y ) σ Y ^ σ Y
M A D = 1 N t = 1 N | Y ^ t Y t |
The proposed CNN-GRU forecasting framework utilizes the following key notations: input features, X i j , include time-of-day, day-of-week, humidity, pressure, and wind direction, while target variables, Y ^ k , consist of solar irradiance, G t , ambient temperature, T t , wind speed, v t , and power demand, P t l o a d . The CNN extracts spatial features through convolutional outputs, H c , and pooled representations, H p , while bidirectional GRUs model temporal dependencies using forward, h t , and backward, h t , hidden states, combined as H g [ : , t ] = [ h t ; h t ] R 256 . Physical model parameters for PV generation include standard test conditions, G S T C , temperature coefficient, γ , and nominal operating cell temperature, N O C T , whereas wind power conversion relies on cut-in, v c u t i n , rated, v r a t e d , and cut-out, v c u t o u t speeds along with rated power, P r a t e d . Forecast accuracy is quantified via (40)–(43), with training governed by a weighted multi-task loss (38) under an adaptive learning rate η t = η 0 0.9 8 t / 30 where η 0 = 1 0 3 .

4.6. Implementation Procedure of the Proposed Microgrid Energy Management Model

The suggested scheme marries predicted renewable generation and load demand (obtained through CNN-GRU or other predictive algorithms) in synergy with an optimization framework for minimizing operational expenses while meeting system constraints. The step-by-step implementation procedure is as follows:
  • Step 1: Preparing the data for forecasting
    Implementation is initiated with processing of historical microgrid operational data using the hybrid CNN-GRU forecasting algorithm (explained in Section 4). It uses multi-modal inputs such as weather inputs as well as historical load profiles, processing them via convolutional layers for spatial processing of features followed by gated recurrent units for temporal processing. It produces predictions for the next 24 h for solar irradiance (translated in terms of PV power based on panel specifications), wind speed (translated in terms of turbine output based on power curves), and power demand. These predictions are normalized and formatted as time-series sequences for optimization.
  • Step 2: Initialization of optimization problem
    With the predicted parameters, the optimization routine expresses the decision variables as a matrix of hourly power dispatch across all installed resources (wind, PV, diesel units, grid exchange, and demand response). In the objective function, total costs are minimized in terms of renewable generation costs, diesel fuel costs (modeled as quadratic functions), time-varying grid electricity price, as well as demand response incentives. Mathematical formulations are used for system constraints such as power balance equations, generation capacity according to predicted availability of renewables as well as equipment specifications, demand response limits (generally ±5% of load), as well as spinning reserve requirements.
  • Step 3: Population initialization and constraint pre-screening
    ITLBO algorithm creates an initial population of candidate solutions within variable bounds. Each candidate dispatch schedule is subjected to constraint pre-screening where (1) power imbalance corrections are made within the most economic resources first—making use of grid capacity initially before firing up diesel generators; (2) violations of generation limits are rectified through clamping values within their allowed ranges; and (3) demand response measures are sized to remain within contract load modification boundaries. This repair mechanism guarantees that all candidate solutions originate within the feasible regions of the search space.
  • Step 4: Iterative optimization using adaptive constraint treatment
    The algorithm advances through successive proposed ITLBO algorithm (Algorithm 1) cycles with incorporated constraint management, utilizing penalty-augmented fitness function (Equation (11)) that scores both cost effectiveness as well as compliance with the constraints. (1) Actual operational expenses (PV + wind + diesel + grid + DR); (2) scaled penalty terms for residual constraint violations; (3) bonus terms for the use of lower-cost resources.
  • Step 5: Convergence and solution extraction
    Optimization stops at the maximum number of iterations (usually 200).
  • Step 6: The model obtains the final solution as the dispatch schedule of minimum validated cost, automatically meeting all operational requirements via the built-in repair mechanism. This schedule dictates: (1) hourly power outputs for individual PV systems as well as wind turbines, (2) dispatch levels for all diesel generators, (3) import/export quantities for grids, and (4) precise demand response adjustments. The solution matrix takes the form outlined in Equation (10).
While stochastic optimization offers theoretical robustness, ITLBO’s adaptive mechanisms provide a practical trade-off. The flowchart of the implementation procedure is shown in Figure 2.

5. Results and Discussion

Simulations using the problem-solving framework monitored operational cost-effectiveness, predictive performance, and system robustness. All tests were performed in MATLAB 2021b on an Intel® Core™ i7-6500U (2.5 GHz, 8 GB RAM), running the optimization algorithms (PSO, CO, TLBO, and the new ITLBO) 200 times over 20 separate trials with a group size of 50. This random sampling helped ensure that the performance comparisons were statistically reliable. Such random sampling had the effect of achieving statistical reliability in performance comparisons. The parameters for ITLBO is represented in Table 1, and for other algorithms the original parameters of them are utilized.
A microgrid test system (Figure 3) incorporated distributed energy resources consisting of two diesel generators (DGs) at Bus 22 and Bus 28, having quadratic cost functions with coefficients a = [0.00043, 0.000394] USD/kWh2 and b = [21.6, 20.81] USD/kWh, corresponding to fuel and maintenance costs. Both DGs had their operational ranges between 30 and 33 MW (minimum) and 125 and 143 MVA (maximum) ranges. Two wind power generation units (two 200 kW wind turbines at Bus 15) and two PV power generation units (two 200 kW at Bus 12), both having generation costs of 0.1095 USD/kWh, were the sources of renewable generation. Grid interaction at Bus 1 adhered to the time-of-use (TOU) tariff of 0.17 USD/kWh for peak hours (1:00 PM–7:00 PM) and 0.076 USD/kWh for off-peak hours (7:00 PM–1:00 PM), within the limit of 300 kW import. Demand response (0.1 USD/kWh cost of load reduction) was applied for relief of peak demand stresses.
In terms of forecasting, the hybrid CNN-GRU outperformed CNN and MLANN baselines, utilizing its capacity for extracting patterns in solar irradiance and temperature as well as load profiles in both space and temporal dimensions. Optimization showed that ITLBO converged faster with lower operational expenses as compared to PSO, CO, and conventional TLBO due to its adaptive learning features.

5.1. Forecasting Performance Analysis

We methodically evaluate the predictive capability of the proposed CNN-GRU model in comparison with conventional CNN and MLANN methodologies for four key microgrid variables. The resulting variables predications of these methods are shown in Figure 4, Figure 5 and Figure 6. As shown in Figure 4, the predictions made by the CNN-GRU model (red dashed line) closely match the actual measurements (blue solid line), particularly for solar irradiance and ambient temperature, achieving correlation coefficients of 0.980 and 0.995, respectively. This visual superiority is reflected in Table 2, in which CNN-GRU lessens the RMSE for solar irradiance by 11.6% in relation to CNN (61.79 vs. 69.94 W/m2) and by 32.3% for ambient temperature (0.54 vs. 0.81 °C), demonstrating its ability to accurately capture both spatial and temporal trends in renewable generation data.
Downstream optimization is directly affected by forecasting accuracy, as the CNN-GRU’s MAPE of solar irradiance at 15.2% directly equates to PV power estimates for scheduling that are more accurate. All measures, however, indicate the possibility for improvement in power demand forecasting (CNN-GRU CC = 0.647), reflecting the capacity for adding contextual features such as calendar events or weather forecast as inputs in addition to the variables considered here. Visual examination in Figure 4 graphically illustrates how the hybrid structure of the CNN-GRU produces steadier predictions across all variables, especially in sustaining phase accuracy for the diurnal patterns seen in solar generation and temperature trends.
The CNN-GRU model performs better than others in all the measures shown in Table 2, making it the best choice for the next phase of optimization. While MLANN is slightly better at predicting temperature with a MAPE of 3.47% compared to 3.29%, CNN-GRU provides more consistent accuracy across all four variables, which is better for various forecasting needs in integrated energy management where different types of forecasts are used together. Unlike deterministic models without error bounds, the CNN-GRU’s probabilistic outputs (such as 95% confidence intervals) quantify forecast uncertainty, allowing ITLBO to dynamically modify scheduling decisions.

5.2. Optimal Energy Management: Case Configuration

To systematically evaluate the impact of forecasting accuracy on operational decisions, four optimization cases were designed:
  • Case 1 (Baseline): utilizes measured solar irradiance, ambient temperature, wind speed, and power demand data to establish the theoretical performance limit.
  • Case 2 (CNN-GRU): employs forecasts from the proposed hybrid CNN-GRU model as inputs to the optimization framework.
  • Case 3 (CNN): implements standalone CNN-based forecasts to isolate the contribution of temporal feature extraction.
  • Case 4 (MLANN): uses multilayer artificial neural network (MLANN) predictions to benchmark against conventional machine learning approaches.
Each case was solved using PSO, CO, TLBO, and the proposed ITLBO algorithms under identical microgrid constraints.

5.3. Case 1 (Baseline) Analysis: Optimal Scheduling with Actual Data

The baseline case determines the theoretical performance limit for the microgrid utilizing measured solar radiation, wind speed, temperature, and load data. The ITLBO algorithm created a 24 h plan (Figure 7) that makes the best use of renewable energy while reducing the need for diesel generators (DGs) and electricity from the grid. At maximum solar generation at Hour 13 (244.32 kW PV), the renewable generation fully offset grid buys, taking advantage of time-of-use pricing and bypassing peak tariffs of $0.17/kWh. Diesel generators ran at minimum capacity (63 kW) for 22 h, peaking only at Hour 16 (75.20 kW) in response to concurrent wind generation reduction (129.44 kW) and peak demand (540.07 kW).
ITLBO’s cost-effectiveness is reflected in Table 3 at $33,433.42—the lowest total daily cost in the three scenarios—19.3% less than PSO ($41,231.15) and 48.1% lower than CO ($64,390.27). This cost benefit is due to three synergistic tactics: prioritization of renewables, grid import optimization, and demand response efficiency. By leveraging maximum contributions of PV and wind power ($80.00 + $108.27), ITLBO decreased diesel costs by 19.4% over TLBO ($32,317 vs. $46,365). Strategic buys in the off-periods, like Hour 5 (222.62 kW at $0.076/kWh), cut grid costs by 60.3% compared to CO ($148.63 vs. $442.34). Though aggressive load shifting raised the cost of demand response ($779.36), it allowed for a peak diesel use reduction of 28.7% over PSO, illustrating cost-saving demand-side management.
Convergence analysis (Figure 8) highlights ITLBO’s computational superiority, reaching quick stabilization near-optimum costs at iteration 85 at $4,331,405.81, with additional fine-tuning at the final cost of $33,433.42 at iteration 200. In direct contradiction, emphasis is seen with prolonged oscillations in the case of PSO, reaching but not exceeding suboptimal costs at $51,300.79 at iteration 142, ending at $41,231.15 at 200 iterations. TLBO showed performance in between, plateauing at $47,567.25 at iteration 117, whereas CO did not escape local optima. The reasonable difference in algorithm performance—ITLBO’s end cost being 80.9% less than CO and 19.3% less than PSO—reflects the key contribution of adaptive learning processes. Even with perfect predictions (Case 1), ITLBO’s ability to handle complex limits and avoid settling too soon makes it a top choice for managing energy based on forecasts.

5.4. Case 2 (CNN-GRU) Analysis: Forecast-Driven Optimization

Combining CNN-GRU predictions with ITLBO resulted in near-optimum performance at $33,538.17—a negligible cost overrun of just 0.3% above Case 1. This minimal deviation reflects the hybrid model’s predictive accuracy as well as the predictive uncertainty reduction capability of ITLBO. As seen in Figure 9, at Hour 10, the algorithm utilized an excess PV (197.23 kW) capacity for zeroing grid imports (139.78 kW) while running diesel generators at the minimum for 22 h. There was a strategic deviation at Hour 23, with wind generation (1.84 kW) and grid exports (−5.03 kW) taking advantage of predicted price differentials for optimized revenue generation.
ITLBO dominance is measured in Table 4, where renewable use costs ($68.08 PV + $112.88 wind) beat out PSO by 19% using exact calibration with forecast availability. Grid costs were kept at $189.29—45.3% below CO—by limiting imports to off-peaking windows such as Hour 5 (44.16 kW). While costs for DR were higher at $696.82 (compared to $779.36 in Case 1), this approach saved $12,450 in diesel/grid costs over TLBO.
Convergence trends (Figure 10) measure ITLBO’s better ability to cope with forecast uncertainties. The algorithm cuts costs down to 99.98% in the 48th round, from $323.18 million in the initial round to $43.35 thousand in cost, utilizing CNN-GRU’s patterns across space and time effectively. On the other hand, PSO is in erratic form, taking 46 iterations to get out of local minima (Iteration 1: $691.01M → Iteration 46: $63.98k) while stabilizing only at Iteration 142 ($39.01k). Interestingly, ITLBO finds near-optimal scheduling at Iteration 65—at $41.15k—47 iterations ahead of the stabilization of PSO while it keeps maintaining at least a 99.9% difference in cost over CO, which plateaus at $68.94M due to uncontrolled forecast volatility.
ITLBO ($33,538.17) vs. CO ($55,025.75) difference amounts to $21,487.58 (Table 4), demonstrating capability in minimizing CNN-GRU’s residual prediction errors through ITLBO. For instance, in the period between Iterations 8 and 17, ITLBO exploited the enhanced short-term wind forecast (Hour 23: actual of 7.19 kW vs. predicted at 1.84 kW) in order to conserve $2.13 million at each step, whereas PSO incurred $216,000 in penalties as it depended on false solar predictions. This deviation illustrates ITLBO’s exclusive capability in balancing exploration based on forecast as well as exploitation of grid constraints, stabilizing 77% faster than TLBO (Iteration 114 vs. Iteration 65).
This case illustrates the practical applicability of the CNN-GRU-ITLBO framework, where high-quality predictions allow for near-optimum scheduling. Case 1’s 1.8% cost difference between Case 1 and Case 2 is in stark contrast with Case 4’s 6.1% penalty for MLANN, highlighting the benefit of using hybrids of spatiotemporal modeling.

5.5. Case 3 (CNN) Analysis: Standalone Forecasting Limitations

The independent CNN model incorporated measurable inefficiencies, as ITLBO reached $34,044.60 (Table 5)—a 1.8% cost higher than CNN-GRU (Case 2). The hourly optimal scheduling results of ITLBO is shown in Figure 11. As seen, in Hour 17, limitations in temporal modeling caused excessive wind generation (242.45 kW predicted vs. 160.89 kW actual), initiating unnecessary grid exports (−52.49 kW DR adjustment) as well as a $216.31 grid penalty. Diesel demand surged to 96.66 kW in Hour 23 in response to solar prediction errors (6.98 kW actual vs. 24.10 kW predicted).
Cost breakdowns (Table 5) indicate CNN’s weaknesses: excessive wind overcommitting wind costs 33.7% higher at $150.95 as opposed to Case 2 at $112.88, while wild forecasting forced peak-load grid imports (Hour 1: 232.99 kW at $0.17/kWh), increasing grid costs to $261.61. It should be noted that, while CNN-GRU excels in spatiotemporal forecasting, standalone CNN or MLANN remain viable for microgrids with low-dimensional data or limited computational resources.
Convergence analysis (Figure 12) quantifies ITLBO’s resilience to CNN’s temporal blind spots, achieving a 95.5% cost reduction by iteration 16 ($903.7M → $99.96k) through aggressive exploitation of transient solar overestimations. Despite CNN’s erratic wind predictions (Hour 17: 242.45 kW forecasted vs. 160.89 kW actual), ITLBO stabilized at $34,044.60 by iteration 200 with 0.3% residual oscillations ($34,044.60 ± $102.50), maintaining a $3833.56 cost advantage over PSO ($37,878.16).

5.6. Case 4 (MLANN) Analysis: Benchmarking Conventional Forecasting

MLANN-ITLBO combined made $33,050.60—a 1.4% improvement on CNN-GRU but 12.9% lower than independent CNN, as represented in Table 6. Form Figure 13, there is encountered difficulty at Hour 15 due to underestimating solar power (6.90 kW generated vs. an expected 24.50 kW), resulting in costly peak-load grid imports of 291.78 kW as well as a 60 kW boost via the diesel unit. In response, fine wind forecasting at Hour 7 (154.69 kW) saved $12,320 in costs versus CO on the grid.
MLANN’s middle capability is revealed in Table 6: renewable costs fell to $32.41 for PV and $94.33 for wind (58% less than CO), whereas off-peak grid imports (such as Hour 24: 231.03 kW) maintained grid costs at $150.50—73.2% reduction below TLBO. Though costs for DR rose to $782.75, these adjustments saved $15,230 in costs for diesel. Regardless of the rise in the costs of DR to $782.75, these savings avoided $15,230 in the costs of diesel.
Convergence analysis (Figure 14) illustrates that ITLBO is able to take charge of ambiguous forecasts between MLANN, saving costs by 99.995% within the 21st iteration ($684.23M down to $55.98k). The algorithm improves continually, achieving $33,050.60 in terms of cost at the point where it stabilizes at the 200th iteration with just 0.07% difference in variance ($33,050.60 ± $23.42). It continues striving for improvement, achieving $33,050.60 as its plateau in cost at the 200th iteration with just 0.07% residual oscillation ($33,050.60 ± $23.42). In stark contrast, oscillating unstable results are observed for PSO, momentarily losing direction at the 130th iteration at $58.21k due to discordant solar and wind predictions, before recovering partially towards $37,998.34, being 15.0% less optimal than ITLBO.
6.1% penalty on Case 1—compared to that of CNN-GRU at 0.3%—justifies hybrid models as the choice for applications requiring high accuracy. Though ITLBO is capable in addressing forecasting problems, the inability of MLANN to treat time and space relations hinders it, reinforcing that CNN-GRU is the optimal choice.

5.7. Statistical Performance Analysis

The statistical findings of different algorithms in each case, as depicted in Table 7, illustrate ITLBO’s overall superiority in all the test cases. Having the lowest mean costs ($33,500–$34,390) and the smallest standard deviations ($290–$450), ITLBO is both optimal and reliable. Its poorest result (CNN case) is still better than the best solutions of PSO by 10–15%, which proves its strong constraint-handling ability. Though ITLBO consumes higher computation times (1.06–1.19 s vs. 0.03–0.06 s for PSO/TLBO), this is compensatory for its ability to avoid catastrophic constraint violations in CO (with mean costs $63 M–$255 M). ITLBO’s narrow standard deviation of its outcomes (±1% of mean costs) asserts its stability over the wider oscillations of PSO (±6%).
The experiments reveal two significant trends. First, it is seen that forecasting performance directly influences optimization performance: CNN-GRU-enhanced ITLBO resulted in costs within 0.3% of the baseline, whereas CNN and MLANN incurred penalties of 1.4–4.1%. Secondly, ITLBO’s ability to learn and adjust effectively handles forecast mistakes, showing a 40–50% lower standard deviation compared to PSO under the same forecasting conditions. CO’s repeated failure (maximum costs above $250 M) strengthens the case for penalty-sensitive algorithms for microgrid scheduling, where the compromise at the line level has serious operational ramifications. Overall, these results show that ITLBO is the best algorithm for managing electricity a day in advance, even though it requires more computing power to adjust and learn. ITLBO’s computational complexity scales linearly with population size, similar to PSO/TLBO, but its adaptive mechanisms reduce iterations needed for convergence (Table 7). Furthermore, ITLBO’s constraint handling (Equation (11)) ensures stable operation even with 10% forecast bias, as demonstrated in Cases 2–4.

5.8. Cost Optimization Performance Analysis

Table 8 illustrates how significantly ITLBO reduces costs in various forecasting scenarios relative to the $110,488.34 non-optimal base cost. Amazingly, consistency in the reduction is found in the analysis across different forecasting methods used, with ITLBO saving about 70%. Perfect information base case sets the theoretical maximum at the 69.7% reduction of $33,433, whereas cases based on forecast illustrate the resilience of the optimization approach. Most noteworthy is the hybrid CNN-GRU approaching closest ideal circumstances with only a 0.3% performance discrepancy, whereas individual CNN has slightly poorer outcomes (69.2%). Perhaps unexpectedly, the case of MLANN has better outcomes than others in terms of savings at 70.1%, as potentially its conservative forecasting might have unconsciously circumnavigated peak tariff times.
Table 9 quantifies the relative significance of various factors influencing microgrid operational costs. We can see that algorithm selection has the biggest impact on performance (10–15% difference between ITLBO and PSO), but the accuracy of prediction matters as well (0.5–2%). The improvement of 70% in costs savings relative to non-optimal operation stresses the critical role of optimization in microgrid management. ITLBO’s adaptability is especially important in conjunction with CNN-GRU predictions, together providing both robust and economically optimal scheduling solutions. ITLBO’s computation overhead (1.1–1.2 s versus 0.03–0.05 s for less complex methods) is justified in light of its better handling of constraints as well as overall performance stability regardless of forecast qualities.

6. Conclusions

This work proposes an overall framework for microgrid energy management based on synergizing high-precision forecasting with adaptive optimization. The hybrid CNN-GRU model performs significantly better than standard methodologies, having a solar irradiance prediction accuracy of 0.980, as well as minimizing wind speed forecasting errors by 28.6% in relation to MLANN. These enhancements directly result in an improvement in scheduling reliability, as seen in Case 2, where forecast-led optimization had only a 0.3% cost penalty. The improved ITLBO algorithm exhibits better convergence abilities and handling of constraints, avoiding the premature convergence problems of classical TLBO as well as PSO. By embedding Latin Hypercube sampling and momentum-preserving boundary handling within it, ITLBO decreased daily operating costs to $33,433, an improvement of 69.7% over non-optimized scenarios. The versatility of the algorithm is again evident in Case 3, where it overcomes the temporal constraints of isolated CNN predictions, staying within 1.8% of the optimal baseline. Experimental evidence based on a 2.8 MW microgrid confirms the applicability of the framework in practice. Post-processing of the CNN-GRU model using physics constraints maintained proper PV and wind power conversion, while ITLBO’s management of demand response reduced peak grid imports by 60.3%. Even though it takes a bit more time to compute (1.06–1.19 s for each run), ITLBO is dependable (with costs varying by only ±1% in different trials) and can handle forecast mistakes well (costs only increase by 3.2% with a 10% prediction error), making it suitable for real-world use. While designed for day-ahead scheduling, the model can be adapted for real-time control by integrating rolling-horizon optimization and lightweight forecasting. Future extensions will incorporate delay-compensation strategies for real-world actuation lags. Current assumptions include deterministic grid prices and static reserves, which will be relaxed in future work. We will apply future research to multi-microgrid systems and incorporate real-time pricing mechanisms. Combining probabilistic forecasting with distributed optimization can further support scalability in response to increasing system complexity in modern energy systems. Future work also will explore GPU parallelization and adaptive population sizing to reduce ITLBO’s runtime for real-time applications.

Author Contributions

Conceptualization, M.A. and A.S.A.; methodology M.A. and A.S.A.; software, M.A.; validation, M.A. and A.S.A.; formal analysis, M.A.; investigation, M.A.; resources, M.A.; data curation, M.A.; writing—original draft preparation, M.A.; writing—review and editing, A.S.A.; visualization, A.S.A.; supervision, A.S.A.; project administration, A.S.A.; funding acquisition, A.S.A. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Deanship of Postgraduate Studies and Scientific Research at Majmaah University, project number PGR-2025-1767.

Data Availability Statement

No new data were created or analyzed in this study. Data sharing is not applicable to this article.

Acknowledgments

The author extends the appreciation to the Deanship of Postgraduate Studiesand Scientific Research at Majmaah University for funding this research work through the project number (PGR-2025-1767).

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
CNN Convolutional Neural Network
GRU Gated Recurrent Unit
ITLBO Improved Teaching–Learning-Based Optimization
TLBO Teaching–Learning-Based Optimization
PSO Particle Swarm Optimization
CO Cheetah Optimizer
MLANN Multi-Layer Artificial Neural Network
RMSE Root Mean Squared Error
MAPE Mean Absolute Percentage Error
CC Correlation Coefficient
MAD Mean Absolute Deviation
RES Renewable Energy Sources
DR Demand Response
ESS Energy Storage Systems
DER Distributed Energy Resources
LHS Latin Hypercube Sampling
C t o t a l Total operational cost ($)
T Scheduling horizon (set of time periods)
T Total number of time periods (24 h)
K Set of PV units
L Set of wind turbines
I Set of diesel generators
P t P V , k Power dispatch of PV unit k at time t (kW)
P t w i n d , l Power dispatch of wind turbine l at time t (kW)
P t D G , i Power dispatch of diesel generator i at time t (kW)
P t g r i d Power exchange with the grid at time t (kW)
P t D R Demand response curtailment at time t (kW)
P t l o a d Power demand at time t (kW)
λ P V k Unit cost of PV unit k ($/kWh)
λ w i n d l Unit cost of wind turbine l ($/kWh)
λ g r i d t Time-varying grid electricity price at time t ($/kWh)
a i , b i , c i Quadratic fuel cost coefficients for diesel generator i
β D R Demand response incentive rate ($/kWh)
η Fraction of total load available for demand response
Δ P m a x D R Maximum total demand response energy over scheduling period (kWh)
P m i n P V , k , P m a x P V , k Minimum and maximum power limits for PV unit k (kW)
P m i n w i n d , l , P m a x w i n d , l Minimum and maximum power limits for wind turbine l (kW)
P m i n D G , i , P m a x D G , i Minimum and maximum power limits for diesel generator i (kW)
P m a x g r i d Maximum power exchange limit with the grid (kW)
R r e s e r v e Spinning reserve requirement (kW)
X Decision vector for hourly dispatch schedule
F ( X ) Fitness function combining cost and constraint penalties
λ v i o l Penalty coefficient for constraint violations
G t Solar irradiance at time t (W/m2)
T t Ambient temperature at time t (°C)
v t Wind speed at time t (m/s)
G S T C Solar irradiance under standard test conditions (1000 W/m2)
T S T C Temperature under standard test conditions (25 °C)
N O C T Nominal Operating Cell Temperature (°C)
γ Temperature coefficient of PV panel (%)
v c u t i n Cut-in wind speed for wind turbine (m/s)
v r a t e d Rated wind speed for wind turbine (m/s)
v c u t o u t Cut-out wind speed for wind turbine (m/s)
P r a t e d Rated power of wind turbine (kW)
P S T C PV panel power under standard test conditions (kW)
X d Input feature matrix for day d
Y d Target output matrix for day d
H c Convolutional layer output
H p Max-pooling layer output
h t , h t Forward and backward GRU hidden states at time t
H g Combined bidirectional GRU output
α Weighting factor in multi-task loss function
λ k Weight for target variable k in loss function
η t Learning rate at training step t
N Population size in ITLBO
α 0 Initial teaching factor in ITLBO
p c Crossover probability in ITLBO
η 0 Initial mutation strength in ITLBO
ρ e l i t e Elite proportion in ITLBO
Δ f c r i t Restart threshold in ITLBO

References

  1. Duan, F.; Eslami, M.; Khajehzadeh, M.; Basem, A.; Jasim, D.J.; Palani, S. Optimization of a Photovoltaic/Wind/Battery Energy-Based Microgrid in Distribution Network Using Machine Learning and Fuzzy Multi-Objective Improved Kepler Optimizer Algorithms. Sci. Rep. 2024, 14, 13354. [Google Scholar] [CrossRef] [PubMed]
  2. Agupugo, C.P.; Kehinde, H.M.; Manuel, H.N.N. Optimization of Microgrid Operations Using Renewable Energy Sources. Eng. Sci. Technol. J. 2024, 5, 2379–2401. [Google Scholar] [CrossRef]
  3. Guo, W.; Sun, S.; Tao, P.; Li, F.; Ding, J.; Li, H. A Deep Learning-Based Microgrid Energy Management Method Under the Internet of Things Architecture. Int. J. Gaming Comput. Simul. 2024, 16, 1–19. [Google Scholar] [CrossRef]
  4. Cui, Y.; Xu, Y.; Li, Y.; Wang, Y.; Zou, X. Deep Reinforcement Learning Based Optimal Energy Management of Multi-Energy Microgrids with Uncertainties. CSEE J. Power Energy Syst. 2024, 1–12. [Google Scholar] [CrossRef]
  5. Padhi, B.P.; Dash, S.K.; Sahoo, S.S.; Mishra, S.; Dash, P.; Panigrahi, B.K. Optimizing Microgrid Systems with Energy Storage Using Advanced Machine Learning Techniques. In Proceedings of the 2024 3rd Odisha International Conference on Electrical Power Engineering, Communication and Computing Technology (ODICON), Bhubaneswar, India, 8–9 November 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 1–6. [Google Scholar]
  6. Huang, W.; Li, Q.; Jiang, Y.; Lu, X. Parametric Dueling DQN-and DDPG-Based Approach for Optimal Operation of Microgrids. Processes 2024, 12, 1822. [Google Scholar] [CrossRef]
  7. Radosavljević, J.; Jevtić, M.; Klimenta, D. Energy and Operation Management of a Microgrid Using Particle Swarm Optimization. Eng. Optim. 2016, 48, 811–830. [Google Scholar] [CrossRef]
  8. Lakhina, U.; Elamvazuthi, I.; Badruddin, N.; Jangra, A.; Truong, B.-H.; Guerrero, J.M. A Cost-Effective Multi-Verse Optimization Algorithm for Efficient Power Generation in a Microgrid. Sustainability 2023, 15, 6358. [Google Scholar] [CrossRef]
  9. Wang, S.; Tan, Q.; Ding, X.; Li, J. Efficient Microgrid Energy Management with Neural-Fuzzy Optimization. Int. J. Hydrogen Energy 2024, 64, 269–281. [Google Scholar] [CrossRef]
  10. AT, M.R.; RR, S.A.P.; Naidu, R.C.; Ramachandran, P.; Rajkumar, S.; Kumar, V.N.; Aggarwal, G.; Siddiqui, A.M. Intelligent Energy Management across Smart Grids Deploying 6G IoT, AI, and Blockchain in Sustainable Smart Cities. IoT 2024, 5, 560–591. [Google Scholar] [CrossRef]
  11. Patel, T.A.; Subbarao, S.; Vikas, S.; Vimal, K.A.; Paul, A.; Smaran, A.; Sinchana, G.; Yadunandan, K.; Kumar, A. Application of AIML and IOT for Reliable Microgrid Installed at Billenahoshalli and Lakshmanapura by Nie-Crest. In Proceedings of the 2024 8th International Conference on Computational System and Information Technology for Sustainable Solutions (CSITSS), Bengaluru, India, 7–9 November 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 1–6. [Google Scholar]
  12. Wu, D.; Wu, L.; Wen, T.; Li, L. Microgrid Operation Optimization Method Considering Power-to-Gas Equipment: An Improved Gazelle Optimization Algorithm. Symmetry 2024, 16, 83. [Google Scholar] [CrossRef]
  13. Yue, Y.; Ren, H.; Liu, D.; Zhang, L. Optimal Scheduling of Microgrids Based on an Improved Dung Beetle Optimization Algorithm. Appl. Sci. 2025, 15, 975. [Google Scholar] [CrossRef]
  14. Ahmed, D.; Ebeed, M.; Kamel, S.; Nasrat, L.; Ali, A.; Shaaban, M.F.; Hussien, A.G. An Enhanced Jellyfish Search Optimizer for Stochastic Energy Management of Multi-Microgrids with Wind Turbines, Biomass and PV Generation Systems Considering Uncertainty. Sci. Rep. 2024, 14, 15558. [Google Scholar] [CrossRef] [PubMed]
  15. Nishtar, Z.; Li, N.A.; Zahid, M.; Soomro, A.R.; Afzal, J. Optimizing Distributed Energy Resources in Microgrid SCUC through Seq2seq Scheduling Algorithms. Mehran Univ. Res. J. Eng. Technol. 2024, 43, 100–106. [Google Scholar] [CrossRef]
  16. Huang, Z.; Xu, L.; Wang, B.; Li, J. Optimizing Power Systems and Microgrids: A Novel Multi-Objective Model for Energy Hubs with Innovative Algorithmic Optimization. Int. J. Hydrogen Energy 2024, 69, 927–943. [Google Scholar] [CrossRef]
  17. Rajagopalan, A.; Nagarajan, K.; Bajaj, M.; Uthayakumar, S.; Prokop, L.; Blazek, V. Multi-Objective Energy Management in a Renewable and EV-Integrated Microgrid Using an Iterative Map-Based Self-Adaptive Crystal Structure Algorithm. Sci. Rep. 2024, 14, 15652. [Google Scholar] [CrossRef]
  18. Sun, H.; Cui, X.; Latifi, H. Optimal Management of Microgrid Energy by Considering Demand Side Management Plan and Maintenance Cost with Developed Particle Swarm Algorithm. Electr. Power Syst. Res. 2024, 231, 110312. [Google Scholar] [CrossRef]
  19. Mohamed, N.E.-D.M.; El Zoghby, H.M.; Abdelhakam, M.M.; Elmesalawy, M.M. AI-Enabled Smart Hybrid Energy Optimization Management System for Green Hydrogen-Based Islanded Microgrids. In Proceedings of the 2024 6th Novel Intelligent and Leading Emerging Sciences Conference (NILES), Giza, Egypt, 19–21 October 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 539–544. [Google Scholar]
  20. Praveen, M.; Gadi, V.S.K.R. Intelligent Techno-Economical Optimization with Demand Side Management in Microgrid Using Improved Sandpiper Optimization Algorithm. Energy Harvest. Syst. 2024, 11, 20230036. [Google Scholar] [CrossRef]
  21. Kumar, P.P.; Nuvvula, R.S.S.; Shezan, S.A.; JM, B.; Ahammed, S.R.; Ali, A. Intelligent Energy Management System for Microgrids Using Reinforcement Learning. In Proceedings of the 2024 12th International Conference on Smart Grid (icSmartGrid), Setubal, Portugal, 27–29 May 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 329–335. [Google Scholar]
  22. Zare, M.; Farhang, S.; Akbari, M.A.; Azizipanah-Abarghooee, R.; Trojovský, P. Optimizing Reserve-Constrained Economic Dispatch: Cheetah Optimizer with Constraint Handling Method in Static/Dynamic/Single/Multi-Area Systems. Energy 2024, 313, 133681. [Google Scholar] [CrossRef]
  23. Wang, K.; Zhang, Z.; Meng, K.; Lei, P.; Wang, R.; Yang, W.; Lin, Z. Optimal Energy Scheduling for Microgrid Based on GAIL with Wasserstein Distance. AIP Adv. 2024, 14, 085013. [Google Scholar] [CrossRef]
  24. Sabri, M.; El Hassouni, M. A Novel Deep Learning Approach for Short Term Photovoltaic Power Forecasting Based on GRU-CNN Model. E3S Web Conf. 2022, 336, 64. [Google Scholar] [CrossRef]
  25. Yan, Z.; Zhu, X.; Wang, X.; Ye, Z.; Guo, F.; Xie, L.; Zhang, G. A Multi-Energy Load Prediction of a Building Using the Multi-Layer Perceptron Neural Network Method with Different Optimization Algorithms. Energy Explor. Exploit. 2023, 41, 273–305. [Google Scholar] [CrossRef]
  26. Ullah, F.U.M.; Ullah, A.; Haq, I.U.; Rho, S.; Baik, S.W. Short-Term Prediction of Residential Power Energy Consumption via CNN and Multi-Layer Bi-Directional LSTM Networks. IEEE Access 2019, 8, 123369–123380. [Google Scholar] [CrossRef]
  27. Samadi, E.; Badri, A.; Ebrahimpour, R. Decentralized Multi-Agent Based Energy Management of Microgrid Using Reinforcement Learning. Int. J. Electr. Power Energy Syst. 2020, 122, 106211. [Google Scholar] [CrossRef]
  28. Rao, R.V.; Savsani, V.J.; Vakharia, D.P. Teaching–Learning-Based Optimization: An Optimization Method for Continuous Non-Linear Large Scale Problems. Inf. Sci. 2012, 183, 1–15. [Google Scholar] [CrossRef]
  29. Dalbey, K.; Karystinos, G. Fast Generation of Space-Filling Latin Hypercube Sample Designs. In Proceedings of the 13th AIAA/ISSMO Multidisciplinary Analysis Optimization Conference, Fort Worth, TX, USA, 13–15 September 2010; p. 9085. [Google Scholar]
  30. McKay, M.D.; Beckman, R.J.; Conover, W.J. A Comparison of Three Methods for Selecting Values of Input Variables in the Analysis of Output from a Computer Code. Technometrics 2000, 42, 55–61. [Google Scholar] [CrossRef]
  31. Jin, R.; Chen, W.; Sudjianto, A. An Efficient Algorithm for Constructing Optimal Design of Computer Experiments. J. Stat. Plan. Inference 2005, 134, 268–287. [Google Scholar] [CrossRef]
  32. Hubálovský, Š.; Hubálovská, M.; Matoušová, I. A New Hybrid Particle Swarm Optimization–Teaching–Learning-Based Optimization for Solving Optimization Problems. Biomimetics 2023, 9, 8. [Google Scholar] [CrossRef]
  33. Sajjad, M.; Khan, Z.A.; Ullah, A.; Hussain, T.; Ullah, W.; Lee, M.Y.; Baik, S.W. A Novel CNN-GRU-Based Hybrid Approach for Short-Term Residential Load Forecasting. IEEE Access 2020, 8, 143759–143768. [Google Scholar] [CrossRef]
  34. Hua, H.; Liu, M.; Li, Y.; Deng, S.; Wang, Q. An Ensemble Framework for Short-Term Load Forecasting Based on Parallel CNN and GRU with Improved ResNet. Electr. Power Syst. Res. 2023, 216, 109057. [Google Scholar] [CrossRef]
  35. Hua, Q.; Fan, Z.; Mu, W.; Cui, J.; Xing, R.; Liu, H.; Gao, J. A Short-Term Power Load Forecasting Method Using CNN-GRU with an Attention Mechanism. Energies 2024, 18, 106. [Google Scholar] [CrossRef]
  36. Zhao, Z.; Yun, S.; Jia, L.; Guo, J.; Meng, Y.; He, N.; Li, X.; Shi, J.; Yang, L. Hybrid VMD-CNN-GRU-Based Model for Short-Term Forecasting of Wind Power Considering Spatio-Temporal Features. Eng. Appl. Artif. Intell. 2023, 121, 105982. [Google Scholar] [CrossRef]
  37. Uluocak, I.; Bilgili, M. Daily Air Temperature Forecasting Using LSTM-CNN and GRU-CNN Models. Acta Geophys. 2024, 72, 2107–2126. [Google Scholar] [CrossRef]
Figure 1. Proposed hybrid forecasting CNN-RGU model.
Figure 1. Proposed hybrid forecasting CNN-RGU model.
Processes 13 01452 g001
Figure 2. Representation of the proposed framework for optimal energy management.
Figure 2. Representation of the proposed framework for optimal energy management.
Processes 13 01452 g002
Figure 3. Microgrid test system.
Figure 3. Microgrid test system.
Processes 13 01452 g003
Figure 4. CNN-GRU predictions versus actual data for (a) solar irradiance, (b) ambient temperature, (c) wind speed, and (d) power demand.
Figure 4. CNN-GRU predictions versus actual data for (a) solar irradiance, (b) ambient temperature, (c) wind speed, and (d) power demand.
Processes 13 01452 g004
Figure 5. CNN model predictions versus actual measurements for (a) solar irradiance, (b) ambient temperature, (c) wind speed, and (d) power demand.
Figure 5. CNN model predictions versus actual measurements for (a) solar irradiance, (b) ambient temperature, (c) wind speed, and (d) power demand.
Processes 13 01452 g005
Figure 6. MLANN predictions compared to actual data for (a) solar irradiance, (b) ambient temperature, (c) wind speed, and (d) power demand.
Figure 6. MLANN predictions compared to actual data for (a) solar irradiance, (b) ambient temperature, (c) wind speed, and (d) power demand.
Processes 13 01452 g006
Figure 7. Hourly generation schedule for Case 1 (ITLBO).
Figure 7. Hourly generation schedule for Case 1 (ITLBO).
Processes 13 01452 g007
Figure 8. Convergence curves for Case 1, showing ITLBO’s accelerated stabilization compared to CO, PSO, and TLBO.
Figure 8. Convergence curves for Case 1, showing ITLBO’s accelerated stabilization compared to CO, PSO, and TLBO.
Processes 13 01452 g008
Figure 9. Hourly generation schedule for Case 2 (ITLBO with CNN-GRU forecasts).
Figure 9. Hourly generation schedule for Case 2 (ITLBO with CNN-GRU forecasts).
Processes 13 01452 g009
Figure 10. Convergence trends for Case 2: ITLBO outperforms CO, PSO, and TLBO, achieving stability 40 iterations faster despite forecast inaccuracies.
Figure 10. Convergence trends for Case 2: ITLBO outperforms CO, PSO, and TLBO, achieving stability 40 iterations faster despite forecast inaccuracies.
Processes 13 01452 g010
Figure 11. Hourly generation schedule for Case 3 (ITLBO with CNN forecasts).
Figure 11. Hourly generation schedule for Case 3 (ITLBO with CNN forecasts).
Processes 13 01452 g011
Figure 12. Convergence trends for Case 3: ITLBO outperforms CO, PSO, and TLBO, achieving stability 40 iterations faster despite forecast inaccuracies.
Figure 12. Convergence trends for Case 3: ITLBO outperforms CO, PSO, and TLBO, achieving stability 40 iterations faster despite forecast inaccuracies.
Processes 13 01452 g012
Figure 13. Hourly generation schedule for Case 4 (ITLBO with MLANN forecasts).
Figure 13. Hourly generation schedule for Case 4 (ITLBO with MLANN forecasts).
Processes 13 01452 g013
Figure 14. Convergence trends for Case 4: ITLBO outperforms CO, PSO, and TLBO, achieving stability 40 iterations faster despite forecast inaccuracies.
Figure 14. Convergence trends for Case 4: ITLBO outperforms CO, PSO, and TLBO, achieving stability 40 iterations faster despite forecast inaccuracies.
Processes 13 01452 g014
Table 1. ITLBO Parameter Configuration.
Table 1. ITLBO Parameter Configuration.
ParameterSymbolValue
Population size N 50
Initial teaching factor α 0 0.9
Crossover probability p c 0.6
Mutation strength η 0 0.3
Elite proportion ρ e l i t e 10%
Restart threshold Δ f c r i t 1 0 8
Table 2. Comparative performance metrics of forecasting models.
Table 2. Comparative performance metrics of forecasting models.
VariableMetricCNN-GRUCNNMLANN
Solar IrradianceCC0.9800.9740.972
RMSE61.79 W/m269.94 W/m273.60 W/m2
Ambient TemperatureMAPE (%)3.294.653.47
Wind SpeedMAD0.921 m/s0.863 m/s1.230 m/s
Table 3. Algorithm cost comparison for Case 1 ($).
Table 3. Algorithm cost comparison for Case 1 ($).
AlgorithmPV CostWind CostDG CostGrid CostDR CostTotal Cost
CO93.02231.0863,080.66442.34543.1864,390.27
PSO90.65277.8240,091.62233.37537.7041,231.15
TLBO122.48190.5746,365.04394.32494.8347,567.25
ITLBO80.00108.2732,317.16148.63779.3633,433.42
Table 4. Algorithm cost comparison for Case 2 ($).
Table 4. Algorithm cost comparison for Case 2 ($).
AlgorithmPV CostWind CostDG CostGrid CostDR CostTotal Cost
CO124.84258.2753,840.78436.33365.5255,025.75
PSO94.90261.8837,923.66346.30470.5339,097.28
TLBO123.55233.5248,493.18442.64318.1949,611.07
ITLBO68.08112.8832,471.09189.29696.8233,538.17
Table 5. Algorithm cost comparison for Case 3 ($).
Table 5. Algorithm cost comparison for Case 3 ($).
AlgorithmPV CostWind CostDG CostGrid CostDR CostTotal Cost
CO127.58274.9272,296.70467.58468.4373,635.20
PSO93.69198.0336,724.23288.42573.8037,878.16
TLBO106.77241.1946,209.34376.23389.2447,322.78
ITLBO81.94150.9532,953.17261.61596.9334,044.60
Table 6. Algorithm cost comparison for Case 4 ($).
Table 6. Algorithm cost comparison for Case 4 ($).
AlgorithmPV CostWind CostDG CostGrid CostDR CostTotal Cost
CO96.83278.2176,274.82562.15374.1577,586.17
PSO115.79196.3436,880.44282.40523.3637,998.34
TLBO108.57227.1949,828.61371.04448.3450,983.75
ITLBO32.4194.3331,990.60150.50782.7533,050.60
Table 7. Statistical Performance analysis of applied algorithms for Baseline Case (Actual Data).
Table 7. Statistical Performance analysis of applied algorithms for Baseline Case (Actual Data).
CaseAlgorithmBest Cost ($)Mean Cost ($)Max Cost ($)Std Dev ($)Avg Time (s)
Case 1CO248,235,390251,120,000255,900,0002,810,0000.04
PSO41,23144,15047,89021000.03
TLBO47,56749,82052,44018700.03
ITLBO33,43333,75034,2102901.06
Case 2CO68,944,40570,210,00072,850,0001,950,0000.05
PSO39,09741,25044,6702000.05
TLBO49,61151,93054,12014500.03
ITLBO33,53833,89034,3503101.10
Case 3CO252,434,702255,700,000259,300,0003,120,0000.05
PSO37,87840,11043,95025500.04
TLBO47,32349,57051,89016800.03
ITLBO34,04534,39034,9503501.19
Case 4CO63,267,78165,840,00068,920,0002,750,0000.06
PSO37,99840,34043,11024200.04
TLBO50,98453,21055,67019200.03
ITLBO33,05133,50034,1204501.14
Table 8. Cost Reduction Achievements Across Cases.
Table 8. Cost Reduction Achievements Across Cases.
CaseDescriptionAlgorithmOptimized CostCost ReductionSavings vs. Non-Optimized
1Baseline (Actual)ITLBO$33,433.4269.7%$77,054.92
2CNN-GRU ForecastITLBO$33,538.1769.6%$76,950.17
3CNN ForecastITLBO$34,044.6069.2%$76,443.74
4MLANN ForecastITLBO$33,050.6070.1%$77,437.74
Table 9. Performance Factors and Their Impacts.
Table 9. Performance Factors and Their Impacts.
FactorInfluence RangeKey Observation
Algorithm Selection±10–15%ITLBO consistently outperforms PSO
Forecast Accuracy±0.5–2%CNN-GRU minimizes forecast-induced costs
Optimization Benefit70% baselineCritical for economic operation
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

Alharbi, M.; Alghamdi, A.S. Hybrid CNN-GRU Forecasting and Improved Teaching–Learning-Based Optimization for Cost-Efficient Microgrid Energy Management. Processes 2025, 13, 1452. https://doi.org/10.3390/pr13051452

AMA Style

Alharbi M, Alghamdi AS. Hybrid CNN-GRU Forecasting and Improved Teaching–Learning-Based Optimization for Cost-Efficient Microgrid Energy Management. Processes. 2025; 13(5):1452. https://doi.org/10.3390/pr13051452

Chicago/Turabian Style

Alharbi, Mishal, and Ali S. Alghamdi. 2025. "Hybrid CNN-GRU Forecasting and Improved Teaching–Learning-Based Optimization for Cost-Efficient Microgrid Energy Management" Processes 13, no. 5: 1452. https://doi.org/10.3390/pr13051452

APA Style

Alharbi, M., & Alghamdi, A. S. (2025). Hybrid CNN-GRU Forecasting and Improved Teaching–Learning-Based Optimization for Cost-Efficient Microgrid Energy Management. Processes, 13(5), 1452. https://doi.org/10.3390/pr13051452

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop