Abstract
The integration of photovoltaic (PV) systems and renewable energy sources into modern utility grids presents substantial opportunities for sustainable energy, yet also introduces critical power quality challenges due to the proliferation of nonlinear and unbalanced loads. This paper proposes a dynamic multi-function reference frame control (DMRFC) strategy for a multifunctional bidirectional grid-interactive converter (µG-MPGIC), designed for PV-grid interconnection with enhanced power quality assistance. Built upon the Synchronous Reference Frame (SRF) theory, the DMRFC approach enables autonomous multifunctionality: (i) dynamic regulation of active power transfer based on load demands and available DC-side energy, (ii) bidirectional energy flow between AC and DC interfaces considering the battery's state of charge (SOC), (iii) harmonic current mitigation, reactive power compensation, and (iv) neutral current suppression under unbalanced load conditions. A small-signal transfer function model is developed for stability analysis using frequency-domain methods. Simulation studies conducted in MATLAB/SIMULINK demonstrate that the proposed DMRFC control achieves a total harmonic distortion (THD) reduction in grid currents to
Keywords
Introduction
The global surge in energy demand is closely tied to population growth and evolving lifestyle standards. At the same time, rising concerns about carbon emissions and the declining availability of fossil fuels are pushing the energy sector toward sustainable alternatives. In response, renewable energy sources (RES) are being increasingly adopted across numerous applications (Pupo-Roncallo et al., 2021). Among these, photovoltaic (PV) systems have proven to be especially promising not only because they can be installed almost anywhere, but also due to rapid technological advancements.
Recent developments in PV technology, such as the improved performance of water-based PV setups (Mentel et al., 2023) and better energy yield under partially shaded conditions (Manjunath et al., 2019), have enhanced the practicality of these systems. There's also been notable progress in power electronics, particularly in the design of DC–DC converters. Many of these now offer significantly higher voltage gains, sometimes exceeding ten times the input by maintaining efficiency levels of around 93%. A variety of MPPT strategies have also been proposed, including multivariable approaches that adapt more efficiently to changing conditions (Abdel-Rahim & Wang, 2020).
What stands out further is the improvement in inverter designs for grid integration. Three-phase three-leg or four-leg seven-level inverters, as outlined in the works of Kirubakaran et al. (2019) and Ahmed et al. (2020), have made real strides by reducing component count and voltage stress. Their ability to compensate for neutral current imbalances and maintain low total harmonic distortion (THD) helps simplify PV system integration into utility grids. Taken together, these innovations are making PV a more viable and practical choice for both standalone and grid-connected systems.
From a control point of view, harmonic current calculation can be performed using two methods: (i) frequency domain approach and (ii) time domain approach. The sliding discrete Fourier transform techniques discussed by Tyagi and Sumathi (2020) and Orallo et al. (2014) offer harmonic analysis in the frequency domain, but they involve significant computational effort. Moreover, for dynamically varying harmonic frequencies, calculating Fourier coefficients repeatedly becomes time-consuming.
Time-domain techniques (Akagi et al., 1984; Bhuvaneswarin & Nair, 2008; Herrera & Salmeron, 2009) simplify the process by decoupling the fundamental component from the harmonic currents. These harmonic components can be injected in quadrature to cancel the distortion. This decomposition concept offers a practical way to inject PV-extracted power into the grid by combining the active component from the DG with the extracted harmonic content from the load. This modification enables a multi-objective control structure with a simple design.
However, PV power systems are inherently intermittent, rendering the PV inverter underutilized during periods of low solar availability (Li et al., 2015). Meanwhile, power quality issues such as harmonic pollution and load unbalance are growing due to the increasing presence of nonlinear loads and high penetration of RES in distribution networks and microgrids. Additionally, in power quality-sensitive electricity markets, such disturbances can impact pricing, further justifying the need for multifunctional grid-tied converters.
These grid interconnection problems and those associated with nonlinear, unbalanced loads are addressed by incorporating multipurpose grid-tied converters (MPGTIs) for real power transfer to the grid while simultaneously enhancing power quality (Kumar & Singh, 2018; Singh et al., 2011; Tummuru et al., 2014). Time-domain control strategies, such as the instantaneous power theory (p–q theory), have been explored in several studies (Akagi et al., 2017; Bouzelata et al., 2015; İnci et al., 2016; Safa et al., 2018). However, when the grid voltage is distorted due to unbalance or harmonic components, these methods may inadvertently introduce harmonics into the reference currents. As a result, both real and imaginary power components may arise, affecting overall power quality.
Advanced methods like adaptive notch filtering (ANF) based decomposition of fundamental and polluted components, as presented by Chilipi et al. (2020) and Shah and Singh (2020), suffer from a sluggish transformation process. It is also evident that using a greater number of notch filters for decomposition adds to system cost.
A symmetrical component theory-based MPGTI is proposed by Bouzelata et al. (2015), but not all multifunctional features—such as unbalance and reactive power compensation—are addressed, and the
An MPGTI based on the enhanced phase-locked loop (EPLL) is reported by Vigneysh and Kumarappan (2017); however, it lacks discussion on MPPT, the type of renewable energy source (RES) used, and control over injected power. Triangular function-based decomposition of active and reactive currents, as discussed by Verma et al. (2015) and Verma and Singh (2018), requires a higher number of low-pass filters, which can cause time delays in estimating fundamental signals.
An MPGTI based on fundamental load current decomposition (FLCD) for extracting active and reactive currents is reported by Patel et al. (2019), and although it addresses all multifunctional aspects, the control structure is complex and involves three low-pass filters, further increasing system complexity.
Normally, the control schemes implemented in noteworthy previous works have used PI, PR, and hysteresis controllers to control MPGTIs (Golestan et al., 2018; Mao et al., 2012; Teodorescu et al., 2006). PR controllers are employed in the stationary reference frame, offering control features such as low steady-state error, higher gain, and effective mitigation of lower-order harmonics. Controllers operating in the rotating reference frame (dq0) are often preferred for their straightforward structure and accurate reference tracking. Hysteresis control (HC), in particular, provides significant advantages like robustness and fast dynamic response; however, it also presents drawbacks, including higher current ripple and increased switching losses.
Several impactful studies have been explored to demonstrate the technical soundness and practical relevance of the proposed multifunctional control strategy. In works such as Singh et al. (2011), Tummuru et al. (2014), and Kumar and Singh (2018), reference current generation is primarily based on the decomposition of load currents. These methods focus on improving power quality by enabling harmonic suppression and supporting both active and reactive power exchange based on real-time load conditions. Yahia et al. presented a comparative study of current detection algorithms, emphasizing the significance of accurate signal decomposition in multifunctional converters. Their work highlights that the performance of control strategies depends heavily on the algorithm's ability to respond under varying operating scenarios, such as dynamic or nonlinear load conditions.
Robust inverter control methods are further detailed in Safa et al. (2018), Chilipi et al. (2020), and Shah and Singh (2020), where the primary objective is to maintain a balance between power quality and system stability. These techniques involve continuous monitoring of load demands, with real and reactive power components being computed and injected accordingly. The harmonic components are effectively filtered and injected back to minimize distortion in grid currents.
Advanced control strategies utilizing intelligent algorithms such as fuzzy logic and adaptive observers are explored in Li et al. (2005), Acuna et al. (2014), Vigneysh and Kumarappan (2017), and Verma et al. (2015). These approaches enhance the flexibility and responsiveness of grid-connected converters under fluctuating grid and load scenarios. For instance, fuzzy-PI and observer-based techniques significantly improve the controller's ability to manage non-linearities and uncertainties in renewable energy environments.
Research efforts such as Patel et al. (2019), Meral and Çelık (2019), and Zeng et al. (2016) propose multi-objective and hybrid control architectures to integrate photovoltaic (PV) systems into the grid while ensuring simultaneous support for voltage regulation, harmonic mitigation, and neutral current compensation. These studies collectively address not only the technical design aspects of multifunctional converters but also their adaptability to microgrid applications.
Finally, more recent developments, such as those presented by Singh et al. (2016) and Wang, Lam and Wong (2019), introduce hybrid structures and sustainable PV system models with multifunctional converters capable of injecting active power while compensating for non-active components under challenging operating conditions. These contributions serve as a strong foundation for enhancing grid reliability, especially when integrated with intelligent, flexible control strategies like the one proposed in this study.
Recent advances in photovoltaic (PV) systems have explored diverse strategies for improving efficiency, control, and integration with utility grids. Labiod et al. (2025) developed an AI-assisted diagnostic framework for PV panels by integrating an experimental buck–boost converter, enhancing fault detection and monitoring accuracy. Deghfel et al. (2024) proposed a model reference adaptive controller (MRAC) intelligently tuned with genetic algorithm (GA) and Whale optimization algorithm (WOA) to optimize MPPT operations under varying irradiance. Harrison et al. (2024) designed a control strategy for PV emulators based on a shift methodology to ensure stable operation under continuous environmental fluctuations. Natarajan Vijayanathan et al. (2024) introduced a multi-input DC–DC converter targeting nanogrid applications, enabling flexible integration of solar PV systems with multiple energy inputs. Zaghba et al. (2024) presented a novel hybrid MPPT technique that adapts to variable atmospheric conditions, improving grid-connected PV system performance. Reddy et al. (2023) developed an intelligent converter and controller tailored for electric vehicle (EV) drives, compatible with both grid-tied and standalone solar PV generation. Altawil et al. (2023) employed slap swarm optimization to fine-tune a fractional-order PI controller for voltage regulation in grid-connected PV systems. Rekioua et al. (2024a, 2024b) proposed a smart PV architecture that integrates battery storage and hydrogen production to ensure energy sustainability and system versatility. Panchanathan et al. (2025) examined a boost converter coupled with a Perturb and Observe (P&O) MPPT approach for efficient EV charging applications using PV energy. Another contribution by Rekioua et al. (2024a, 2024b) involved integrating PV with grid systems through a modulated hysteresis current control approach to ensure accurate power control. Babu et al. (2023) analyzed the dynamic performance of grid-connected PV systems using an advanced control strategy under varying environmental conditions. Mohapatra et al. (2022) validated a real-time control method based on the Improved African Vulture Optimization Algorithm (IAOA), implementing an offset hysteresis band current controller for grid-tied PV inverters. Behera et al. (2022) proposed the control of an 11-level modular multilevel converter that functions as a dual-purpose inverter, optimized for grid-connected PV systems. Yahiaoui et al. (2022) validated intelligent control for a standalone solar energy system using the dSPACE platform, confirming practical feasibility. Goud et al. (2023) introduced a gravitational search algorithm (GSA) based fractional-order PID controller to enhance power quality in PV-integrated VSI systems. In a related study, Goud et al. (2022) demonstrated a hybrid PV/wind turbine system that employed Gray Wolf Optimization to improve voltage stability and reduce harmonics. Madaria et al. (2020) developed a grid-connected PV module with autonomous power management, addressing energy flow under dynamic load conditions. Bajaj and Singh (2020) delivered a thorough review of power quality issues and modern mitigation strategies in renewable distributed generation systems. Selvakumar et al. (2022) designed a cone-structured seven-level boost inverter combined with an online monitoring controller to enhance power quality in DSTATCOM applications. Kumar et al. (2022) evaluated the performance of an optimized asymmetric multilevel inverter in grid-connected solar PV systems, reporting improvements in efficiency and waveform quality. Finally, Pachauri et al. (2023) presented a robust fractional-order control scheme specifically designed for PV-penetrated, grid-connected microgrids, focusing on dynamic stability and control robustness.
The detailed review of existing literature reveals that while various control strategies have been developed for multifunctional grid-tied converters, significant challenges persist. Most prior methods primarily rely on load-current-based reference generation, resulting in unidirectional power flow and underutilization of converters during renewable energy intermittency or battery surplus conditions. Traditional techniques such as instantaneous power theory (IPT), symmetrical component theory (SCT), and adaptive filtering methods often introduce complex structures, higher computational burdens, or sluggish dynamic responses. Moreover, many existing solutions inadequately address harmonic compensation, neutral current mitigation, and dynamic active/reactive power management under fluctuating load and source conditions within a single unified framework. Furthermore, prior works largely neglect the intelligent incorporation of battery state of charge (SOC) and real-time renewable availability into the control mechanism, limiting system flexibility and robustness. Therefore, there remains a critical need for a dynamic, multifunctional, bidirectional control strategy that can autonomously manage energy dispatch, maintain power quality, and ensure stable grid support under a wide range of practical operating conditions.
Consider a scenario where the load remains constant and no power is available from the renewable energy sources (RES). In such cases, existing control schemes in the literature typically inject real power proportional solely to the load demand, without accounting for the available energy at the RES or the battery. This inherently results in a unidirectional operation of the multipurpose grid-tied inverter (MPGTI), as the reference currents are generated based purely on the load currents. Similarly, under constant load conditions where significant energy is available from the battery or distributed generation (DG) units, conventional control strategies again fail to utilize the surplus effectively, injecting only the amount of power required by the load. In contrast, the proposed dynamic multi-function reference frame control (DMRFC) strategy addresses this limitation by regulating grid power flow based not only on variations in load demand but also on the real-time availability of energy from the RES and the state of charge (SOC) of the battery. In the proposed method, when the battery requires charging and sufficient grid energy is available, the inverter can autonomously manage the additional current needed for battery charging alongside the load current. Conversely, when excess energy is available at the battery or RES, it can be exported back to the grid. By incorporating both the load conditions and energy availability into the reference current generation for the Multi-Purpose Grid Integrated Inverter (MPGII), the DMRFC enables true bidirectional energy flow. This significantly enhances the operational scope of the MPGII, promoting more efficient, intelligent, and autonomous energy management within the grid-connected system.
The main contributions of this paper are summarized below:
In order to provide intelligent and autonomous energy dispatch based on real-time PV generation and battery state of charge (SOC), a novel dynamic multi-function reference frame control (DMRFC) technique is put forth for a bidirectional grid-tied PV system. Active power injection, battery charging and discharging, harmonic compensation, reactive power compensation, and unbalanced load current mitigation are the five simultaneous functions that the suggested technique enables. For both voltage and current control loops, a comprehensive controller design and stability analysis utilizing frequency-domain response and small-signal transfer function modeling are provided. Five dynamic case studies are used to empirically validate the suggested DMRFC using MATLAB/SIMULINK simulations, and the results are compared with both SCT and IPT control procedures and Numerical data show that DMRFC is better than SCT and IPT.
The remainder of this paper is structured as follows. Section II system description and test configuration under study. Section III outlines the instantaneous power theory (IPT) and symmetrical component theory (SCT) based control strategies used for comparison. Section IV presents the proposed dynamic multi-function reference frame control (DMRFC) strategy and its working principles. In Section V, the design and stability analysis of the controller using transfer function models are detailed. Section VI provides comprehensive simulation results and comparisons for various operating conditions. Finally, Section VII concludes the paper with key findings and suggestions for future work.
System description and test configuration
The designed three-phase, three-wire µG-MPGIC system integrates a solar PV array through a boost converter, as illustrated in Figure 1. The boost converter employs an incremental conductance (INC)-based maximum power point tracking (MPPT) algorithm to effectively extract the highest possible power from the PV source, while simultaneously elevating the DC output voltage to align with the voltage requirements of the DC-link. A DC-link capacitor is incorporated to fulfill several roles, including:
Enabling the export of active power to the utility grid under varying load demands, Compensating for energy losses caused by switching operations within the µG-MPGIC unit, Maintaining voltage stability under fluctuating solar irradiance conditions.

