Abstract
Frequency instability caused by reduced system inertia in inverter-dominated islanded microgrids represents a critical challenge in renewable-integrated power systems. Conventional fixed-parameter controllers exhibit limited adaptability to uncertain and time-varying low-inertia conditions. This paper proposes an LSTM–MPC + VIC framework that embeds a Long Short-Term Memory (LSTM) surrogate predictor directly within a Model Predictive Control (MPC) optimisation loop, coordinated with a Virtual Inertia Controller (VIC) for immediate transient support. The LSTM provides data-driven frequency predictions without requiring precise analytical system modelling, while the VIC supplies reactive inertial damping within the same control cycle. The proposed controller is evaluated against Proportional–Integral–Derivative (PID), PSO-optimised PID, and standard MPC baselines on a 50 Hz islanded microgrid. Results demonstrate the lowest maximum frequency deviation of 0.009748 Hz, fastest settling time of 36.34 s, and minimum integral absolute error of 0.12283 Hz·s among all controllers. A Lyapunov-based Input-to-State Stability (ISS) analysis, incorporating the load disturbance term via Young’s inequality, confirms an ISS ultimate bound of 0.057866 Hz and an effective decay rate of 1.2952 s−1. Robustness is further validated through multi-scenario testing, parametric sensitivity analysis, component ablation, and computational feasibility assessment, confirming suitability for real-time deployment in low-inertia microgrid systems.
1. Introduction
The global transition toward renewable energy systems has accelerated the deployment of islanded microgrids as a viable solution for supplying electricity to remote communities, industrial installations, and geographically isolated power systems. These microgrids comprise local loads, distributed generation units powered by wind and solar, and energy storage systems that must collectively maintain frequency balance without external grid support. Previous studies have examined the participation of renewable energy resources in frequency regulation under islanded operating conditions [1], while the application of virtual inertia control across photovoltaic systems, wind generation, and energy storage units has been investigated to improve frequency stability [2]. Unlike conventional grid-connected systems that benefit from the stabilizing influence of large synchronous generators, islanded microgrids must regulate frequency entirely through local control mechanisms. Earlier investigations demonstrated that without adequate virtual inertia support, microgrid frequency can diverge rapidly under load disturbances and high renewable penetration [3]. Additional studies have further shown that conventional model predictive control alone may be insufficient for maintaining frequency stability in low-inertia microgrids without an appropriate inertia support mechanism [4,5]. Consequently, frequency regulation in renewable-dominated islanded microgrids has emerged as a significantly more challenging control problem.
A major source of this challenge is the decline in effective system inertia as synchronous generators are replaced by inverter-based renewable generation. Conventional synchronous generators inherently provide kinetic energy that mitigates frequency deviations following power imbalances. In contrast, inverter-dominated systems have limited physical inertia, making them highly vulnerable to rapid frequency excursions and instability. Previous studies report that the effective inertia constant in islanded microgrids can drop to as low as H = 0.083 s, compared with H = 2–8 s typically observed in conventional power systems [6]. Such reductions significantly increase the rate of change of frequency (RoCoF) following disturbances and renewable intermittency events. Severe frequency instability has been reported in isolated oceanic microgrids [7], airport microgrids incorporating electric aircraft energy storage systems [8], and urban renewable-dominated islanded networks [9,10]. Existing studies further indicate that conventional fixed-parameter controllers struggle to maintain acceptable regulation performance under low-inertia operating conditions [9,10]. Additional investigations emphasize that adaptive control mechanisms capable of responding to dynamically varying inertia conditions are essential for maintaining stability in inverter-dominated systems [11].
To mitigate the adverse effects of reduced inertia, virtual inertia control (VIC) has been extensively studied as a frequency support strategy. VIC emulates the inertial response of synchronous generators by injecting compensatory power through fast-acting energy storage systems, driven by frequency deviation and RoCoF measurements [3]. Previous studies have shown that intelligently designed virtual inertia mechanisms can significantly improve transient frequency response and enhance stability margins in low-inertia systems [12]. Subsequent work has explored various VIC implementations, including islanded microgrid cluster configurations [13] and active disturbance rejection-based frequency stabilization strategies [14].
Several advanced control strategies have also been integrated with virtual inertia support. Optimized proportional–integral virtual inertia controllers were investigated in [15], yielding improved transient damping during disturbances. A multi-stage, optimized fractional-order fuzzy PID controller was proposed in [16] to enhance robustness under distributed power system operating conditions. Neural-network-assisted fractional-order VICs were shown in [17] to outperform conventional PID approaches under varying microgrid operating conditions. Adaptive virtual synchronous generator strategies were developed in [18] to improve performance under operating uncertainty, while adaptive MPC-assisted virtual inertia frameworks were investigated in [19] to enhance predictive frequency regulation. Intelligent learning-assisted approaches have also been explored extensively. A recurrent fuzzy neural network framework for VIC-assisted microgrid control was developed in [20] and demonstrated improved disturbance response. Robust H∞-based virtual inertia controllers were introduced in [21] to improve disturbance rejection performance. Self-adaptive fuzzy logic-based inertia tuning strategies were investigated in [22], whereas interval type-2 fuzzy adaptive virtual inertia regulation was developed in [23] to address uncertainty and nonlinear operating conditions. Despite these developments, most existing VIC approaches still rely on fixed controller structures or offline parameter-tuning strategies, limiting their adaptability under rapidly varying operating conditions.
Recognizing these limitations, substantial research has focused on optimization-based tuning strategies for frequency regulation in low-inertia microgrids. Convex optimization combined with linear exponential integral regulation was investigated for low-inertia frequency control [24]. Grey Wolf Optimization was applied in [25] to tune internal model controllers for virtual inertia regulation in isolated microgrids. Metaheuristic-based virtual inertia regulation incorporating electric vehicle storage systems was proposed in [26] to improve frequency response flexibility. A sine-augmented arithmetic optimization strategy for frequency regulation enhancement was introduced in [27]. Fractional-order PID control combined with flower pollination optimization was investigated in [28] for microgrid stabilization. The golf optimization algorithm was shown in [29] to perform competitively with PSO and GWO for controller tuning, while a modified golf optimization framework was applied in [30] to multistage PID tuning for islanded microgrid frequency regulation. Nevertheless, these optimization approaches remain fundamentally limited because the resulting controllers retain fixed parameters during operation. As operating conditions evolve, fixed-parameter controllers cannot exploit predictive information or proactively respond to disturbances before observable frequency deviations occur. Previous studies have shown that controller performance deteriorates under changing operating conditions despite robust offline tuning [13,14].
To overcome these limitations, learning-based control approaches have recently attracted significant attention. Neural-network-assisted fractional-order virtual inertia controllers demonstrated improved adaptability compared with conventional PID-based strategies under varying operating conditions [17]. A learning-based virtual inertia controller for renewable-dominated islanded microgrids was proposed in [31] and reported to improve adaptability compared with fixed-parameter approaches. However, the proposed method primarily operated as a standalone adaptive controller without predictive optimization capability. Recurrent neural network-assisted control structures were further shown to improve frequency regulation performance through learned system representations [20]. Despite these advances, most existing learning-based control methods remain reactive rather than predictive.
In parallel, significant advances have been made in learning-based model predictive control frameworks. The feasibility of using Long Short-Term Memory (LSTM) networks as surrogates in model predictive control architectures for nonlinear systems was examined in [32]. An LSTM-assisted GA-PID controller was applied to load-frequency regulation in a two-area hydro-wind power system in [33]. Sufficient conditions for input-to-state stability and closed-loop asymptotic stability in LSTM-assisted MPC systems were established in [34]. Stability analyses were further extended to gated recurrent unit (GRU)-based predictive control frameworks for nonlinear systems in [35]. A broader review of recurrent neural network-based predictive control architectures was presented in [36], including a systematic examination of stability considerations for LSTM- and GRU-assisted control systems. An offset-free nonlinear MPC scheme for systems learned by neural NARX models was further developed in [37]. Robustness and stability properties in data-driven predictive control frameworks were further investigated in [38]. Despite these developments, the application of LSTM-assisted predictive control for frequency stabilization in low-inertia islanded microgrids remains limited.
To clearly position the proposed framework within the existing literature, Table 1 presents a structured comparison of six representative studies. The key differentiator of the proposed approach is the unified integration of five elements not addressed simultaneously in any prior work: (1) an LSTM surrogate predictor embedded directly within the MPC optimization loop at every sampling instant; (2) a VIC coordination layer that provides immediate reactive inertial support within the same control cycle; (3) application to low-inertia islanded microgrids with H = 0.083 s, which is 24 to 96 times lower than in conventional systems; (4) a corrected Lyapunov-based ISS proof that includes the load disturbance term via Young’s inequality; and (5) comprehensive validation combining multi-scenario testing, component ablation, parametric sensitivity, and computational feasibility assessment.
Table 1.
Structured comparison of related learning-based and predictive control studies for frequency regulation in microgrids.
No existing study addresses all five dimensions simultaneously for low-inertia islanded microgrids, confirming the originality and necessity of the proposed LSTM–MPC + VIC framework.
To clarify the contribution of this work, it is essential to emphasize that, unlike existing approaches, this study does not treat learning-based control, virtual inertia, and predictive optimization as independent enhancements. Instead, it integrates these elements into a unified control architecture tailored for low-inertia islanded microgrids. In particular, the LSTM model is embedded directly within the MPC optimization loop to provide real-time predictions, while the virtual inertia control layer provides immediate physical support during transient disturbances. This coordinated design enables both proactive and reactive frequency regulation, addressing the limitations of purely reactive controllers and fixed-parameter optimization methods. Furthermore, the proposed framework is evaluated against a rigorously optimized PSO-PID baseline and supported by comprehensive stability analysis, robustness assessment, and ablation studies, which are not jointly addressed in the existing literature.
To date, the direct integration of a trained LSTM surrogate predictor into a VIC-assisted model predictive control optimization loop for islanded microgrid frequency regulation has not been sufficiently investigated. Existing studies have not simultaneously considered predictive learning-assisted control, rigorously optimized classical baselines, comprehensive multi-scenario robustness evaluation, and formal stability analysis within a unified framework for low-inertia microgrid frequency regulation. The proposed framework is architecturally distinct from the most closely related references: ref. [32] surveys LSTM/GRU-based MPC for general nonlinear systems without addressing microgrid frequency regulation, virtual inertia, or ISS guarantees; and ref. [33] uses an LSTM offline for gain scheduling in a multi-area hydro-wind system rather than as a real-time surrogate within an MPC optimization loop. By contrast, this work embeds the trained LSTM directly within the receding-horizon MPC for a VIC-assisted low-inertia islanded microgrid, provides a formal ISS proof under bounded prediction error and load disturbance, employs a rigorously PSO-optimized PID baseline, and validates through ablation, sensitivity, and multi-scenario analysis, capabilities not jointly present in [32] or [33].
Motivated by the limitations of existing frequency regulation approaches, this paper proposes an LSTM-enhanced model predictive virtual inertia control framework for low-inertia islanded microgrids. The proposed architecture integrates a Long Short-Term Memory (LSTM) network into a Model Predictive Control (MPC) framework to provide data-driven predictions of microgrid frequency dynamics without requiring highly accurate analytical system identification. In parallel, a Virtual Inertia Control (VIC) layer is incorporated to provide immediate transient frequency support during disturbances. Unlike conventional fixed-parameter or purely adaptive controllers, the proposed framework combines predictive optimization with learned temporal dynamics, thereby improving adaptability to time-varying disturbances and mitigating closed-loop saturation.
For a comprehensive evaluation, the proposed framework is benchmarked against conventional PID control, PSO-optimized PID control, and standard MPC. A Lyapunov-based stability analysis of the feedback subsystem is conducted to establish bounded-input bounded-output (BIBO) stability and input-to-state stability (ISS) under bounded prediction errors and load disturbances. The robustness and generalization of the proposed controller are further assessed through multi-scenario disturbance testing, parametric sensitivity analysis, component ablation studies, and a computational feasibility evaluation for real-time implementation. To the best of the authors’ knowledge, this work is among the few studies that integrate LSTM-based surrogate prediction, coordinated VIC–MPC, and formal stability analysis into a unified framework for frequency regulation in low-inertia islanded microgrids.
The main contributions of this work are summarized as follows:
- Development of an LSTM-enhanced model predictive control framework for frequency regulation in low-inertia, islanded microgrids.
- Integration of a data-driven LSTM surrogate predictor into the predictive control optimization loop for proactive frequency regulation.
- Inclusion of a PSO-optimized PID controller as a rigorous baseline for performance benchmarking.
- Lyapunov-based practical stability analysis together with input-to-state stability assessment under bounded prediction errors.
- Comprehensive validation through disturbance scenarios, robustness analysis, component ablation studies, and computational feasibility assessment.
2. System Description and Problem Formulation
The proposed architecture is shown in Figure 1. The system under study is a 50 Hz islanded microgrid comprising inverter-interfaced renewable energy sources, including photovoltaic generation and wind turbines, an energy storage system (ESS), and local loads, operating without support from the main utility grid. As the penetration of inverter-based renewable generation increases, the microgrid’s effective inertia is substantially reduced, thereby increasing its susceptibility to rapid frequency deviations during load disturbances and under intermittent renewable generation.
Figure 1.
Proposed LSTM-enhanced model predictive frequency control framework with virtual inertia support for low-inertia islanded microgrids.
To capture the dominant-frequency dynamics of the islanded microgrid, a reduced-order swing-equation model is employed. This approach is widely used in low-inertia load-frequency control studies because it captures the dominant relationship between generation-load imbalance and frequency deviation while maintaining computational simplicity for controller development [3,4]. The frequency dynamics are represented by
where denotes the frequency deviation, represents the equivalent inertia constant of the microgrid, is the load damping coefficient, denotes the controlled power injection, and represents the load disturbance.
The principal objective of the proposed control framework is to minimize frequency deviations following disturbances while simultaneously limiting excessive control effort and maintaining stable operation under low-inertia operating conditions.
2.1. Virtual Inertia Control Design
To compensate for reduced physical inertia in an inverter-dominated microgrid, the proposed framework incorporates a Virtual Inertia Control (VIC) mechanism. The VIC layer emulates the inertial response of conventional synchronous generators by injecting power proportional to both the frequency deviation and the rate of change of frequency (RoCoF). This approach improves transient frequency stability and reduces rapid frequency excursions after disturbances [2,3].
The VIC signal is defined as
where and denote the virtual inertia and virtual damping gains, respectively.
The total control input applied to the microgrid is given by.
where denotes the supplementary control signal generated by the higher-level predictive controller.
The adopted VIC structure provides an immediate stabilizing response to disturbances, thereby improving transient frequency support before the predictive optimization layer produces corrective control actions.
2.2. State-Space Representation
To facilitate predictive controller design and analytical stability assessment, the islanded microgrid’s frequency dynamics are expressed in state-space form. The system state variable is the frequency deviation,
The reduced-order microgrid frequency model presented in (1) can be expressed as
where denotes the supplementary control action generated by the predictive control framework and represents the external load disturbance input.
The corresponding state-space coefficients are given by.
This state-space formulation provides a compact yet sufficiently representative dynamic model for implementing predictive control while preserving the dominant transient frequency-response characteristics of the low-inertia islanded microgrid. The formulation also enables efficient integration of the proposed control architecture into the Model Predictive Control (MPC) framework.
Furthermore, the state-space model is used to generate training data for the Long Short-Term Memory (LSTM) predictor across multiple randomized disturbance scenarios and varying operating conditions. The resulting dataset captures the essential transient dynamics and temporal behavior of the microgrid’s frequency response, which are required for data-driven predictive learning.
In addition, the derived state-space representation establishes the analytical foundation for the Lyapunov-based practical stability analysis presented in Section 3.
2.3. LSTM-Based Surrogate Predictor
To enhance the predictive capabilities of the Model Predictive Control (MPC) framework, a Long Short-Term Memory (LSTM) neural network is integrated as a surrogate model. The LSTM network provides a data-driven approach to predicting the microgrid’s future states, specifically the frequency deviation, using historical operational data. This predictive model is essential for enabling the MPC controller to take proactive corrective actions before significant deviations occur, thereby improving the system’s overall performance.
2.3.1. LSTM Network Architecture
The LSTM network has 50 hidden units, and the input sequence consists of the frequency deviation and corresponding control actions over a sliding window of 20 samples. The network is trained to predict future frequency deviations over a 3-step horizon. Although 3 steps correspond to 0.03 s at a 100 Hz sampling rate, this does not limit the controller’s anticipatory capability for the following reasons. First, and most importantly, the effective anticipation horizon is determined by the LSTM input window of W = 20 samples (0.2 s), not by the 3-step output horizon. The LSTM encodes 0.2 s of frequency and control history into its hidden state before generating each prediction, providing rich temporal context that far exceeds 0.03 s. Second, to balance computational efficiency with prediction accuracy, the LSTM prediction is updated every 4 sampling instants (40 ms), with exponential smoothing applied to suppress high-frequency noise in the prediction signal. The MPC optimization and total control output, including the VIC component, are computed at every sampling instant (0.01 s), ensuring continuous closed-loop correction throughout each transient. The 3-step horizon, therefore, represents the look-ahead per MPC solve, not the total anticipation window. Third, short-horizon LSTM predictors are known to achieve lower generalization error than long-horizon ones for nonlinear dynamic systems [32], making N = 3 an appropriate and well-founded choice. Fourth, the VIC layer provides immediate reactive inertial support during the first moments of any disturbance, before the MPC predictive correction takes full effect, so the two layers are complementary by design. Fifth, empirical sufficiency is confirmed in Section 3.3: the LSTM–MPC + VIC achieves the best performance across all three disturbance scenarios, including stochastic disturbances over the full 50 s simulation, as discussed in detail in Section 3.3.
where denotes the current frequency deviation, and is the corresponding control input. The LSTM network learns the temporal dependencies between the inputs (frequency deviations and control actions) and outputs (future frequency states).
2.3.2. Training Data Generation
The LSTM training data is generated using the state-space model described earlier. Multiple randomized disturbance scenarios are simulated across varying operating conditions, including load disturbances, renewable generation fluctuations, and changes in system parameters. The resulting dataset captures the microgrid’s frequency-response dynamics and closed-loop input–output behavior under varied disturbance profiles, including the effects of control saturation, which introduces closed-loop nonlinearity even within a linear plant model. This dataset serves as the basis for data-driven LSTM training. The data is preprocessed by normalizing the input-output pairs and splitting them into training, validation, and test sets. A 70/15/15 split is used for training, validation, and testing, respectively. Min-max normalization is applied to all input-output pairs prior to training to ensure numerical stability and accelerate convergence. It is important to note that the LSTM is not claimed to learn nonlinear plant physics. The swing equation (Equation (1)) is a linear model. However, the closed-loop system is rendered nonlinear by control saturation at ±0.03 pu, and the disturbance signal contains temporally structured components (sinusoidal, exponentially decaying, and stochastic) that create a richer prediction problem than a static linear plant suggests. The LSTM exploits the joint history of frequency deviation and control input through its gating mechanism to produce predictions that outperform the exact analytical model used by standard MPC—as subsequently confirmed in the ablation study presented in Section 3.5. This evidence demonstrates that data-driven temporal learning adds genuine predictive value beyond analytical model knowledge, even when both are derived from the same linear plant. Four mechanisms explain why the LSTM surrogate outperforms the exact analytical model despite both being derived from the same linear plant. First, controlling saturation at ±0.03 pu renders the closed-loop system nonlinear: the LSTM learns the joint saturated input–output behavior directly from closed-loop data, whereas the standard MPC applies the unsaturated linear model and relies on post hoc clipping, introducing a model–reality mismatch during saturation events. Second, the LSTM input window of W = 20 samples (0.2 s) encodes rich temporal context via its gating mechanism, providing predictive information that substantially exceeds the 3-step analytical horizon. Third, the training disturbance comprises sinusoidal, exponentially decaying, and stochastic components; the LSTM learns these temporal patterns and produces anticipatory corrections that the linear model cannot exploit. Fourth, and most critically, the standard MPC baseline is granted perfect knowledge of the forthcoming disturbance trajectory (Section 2.4), representing an informational advantage over the LSTM–MPC + VIC, which relies solely on learned history. That the LSTM–MPC + VIC still outperforms this idealized baseline confirms that the observed improvement reflects genuine learned predictive capability rather than any informational deficit imposed on the comparator.
To ensure full reproducibility, all simulation and training parameters are specified explicitly. The random initialization seed was fixed using rng (0). The training signal consisted of a 50 Hz nominal frequency with superimposed disturbance components, including a sinusoidal disturbance with amplitude 0.02 Hz and frequency 2 Hz applied between 10 and 20 s, an exponentially decaying oscillation with amplitude 0.025 Hz, frequency 1 Hz, and decay rate 0.5 applied between 30 and 40 s, and additive white Gaussian noise with standard deviation σ = 0.001 Hz.
The LSTM input sequence employed a sliding window of W = 20 samples (0.2 s), with a prediction horizon of H = 3 steps and a step size of 5 samples, resulting in a total of 996 training sequences. The dataset was divided into training, validation, and testing subsets using a chronological 70/15/15 partition without random shuffling to prevent data leakage. Input-output data were normalized using min–max scaling with a scale factor of 0.03, corresponding to the maximum ESS control limit Umax.
The LSTM model was trained using the Adam optimizer with a learning rate of 0.005 for 60 epochs and a batch size of 64 samples. The Mean Squared Error (MSE) criterion was used as the loss function. To evaluate generalization capability, test scenarios A1 (step disturbance) and A2 (stochastic disturbance) employed disturbance profiles that were not included in the training dataset.
The LSTM model is trained with the Adam optimizer, widely used in deep learning for its efficiency and adaptive learning rate. The model is trained for 60 epochs with a batch size of 64. The loss function used for training is Mean Squared Error (MSE), which encourages the model to minimize the difference between predicted and actual future frequency states.
2.3.3. LSTM–MPC + VIC Integration
The trained LSTM network is embedded in the MPC optimization loop as a surrogate model for the microgrid. This enables the controller to predict future frequency deviations and take proactive corrective actions before they become significant. Integrating the LSTM predictor into the MPC loop allows the controller to anticipate disturbances, optimize control inputs, and maintain system stability, even under low-inertia conditions.
The optimization problem solved by the MPC is formulated as:
where denotes the prediction horizon, , , and are the weighting factors, and represents the control input over the prediction horizon. The objective of the MPC is to minimize the frequency deviation, the rate of change of frequency (RoCoF), and the control effort while satisfying the system constraints, including the ESS power output limitation.
where pu represents the rated power output limit of the energy storage system (ESS). This constraint reflects ESS’s physical operating limitation. Under bounded control input conditions and considering the dissipative characteristics of the microgrid dynamics, the system output, represented by the frequency deviation , remains bounded for all .
The optimization problem is solved at each sampling instant, and only the first control action . The optimal control sequence is applied to the system according to the receding horizon principle. The optimization process is then repeated at the next sampling instant using updated system states and predictions.
2.3.4. Model Validation and Performance Metrics
The performance of the LSTM-assisted MPC controller is evaluated using several key performance metrics to ensure its robustness and effectiveness in real-world scenarios. The following metrics are considered:
- Frequency Deviation (): The maximum deviation of the system’s frequency from its nominal value (50 Hz) after a disturbance. This metric reflects the system’s ability to stabilize and return to nominal frequency.
- Rate of Change of Frequency (RoCoF): This measures how quickly the frequency deviation occurs in response to a disturbance. A higher RoCoF indicates a more aggressive frequency change, which could lead to instability.
- Settling Time: The time elapsed from disturbance onset until the frequency deviation last exits the band ±2% of its peak absolute deviation, measured relative to the final settled value. This criterion is applied identically to all four controllers throughout all simulation scenarios, ensuring that comparative rankings are unaffected by the choice of tolerance band.
- Integral of Absolute Error (IAE): This metric quantifies the cumulative error over time, capturing both transient and steady-state performance. A lower IAE value indicates better overall control performance in minimizing frequency deviations.
Simulations are performed under various disturbance scenarios, including sudden load changes and fluctuations in renewable generation. These scenarios are designed to test the controller’s ability to handle dynamic conditions such as renewable intermittency and load fluctuations, ensuring that the LSTM–MPC + VIC framework remains effective in maintaining frequency stability across different operating conditions.
2.4. Model Predictive Control Formulation
The Model Predictive Control (MPC) framework in this study integrates an LSTM-based surrogate model for predictive control. By embedding the trained LSTM network within the MPC optimization loop, the controller can predict future frequency deviations and take proactive corrective actions before they become significant. This integration enables the controller to optimize control inputs, minimizing frequency deviations, the rate of change of frequency (RoCoF), and control effort while maintaining system stability under low-inertia conditions.
The optimization problem solved by the MPC is formulated as shown in Equation (8). The standard MPC baseline employs the exact analytical state-space model given in Equations (5) and (6) as its internal prediction model, with cost weights (state penalty) and (control penalty), a prediction horizon of steps, and the ESS saturation constraint pu. The optimal control action is computed in closed form as:
Only the first control action is applied to the system in accordance with the receding-horizon principle. The optimization process is then repeated at the next sampling instant using updated state measurements, predictions, and system states.
It should be noted that the standard MPC baseline employs the measured disturbance signal as the prediction reference at each sampling instant, thereby providing the controller with perfect knowledge of the forthcoming disturbance trajectory over the prediction horizon. Consequently, this setup represents an optimistic upper bound on achievable linear MPC performance rather than a strictly realistic causal implementation. Despite the inherent informational advantage afforded to the standard MPC baseline, the proposed LSTM–MPC + VIC framework consistently achieves superior performance across key transient frequency-stability metrics and disturbance scenarios. This confirms that the observed improvements are primarily attributed to the predictive learning capability of the proposed architecture rather than to any informational limitation imposed on the baseline controller. It should be emphasized that the perfect disturbance preview is an intentional advantage granted to the standard MPC comparator, not to the proposed method. This design choice was adopted to ensure that any performance gap observed in favor of the LSTM–MPC + VIC cannot be attributed to an information deficit in the baseline. The fact that LSTM–MPC + VIC consistently outperforms even this idealized standard MPC therefore strengthens, rather than weakens, the evidence for the proposed framework’s genuine predictive advantage.
2.5. PSO-Optimized PID Baseline
To establish a rigorous performance baseline for comparison, a Particle Swarm Optimization (PSO)-optimized PID controller (PSO-PID) is implemented. The PSO algorithm tunes the PID gains by minimizing the Integral of Absolute Error (IAE) across a set of disturbance scenarios. PSO is chosen for its ability to handle nonlinear optimization problems and its robustness in finding global optima.
The optimization process aims to determine the optimal PID gains (, , and ) that minimize the error between the desired and actual frequency responses, as outlined in Table 2.
Table 2.
Simulation, Controller, and LSTM Parameters.
The general form of the PID controller is given by:
where:
- is the proportional gain;
- is the integral gain;
- is the derivative gain;
- is the frequency deviation at time .
The PID controller is designed to minimize frequency deviation in the system, and the optimization process ensures that the gains are tuned for stable, effective frequency regulation under varying disturbance conditions.
2.6. Stability Analysis
This section presents a Lyapunov-based stability analysis of the proposed LSTM–MPC + VIC framework. Because the LSTM predictor is data-driven and nonlinear, a classical Lyapunov proof for the entire closed-loop system is not directly tractable. To address this, the control structure is decomposed into two components: a feedback subsystem and a feedforward LSTM-based predictor.
The LSTM feedforward component is treated as a bounded perturbation within the feedback loop. Stability is therefore established in two stages: first, the asymptotic stability of the feedback subsystem is proven using Lyapunov theory; second, the overall system’s Input-to-State Stability (ISS) is established with respect to the bounded prediction error. This approach aligns with established methodologies for learning-based MPC systems that provide theoretical stability guarantees. Specifically, sufficient conditions for ISS and closed-loop asymptotic stability in LSTM-assisted MPC systems were established in [33]. Stability analyses were further extended to GRU-based predictive control frameworks for nonlinear systems in [34]. Robustness and stability properties in data-driven predictive control frameworks were further investigated in [38]. An offset-free nonlinear MPC scheme for systems learned by neural NARX models, providing a complementary stability framework, was further developed in [39].
2.6.1. BIBO Stability
The control input is constrained by a saturation limit defined as:
This constraint reflects the physical power limitations of the energy storage system (ESS). Under bounded input conditions, and given the dissipative nature of the microgrid dynamics, the system output, represented by the frequency deviation , remains bounded for all .
Accordingly, the closed-loop system satisfies the Bounded-Input Bounded-Output (BIBO) stability criterion, ensuring that bounded control actions do not cause unbounded frequency deviations.
2.6.2. Lyapunov-Based Stability of the Feedback Subsystem
To establish the stability of the feedback subsystem, the following quadratic Lyapunov candidate function is defined:
This function satisfies the standard Lyapunov conditions:
The feedback control law is given by:
Substituting the full system dynamics (including the load disturbance term ) into the time derivative of the Lyapunov function yields:
where:
Since is strictly positive, it follows that:
Therefore, the Lyapunov function decreases monotonically along system trajectories, establishing the asymptotic stability of the feedback subsystem in the Lyapunov sense.
2.6.3. Input-to-State Stability (ISS) of the Full System
The LSTM-based feedforward component introduces a bounded disturbance due to prediction error, defined as: where
This bounded perturbation is added to the system dynamics. Incorporating both the LSTM prediction error and the load disturbance term ΔPL into the corrected Lyapunov derivative yields:
This inequality conforms to the standard form of Input-to-State Stability (ISS), in which the negative-definite term dominates when both the LSTM prediction error δ and the load disturbance are bounded.
Consequently, the system remains ISS with respect to both the LSTM prediction error and the load disturbance , and the frequency deviation is ultimately bounded. The size of this bound is directly determined by the magnitude of the LSTM prediction error .
2.6.4. Error Boundedness
From the ISS formulation, the steady-state bound on the frequency deviation can be expressed as:
This relationship indicates that closed-loop performance depends on the LSTM predictor’s accuracy. As the prediction error decreases, the ultimate bound on the frequency deviation correspondingly shrinks.
Detailed numerical validation of the derived bounds, along with comparative performance evaluation, is presented in Section 3.
2.7. Simulation Setup
The simulation environment, controller parameters, and LSTM configuration used in this study are summarized in Table 2, with literature-based justifications. All simulations are conducted in MATLAB/Simulink R2024a (Version 24.1) at a 100 Hz sampling rate over a 50 s time horizon. Reproducibility is ensured by fixing the stochastic initialization for PSO and LSTM training.
The PSO-based PID controller parameters are obtained using the optimization procedure described in Section 2.6, whereas the manually tuned PID gains serve as an unoptimized baseline for comparison. The LSTM architecture and training configuration follow established practices in LSTM–MPC frameworks [32,34].
Overall, the adopted simulation setup provides a consistent and reliable framework for evaluating controller performance under low-inertia operating conditions.
3. Results and Discussion
This section comprehensively evaluates the proposed LSTM–MPC + VIC framework against three benchmark controllers—conventional PID, PSO-optimized PID (PSO-PID), and standard MPC—on the representative 50 Hz low-inertia islanded microgrid described in Section 2. The evaluation is organized as follows. Section 3.1 presents time-domain frequency performance in Table 3. Section 3.2 reports additional statistical and operational metrics in Table 4. Section 3.3 evaluates generalization across disturbance scenarios in Table 5. Section 3.4 assesses parametric robustness in Table 6. Section 3.5 presents the component ablation study in Table 7. Section 3.6 analyzes the PSO-PID optimization baseline. Section 3.7 validates the LSTM surrogate model and provides ISS evidence. Section 3.8 evaluates computational feasibility in Table 8. Finally, Section 3.9 concludes with Lyapunov-based stability verification.
3.1. Time-Domain Frequency Performance
The primary time-domain performance is illustrated in Figure 2, with Figure 2a showing frequency deviation, Figure 2b showing control input, Figure 2c showing tracking error, and Figure 2d showing the rate of change of frequency (RoCoF). The corresponding quantitative metrics are summarized in Table 3.
Table 3.
Time-Domain Performance Metrics.
The proposed LSTM–MPC + VIC achieves the lowest maximum frequency deviation (0.009748 Hz), the fastest settling time (36.34 s), and the lowest integral absolute error (IAE) (0.12283 Hz·s) among all evaluated controllers. Compared with the PSO-PID baseline, which represents the best achievable fixed-parameter PID performance for this plant, the LSTM–MPC + VIC reduces the maximum frequency deviation by 54.5%, the IAE by 44.2%, and the settling time by 15.7%. Because PSO-PID is a rigorously optimized reference rather than a manually tuned controller, these improvements reflect a genuine advantage of predictive learning-based control.
The conventional PID and standard MPC controllers exhibit larger deviations and longer settling times, indicating limited ability to anticipate disturbances without a learned surrogate predictor. In contrast, the LSTM–MPC + VIC yields smoother control actions and significantly reduces energy demand. The control effort (1.98 × 10−5) is several orders of magnitude lower than that of PID (0.027129) and MPC (0.040721), demonstrating that predictive optimization replaces aggressive reactive corrections with gradual, energy-efficient control responses.
The proposed controller exhibits faster damping, fewer oscillations, and improved transient frequency response.
Figure 2.
Time-domain performance comparison of all four controllers: (a) frequency deviation Δf(t); (b) control input u(t); (c) tracking error e(t) (Hz); (d) rate of change of frequency (RoCoF).
3.2. Performance Metrics Analysis
A broader set of statistical and operational metrics is summarized in Table 4 and evaluated over the full 50 s simulation horizon.
The most critical operational indicator is the maximum rate of change of frequency (RoCoF). The proposed LSTM–MPC + VIC achieves a peak of 0.031212 Hz/s, significantly lower than 0.180719 Hz/s for PSO-PID, 0.183053 Hz/s for MPC, and 0.183040 Hz/s for PID. This corresponds to reductions of approximately 5.8×, 5.9×, and 5.9×, respectively. These reductions are essential in islanded microgrids, where excessive RoCoF can cause instability and undesirable protection actions.
Table 4.
Statistical and Operational Performance Metrics.
The control input characteristics further underscore the efficiency of the proposed framework. The peak control effort of the LSTM–MPC + VIC (0.005171 pu) is substantially lower than that of PSO-PID (0.030000 pu) and PID (0.030000 pu), both operating at the ESS saturation limit, while MPC also saturates at 0.030000 pu. The LSTM–MPC + VIC achieves the same frequency regulation with a peak actuation of only 17.2% of the saturation limit, demonstrating the efficiency of predictive optimization in minimizing control effort.
From a statistical perspective, the interquartile range (IQR) of frequency deviation for the LSTM–MPC + VIC (0.000473 Hz) is the smallest across all controllers, indicating tighter, more consistent frequency regulation throughout the simulation period. Similarly, the peak power spectral density (PSD) is the lowest (0.000204), confirming reduced oscillatory energy and smoother system dynamics.
The mean absolute error (MAE) of the LSTM–MPC + VIC (0.007172 Hz) is higher than that of the PSO-PID (0.001718 Hz). This behavior reflects a design trade-off in which the proposed controller prioritizes suppression of peak deviations and RoCoF over minimizing instantaneous pointwise error. This trade-off is justified by superior performance in key operational metrics, including maximum deviation, IAE, and settling time. This elevated MAE arises because the LSTM–MPC + VIC optimization objective (Equation (8)) weights peak deviation and RoCoF suppression through λ1 and λ2, rather than directly minimizing the time-averaged absolute error. As a result, the controller generates smooth, low-amplitude corrective signals that reduce extreme frequency excursions but allow slightly larger residual steady-state errors compared with the tightly tuned integral action of PSO-PID. In frequency-sensitive islanded microgrids, where protection relays are typically triggered by peak deviations and excessive RoCoF rather than average error, this trade-off represents an appropriate and operationally meaningful design choice. This does not contradict the overall performance advantage of the proposed framework, as the higher MAE reflects objective prioritization rather than fundamental control limitation.
A visual comparison of these performance characteristics is shown in Figure 3, with Figure 3a presenting cumulative IAE over time, Figure 3b showing control effort, Figure 3c showing normalized performance metrics relative to the PID baseline, and Figure 3d presenting total control effort on a logarithmic scale.
Figure 3.
Controller performance summary: (a) cumulative IAE over time; (b) control effort ; (c) normalized performance metrics relative to PID baseline; (d) total control effort on a logarithmic scale. Line styles: solid line (LSTM-MPC + VIC), dashed line (PID), dash-dot line (MPC), dotted line (PSO-PID).
3.3. Scenario Validation
To evaluate the generalization capability of the proposed LSTM–MPC + VIC framework beyond the nominal disturbance, two additional disturbance scenarios are considered. Scenario A1 applies a step load change of −0.03 pu at , representing abrupt load variations. Scenario A2 introduces a band-limited stochastic disturbance generated by filtering white noise through a first-order low-pass filter, representing renewable generation intermittency. The performance metrics across all scenarios are summarized in Table 5.
Table 5.
Performance Under Multiple Disturbance Scenarios.
Under Scenario A1 (step disturbance), the LSTM–MPC + VIC achieves the lowest maximum frequency deviation (0.014106 Hz) and the fastest settling time (11.47 s). In contrast, the standard MPC fails to settle within the simulation horizon (reported as 49.99 s), indicating limited capability in handling abrupt step disturbance transients without a learned surrogate predictor.
Under Scenario A2 (stochastic disturbance), the LSTM–MPC + VIC maintains the tightest frequency regulation with MaxDev = 0.002333 Hz and IAE = 0.03899 Hz·s, demonstrating strong disturbance rejection under noisy operating conditions. The improved performance is attributed to the LSTM surrogate’s predictive capability, which enables proactive compensation for rapidly varying inputs.
Across all three scenarios (nominal, step, and stochastic), the performance ranking remains consistent, with LSTM–MPC + VIC outperforming PSO-PID, while PID and MPC perform comparably but are inferior. This consistency suggests that the proposed framework’s performance advantage is not scenario-dependent.
The dynamic responses for each scenario are shown in Figure 4, with Figure 4a showing the frequency response to a step disturbance, Figure 4b presenting the response to a stochastic disturbance, and Figure 4c providing a comparative summary of the maximum frequency deviation across all scenarios.
Figure 4.
Disturbance scenario validation: (a) frequency deviation under step load change of −0.03 pu at ; (b) frequency response under stochastic disturbance; (c) comparison of maximum frequency deviation across nominal, step, and stochastic scenarios.
3.4. Sensitivity Analysis
The robustness of the proposed control framework to parametric uncertainty is evaluated by independently perturbing the inertia constant and the damping coefficient from their nominal values. The inertia constant varies by 20% , reflecting realistic variability in effective inertia in inverter-dominated microgrids. Similarly, the damping coefficient is varied by ±30% . The resulting performance metrics are summarized in Table 6.
Table 6.
Parametric Sensitivity Analysis under and Variations.
Under variations in inertia, the proposed LSTM–MPC + VIC framework demonstrates highly consistent performance. The maximum frequency deviation (MaxDev) varies within a narrow range of –, corresponding to approximately 1.3% variation, indicating strong robustness to inertia uncertainty. In contrast, the conventional PID controller exhibits notably higher RoCoF under the −20% condition (MaxDev = 0.025279 Hz, MaxRoCoF = 0.228759 Hz/s), reflecting higher sensitivity to inertia reduction compared with the proposed framework. All four controllers remain stable across the entire inertia range; however, the LSTM–MPC + VIC consistently achieves lower MaxDev, reduced IAE, and substantially lower RoCoF.
Under damping variation, all controllers remain stable. The LSTM–MPC + VIC again shows minimal sensitivity, with MaxDev ranging from to (approximately 2.0% variation). The corresponding IAE and RoCoF metrics remain tightly bounded, confirming consistent dynamic performance. In comparison, the PID controller exhibits persistently high RoCoF across all cases, whereas MPC and PSO–PID are moderately sensitive to parameter changes.
The bar chart comparisons in Figure 5 clearly illustrate these trends, with Figure 5a showing how inertia variation affects MaxDev, IAE, and maximum RoCoF—the PID controller exhibiting pronounced performance degradation at low inertia—and Figure 5b presenting the corresponding results for damping variation, confirming that the proposed LSTM–MPC + VIC framework maintains superior and consistent performance across all tested conditions.
Figure 5.
Parametric sensitivity analysis. (a) Effect of ±20% variation in inertia constant on maximum frequency deviation (MaxDev), IAE, and maximum RoCoF; (b) Effect of ±30% variation in damping coefficient on the same performance metrics.
Overall, these results demonstrate that predictive learning-based architecture effectively mitigates the impact of parametric uncertainty, ensuring robust frequency regulation and stable dynamic performance in low-inertia islanded microgrids.
The PID controller exhibits the highest RoCoF under low-inertia conditions (−20% ), with MaxRoCoF reaching 0.228759 Hz/s compared with 0.038983 Hz/s for the LSTM–MPC + VIC, while remaining within stable operating bounds.
3.5. Ablation Study
To systematically quantify each component’s contribution to the proposed control architecture, a structured ablation study is conducted. Four configurations are evaluated: C1 (VIC only), representing inertia emulation without predictive control; C2 (standard MPC only), representing model-based predictive control without learning or inertia support; C3 (LSTM–MPC without VIC), isolating the contribution of the learned surrogate predictor; and C4 (proposed LSTM–MPC + VIC), representing the full architecture.
The results, summarized in Table 7, reveal clear performance stratification across configurations. Configuration C1 (VIC only) exhibits the weakest performance, with a maximum frequency deviation of and IAE of 0.18947 Hz·s, demonstrating that virtual inertia alone is insufficient for precise frequency regulation in the absence of predictive control.
Table 7.
Component Ablation Study Results.
Configuration C2 (MPC only) significantly improves performance , confirming the effectiveness of model-based predictive control. However, its relatively high settling time and RoCoF indicate limitations in handling fast transient dynamics without a learned system representation.
Configuration C3 (LSTM–MPC without VIC) achieves a substantial improvement , highlighting that the integration of the LSTM surrogate model provides the dominant performance gain by enabling accurate disturbance prediction and anticipatory control action.
The full proposed configuration C4 (LSTM–MPC + VIC) delivers the best overall performance across all metrics, achieving and Hz\cdotps. Compared to C3, the inclusion of VIC provides an additional reduction in maximum deviation (approximately 12.1%) and improved settling behavior. This improvement is attributed to the immediate inertial response provided by VIC, which complements the LSTM–MPC layer’s predictive correction during the initial transient phase.
Figure 6a presents the time-domain frequency responses across all configurations, showing a progressive improvement from C1 to C4. Figure 6b shows normalized performance metrics relative to the MPC baseline (C2), clearly demonstrating that each architectural component contributes incrementally to overall control performance.
Figure 6.
Component ablation study. (a) Time-domain frequency deviation responses for C1 (VIC only), C2 (MPC only), C3 (LSTM–MPC without VIC), and C4 (proposed LSTM–MPC + VIC); (b) Normalized performance metrics relative to the MPC baseline (C2).
Overall, the ablation study confirms that both the LSTM predictor and the VIC layer are essential, with the LSTM providing the primary performance gain and the VIC layer adding transient support, resulting in a robust, high-performance control framework.
The results demonstrate the incremental contributions of predictive learning and virtual inertia to overall control performance.
3.6. PSO Analysis
The PSO-optimized PID controller is adopted as the primary benchmark because it represents the best achievable fixed-parameter PID performance for the given plant and disturbance profile, rather than a manually tuned reference.
The convergence behavior of the PSO algorithm is illustrated in Figure 7a. The best objective value (IAE) decreases rapidly from an initial magnitude on the order of Hz·s to the optimal value of 0.220085 Hz·s within the first few iterations, after which convergence is achieved and further improvement becomes negligible. This rapid convergence indicates that the optimization landscape is smooth under the considered operating conditions and confirms that the PSO search reached a stable solution.
Figure 7.
PSO-PID optimization: (a) convergence of the PSO algorithm showing IAE minimization; (b) normalized performance comparison of all controllers relative to the PSO-PID baseline. In (a), the solid line represents the PSO convergence trajectory from initial random swarm positions to the optimal IAE value.
The resulting optimal PID gains are , , and . Compared with the manually tuned baseline . The optimized gains assign significantly lower weight to the integral and derivative terms. This reflects the nature of the disturbance profile, where excessive integral action can degrade transient performance.
A normalized performance comparison is shown in Figure 7b. The LSTM–MPC + VIC framework achieves improvements of 54.5% in maximum frequency deviation, 44.2% in IAE, and 15.7% in settling time relative to the PSO-PID controller. Since PSO-PID represents an optimized baseline, these gains indicate that the observed performance improvements arise from the predictive learning-based control structure rather than from suboptimal PID tuning.
3.7. LSTM Model Validation and ISS Evidence
The validity of the LSTM surrogate model and the associated input-to-state stability (ISS) framework is assessed through empirical analysis, as shown in Figure 8.
Figure 8.
LSTM model validation and ISS evidence: (a) prediction error compared with empirical and theoretical bounds; (b) RoCoF comparison with reference threshold for all controllers.
Figure 8a presents the time evolution of the prediction error (18) together with the empirical bound and the theoretical ISS ultimate bound of 0.057866 Hz. The prediction error remains bounded throughout the simulation, reaching its maximum during the disturbance interval . After the transient, the error converges to a steady-state value of 0.004498 Hz, which is significantly below the theoretical bound, indicating that the ISS estimate is conservative and that the actual system behavior is more stable than predicted by worst-case analysis.
Figure 8b shows the rate of change of frequency (RoCoF) for all controllers, along with a reference threshold of ±1.0 Hz/s. All saturated controllers maintain RoCoF below 0.184 Hz/s. The LSTM–MPC + VIC achieves the lowest RoCoF of 0.031212 Hz/s, representing reductions of 5.9× relative to PID (0.183040 Hz/s) and 5.8× relative to PSO-PID (0.180719 Hz/s). All controllers remain well below the ±1.0 Hz/s relay threshold throughout the simulation.
These results are particularly relevant for islanded microgrid operation, where excessive RoCoF can lead to undesired protection actions. The LSTM–MPC + VIC mitigates this risk by generating smoother corrective actions through predictive control, thereby maintaining stable system operation under dynamic conditions.
3.8. Computational Feasibility
For real-time deployment, the control algorithm’s computational demand must remain within the available sampling interval. The computational performance of the proposed LSTM–MPC + VIC framework is evaluated over 200 consecutive inference trials at a sampling frequency of 100 Hz, corresponding to a 10.0 ms sampling interval per control cycle.
The mean LSTM inference time is 3.27 ms, with a maximum observed latency of 5.26 ms, both well below the 10.0 ms sampling deadline. The total execution time of the control loop—including prediction, optimization, and output computation—has a mean of 2.93 ms, indicating an efficient control architecture.
These results provide a timing margin of approximately 4.74 ms relative to the worst-case execution time (10.0 − 5.26 = 4.74 ms), which is sufficient to accommodate computational jitter, communication delays, and auxiliary monitoring tasks in practical implementations.
Overall, the proposed framework satisfies real-time computational requirements without requiring specialized high-performance hardware, supporting its feasibility for deployment in embedded microgrid control systems.
Table 8.
Computational Feasibility Assessment.
3.9. Stability Verification
Following the performance and robustness evaluations, the stability properties of the proposed control framework are validated through Lyapunov-based analysis and numerical verification. The results are illustrated in Figure 9 and correspond to the analytical derivations presented in Section 2.7.
Figure 9.
Lyapunov-based stability verification: (a) BIBO stability showing bounded control input and frequency response; (b) Lyapunov function (13) demonstrating monotonic decay; (c) Lyapunov derivative verified numerically; (d) absolute frequency deviation bounded below the ISS ultimate bound of 0.057866 Hz.
Figure 9a confirms bounded-input bounded-output (BIBO) stability. All controllers produce bounded frequency deviations in response to bounded control inputs over the full simulation horizon. The LSTM–MPC + VIC input remains within , well below the saturation limit . Although the unsaturated PID control signal exceeds this limit, the applied signal is constrained by saturation, and the resulting system response remains bounded.
Figure 9b presents the Lyapunov function (13), which is positive definite and exhibits monotonic decay following disturbance events. This behavior is consistent with the asymptotic stability condition derived in Section 2.7, indicating convergence of the closed-loop system.
Figure 9c shows the numerical evaluation of the Lyapunov derivative. The condition is satisfied throughout the simulation for all controllers. The maximum recorded value for the LSTM–MPC + VIC is −2.24 × 10−11, which is effectively zero, confirming the theoretical stability condition.
Figure 9d presents the absolute frequency deviation together with the ISS ultimate bound of 0.057866 Hz. All controllers remain below this bound at all times. The LSTM–MPC + VIC achieves a steady-state error of 0.004418 Hz, which is significantly smaller than the theoretical limit, indicating that the ISS bound is conservative. While PSO–PID exhibits slightly lower steady-state error due to reduced residual oscillations, the proposed framework achieves superior overall dynamic performance.
Overall, the combined BIBO, Lyapunov, and ISS results confirm that the proposed LSTM–MPC + VIC framework maintains stable and bounded operation under the considered disturbance conditions, consistent with the analytical stability guarantees.
4. Conclusions
This paper presents a hybrid adaptive control framework for frequency stabilization in low-inertia islanded microgrids, integrating Virtual Inertial Control (VIC), a Long Short-Term Memory (LSTM) surrogate predictor, and Model Predictive Control (MPC) into a unified architecture.
The key contribution of this work is embedding a trained LSTM model within the MPC framework, enabling predictive, data-driven disturbance rejection without requiring precise system identification. In addition, a PSO-optimized PID controller is used as a benchmark, ensuring that the observed performance improvements are not due to suboptimal tuning of conventional controllers.
Simulation results demonstrate that the proposed LSTM–MPC + VIC framework achieves superior performance across the key operational metrics—maximum frequency deviation, IAE, settling time, and RoCoF—while exhibiting a deliberate trade-off in mean absolute error, which reflects the controller’s objective of suppressing peak deviations rather than minimising time-averaged error. Specifically, the controller achieves the lowest maximum frequency deviation (0.009748 Hz), a lower integral absolute error (IAE), and a faster settling time than PID, PSO-PID, and standard MPC approaches. Furthermore, the rate of change of frequency (RoCoF) is significantly reduced, improving compatibility with protection constraints in low-inertia systems.
The proposed framework also demonstrates strong robustness under parametric uncertainty, including variations in system inertia and damping, as well as across multiple disturbance scenarios. The ablation study confirms that both the LSTM predictor and the VIC layer contribute independently and synergistically to overall performance improvement.
Moreover, computational analysis verifies that the control strategy meets real-time implementation requirements at a 100 Hz sampling frequency, indicating its practical feasibility for embedded control systems.
Overall, the results establish the proposed LSTM–MPC + VIC-based adaptive virtual inertia control framework as a robust and effective solution for frequency regulation in modern low-inertia microgrids, with strong potential for deployment in renewable-dominated power systems.
5. Research Limitations
Although the proposed LSTM–MPC + VIC-based control framework demonstrates strong and consistent performance across the evaluated conditions, several aspects define the scope of the present study and motivate future extensions.
First, the system is modeled with a single-area reduced-order swing equation, widely used in load-frequency control studies for its analytical clarity and suitability for controller evaluation. However, this representation does not explicitly capture higher-order nonlinear dynamics, converter-level switching behavior, or inter-area coupling effects. Future work will extend the proposed framework to higher-fidelity electromagnetic transient (EMT) and multi-area microgrid models. It should be noted that the reported frequency deviations (approximately 0.01 Hz) are specific to this reduced-order representation; higher-fidelity models incorporating converter-level nonlinearities or multi-area dynamics may produce larger deviations in absolute terms. Nevertheless, because all four controllers are evaluated on the identical model, the relative performance rankings and the demonstrated advantages of the proposed framework over PID, PSO–PID, and standard MPC remain valid within the scope of the study.
Second, validation is conducted through detailed numerical simulation. While this enables controlled, repeatable performance evaluation, practical implementation factors such as hardware latency, measurement noise, and communication delays are not explicitly considered. Experimental validation using hardware-in-the-loop (HIL) platforms or real-time digital simulators will be pursued to further verify real-world applicability.
Third, the LSTM predictor is trained offline and remains fixed during operation. While this ensures stability and consistency under the studied conditions, significant variations in system configurations, such as large-scale renewable integration or topology changes, may require retraining or adaptive updates. Incorporating online learning or adaptive mechanisms is a promising way to enhance flexibility. It is explicitly acknowledged that the LSTM is trained and evaluated on data generated from the same linear plant model. Generalization to substantially different system topologies or operating regimes beyond the training distribution is not guaranteed. The parametric sensitivity analysis in Section 3.4, which demonstrates consistent performance under ±20% inertia and ±30% damping variations, provides empirical evidence of robustness within a bounded neighborhood of the nominal operating point. Extension to broader parameter ranges and different topologies through online or transfer learning strategies is identified as a priority for future work.
Finally, the framework is evaluated on a single-area islanded microgrid. Extension to interconnected multi-area systems with tie-line dynamics will enable further investigation of coordination strategies and distributed control performance.
Future work will therefore focus on:
(i) Extending the model to higher-order nonlinear and EMT-based systems; (ii) conducting hardware-in-the-loop and experimental validation; (iii) integrating adaptive or online LSTM learning strategies; and (iv) expanding the framework to multi-area interconnected microgrids.
Author Contributions
Conceptualization, A.B.A. and A.A.; methodology, A.B.A. and A.A.; software, A.B.A.; validation, A.B.A. and A.A.; formal analysis, A.B.A. and A.A.; investigation, A.B.A. and A.A.; resources, A.A.; data curation, A.B.A.; writing—original draft preparation, A.B.A.; writing—review and editing, A.B.A. and A.A.; visualization, A.B.A.; supervision, A.A.; project administration, A.A.; funding acquisition, A.A. All authors have contributed equally to this work. All authors have read and agreed to the published version of the manuscript.
Funding
The research was funded by the Ongoing Research Funding Program (ORF-2026-258), King Saud University, Riyadh, Saudi Arabia.
Data Availability Statement
The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding authors.
Acknowledgments
The authors gratefully acknowledge the financial support provided by the Ongoing Research Funding Program (ORF-2026-258), King Saud University, Riyadh, Saudi Arabia.
Conflicts of Interest
The authors declare no conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| Abbreviation | Full Term |
| LSTM | Long Short-Term Memory |
| MPC | Model Predictive Control |
| PID | Proportional–Integral–Derivative |
| PSO | Particle Swarm Optimization |
| PSO-PID | Particle Swarm Optimization-based PID |
| VIC | Virtual Inertia Control |
| ESS | Energy Storage System |
| RoCoF | Rate of Change of Frequency |
| IAE | Integral of Absolute Error |
| MAE | Mean Absolute Error |
| MSE | Mean Squared Error |
| RMS | Root Mean Square |
| PSD | Power Spectral Density |
| IQR | Interquartile Range |
| BIBO | Bounded-Input Bounded-Output |
| ISS | Input-to-State Stability |
| LFC | Load Frequency Control |
| GRU | Gated Recurrent Unit |
| NN | Neural Network |
| GWO | Grey Wolf Optimization |
| PI | Proportional–Integral |
| EMT | Electromagnetic Transient |
| HIL | Hardware-in-the-Loop |
| MATLAB | Matrix Laboratory |
References
- Nayak, S.R.; Khadanga, R.K.; Panda, S.; Sahu, P.R.; Padhy, S.; Ustun, T.S. Participation of renewable energy sources in the frequency regulation issues of a five-area hybrid power system. Energies 2023, 16, 926. [Google Scholar] [CrossRef] [Scilit]
- Amiri, F.; Moradi, M.H. Improving frequency stability of islanded microgrid using virtual inertia control. Sustain. Energy Artif. Intell. 2025, 1, 37–44. [Google Scholar] [CrossRef] [Scilit]
- Kerdphol, T.; Rahman, F.S.; Mitani, Y.; Hongesombut, K.; Küfeoğlu, S. Virtual inertia control-based model predictive control for microgrid frequency stabilization considering high renewable energy integration. Sustainability 2017, 9, 773. [Google Scholar] [CrossRef] [Scilit]
- Tamrakar, U.; Hansen, T.M.; Tonkoski, R.; Copp, D.A. Model predictive frequency control of low inertia microgrids. In 2019 IEEE 28th International Symposium on Industrial Electronics (ISIE); IEEE: Piscataway, NJ, USA, 2019; pp. 2111–2116. [Google Scholar] [CrossRef] [Scilit]
- Maaruf, M.; Ahmad, S.; Khalid, M. Improving the frequency response of high renewable penetrated islanded microgrids. In Proceedings of the 2022 IEEE PES 14th Asia-Pacific Power and Energy Engineering Conference (APPEEC); IEEE: Piscataway, NJ, USA, 2022; pp. 1–6. [Google Scholar]
- Hamanah, W.M.; Shafiullah, M.; Alhems, L.M.; Alam, S.; Abido, M.A. Realization of robust frequency stability in low-inertia islanded microgrids with optimized virtual inertia control. IEEE Access 2024, 17, 58208–58221. [Google Scholar] [CrossRef] [Scilit]
- Zare, P.; Mohammadian, A.; SeyedShenava, S.; Davoudkhani, I.F. A reliable load frequency control strategy for oceanic mobile electrical storage system isolated microgrid using Greylag Goose optimization for energy supply to pelagic oceanic islands. In Proceedings of the 2024 19th Iranian Conference on Intelligent Systems (ICIS), Sirjan, Iran; IEEE: Piscataway, NJ, USA, 2024; pp. 140–146. [Google Scholar] [CrossRef] [Scilit]
- Shayeghi, H.; Davoudkhani, I.F.; Bizon, N. Robust self-adaptive fuzzy controller for load-frequency control of islanded airport microgrids considering electric aircraft energy storage and demand response. IET Renew. Power Gener. 2024, 18, 616–653. [Google Scholar] [CrossRef] [Scilit]
- Davoudkhani, I.F.; Zare, P.; Abdelaziz, A.Y.; Bajaj, M.; Tuka, M.B. Robust load-frequency control of islanded urban microgrid using 1PD-3DOF-PID controller. Sci. Rep. 2024, 20, 13962. [Google Scholar]
- Davoudkhani, I.F.; Zare, P.; Shenava, S.J.S.; Abdelaziz, A.Y.; Bajaj, M.; Tuka, M.B. Maiden application of mountaineering team-based optimization algorithm optimized 1PD-PI controller for load frequency control in islanded microgrid with renewable energy sources. Sci. Rep. 2024, 20, 22851. [Google Scholar] [CrossRef] [Scilit]
- Markovic, U.; Chu, Z.; Aristidou, P.; Hug, G. LQR-based adaptive virtual synchronous machine for power systems with high inverter penetration. IEEE Trans. Sustain. Energy 2019, 10, 1501–1512. [Google Scholar] [CrossRef] [Scilit]
- Hasen, S.A.; Aydın, Ö.; Ayasun, S.; Sönmez, Ş. Impact of virtual inertia and damping control on stability delay margins of load frequency control systems with renewable energy sources. Electr. Eng. 2024, 106, 323–341. [Google Scholar] [CrossRef] [Scilit]
- Ghodsi, M.R.; Tavakoli, A.; Samanfar, A. A robust controller design for load frequency control in islanded microgrid clusters. Int. Trans. Electr. Energy Syst. 2022, 2022, 4218067. [Google Scholar] [CrossRef] [Scilit]
- Khamies, M.; Sayed, K.; Alrumayh, O.; Almutairi, A.; Mahmoud, A.A. Advanced active disturbance rejection control for enhancing frequency stability in low-inertia power grids. Heliyon 2025, 16, e42556. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Saleh, A.; Omran, W.A.; Hasanien, H.M.; Tostado-Véliz, M.; Alkuhayli, A.; Jurado, F. Manta ray foraging optimization for the virtual inertia control of islanded microgrids including renewable energy sources. Sustainability 2022, 14, 4189. [Google Scholar] [CrossRef] [Scilit]
- Padhy, S.; Sahu, P.R.; Khadanga, R.K.; Arya, Y.; Panda, S. MSOA-optimized FOFPID controller for frequency stability of distributed power system. Electr. Power Syst. Res. 2025, 247, 111736. [Google Scholar] [CrossRef] [Scilit]
- Skiparev, V.; Nosrati, K.; Tepljakov, A.; Petlenkov, E.; Levron, Y.; Belikov, J.; Guerrero, J.M. Virtual inertia control of isolated microgrids using an NN-based VFOPID controller. IEEE Trans. Sustain. Energy 2023, 14, 1558–1568. [Google Scholar] [CrossRef] [Scilit]
- Shi, T.; Sun, J.; Han, X.; Tang, C. Research on adaptive optimal control strategy of virtual synchronous generator. IET Power Electron. 2024, 17, 121–133. [Google Scholar]
- Fawzy, A.; Bakeer, A.; Magdy, G.; Atawi, I.E.; Roshdy, M. Adaptive virtual inertia-damping system based on model predictive control for low-inertia microgrids. IEEE Access 2021, 14, 109718–109731. [Google Scholar] [CrossRef] [Scilit]
- Tan, K.-H.; Lin, F.-J.; Shih, C.-M.; Kuo, C.-N. Intelligent control of microgrid with virtual inertia using recurrent probabilistic wavelet fuzzy neural network. IEEE Trans. Power Electron. 2020, 35, 7451–7464. [Google Scholar]
- Altaf, A.; Kumar, M.; Biswas, D.; Mahadeva, R.; Patole, S.P. Virtual inertia controller design based on mixed sensitivity constraint H∞ approach. IEEE Access 2024, 17, 102328–102336. [Google Scholar] [CrossRef] [Scilit]
- Kerdphol, T.; Watanabe, M.; Hongesombut, K.; Mitani, Y. Self-adaptive virtual inertia control-based fuzzy logic to improve frequency stability. IEEE Access 2019, 12, 76071–76083. [Google Scholar]
- Sajadinia, M. An adaptive virtual inertia control design for energy storage devices using interval type-2 fuzzy logic. J. Energy Storage 2024, 84, 110791. [Google Scholar] [CrossRef] [Scilit]
- Sati, S.E.; Al-Durra, A.; Zeineldin, H.; El-Fouly, T.H.; El-Saadany, E.F. A novel virtual inertia-based damping stabilizer for frequency control enhancement for islanded microgrid. Int. J. Electr. Power Energy Syst. 2024, 155, 109580. [Google Scholar]
- Prabhakar, K.; Jain, S.K.; Padhy, P.K. Virtual inertia control of isolated microgrids using GWO-optimized modified IMC controller. Trans. Inst. Meas. Control 2025, 47, 733–745. [Google Scholar]
- Mishra, D.; Maharana, M.K.; Kar, M.K.; Nayak, A.; Islam, M.M.; Ustun, T.S. A metaheuristic algorithm for regulating virtual inertia of a standalone microgrid incorporating electric vehicles. J. Eng. 2024, 2024, e12383. [Google Scholar] [CrossRef] [Scilit]
- Khadanga, R.K.; Das, D.; Kumar, A.; Panda, S. Sine augmented scaled arithmetic optimization algorithm for frequency regulation of a virtual inertia control based microgrid. ISA Trans. 2023, 138, 534–545. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Hongesombut, K.; Keteruksa, R. Fractional order based on a flower pollination algorithm PID controller and virtual inertia control for microgrid frequency stabilization. Electr. Power Syst. Res. 2023, 220, 109381. [Google Scholar] [CrossRef] [Scilit]
- Montazeri, Z.; Niknam, T.; Aghaei, J.; Malik, O.P.; Dehghani, M.; Dhiman, G. Golf optimization algorithm: A new game-based metaheuristic algorithm and its application to energy commitment problem considering resilience. Biomimetics 2023, 6, 386. [Google Scholar] [CrossRef] [Scilit]
- Nath, M.K.; Prasad, N.B.; Baliarsingh, A.K. Virtual inertia control for enhanced frequency stability in islanded microgrids: A multistage PID and modified golf optimization approach. Next Energy 2026, 10, 100503. [Google Scholar] [CrossRef] [Scilit]
- Norouzi, M.H.; Oshnoei, A.; Mohammadi-Ivatloo, B.; Abapour, M. Learning-Based Virtual Inertia Control of an Islanded Microgrid with High Participation of Renewable Energy Resources. IEEE Syst. J. 2024, 18, 786–795. [Google Scholar] [CrossRef] [Scilit]
- Ławryńczuk, M.; Zarzycki, K. LSTM and GRU type recurrent neural networks in model predictive control: A review. Neurocomputing 2025, 632, 129712. [Google Scholar] [CrossRef] [Scilit]
- Dash, R.; Reddy, K.J.; Mohapatra, B.; Bajaj, M.; Zaitsev, I. An approach for load frequency control enhancement in two-area hydro-wind power systems using LSTM + GA-PID controller with augmented lagrangian methods. Sci. Rep. 2025, 21, 1307. [Google Scholar] [CrossRef] [Scilit]
- Terzi, E.; Bonassi, F.; Farina, M.; Scattolini, R. Learning model predictive control with long short-term memory networks. Int. J. Robust Nonlinear Control 2021, 31, 8877–8896. [Google Scholar] [CrossRef] [Scilit]
- Bonassi, F.; La Bella, A.; Farina, M.; Scattolini, R. Nonlinear MPC design for incrementally ISS systems with application to GRU networks. Automatica 2024, 159, 111381. [Google Scholar] [CrossRef] [Scilit]
- Bonassi, F.; Farina, M.; Xie, J.; Scattolini, R. On recurrent neural networks for learning-based control: Recent results and ideas for future developments. J. Process Control 2022, 114, 92–104. [Google Scholar] [CrossRef] [Scilit]
- Bonassi, F.; Xie, J.; Farina, M.; Scattolini, R. An offset-free nonlinear MPC scheme for systems learned by neural NARX models. In Proceedings of the 2022 IEEE 61st Conference on Decision and Control (CDC), Cancun, Mexico, 6–9 December 2022; IEEE: Piscataway, NJ, USA, 2022; pp. 2123–2128. [Google Scholar] [CrossRef] [Scilit]
- Berberich, J.; Köhler, J.; Müller, M.A.; Allgöwer, F. Data-driven model predictive control with stability and robustness guarantees. IEEE Trans. Autom. Control 2021, 66, 1702–1717. [Google Scholar] [CrossRef] [Scilit]
- Sontag, E.D. Smooth stabilization implies coprime factorization. IEEE Trans. Autom. Control 1989, 34, 435–443. [Google Scholar] [CrossRef] [Scilit]
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. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.








