Seamless grid following and grid forming inverter mode transition enabled by machine-learning based SCR estimation and smooth switching control Authors: Anugula Rajamallaiah, Josep M. Guerrero, Yadala Pavankumar, Kishore Bingi, Muhammad Zain Yousaf, Mamdouh L. Alghaythi, Meshari S. Alshammari Published: 2026 ABSTRACT The increasing penetration of inverter-based resources has led to converter-dominated power systems in which grid strength varies significantly and strongly influences inverter control performance. Grid-following (GFL) and grid-forming (GFM) control strategies offer complementary advantages; however, inappropriate mode selection or abrupt transitions between these modes can result in power oscillations, frequency deviations, and degraded stability, particularly in weak grids. Reliable real-time awareness of grid strength is therefore essential to enable seamless hybrid GFL/GFM operation. This paper proposes a control-oriented, data-driven short-circuit ratio (SCR) estimation framework to support adaptive GFL/GFM mode transitions in grid-connected inverters. A lightweight multilayer perceptron (MLP) is employed to infer grid strength directly from locally measured point-of-common-coupling voltage and current signals, without relying on explicit grid models or intrusive signal injection. The estimated SCR is used as a supervisory signal to select the appropriate operating mode, while parallel GFL and GFM controllers with internal-state synchronization ensure smooth transitions with continuity of phase angle and current references. Comprehensive simulation studies under gradual and abrupt grid-strength variations demonstrate that the proposed approach significantly improves mode-transition behavior compared with conventional ordinary least squares–based estimation. In particular, active and reactive power oscillations are reduced and frequency stability is enhanced during GFL/GFM switching. The results highlight the importance of control-enabling grid-strength estimation for reliable operation of inverter-based resources in weak and converter-dominated power systems. Introduction Grid-connected inverters (GCI) now constitute a dominant share of generation, and their control capabilities directly influence system strength, transient stability, and frequency–voltage regulation. As shown in Fig. 1, grid-connected inverters have been widely deployed due to their robust power regulation capability and compatibility with existing grid infrastructure1–3. The rapid integration of renewable energy sources and converter-interfaced generation has fundamentally transformed modern power systems, leading to a progressive reduction in system inertia and an increased reliance on power-electronic control to maintain grid stability. In contrast to conventional synchronous generator–dominated networks, converter-dominated grids exhibit strong coupling between control dynamics and network impedance, making stability and performance highly sensitive to grid strength variations. As a result, the design of grid-connected inverter control strategies has become a critical research topic in power electronics and power systems4–6.Fig. 1Grid-connected inverter system comprising solar PV unit interfaced through a converter, connected to the utility grid via a transformer & transmission line. Grid-connected inverter system comprising solar PV unit interfaced through a converter, connected to the utility grid via a transformer & transmission line. GFL and GFM control strategies represent two fundamentally different paradigms for interfacing converters with the grid. GFL converters synchronize to the grid voltage using phase-locked loops (PLLs) and regulate active and reactive power based on measured grid quantities. This approach is well-suited to strong-grid conditions, in which the grid provides a stiff voltage and frequency reference. However, under weak-grid conditions, PLL dynamics may interact adversely with grid impedance, leading to oscillations or loss of synchronization7–10. In contrast, GFM converters establish their own voltage and frequency references and inherently provide inertial and damping support, making them more suitable for weak grids and islanded operation. Nevertheless, GFM operation in strong grids can introduce power oscillations, circulating currents, or lead to instability when the GFM tries to regulate the already tightly regulated grid voltage11–13. Because neither GFL nor GFM control is universally optimal, hybrid control frameworks that allow seamless transitions between the two modes have attracted significant attention. Such hybrid approaches aim to exploit the advantages of both strategies by adapting the inverter operating mode to prevailing grid conditions. However, abrupt transitions between GFL and GFM can introduce discontinuities in phase angle, frequency, and current references, leading to large transient power deviations and potential instability14–16. To address this challenge, several smooth-switching and unified control schemes have been proposed, including parallel control execution, reference synchronization, virtual oscillator–based unification, and droop-assisted PLL coordination. While these methods effectively mitigate switching-induced transients, their performance critically depends on accurate and timely identification of grid strength17–19. Grid strength is commonly quantified using the SCR, defined as the ratio of the grid short-circuit capacity to the rated converter power. SCR directly influences inverter stability margins, damping characteristics, and permissible control bandwidths. Consequently, reliable real-time SCR estimation is essential for adaptive mode selection and supervisory control in hybrid GFL/GFM systems20–22. Existing SCR and grid-impedance estimation techniques can be broadly classified as active or passive. Active methods inject perturbations–such as voltage, current, or frequency disturbances–to accurately determine grid impedance. However, these methods increase control complexity, introduce power-quality disturbances, and may violate grid-code constraints, making them unsuitable for continuous online operation23–25. Passive estimation techniques rely solely on naturally occurring voltage and current measurements at the point of common coupling. Among these, model-based and recursive identification methods–such as ordinary least squares (OLS) and recursive least squares–are widely used due to their low computational burden26–28. Nevertheless, these methods assume linear relationships and sufficient excitation, conditions that are often violated in practical weak-grid scenarios characterized by noise, nonlinear control interactions, and rapid changes in operating points. As a result, passive estimators may exhibit delayed convergence, oscillatory behavior, or inaccurate SCR tracking during dynamic grid events, limiting their suitability for fast GFL/GFM mode-transition decisions29–31. Recent advances in converter-dominated power systems have emphasized the need for intelligent monitoring and adaptive control to ensure stable operation under varying grid conditions. Reference32 presented an ATOGI-based control strategy for microgrid-assisted EV charging systems that improved synchronization robustness, power quality, and converter performance under weak and distorted grid conditions through hardware-in-the-loop validation. Furthermore, a digital-twin-based framework was proposed in Ref.33, where real-time parameter estimation and adaptive optimization were employed to monitor and enhance the performance of grid-connected photovoltaic inverters. These studies demonstrate the growing interest in data-driven monitoring, real-time system awareness, and adaptive inverter operation. Motivated by these developments, the present work focuses on machine-learning-based estimation of grid strength through online SCR assessment and utilizes the estimated grid condition to enable adaptive and seamless transitions between GFL and GFM operating modes. Neural-network–based estimators have demonstrated strong capability in capturing nonlinear relationships between electrical measurements and system parameters, even under noisy and uncertain conditions. In particular, MLPs offer a favorable balance between modeling capacity and computational efficiency, making them attractive for real-time implementation in embedded controllers. Despite these advantages, most existing machine-learning-based studies focus on offline impedance identification or stability assessment and do not explicitly address real-time SCR estimation for adaptive GFL/GFM switching. Furthermore, systematic hyperparameter selection and benchmarking against classical estimation techniques are often overlooked, limiting reproducibility and practical relevance34–36. Motivated by these gaps, this paper proposes a lightweight MLP-based SCR estimation framework to enable seamless transitions between GFL/GFM modes in grid-connected inverter systems. The proposed approach leverages locally measured dq-axis voltage and current signals to learn a nonlinear mapping between PCC measurements and grid strength, without relying on explicit impedance models or external perturbations. A grid-search–based hyperparameter optimization procedure is employed to ensure estimator robustness and generalization across a wide range of grid conditions. The estimated SCR is subsequently integrated with a hysteresis-based supervisory logic to enable stable and well-timed transitions between GFL and GFM operation while preserving phase-angle and current-reference continuity. The main contributions of this work are summarized as follows:A lightweight MLP-based SCR estimator is developed that directly maps locally available PCC measurements to grid strength without explicit impedance modeling or signal injection.A grid-search–based hyperparameter optimization framework is employed to systematically identify an accurate and computationally efficient estimator configuration, ensuring reproducibility and practical deployability.The estimated SCR is integrated into a robust decision layer with hysteresis-based logic to prevent mode-chattering under both gradual and abrupt grid-strength variations.Comprehensive simulation studies demonstrate that the proposed approach significantly improves SCR estimation accuracy, reduces decision delay, and enhances active power, reactive power, and frequency stability during GFL/GFM transitions compared with conventional OLS-based methods. A lightweight MLP-based SCR estimator is developed that directly maps locally available PCC measurements to grid strength without explicit impedance modeling or signal injection. A lightweight MLP-based SCR estimator is developed that directly maps locally available PCC measurements to grid strength without explicit impedance modeling or signal injection. A grid-search–based hyperparameter optimization framework is employed to systematically identify an accurate and computationally efficient estimator configuration, ensuring reproducibility and practical deployability. A grid-search–based hyperparameter optimization framework is employed to systematically identify an accurate and computationally efficient estimator configuration, ensuring reproducibility and practical deployability. The estimated SCR is integrated into a robust decision layer with hysteresis-based logic to prevent mode-chattering under both gradual and abrupt grid-strength variations. The estimated SCR is integrated into a robust decision layer with hysteresis-based logic to prevent mode-chattering under both gradual and abrupt grid-strength variations. Comprehensive simulation studies demonstrate that the proposed approach significantly improves SCR estimation accuracy, reduces decision delay, and enhances active power, reactive power, and frequency stability during GFL/GFM transitions compared with conventional OLS-based methods. Comprehensive simulation studies demonstrate that the proposed approach significantly improves SCR estimation accuracy, reduces decision delay, and enhances active power, reactive power, and frequency stability during GFL/GFM transitions compared with conventional OLS-based methods. Proposed seamless GFL/GFM transition framework The framework shown in Fig. 2 illustrates how a single grid-connected converter can operate in either GFL or GFM mode and transition between them seamlessly without inducing large transients. The key idea is that the power-circuit hardware, including the converter circuit, DC link, PWM bridge, filter inductors \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_1$$\end{document}–\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_2$$\end{document}, and PCC measurements, remains unchanged. At the same time, the control layer runs two controllers in parallel (GFL and GFM) and only switches two signals: (i) the synchronization/phase-angle path and (ii) the dq current-reference path. This strategy follows an established seamless-transition principle: keep the inner current controller common and avoid discontinuities by synchronizing the inactive controller states in the background before any mode change26.Fig. 2Grid-connected converter control structure showing parallel execution of GFL and GFM controllers with synchronized phase-angle and current-reference smooth switching to ensure transient-free mode transitions. Grid-connected converter control structure showing parallel execution of GFL and GFM controllers with synchronized phase-angle and current-reference smooth switching to ensure transient-free mode transitions. Power circuit and control architecture The functional details of the various blocks of the Fig. 2 are given in detail below. Power stage and measurement interface The PWM converter in Fig. 2 injects current into the grid through the filter inductors. The PCC voltage and current are measured and transformed using \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$abc\!\rightarrow \!dq$$\end{document} blocks, providing \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(v_d,v_q,i_d,i_q)$$\end{document} to the controllers. These local measurements are sufficient for (i) regulating current/power and (ii) generating the mode-selection signal (through SCR estimation). Importantly, the same measured variables are used regardless of the operating mode, thereby keeping the control implementation uniform. Common inner current control loop (shared by GFL and GFM) The lower-left portion of Fig. 2 shows the inner current controller in the synchronous reference frame. The reference currents \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(i_{d}^{*}, i_{q}^{*})$$\end{document} are compared with the measured \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(i_d,i_q)$$\end{document}, and PI regulators (with decoupling terms such as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _g L_f$$\end{document} cross-coupling compensation) generate voltage commands \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(v_d^{*},v_q^{*})$$\end{document} that are then modulated by PWM. Because this inner loop is identical in both modes, switching between GFL and GFM does not require reconfiguration of the plant-facing controller. Instead, the mode transition is realized by smoothly changing the reference generators that feed this inner loop. Phase-angle (grid synchronization) smooth switching The upper-right dashed block in Fig. 2 labeled Grid synchronization phase angle smooth switching explains how the converter angle θ is produced without discontinuities.GFL angle generation (blue path): In GFL, a PLL provides the grid-synchronized frequency \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{\textrm{GFL}}$$\end{document} (centered around \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _0$$\end{document}). Integrating ω gives the phase angle θ. This is the standard GFL synchronization mechanism.GFM angle generation (orange path): In GFM, frequency is generated internally using active-power droop to obtain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{\textrm{GFM}}$$\end{document}, which is also integrated to produce θ.A direct switch from \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{\textrm{GFL}}$$\end{document} to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{\textrm{GFM}}$$\end{document} would typically cause a jump in ω and therefore in θ, leading to abrupt phase mismatch and severe power/current transients at the PCC. To prevent this, Fig. 2 includes background synchronization integrators (gains \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k_{iw1}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k_{iw2}$$\end{document} in the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\frac{k}{s}$$\end{document} blocks) that force the inactive frequency/angle state to track the active one.When operating in GFL, the GFM synchronization loop runs in the background and drives the GFM frequency state toward the currently applied ω (i.e. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{\textrm{GFM}}\!\rightarrow \!\omega _{\textrm{GFL}}$$\end{document}).When operating in GFM, the PLL-based path runs in the background and aligns \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{\textrm{GFL}}$$\end{document} with the internally generated ω (i.e. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{\textrm{GFL}}\!\rightarrow \!\omega _{\textrm{GFM}}$$\end{document}).As a result, at the switching instant, the two candidate phase trajectories are already aligned (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\theta _{\textrm{GFL}}\approx \theta _{\textrm{GFM}}$$\end{document}), so selecting either path produces phase continuity. This is the core mechanism that enables seamless GFL↔GFM transitions while remaining grid-connected. GFL angle generation (blue path): In GFL, a PLL provides the grid-synchronized frequency \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{\textrm{GFL}}$$\end{document} (centered around \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _0$$\end{document}). Integrating ω gives the phase angle θ. This is the standard GFL synchronization mechanism. GFL angle generation (blue path): In GFL, a PLL provides the grid-synchronized frequency \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{\textrm{GFL}}$$\end{document} (centered around \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _0$$\end{document}). Integrating ω gives the phase angle θ. This is the standard GFL synchronization mechanism. GFM angle generation (orange path): In GFM, frequency is generated internally using active-power droop to obtain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{\textrm{GFM}}$$\end{document}, which is also integrated to produce θ. GFM angle generation (orange path): In GFM, frequency is generated internally using active-power droop to obtain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{\textrm{GFM}}$$\end{document}, which is also integrated to produce θ. When operating in GFL, the GFM synchronization loop runs in the background and drives the GFM frequency state toward the currently applied ω (i.e. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{\textrm{GFM}}\!\rightarrow \!\omega _{\textrm{GFL}}$$\end{document}). When operating in GFL, the GFM synchronization loop runs in the background and drives the GFM frequency state toward the currently applied ω (i.e. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{\textrm{GFM}}\!\rightarrow \!\omega _{\textrm{GFL}}$$\end{document}). When operating in GFM, the PLL-based path runs in the background and aligns \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{\textrm{GFL}}$$\end{document} with the internally generated ω (i.e. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{\textrm{GFL}}\!\rightarrow \!\omega _{\textrm{GFM}}$$\end{document}). When operating in GFM, the PLL-based path runs in the background and aligns \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{\textrm{GFL}}$$\end{document} with the internally generated ω (i.e. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{\textrm{GFL}}\!\rightarrow \!\omega _{\textrm{GFM}}$$\end{document}). dq-current-reference smooth switching The lower-right dashed block in Fig. 2 labeled Current reference smooth switching addresses the second main source of transients: discontinuities in \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(i_d^*,i_q^*)$$\end{document}.GFL reference generation (blue path): In GFL mode, the converter is typically commanded by power setpoints \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(P_{\textrm{ref}}, Q_{\textrm{ref}})$$\end{document} (or P droop for frequency support). These setpoints are converted into current references using the instantaneous PCC voltage components, yielding \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{d,\textrm{ref}}^{\textrm{GFL}}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{q,\textrm{ref}}^{\textrm{GFL}}$$\end{document}.GFM reference generation (orange path): In GFM mode, the converter regulates PCC voltage/frequency behavior, so the current references are produced from voltage-control errors (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$v_d$$\end{document} vs. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$v_{d,\textrm{ref}}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$v_q$$\end{document} vs. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$v_{q,\textrm{ref}}$$\end{document}) through PI blocks, generating \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{d,\textrm{ref}}^{\textrm{GFM}}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{q,\textrm{ref}}^{\textrm{GFM}}$$\end{document}.If switching is performed directly between these two reference sets, the inner current controller experiences a step in \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_d^*$$\end{document} and/or \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_q^*$$\end{document}, resulting in current and power spikes. It is avoided by adding background reference synchronization loops (integrators with gains \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k_{iid}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k_{iiq}$$\end{document}), which continuously drive the inactive reference to match the active one:In GFL operation, the GFM reference loops track \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{d,\textrm{ref}}^{\textrm{GFL}}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{q,\textrm{ref}}^{\textrm{GFL}}$$\end{document}, forcing \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{d,\textrm{ref}}^{\textrm{GFM}}\!\approx \!i_{d,\textrm{ref}}^{\textrm{GFL}}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{q,\textrm{ref}}^{\textrm{GFM}}\!\approx \!i_{q,\textrm{ref}}^{\textrm{GFL}}$$\end{document}.In GFM operation, the GFL reference path is updated in the background so that the power-to-current mapping produces references consistent with the currently enforced GFM behavior.Therefore, at the moment the mode-selection switch changes state, the commanded current references remain continuous, and the inner current controller does not experience a discontinuous setpoint. GFL reference generation (blue path): In GFL mode, the converter is typically commanded by power setpoints \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(P_{\textrm{ref}}, Q_{\textrm{ref}})$$\end{document} (or P droop for frequency support). These setpoints are converted into current references using the instantaneous PCC voltage components, yielding \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{d,\textrm{ref}}^{\textrm{GFL}}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{q,\textrm{ref}}^{\textrm{GFL}}$$\end{document}. GFL reference generation (blue path): In GFL mode, the converter is typically commanded by power setpoints \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(P_{\textrm{ref}}, Q_{\textrm{ref}})$$\end{document} (or P droop for frequency support). These setpoints are converted into current references using the instantaneous PCC voltage components, yielding \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{d,\textrm{ref}}^{\textrm{GFL}}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{q,\textrm{ref}}^{\textrm{GFL}}$$\end{document}. GFM reference generation (orange path): In GFM mode, the converter regulates PCC voltage/frequency behavior, so the current references are produced from voltage-control errors (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$v_d$$\end{document} vs. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$v_{d,\textrm{ref}}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$v_q$$\end{document} vs. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$v_{q,\textrm{ref}}$$\end{document}) through PI blocks, generating \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{d,\textrm{ref}}^{\textrm{GFM}}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{q,\textrm{ref}}^{\textrm{GFM}}$$\end{document}. GFM reference generation (orange path): In GFM mode, the converter regulates PCC voltage/frequency behavior, so the current references are produced from voltage-control errors (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$v_d$$\end{document} vs. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$v_{d,\textrm{ref}}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$v_q$$\end{document} vs. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$v_{q,\textrm{ref}}$$\end{document}) through PI blocks, generating \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{d,\textrm{ref}}^{\textrm{GFM}}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{q,\textrm{ref}}^{\textrm{GFM}}$$\end{document}. In GFL operation, the GFM reference loops track \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{d,\textrm{ref}}^{\textrm{GFL}}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{q,\textrm{ref}}^{\textrm{GFL}}$$\end{document}, forcing \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{d,\textrm{ref}}^{\textrm{GFM}}\!\approx \!i_{d,\textrm{ref}}^{\textrm{GFL}}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{q,\textrm{ref}}^{\textrm{GFM}}\!\approx \!i_{q,\textrm{ref}}^{\textrm{GFL}}$$\end{document}. In GFL operation, the GFM reference loops track \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{d,\textrm{ref}}^{\textrm{GFL}}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{q,\textrm{ref}}^{\textrm{GFL}}$$\end{document}, forcing \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{d,\textrm{ref}}^{\textrm{GFM}}\!\approx \!i_{d,\textrm{ref}}^{\textrm{GFL}}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i_{q,\textrm{ref}}^{\textrm{GFM}}\!\approx \!i_{q,\textrm{ref}}^{\textrm{GFL}}$$\end{document}. In GFM operation, the GFL reference path is updated in the background so that the power-to-current mapping produces references consistent with the currently enforced GFM behavior. In GFM operation, the GFL reference path is updated in the background so that the power-to-current mapping produces references consistent with the currently enforced GFM behavior. Hybrid switching achieved in practice Overall, Fig. 2 implements a hybrid GFL/GFM control by (i) running GFL and GFM reference generators simultaneously, (ii) synchronizing the inactive controller states (angle and current references) to the active controller via dedicated background loops, and (iii) using a single binary switching signal to select which synchronized path drives the converter at any time. Because both the phase angle θ and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(i_d^*,i_q^*)$$\end{document} are aligned before switching, the transition does not introduce abrupt phase jumps, current-reference steps, or large power shocks, enabling smooth GFL↔GFM transitions under varying grid strength. The power circuit, phase angle, grid synchronization, voltage, and current controller parameters are summarized in Table 1.Table 1System, control, and MLP parameters used in this work.S. No.ParameterValuePower circuit parameters 1Base power10 MVA 2System frequency \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(f_0)$$\end{document}50 Hz 3IBR active power reference \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(P_{\textrm{ref}})$$\end{document}1 p.u. 4IBR reactive power reference \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(Q_{\textrm{ref}})$$\end{document}0.2 p.u.Grid synchronization parameters 5PLL proportional gain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_p)$$\end{document}1 6PLL integral gain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_i)$$\end{document}5000 7Droop coefficient \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(m_p)$$\end{document}2%Voltage and current controller gains 8Low-pass filter cutoff frequency \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(f_c)$$\end{document}20 Hz 9Current controller proportional gain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_{pi})$$\end{document}1.25 10Current controller integral gain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_{ii})$$\end{document}10 11Voltage controller proportional gain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_{pv})$$\end{document}3 12Voltage controller integral gain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_{iv})$$\end{document}100 13d-axis current synchronization gain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_{iid})$$\end{document}100 14q-axis current synchronization gain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_{iiq})$$\end{document}100Phase angle synchronization gains 15Phase-angle synchronization gains \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_{iw1},k_{iw2})$$\end{document}5000, 3000MLP model parameters 16Hidden neurons150 17Activation functiontansig 18Solvertrainlm 19Learning rate0.1 Table 1System, control, and MLP parameters used in this work.S. No.ParameterValuePower circuit parameters 1Base power10 MVA 2System frequency \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(f_0)$$\end{document}50 Hz 3IBR active power reference \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(P_{\textrm{ref}})$$\end{document}1 p.u. 4IBR reactive power reference \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(Q_{\textrm{ref}})$$\end{document}0.2 p.u.Grid synchronization parameters 5PLL proportional gain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_p)$$\end{document}1 6PLL integral gain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_i)$$\end{document}5000 7Droop coefficient \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(m_p)$$\end{document}2%Voltage and current controller gains 8Low-pass filter cutoff frequency \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(f_c)$$\end{document}20 Hz 9Current controller proportional gain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_{pi})$$\end{document}1.25 10Current controller integral gain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_{ii})$$\end{document}10 11Voltage controller proportional gain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_{pv})$$\end{document}3 12Voltage controller integral gain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_{iv})$$\end{document}100 13d-axis current synchronization gain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_{iid})$$\end{document}100 14q-axis current synchronization gain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_{iiq})$$\end{document}100Phase angle synchronization gains 15Phase-angle synchronization gains \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(k_{iw1},k_{iw2})$$\end{document}5000, 3000MLP model parameters 16Hidden neurons150 17Activation functiontansig 18Solvertrainlm 19Learning rate0.1 System, control, and MLP parameters used in this work. MLP-based SCR estimation Figure 3 illustrates the MLP-based SCR estimation and switching framework. Locally measured dq-axis PCC signals \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(V_d, V_q, I_d, I_q)$$\end{document} serve as input features to the MLP, which learns the nonlinear mapping between these measurements and grid impedance characteristics. The MLP infers impedance information directly from naturally occurring variations, improving robustness in noisy and weak-grid conditions. From an implementation perspective, the proposed estimator introduces negligible computational overhead, as the MLP inference requires only matrix multiplications and activation evaluations. The computational complexity of the proposed MLP inference is sufficiently low to support future implementation on DSP- or FPGA-based platforms. However, real-time computational performance has not yet been experimentally validated and remains part of ongoing future work.Fig. 3Architecture of the proposed MLP-based SCR estimation scheme using PCC dq-axis voltage and current features, integrated with hysteresis switching logic to generate robust GFL/GFM mode-selection signals.1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} {\begin{matrix} x(k) & = [v_{d}(k),\, v_{q}(k),\, i_{d}(k),\, i_{q}(k)] \in \mathbb {R}^{4}\\ \hat{y}(k) & = f_{\theta }(x(k)) \end{matrix}} \end{aligned}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$f_{\theta }(\cdot )$$\end{document} represents the MLP parameterized by θ. The output is converted into an SCR estimate using the inverse relationship between grid impedance and short-circuit strength. A hysteresis-based switching logic is applied to the estimated SCR to generate a binary mode-selection signal:2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \text {Switch} = {\left\{ \begin{array}{ll} \text {GFM }(0), & \text {SCR}< 3 \\ \text {GFL }(1), & \text {SCR} > 6 \\ \text {GFL }(1)\ \text {or}\ \text {GFM }(0), & 3< \text {SCR} < 6 \end{array}\right. } \end{aligned}$$\end{document}The lower threshold (SCR < 3) corresponds to commonly reported weak-grid operating conditions where grid-following control may exhibit degraded synchronization performance. The upper threshold (SCR > 6) represents sufficiently strong-grid conditions where grid-following operation is generally preferred. The hysteresis band between SCR = 3 and SCR = 6 was intentionally introduced to avoid mode chattering under measurement uncertainty and transient SCR fluctuations. Architecture of the proposed MLP-based SCR estimation scheme using PCC dq-axis voltage and current features, integrated with hysteresis switching logic to generate robust GFL/GFM mode-selection signals. Hyperparameter optimization using grid search The MLP uses a single hidden layer with the hyperbolic tangent activation and a linear output neuron:3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \hat{y} = W_2 \,\sigma (W_1 x + b_1) + b_2 \end{aligned}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma (\cdot )$$\end{document} is the tansig activation function. The model parameters are optimized by minimizing the mean squared error (MSE):4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \mathcal {L} = \frac{1}{N} \sum _{i=1}^{N} (\hat{y}_i - y_i)^2. \end{aligned}$$\end{document}A systematic grid search evaluates combinations ofHidden-layer sizes: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{50, 100, 150\}$$\end{document}Activation functions: {tansig, logsig}Solvers: {trainlm, trainscg}Learning rates: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{10^{-5}, 10^{-3}, 10^{-1}\}$$\end{document}Algorithm 1 describes the procedure adopted to determine an optimal MLP configuration for real-time SCR estimation through systematic hyperparameter tuning. The algorithm takes as input a labeled dataset \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {D}=\{X,y\}$$\end{document}, where the feature matrix X contains locally measured PCC voltage–current quantities and y represents the corresponding SCR values. To ensure adequate coverage of diverse grid conditions, the dataset is generated using eight grid-impedance variation scenarios, including abrupt changes, gradual variations, and mixed operating conditions. These scenarios produce SCR values spanning the range of 0–11. The data are sampled at a rate corresponding to a 4 μs sampling interval, resulting in a dataset containing 92,460 samples. The dataset is subsequently divided into training and testing subsets using an 80:20 ratio for MLP model development and evaluation. To ensure unbiased evaluation and generalization capability, the dataset is initially divided into training and test subsets using an 80/20 split. Hidden-layer sizes: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{50, 100, 150\}$$\end{document} Hidden-layer sizes: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{50, 100, 150\}$$\end{document} Activation functions: {tansig, logsig} Activation functions: {tansig, logsig} Solvers: {trainlm, trainscg} Solvers: {trainlm, trainscg} Learning rates: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{10^{-5}, 10^{-3}, 10^{-1}\}$$\end{document} Learning rates: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{10^{-5}, 10^{-3}, 10^{-1}\}$$\end{document} Algorithm 1Grid-search–optimized MLP training for SCR estimation. Grid-search–optimized MLP training for SCR estimation. A predefined hyperparameter search space is then constructed, comprising the number of hidden neurons \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {H}$$\end{document}, activation functions \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {A}$$\end{document}, training solvers \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {S}$$\end{document}, and learning rates \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {L}$$\end{document}. These ranges are selected to balance estimation accuracy, numerical stability, and real-time computational feasibility. The minimum MSE is initialized to infinity, and a placeholder is assigned for the optimal model to enable performance-based comparison. The algorithm proceeds by exhaustively evaluating all possible combinations of the selected hyperparameters through four nested loops. For each configuration, an MLP model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {M}$$\end{document} is initialized and trained using the training subset. The trained model is subsequently evaluated on the test dataset, and its estimation performance is quantified using the MSE metric. This validation-based assessment ensures that model selection is governed by generalization performance rather than training accuracy. Whenever the computed MSE is lower than the current minimum value, the algorithm updates the stored optimal model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {M}^*$$\end{document} and records the associated hyperparameter set \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Theta ^*=\{h,a,s,\ell \}$$\end{document}. Upon completion of the grid-search process, the algorithm returns the MLP configuration that yields the lowest test MSE within the defined search space. The resulting estimator is then employed for online SCR estimation and integrated into the proposed seamless GFL/GFM mode-transition framework. The resulting estimator represents the best trade-off between accuracy and robustness within the defined search space and forms the basis for real-time SCR estimation in the proposed GFL/GFM mode-transition framework.Fig. 4Training performance characteristics and evolution of RMSE and loss function with respect to training iterations. Training performance characteristics and evolution of RMSE and loss function with respect to training iterations. Final MLP training using optimal hyperparameters After executing the grid-search procedure in Algorithm 1, the optimal hyperparameter set \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Theta ^{*}=\{h^{*},a^{*},s^{*},\ell ^{*}\}$$\end{document} is obtained as mentioned in Table 1 Using this configuration, the final MLP is retrained to produce the deployed SCR estimator. The verified dataset \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {D}=\{X,y\}$$\end{document} is loaded, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$X\in \mathbb {R}^{N\times 4}$$\end{document} contains the four PCC-derived input features and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$y\in \mathbb {R}^{N}$$\end{document} contains the corresponding impedance labels. Figure 4 illustrates the training and validation behavior of the proposed MLP-based SCR estimation model. Both RMSE and loss exhibit a steep decline during the initial training phase, indicating rapid learning of the nonlinear mapping between PCC measurements and grid strength. After the early transient, the curves gradually converge to low steady-state values, confirming stable optimization. The close alignment between training and validation RMSE throughout the learning process demonstrates strong generalization capability and absence of overfitting. The final validation RMSE of 0.636 indicates accurate SCR prediction across unseen operating conditions, despite variations in grid strength and operating regimes. The smooth convergence under a constant learning rate further confirms the numerical stability of the selected network architecture and hyperparameters. Overall, these results validate that the proposed MLP model achieves reliable convergence, robust generalization, and consistent estimation accuracy, making it suitable for real-time SCR estimation and decision-layer support for seamless GFL/GFM mode transitions. Results and discussion This section evaluates the performance of the proposed MLP-based SCR estimator, trained with the optimal hyperparameters obtained via a grid search. Both quantitative metrics and qualitative plots are employed to assess estimation accuracy, convergence behavior, and generalization capability. Figure 5(a) illustrates the predicted versus true SCR values over the test dataset. The close overlap between the predicted SCR and the ground-truth signal across a wide operating range demonstrates the estimator’s strong tracking capability. The MLP accurately captures abrupt SCR variations and steady operating segments, indicating its ability to generalize across different grid-strength conditions without observable bias or drift. The learning behavior of the proposed MLP is shown in Fig. 5(b), where the evolution of the MSE for training, validation, and test datasets is plotted. A rapid initial reduction in MSE is observed, followed by smooth convergence to a minimum validation error at epoch 266. The close alignment of training, validation, and test curves confirms the absence of overfitting and highlights the effectiveness of the selected hyperparameter configuration.Fig. 5Performance evaluation of the MLP-based SCR estimation: (a) prediction accuracy under varying grid impedance conditions, and (b) training convergence characteristics.Fig. 6Performance analysis of the MLP training process: (a) evolution of training state variables, and (b) statistical distribution of estimation errors. Performance evaluation of the MLP-based SCR estimation: (a) prediction accuracy under varying grid impedance conditions, and (b) training convergence characteristics. Performance analysis of the MLP training process: (a) evolution of training state variables, and (b) statistical distribution of estimation errors. Figure 6(a) presents the evolution of the gradient norm, Levenberg–Marquardt damping parameter (μ), and validation checks during training. The gradual reduction of the gradient to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$9.43\times 10^{-6}$$\end{document} indicates convergence toward a local minimum of the loss function. The damping factor stabilizes at a small value, indicating a smooth transition from gradient descent to second-order optimization. The limited number of validation checks confirms stable generalization performance throughout training. The histogram of estimation errors shown in Fig. 6(b) reveals a narrow distribution centered around zero for training, validation, and test datasets. The near-zero error rate indicates low estimation variance and negligible bias, which are essential for reliable real-time SCR estimation. The absence of heavy tails further indicates robustness against noise and outliers in the input features. Figure 7 presents regression plots comparing estimated and actual SCR values for training, validation, test, and combined datasets. High correlation coefficients (R>0.9996 across all cases) confirm the strong linear correspondence between predicted and actual SCR values. The regression slopes remain close to unity with negligible offsets, demonstrating that the MLP estimator preserves both scaling and offset accuracy across different data partitions.Fig. 7Regression plots of estimated versus true SCR values for training, validation, test, and combined datasets, showing high correlation and near-unity regression slopes. Regression plots of estimated versus true SCR values for training, validation, test, and combined datasets, showing high correlation and near-unity regression slopes. SCR estimation accuracy and switching signal robustness An online OLS estimator is implemented using a recursive least squares update law. Although computationally lightweight, OLS assumes a linear relationship between PCC variables and SCR, making it sensitive to noise and grid nonlinearity. It also requires perturbation signals to improve performance, a practice that grid operators discourage. These limitations make it suitable only as a baseline reference model. An MLP based estimation is an initiative method towards non-linear estimation method. Although OLS provides a representative low-complexity baseline, future work will include advanced non-linear based estimation benchmarking against RLS, EKF, SVR, Random Forest, and LSTM-based estimators.Fig. 8SCR estimation accuracy and inverter dynamic response during GFL/GFM transition under increasing grid strength.Fig. 9SCR estimation accuracy and inverter dynamic response during GFL/GFM transition under decreasing grid strength. SCR estimation accuracy and inverter dynamic response during GFL/GFM transition under increasing grid strength. SCR estimation accuracy and inverter dynamic response during GFL/GFM transition under decreasing grid strength. Figure 8 illustrates the SCR estimation accuracy and inverter response when the grid strength increases gradually. The proposed MLP-based estimator accurately tracks the increasing SCR with a smooth, monotonic profile, whereas the OLS-based estimate exhibits small oscillations around the true value. These oscillations translate into a less distinct switching instant. From a dynamic perspective, the inaccurate OLS-based SCR estimate results in noticeable oscillations in active power due to perturbations during the transition interval. In contrast, reactive power exhibits small but persistent ripples. In contrast, the MLP-based switching maintains active power tightly regulated around its reference and ensures a smooth evolution of reactive power without abrupt deviations. The frequency response under MLP-based switching remains close to the nominal value with minimal transient deviation. In contrast, the OLS-based approach introduces small frequency excursions due to premature or delayed mode transitions. The case of gradual grid weakening is presented in Fig. 9. As the SCR decreases, the MLP estimator continues to provide accurate, noise-free estimates across the entire operating range. Conversely, the OLS estimator becomes increasingly sensitive to measurement noise and impedance variation, leading to growing estimation errors near the critical switching threshold. These estimation inaccuracies directly affect inverter dynamics. Under OLS-based switching, active power exhibits amplified oscillations and settling delays, whereas reactive power exhibits noticeable transient spikes. The MLP-based approach significantly mitigates these effects, yielding a well-damped active power response and a smooth reactive power adjustment. Moreover, the frequency deviation during the transition remains within tight bounds for the MLP-based method, confirming improved synchronization performance under weakening grid conditions.Fig. 10SCR estimation accuracy and inverter transient response during abrupt grid-strength variations .Fig. 11SCR estimation accuracy and inverter response during abrupt reduction in grid strength. SCR estimation accuracy and inverter transient response during abrupt grid-strength variations . SCR estimation accuracy and inverter response during abrupt reduction in grid strength. Figure 10 depicts inverter behavior during an abrupt increase in SCR. In this scenario, the OLS-based estimator exhibits pronounced overshoot and transient spikes in the estimated SCR, which propagate into the switching logic and excite interactions within the control loop. As a consequence, significant disturbances in active power are observed, characterized by sharp spikes and oscillations immediately after the transition. Reactive power also exhibits abrupt excursions due to sudden changes in synchronization dynamics. Additionally, the frequency response under OLS-based switching shows clear overshoot and undershoot before settling. In contrast, the MLP-based estimator rapidly converges to the new SCR level, enabling smooth switching that suppresses power oscillations and ensures rapid frequency stabilization. The most critical case, sudden SCR reduction, is shown in Fig. 11. Under these severe conditions, the OLS estimator exhibits estimation lag and oscillatory behavior, resulting in delayed or unstable switching decisions. These shortcomings lead to pronounced transients in inverter dynamics: active power experiences deep dips and overshoots, reactive power undergoes sharp fluctuations, and frequency deviation exceeds acceptable limits immediately following the transition. In contrast, the MLP-based estimator adapts rapidly to the sudden SCR drop, producing a clean switching signal. Consequently, active and reactive power responses remain well damped, and the frequency is restored to its nominal value with a shorter settling time and reduced peak deviation. Table 2 summarizes the performance of the proposed MLP estimator against the OLS baseline. Across all four grid scenarios, the proposed MLP estimator yields consistently lower estimation delay (0.012–0.016 s) and much smaller RMSE (0.021–0.269%) than the online OLS method, indicating faster and more accurate SCR tracking. In contrast, OLS exhibits substantially larger delay (0.3–1.20 s) and higher RMSE (2.64–17.00%), with the worst degradation under sudden SCR changes, highlighting its limited suitability for rapid GFL/GFM mode-transition decisions.Table 2SCR estimation performance under different grid scenarios.ScenarioEst.Delay (s)RMSE (%)Gradual decrease in SCROLS0.302.64MLP0.0120.2288Gradual increase in SCROLS1.205.05MLP0.0150.269Sudden increase in SCROLS0.5211.54MLP0.0160.186Sudden decrease in SCROLS0.7217.00MLP0.0140.021 Table 2SCR estimation performance under different grid scenarios.ScenarioEst.Delay (s)RMSE (%)Gradual decrease in SCROLS0.302.64MLP0.0120.2288Gradual increase in SCROLS1.205.05MLP0.0150.269Sudden increase in SCROLS0.5211.54MLP0.0160.186Sudden decrease in SCROLS0.7217.00MLP0.0140.021 SCR estimation performance under different grid scenarios. The results demonstrate that the proposed MLP-based estimator significantly outperforms OLS in accuracy, noise robustness, and inference latency. The MLP’s nonlinear mapping capability enables reliable SCR estimation under weak-grid and dynamic operating conditions. Its single-pass inference makes it suitable for embedding in digital controllers for real-time GFL/GFM mode-transition decisions. The present study has the following limitations. First, validation is limited to detailed simulation studies and does not include HIL or laboratory experiments. Second, benchmarking is restricted to OLS-based estimation. Third, fixed hysteresis thresholds are employed and may require adaptation under highly variable operating conditions. Fourth, the analysis focuses on a single inverter system and does not investigate multi-converter interactions. These aspects will be addressed in future work and bridge the road for future. Conclusion This paper presents a grid-search–optimized MLP approach for real-time estimation of the short-circuit ratio to support seamless GFL/GFM mode transitions in converter-dominated grids. The proposed estimator demonstrated superior accuracy, robustness, and inference speed compared with a conventional online OLS method. Results show that the optimized MLP effectively captures nonlinear SCR behavior and maintains low prediction error even under noisy operating conditions. Owing to its lightweight architecture and single-pass computation, the method is potentially suitable for embedded implementation subject to future HIL and hardware validation. While the proposed method is validated in simulation, future work will investigate hardware-in-the-loop and experimental verification under real grid disturbances, integration with adaptive switching thresholds, and multi-converter coordination.