Configuration of proposed grid tied PV power system.
Due to environmental unpredictability, the DC bus may undergo voltage instability. To mitigate this, a battery system integrated with a bidirectional DC-DC converter is utilized to balance power flow during PV intermittency by supplying the required deficit energy. To replicate harmonic disturbances, a three-phase diode bridge rectifier is employed as a nonlinear load. Additionally, two 3-phase R–L loads are introduced to analyze dynamic behavior in both active and reactive power flow. Load imbalance is artificially generated by connecting unequal resistive loads (Rd1 = 80 Ω and Rd2 = 60 Ω) to phases ‘b’ and ‘c’, respectively.
A properly rated filter inductor is placed to suppress current harmonics in the compensating signals produced by µG-MPGIC. This system operates as a current-controlled voltage source converter (VSC), capable of facilitating bidirectional energy transfer between the AC and DC sides. Furthermore, it performs as a three-phase shunt active power filter, efficiently reducing grid current harmonics, providing reactive power compensation, and correcting load unbalances at the point of common coupling (PCC).
Techniques for generating command currents
Generating command currents based on symmetrical component theory (SCT)
Symmetrical component theory (SCT) is primarily used for the analysis of three-phase unbalanced systems (Büyük et al., 2019; Hoon et al., 2017; Pawar et al., 2019). The main objective of the instantaneous SCT approach is to generate reference currents that can fulfill all three critical goals, active power delivery, harmonic mitigation, and load balancing.
The transformation matrix used to analyze unbalanced systems in terms of balanced systems is given in Eq. (1)
The primary function of control scheme is to calculate instantaneous positive sequence load currents and grid voltage using SCT
If the phase of vector
In order to balance the grid current neutral current compensation is required, for that the current through neutral conductor must be equal to zero
When θ is equal to zero then grid side converter supplies reactive power, which is equal to the instantaneous power. For unbalanced loads along with harmonic content the instantaneous power is given as sum of dc value, double frequency component and harmonic component
The primary objective of μG-MPGIC is to supply oscillating component and available real power at dc bus. Henceforth using Eq (7), (8) & (9) the reference currents for μG-MPGIC is given as
The reference currents for μG-MPGIC in (20) in terms of active and reactive power is given as
Generating command currents based on instantaneous power theory (IPT)
The active filter currents are produced based on the load behavior and the instantaneous active and reactive power components. This process involves calculating the voltages of the main power supply and the currents of the nonlinear load in a specified reference frame. The transformations used are provided in Equations 10 and 11 (Amenedo et al., 2021; Peng & Lai, 1996; Akagi, Kanazawa & Nabae, 1984). The zero-voltage component is presumed to be nonexistent due to the absence of a neutral conductor; similarly, the zero-current component is also considered null.
After measuring the voltages and current along two axes, the next step is to calculate both the active and reactive powers, as outlined in Eqn. 12. This equation can be broken down into two main components: the average power and the oscillatory power. When the mains voltage is balanced and sinusoidal, the average power is primarily influenced by the first harmonic current of the positive sequence. However, the oscillatory power includes all higher-order current harmonics, including the first harmonic current of the negative sequence. To maintain stability in the average power components of the mains, the active power filter (APF) must make adjustments to compensate for the oscillatory power components. These adjustments involve modifying the powers that need correction, denoted as pc = −pl and qc = −ql, after applying high-pass filters (HPF) to remove the average power components described in Eqn. 13 and Eqn. 14.
In non-sinusoidal mains, this technology does not yield superior performance. As a result, we must find alternative compensatory strategies.
Dynamic multi-function reference frame control strategy
Three reference currents are to be generated by control arrangement for accomplishing multifunctional capability of μG-MPGIC. DMRFC depicted in Figure 2 is used in generating the command currents.

