**1. Introduction**

Fossil fuel resources are frequently used to generate power in conventional power systems, which outcomes in the hasty diminution of fossil fuel, as well as augmented environmental pollution. Renewable energy has arisen as an alternate solution to overcome the environmental and fossil fuel scarcity issues around the world. As a result, modern power systems have undergone vast changes and up-gradation to accommodate renewable energy sources in the power system network. The microgrid (MG) is one of such revolutions, integrating dispatchable and non-dispatchable distributed generation (DG) units through

**Citation:** Ahmad, S.; Mekhilef, S.; Mokhlis, H.; Karimi, M.; Pourdaryaei, A.; Ahmed, T.; Jhuma, U.K.; Afzal, S. Fuzzy Logic-Based Direct Power Control Method for PV Inverter of Grid-Tied AC Microgrid without Phase-Locked Loop. *Electronics* **2021**, *10*, 3095. https://doi.org/10.3390/ electronics10243095

Academic Editors: Shailendra Rajput, Moshe Averbukh and Noel Rodriguez

Received: 14 November 2021 Accepted: 10 December 2021 Published: 13 December 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

power electronics devices to power system networks, and providing uninterruptible power to communities [1,2]. MG possesses benefits like low capital cost, a low payback period, and high reliability; however, regarding their operation, there are still numerous technical challenges, including the flexible control of power flow between the utility grid and MG during grid-tied mode, and voltage magnitude and frequency control during islanding operation [3]. In this study, the control strategy that governs the smooth flow of real and reactive power between the MG and the utility grid for efficient operation of grid-tied AC-MG, with multiple DGs, is considered.

Grid-tied voltage source inverters (VSI) are one of the key devices of a MG, which interconnect the DG units of the MG with the main grid, and regulate power flow between them by adopting appropriate power control methods. It has become very important for grid-tied VSI to ensure high power quality and stability, as the penetration level of MG renewable energy resources in modern power grids is increased. The power controllers allow the MG system to attain a fast response and a small steady state rate of error, and to maintain stability during drastic changes [4]. A rotating synchronous reference framebased trajectory current control scheme is the commonly used strategy to control the output power of a grid-tied VSI. In this scheme, by regulating dq axes currents separately, real and reactive powers are controlled where the decoupling-term-based linear proportional integral (PI) controller can be applied indirectly [4].

To ensure better efficiency, reliability and safety of VSIs used in grid-tied MGs, in the literature based on dq current control schemes (CCSs), various real and reactive power control methods have been proposed. Worku et al. proposed a power control strategy for photovoltaic (PV) and battery storage-based AC-MGs, based on decoupled dq CCS [5]. A rigid power controller was proposed by Safa et al. for a grid-connected VSI, to improve AC-MG power quality [6]. A new power control method, based on the artificial neural network (ANN) to control the power quality of PV-incorporated AC-MGs, was presented by Kaushal et al. [7]. For controlling the VSI of a grid-tied AC-MG, Smadi et al. proposed a compact control strategy based on dq CCS [8]. By cascading the voltage and current controller, a new power control scheme was proposed by Lou et al. for an AC-MG VSI [9]. A power control strategy, based on a sliding mode-integrated dq CCS, was proposed by Abadlia et al. for a hybrid grid-tied PV/hydrogen system [10]. Based on an instantaneous self-tuning technique, another power control scheme was designed by Feng et al. for a grid-tied MG [11]. Adhikari et al., for a maximum power point tracking (MPPT) system-integrated hybrid PV/battery system, proposed a coordinated power control strategy [12]. A coupled harmonic compensation and voltage support method was developed by Mousavi et al., for DG-interfaced VSIs in grid-tied AC-MGs [13]. To regulate the power flow between grid and PV/battery hybrid systems, Go et al. proposed a power control strategy for VSI [14]. A power control and management system for a grid-tied MG was developed by Sedaghati to ensure the optimum operation of MG [15]. For controlling the output power of grid-tied PV-VSI in AC-MGs, a voltage-oriented power coordination strategy was proposed by Tang et al. [16]. A dq axes CCS synchronous reference frame-based power control method was proposed by Ahmad et al. for grid-connected AC-MG's VSIs [17].

Since in the aforementioned methods, Park's transformation has been used during abc to dq transformation, there is a need for phase angle extraction from grid voltages to ensure dq axes currents and grid voltages are in phase with each other [18]. Phaselocked loop (PLL) systems are commonly used for the extraction of grid voltage phase angles, based on arctangent functions [19]. However, the problems with the use of PLL systems are their adverse impact on VSIs' small-signal stability, along with the slowdown of the transient response of the power system parameters, causing high ripples in real and reactive power [20]. Moreover, at low frequencies PLL initiates negative resistance, which deteriorates VSIs stability [21]. PLL also introduces dynamic coupling in VSIs [22]. Furthermore, the power system's dynamic performance is also jeopardized, due to the adoption of low-bandwidth PLLs for improving VSIs' stability and robustness. Another

issue associated with all these controllers is the consideration of two control loops, namely the outer power and inner current control loops, when designing the power control scheme. Due to the presence of two control loops, the computation burden increases. Furthermore, the performances of the above-mentioned control methods are greatly influenced by the accurate tuning of PI controller gains, the conditions of grid voltage, and the comprehensiveness of the current decoupling [23]. In addition, PI controllers cannot eliminate steady state error for sinusoidal signals, and they cannot handle power system non-linearity efficiently. Moreover, due to the existence of multivariable parameters, during dynamic-load variations PI controllers have a poorer performance [24].

