## 1 Introduction  
The increasing integration of renewable energy sources (RESs) and power electronics-based devices in modern power grids has significantly improved flexibility, efficiency, and environmental sustainability [1], as shown in Figure 1. The integration of RESs, such as solar and wind power, has enabled more decentralized and cleaner power generation, reducing dependence on fossil fuels and lowering carbon emissions [2]. Additionally, power electronics-based devices, such as inverters and converters, have enhanced grid flexibility by enabling more precise control over power flow, with recent advancements achieving up to 95% efficiency in high-power inverters [3]. However, this shift also introduces various technical challenges related to power quality and system stability [4]. Nonlinear loads, such as variable speed drives, rectifiers, and other power electronic devices, generate harmonic currents that distort the voltage waveform, with total harmonic distortion (THD) levels reaching as high as 30% in systems with significant nonlinear load penetration [5, 6]. This harmonic distortion can lead to various issues, including transformer overheating, higher system losses, and interference with sensitive electronic equipment [7]. Furthermore, replacing traditional synchronous generators with RESs interfaced via voltage source converters has reduced system inertia, which plays a crucial role in damping frequency disturbances and ensuring stability in the grid [4]. This reduction in inertia increasesthe grid's sensitivity to frequency deviations, particularly under sudden load changes or renewable generation variability, as discussed [8; 9]. In recent years, significant advancements have been made in addressing these challenges. For instance, using advanced power electronic converters in RES integration has improved power quality, with multi-pulse rectifiers reducing harmonic distortions to below 5% in grid-connected photovoltaic (PV) systems [10]. Additionally, grid-connected PV systems employing Fractional Order Notch Filters (FNOFs) have demonstrated the ability to mitigate harmonic currents, achieving a THD reduction to 3.5% while compensating for reactive power and load unbalancing [11]. Moreover, the application of Unified Power Quality Conditioners (UPQCs) in PV-wind systems has successfully reduced THD from over 55% to below 2.23%, ensuring stable voltage and current levels under various operating conditions [12]. These advancements highlight the progress in managing power quality and stability issues in RES-dominated grids. Conventional solutions, such as passive power filters, have been employed to mitigate harmonic distortions [13]. Passive filters are designed to attenuate specific harmonic frequencies, but they are often bulky, inflexible, and prone to resonance, making them unsuitable for dynamic systems where the harmonic spectrum can vary with load conditions. These systems also lack adaptability and cannot adjust to changing grid conditions, leading to inefficient performance when harmonic spectra vary with load [14]. On the other hand, active power filters (APFs) offer a more flexible, dynamic solution by compensating for harmonic currents in real time, achieving THD reductions to below 5% in grid-connected scenarios [15]. APFs can operate in both grid-connected and islanded modes, allowing them to adapt to varying grid conditions and load changes while providing more precise harmonic mitigation [16]. However, most APFs operate in grid-following mode, meaning they rely on an existing grid voltage for synchronization, making them dependent on grid stability and less effective in weak grids where voltage fluctuations exceed 10% [17; 18]. While effective in mitigating harmonic currents, these systems cannot provide essential grid-supportive services, such as voltage regulation, frequency support, and enhanced damping, which are necessary in grids with high-RES penetration. GFMCs have emerged as a promising solution to address the above-mentioned shortcomings.