Synoptic elucidation of proposed control scheme.
In addition to load current, battery's SOC is also utilised in calculation of reference current component. This makes the control system modified, flexible and it also helps in obtaining control over grid current, concurrently on real power injected to the grid. This section provides detailed summary of accomplishing all the objectives with control functions. μG-MPGIC needs compensation currents Id*ref, Iq*ref, I0*ref which are achieved by sensing grid current (IG(RYB)), load current (IL(RYB)), DC link voltages (Vdc). Enhanced phase locked loop (EPLL) along with Grid voltages (VG(RYB)) are used for obtaining grid synchronising angle (Ө).
Condition: I (t = 0.3–0.8 s) (real power injection)
The amount of real power to be injected mainly on active current of DG Id1and this Id1 can be regulated by regulating error in DC link voltage which is given in Eq. (15) and Eq. (16).
The real power transfer injection can be done in two ways
First way is to inject oscillating component of load current, reference current is given in Eq.(17) If the load is constant or lightly loaded then load current based real power transfer will not work. However, under such circumstances if battery has significant charge, then this power can be exported. The reference current is given in Eq. (18).
Condition: II (t = 0–0.8 s) (bi-directional operation of μG-MPGIC)
The bi-directional feature of μG-MPGIC will be enabled when SOC < 15%, Under Such circumstances μG-MPGIC will work as rectifier to enable battery charging through the bidirectional DC-DC converter, the reference current is derived as follows.
Condition: III (t = 0–0.3 s) (Source current harmonic compensator)
μG-MPGIC can be utilized as an active filter to diminish most dominant harmonics created by non-linear load at PCC. This function can be achieved simultaneously along with active power transfer or individually. Frequency domain based harmonic elimination suffers from large mathematical computation. In time domain to reduce the computational burden load currents are transferred to DQ0 frame to extract harmonic &fundamental components simultaneously. He transformation equation is given in Eq. (20).
For harmonic elimination reference currents are
For harmonic elimination & real power transfer reference currents are
Condition: IV (t = 0.3–0.8 s) (reactive power injection)
This suggested μG-MPGIC is capable of compensating reactive part of load current duly with help of q-axis portion of load current. Considering reactive power compensation, q-axis current component is entirely infused back.
Condition: V (t = 0–0.8 s) (un-balance compensation)
If grid currents are unbalanced by feeding load then balance the grid currents by generating a reference current given below
Design of μG-MPGIC controller parameters
Controller parameter estimation through optimal criteria plays vital role in improving the stability, robustness & dynamic performance of system. The proposed control strategy has two control loops (i.e., interior current loop external voltage loop) shown in Figure 3. Design of internal control loop is done with vital intention of achieving less settling time during dynamic situations; similarly, exterior voltage loop is done to achieve intact control and stability.