In some studies, fuzzy logic controller (FLC)-based control methods have been proposed for VSIs operating in grid-tied or autonomous modes for DG applications. Hasanien et al. proposed an FLC-based control method to maintain the output voltage of VSI for the islanded DG system during load variability and weather uncertainties [24]. A type-2 FLC-based control method was developed by Heydari et al. for VSIs of autonomous naval shipboard microgrids, to damp the steady-state deviations of voltage and frequency [25]. However, in [24,25], FLC controllers were used to control the output voltage and frequency of VSIs during an islanded operation. Thao et al. developed a power control method by combining feedback linearization and FLC, to reduce the fluctuations in the VSI's output active and reactive powers at the steady state, for a grid-tied PV system [26]. Another FLC-based power control method was proposed by Omar et al. to control the output power of grid-connected PV-VSI [27]. Jamma et al. proposed an FLC and ANN combined DPC for controlling the VSI output power of a grid-tied PV system [28]. For a grid-tied PV system VSI, a control method based on FLC and the Levenberg–Marquardt optimization method was proposed by Islam et.al. [29]. Shadoul et.al. proposed an adaptive FLC-based control method for grid-tied PV-VSIs [30]. FLC-based active and reactive power control was proposed by Tahri et al. for a grid-tied PV system's neutral-point-clamped VSI [31]. Teekaraman et al. developed an FLC-based current control method for a grid-tied Z-source VSI [32]. In all these studies [26–32], even though FLC was considered when designing the feedback controller, all the control methods were based on dq CCS where Park Transformation was used for abc to dq transformation, and PLL was implemented to extract the voltage angle. As mentioned earlier, due to the use of the PLL system, the control methods performance deteriorated, and most of the control methods consisted of two control loops. As a result, undesirable ripples were observed in the VSI output powers, and controllers took a longer time to track the reference powers. Furthermore, the performance of all these controllers were validated only for grid-tied PV systems, which are not connected to MGs.

To overcome the issue of double control loops, direct power control (DPC) method was introduced for VSI, where the inner current control loop was omitted. A control method for VSI based on a DPC, to control the output power, was introduced by Gui et al. [33,34]. However, due to the use of the variable switch frequency in this method, undesirable harmonics occurred, which hampered the suitable design of the line filter. The DPC method based on the sliding mode and model predictive controllers were introduced by Gui et al. [35] and Choi et al. [36], respectively, to improve the fast tracking of power references and DPC method robustness. Though power tracking performance was improved, undesirable ripples still existed in real and reactive power, and their performances were not validated for MG applications.

In this paper, to address the problems associated with the previous power controllers of PV-VSI, an FLC-based DPC (FLDPC) method is proposed for AC-MG's photovoltaic (PV) VSI, through modulating MG's point of common coupling (PCC) voltage. The advantages of FLC over conventional PI controllers, is that their design is independent of power system mathematical modelling, and can therefore deal with power system non-linearities effectively, and can easily adopt the dynamic load variation of a power system [24]. For gridsynchronization, instead of using a PLL system, in this study, the direct power calculation of PCC voltage and current grid-synchronization takes place. The proposed FL-DPC method also consists of a feedforward decoupled control, and a feedback FLC method

including the non-linear voltage modulated control. Since the proposed controller excludes Park transformation and PLL, it exhibits a faster and more transient dynamic performance, compared with conventional PLL-PI-integrated CCS-based power control methods. In addition, due to the use of FLC and the elimination of PLL, the steady state oscillation in VSI output power reduced substantially, and the reference power tracking speed became faster. Furthermore, the computational burden was also reduced, since the proposed FLDPC had only a single power control loop, which regulated the instantaneous real and reactive power flow, directly. Moreover, the presence of the feedforward decoupled control eliminated the coupling terms presented in the new control inputs from the nonlinear PCC voltage modulation (PVM), and finally, two individual dynamics of the second order error signals of the real and reactive were obtained, using a feedback FLC strategy. For controlling the bus voltage and frequency of the MG during islanded mode of operation, a V-f control strategy was adopted [37].

The main contribution of this paper is unlike conventional CCS-based VSI; the PV-VSI is modelled based on DPC and PVM theory (PVMT) to control the real and reactive power flow between the AC-MG and the utility grid. The detailed mathematical modelling of the grid synchronization technique, based on the direct power calculation of PCC voltage and current was conducted. The modelling of the FLDPC strategy for PV-VSI, along with feedforward decoupled control is also depicted extensively. Real-time simulations were carried out using a real-time digital simulator (RTDS) for different references of real and reactive power, to test the proposed FLDPC method's performance. Considering real-world scenarios, the performance of the proposed controller was verified by changing the PV generation and load demand simultaneously, during both MG's grid-tied and islanded modes of operation. Finally, to demonstrate the pre-eminence of the proposed FLDPC controller, real-time simulations of different conventional grid-tied MG power control methods were conducted, and their performances were compared with the proposed controller for various parameters of steady-state power oscillations, refence power tracking time and total harmonic distortions (THD) of VSI's output current and voltage.

The organization of the rest of the paper is as follows: in Section 2, the modelling of AC-MG's different components are presented. In Section 3, the mathematical modelling of the DPC and PVMT-based VSI are presented. Section 4 presents the proposed FLDPC method's design strategy. Section 5 presents the results obtained through the real-time simulations, along with a detailed discussion and comparative study. Finally, a conclusion of this study is presented in Section 6.