Transfer function model of two loop controlled μG-MPGIC.
Design of interior current loop
To control active and reactive power separately two interior current loops are required but due to same structural aspects only one loop is considered for frequency response analysis The PI controller is represented by a first-order transfer function, as shown in Eq. (27). Likewise, the transfer function of the LCL filter exhibits a behavior comparable to that of a conventional L-type filter, as discussed by Liserre, Blaabjerg and Hansen (2001), when frequency range concurs with bandwidth of inner loop.
Where
Under dynamic conditions, higher-order systems exhibit a sluggish response. To avoid significant time delays, as per the modulus optimum criterion, it is necessary to equate the integral time constant with the filter time constant, thereby canceling the predominant poles (Levine, 2011; Peña-Alzola & Blaabjerg, 2018).
Where
The PI controller gains obtained

Bode response of intramural current loop.
Design of exterior voltage loop
The small-signal representation of the inner current loop is considered as a subset of the outer control loop. The PI controller used in the outer loop is modeled using a first-order transfer function. Similarly, the inner current loop is approximated by a first-order transfer function incorporating a time delay denoted by Ta.
From power balance criteria of converter, the transfer function of DC bus capacitor is given as
No closed loop transfer function is given as
From the above equation the concept of pole-zero cancellation will not work because it has double pole at origin, so by using symmetrical optimum criteria PI gains are calculated. Frequency response of voltage loop is demonstrated in Figure 5, which has PM of 53.20 lies at 3.33*103 rad/sec approximately equal to 529 Hz. This phase cross over frequency is around ten times smaller than switching frequency 6000 Hz, which is mostly preferable to prove that system is robust under uncertainties.

Bode response of outer voltage loop.
Simulation results and discussion
To evaluate the performance and effectiveness of the proposed DMRFC-based µG-MPGIC system under dynamic operating conditions, simulations were carried out using the MATLAB/SIMULINK platform. In order to demonstrate its multifunctional capabilities, the system was tested across five distinct case studies. The simulation outcomes corresponding to both control strategies were thoroughly compared to validate the system's performance. A comprehensive list of components used in the proposed setup is presented in Table 1.
μG-MPGIC as a bidirectional Converter μG-MPGIC as Active Power Filter (PPV = 0) Active And Reactive Power Export Through μG-MPGIC (PPV > PRES; PPV < PRES) μG-MPGIC with Concurrent Operation for Multiple Conditions (Dynamic Performance)
Operating parameters.
μG-MPGIC as a bidirectional converter
Many notable works presented previously focussed on load current decomposition-based reference current calculation, but if the condition arises where there is no variation in load and surplus amount of power is available at battery then the load current decomposition-based control structure will not inject any real power. This problem is addressed in this proposed work. To validate this from t = 0–0.8 s a constant nonlinear load of 16.5 kW is connected, but two cases will be raised a) battery charging b) battery discharging. At t = 0.3 s SOC of battery is enabling the battery to charge, so now total current (load current + battery current) should be consumed from grid. Henceforth it is very clear from Figure 6(a1)-(a3) that during t = 0–0.3 s grid is carrying only load current (32A), but at t = 0.3 s grid current is sum of load current and battery charging current (42A), simultaneously grid real power is increased Similarly in discharging mode the SOC of battery is making μG-MPGIC to inject battery current to grid in order to reduce the burden. Figure 6(A1)-(A3) Demonstrates that at t = 0.3 s grid current magnitude is decreasing and concurrently grid real power magnitude is reduced.

Performance of µG-MPGIC under bidirectional operation.
The bidirectional features of battery are presented in Figure 7 (a)-(b). At t = 0.3 s SOC of battery is considered less; hence the battery has to charge. To enable bidirectional feature, the main condition considered is power available at PV source is zero. In this scenario the battery is to be charged by taking current from grid, so for this purpose μG-MPGIC has to work as rectifier and it has to charge the battery through bi-directional dc-dc converter, notably under this condition power should flow from grid to battery. It is also crystal clear from the Figure 7 (a)-(b) battery current is negative, simultaneously battery power is negative and μG-MPGIC output power is negative which indicates that converter is operating as rectifier. Similarly, for discharging of battery μG-MPGIC power is positive, battery current is positive and grid power magnitude is decreased. The numerical details of charging and discharging battery are given in Table 2.

(a) Charging condition (b) Discharging condition.
Bidirectional converter operational details.
μG-MPGIC as active power filter: (PPV = 0; t = 0–0.3 s)
Harmonic compensation
During this interval, the PV system does not generate any power. At time t = 0 s, a nonlinear load of 16.5 kW is introduced, causing distortion in the source current. Between t = 0 to 0.3 s, the µG-MPGIC operates in harmonic compensation mode, shaping the distorted source current into a sinusoidal waveform with minimal total harmonic distortion (THD). Here μG-MPGIC forces harmonic component to zero by injecting antagonistic copy of polluted harmonic components, so that harmonic nullification will occur. Figure 8 represents profile of load currents which is highly polluted. Figure 9 (A1) shows grid currents with IPT based control Scheme, (A2) shows grid currents with SCT based control Scheme. Similarly (A3)shows shows grid currents with DMRFC based conrol startegy.

Load current.

(A1) are grid currents with IPT based control strategy; (A2) grid currents with SCT based control strategy; (A3) are grid currents with proposed DMRFC based control strategy.
Figure 10(a) shows the load current with a THD of 68.86%, which is significantly high. Figure 10(b) presents the grid currents with a THD of 1.79% under the SCT-based control scheme. Similarly, Figure 10(d) shows the grid currents with a THD of 2.8% using the IPT-based control scheme. Figure 10(c) illustrates the grid currents with a THD of 1.25% achieved using the proposed DMRFC-based control scheme. These results clearly demonstrate that the proposed control scheme achieves lower THD compared to the SCT and IPT control schemes. The images clearly show how the proposed control scheme effectively mitigates the impact of the load current profile on the source currents, in contrast to the SCT and IPT control strategies.

(a) Load current and total harmonic distortion (THD) in phase “a”; (b) grid current and THD in phase “a” using the SCT method; (c) grid current and THD in phase “a” under the proposed DMRFC strategy; (d) grid current and THD in phase “a” under the IPT strategy.
The proposed multifunctional system is connected to the grid through L, LC, and LCL filters for THD (total harmonic distortion) analysis. In this work, a detailed analysis of THD with all three control schemes namely instantaneous power theory (IPT), symmetrical component theory (SCT), and the proposed DMRFC is carried out. The results from Figure 11 show that LCL filters offer superior harmonic performance compared to L and LC filters across all control methods. Among them, the proposed DMRFC control scheme achieves the lowest THD value of 1.84% with the LCL filter, outperforming both SCT (2.02%) and IPT (2.84%) when using the same filter.

THD analysis with different filters.
Table 3 summarizes the THD values obtained for all three filter configurations and all three control strategies. It is observed that the IPT method consistently yields higher THD compared to SCT and DMRFC, highlighting the limitations of IPT in achieving lower harmonic distortion.
THD analysis with optimized gains.
The present work also focuses on THD performance with different PI controller gains obtained through the modulus optimum criterion (MOC). As shown in Table 4, the lowest THD (1.25%) is achieved with the DMRFC scheme at gain G1, which is significantly better than SCT (1.79%) and IPT (2.8%) under the same conditions.
THD analysis with different filters.
In all simulation cases, the total harmonic distortion (THD) of grid current was computed by including the first 25 harmonic components. This selection aligns with the guidelines of IEEE 519, ensuring an accurate and standardized assessment of harmonic distortion in the power system.
Power factor features
The load connected in this proposed system is a non-linear 3Φ rectifier, thus operation of this type of loads will pollute source current and simultaneously introduces a phase difference between source voltage and current, which in turn leads to low power factor. Figure 12 shows power factor obtained from IPT, SCT, and DMRFC based control techniques respectively. It is very clear that the proposed control scheme gives unity power factor compared to SCT control scheme (0.96) and IPT control scheme (0.93). In the proposed method, the μG-MPGIC injects the reactive component of the R-L load as well as the reactive component of current required for rectifier operation, which improves the power factor.

Power factor improvement.
Active and reactive power export through μG-MPGIC (PPV > PRES; PPV < PRES)
In this case real power sharing ability is validated and shown in Figure 13 (a)-(c). In order to create the dynamics in active power available at PV source irradiation levels are changed based on simulation time shown in Figure 14 (a)-(b). Initially the total load demand from t = 0–0.3 s is supplied from grid because PV system is bypassed at t = 0.3 s At t = 0.3 s the irradiation is Ir = 1 kW/m2 and corresponding power generated is 9.4 kW, shown in Figure 14(c), under this condition a R-L load of 6.25 kW is connected at same t = 0.3 s The results obtained from Figure 13 (b)-(c) reveals that in this particular duration (t = 0.3–0.6 s) the total active power demand of 6.25 kW is supplied by μG-MPGIC and the residual power (9.4-6.25 = 3.15 kW) is injected to grid, however this residual power is flowing towards grid hence depicting negative. At t = 0.6 s another R-L load of 6.25 kW is connected, concurrently at same time irradiation level is reduced to Ir = 0.5 kW/m2, as a consequence the power generated by DG system is reduced to 4.2 kW. Notably in this duration (t = 0.6 −0.8 s) the total load is 12.5 kW, now the Figure 13 (b)-(c) demonstrates that the accessible power from PV source is supplied completely and the remaining load demand (12.5-4.2 = 8.3 kW) is supplied from grid to smoothen the load curve. The grid current waveform from cas-1 to case-3 presented in Figure 15 (a)-(b) reveals that, based on load demand the magnitude of grid current is clearly varying (Figure 14). From Figure 13 (a)-(c) shows variation in real power output of μG-MPGIC and grid subjected to variation in load and irradiation levels, however this figure also compares active power responses of μG-MPGIC and grid for SCT, IPT & DMRFC based control strategies in terms of settling time, overshoot. The observations made from all three control strategies like IPT, SCT, and the proposed DMRFC are tabulated in Table 5. It can be seen from Table 5 that the proposed control strategy offers superior performance compared to both SCT and IPT in terms of faster response, reduced oscillations, lower THD, and minimal overshoot. Among the three, IPT shows slower dynamic response and higher overshoot, while SCT performs better than IPT, but still falls short of the overall effectiveness achieved by the DMRFC method.

Active power of (a) load (b) μG-MPGIC (c) grid.

(a) P–V and I–V characteristics of the PV panel under varying irradiance levels. (b) P–V and I–V responses of the PV panel at 25°C. (c) Output power of the PV system for irradiance levels of 1000 W/m² and 500 W/m².

(a) Grid current magnitudes for different case (b) Zoomed image of currents.
Performance comparison of SCT & DMRFC control strategies.

Reactive power of (a) load (b) μG-MPGIC (c) grid.
μG-MPGIC with concurrent operation for multiple conditions (dynamic performance)
The primary goal of this case is to address all the challenges simultaneously. Two single-phase loads, R₁ = 80Ω and R₂ = 60Ω, are introduced into the system in addition to the existing load to intentionally cause an imbalance in the source current. These single-phase loads are applied to phases ‘b’ and ‘c’ for the entire duration of the simulation (t = 0 to 0.8 s). The current profiles, as shown in Figure 17 at various time points and further highlighted through a zoomed-in view of the load currents, reveal that the load current magnitudes vary and are unequal. Significant distortions are observed in the load current. However, the grid current profiles and their corresponding images in Figure 18(a)–(e) illustrates the behavior of grid currents under different control strategies. It is clearly observed that SCT-based control strategy exhibits a notable level of current imbalance and distortion, particularly during transient periods. The IPT-based method also shows significant distortion and imbalance, with visible deviation from sinusoidal form during dynamic load changes. In contrast, the proposed DMRFC control technique results in well-balanced grid currents with minimal distortion and lower THD, ensuring improved power quality and steady operation across dynamic conditions.

Load currents with unbalance load with zoomed images.

(a) Grid currents and its zoomed image with SCT control scheme (b) grid currents and its zoomed image with IPT control scheme (c) grid currents and its zoomed image with proposed DMRFC control scheme.
Under balanced grid current condition the sum of all grid currents must equal to zero,but we have considered unbalanced load condition. Figure 19 represents sum of all grid currents with the three control strategies, it is clear from Figure 19 that proposed control scheme is totally nullifying neutral current compared to SCT based control scheme.

Sum of all grid currents (neutral current).
Figure 20 represents DC link voltage waveform for both the control schemes at t = 0.3 and t = 0.6 s the irradiation levels and loading conditions are changed, but irrespective of change made in source side or load side the dc voltage must be kept constant for proper grid synchronization and active power control. However, from the Figure 20 it is evident that change in magnitude of Dc bus voltage at these specified intervals with SCT and IPT control scheme, whereas dc bus voltage is completely constant with proposed DMRFC control scheme.

DC Link voltage control.
Conclusion
This paper presents a robust and scalable control strategy DMRFC for enhancing the multifunctional capabilities of a grid-connected PV system with bidirectional energy flow. The approach fundamentally shifts the control logic from being purely load-driven to a more holistic model that incorporates both real-time generation availability and battery state-of-charge (SOC). This strategic shift enables the system to operate effectively even under conditions of constant load or intermittent generation, significantly improving energy dispatch flexibility.
Through extensive MATLAB/SIMULINK simulations, the controller's performance was validated under various scenarios, yielding strong numerical evidence of its advantages:
Total Harmonic Distortion (THD) of grid current was reduced to 1.25% using DMRFC, compared to 1.79% with SCT and 2.8% with IPT under identical filter configurations, highlighting the superior harmonic suppression capability of the proposed method. The power factor improved from 0.93 (IPT) and 0.96 (SCT) to unity (1.0) using the proposed DMRFC method, even under highly non-linear loading conditions, indicating excellent reactive power compensation. During unbalanced load conditions, the neutral current was almost completely mitigated using DMRFC, whereas SCT and IPT showed noticeable neutral current flow, indicating current imbalance and poorer control over asymmetrical loading. In bidirectional operation, the converter successfully handled transitions between charging (−4.96 kW) and discharging (+4.95 kW) states, with corresponding grid current variations from 32 A to 42 A, validating its energy buffering capability under dynamic conditions. The settling time for active power response under dynamic loading was 17 ms for DMRFC, compared to 8 ms for SCT and 15 ms for IPT. While DMRFC has slightly higher settling time, it offers improved control accuracy, fewer oscillations, and better steady-state performance.
Moreover, the proposed control strategy demonstrated excellent DC link voltage regulation, maintaining near-constant levels despite load transients and irradiation fluctuations, ensuring proper synchronization and converter stability. The DMRFC control scheme elevates the role of PV inverters in smart grid systems, achieving superior power quality, intelligent energy management, and adaptive multifunctionality. Its ability to concurrently handle harmonic suppression, reactive power compensation, grid current balancing, and bidirectional power flow, all within a single framework, makes it a compelling candidate for next-generation distributed energy systems. Future work could extend this architecture to hybrid RES setups, further optimizing control via predictive analytics or AI-driven coordination.
Footnotes
Author contributions
A. Naveen Kumar, K Rakesh, B. Srikanth Goud: Conceptualization, Methodology, Software, Visualization, Investigation, Writing- Original draft preparation. Arvind Yadav, Ch. Naga Sai Kalyan: Data curation, Validation, Supervision, Resources, Writing - Review & Editing. Basem Abu Zneid, Ievgen Zaitsev: Project administration, Supervision, Resources, Writing - Review & Editing.
Funding
The authors received no financial support for the research, authorship, and/or publication of this article.
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Data availability statement
The datasets used and/or analysed during the current study available from the corresponding author on reasonable request.
