*Article* **Dynamic Stability Performance of Autonomous Microgrid Involving High Penetration Level of Constant Power Loads**

**Mohamed A. Hassan 1,\* , Muhammed Y. Worku 1, Abdelfattah A. Eladl <sup>2</sup> and Mohammed A. Abido 3,4**


**Abstract:** Nowadays, behaving as constant power loads (CPLs), rectifiers and voltage regulators are extensively used in microgrids (MGs). The MG dynamic behavior challenges both stability and control effectiveness in the presence of CPLs. CPLs characteristics such as negative incremental resistance, synchronization, and control loop dynamic with similar frequency range of the inverter disturb severely the MG stability. Additionally, the MG stability problem will be more sophisticated with a high penetration level of CPLs in MGs. The stability analysis becomes more essential especially with high-penetrated CPLs. In this paper, the dynamic stability performance of an MG involving a high penetration level of CPLs is analyzed and investigated. An autonomous MG engaging a number of CPLs and inverter distributed generations (DGs) is modeled and designed using MATLAB. Voltage, current, and power controllers are optimally designed, controlling the inverter DGs output. A power droop controller is implemented to share the output DGs powers. Meanwhile, the current and voltage controllers are employed to control the output voltage and current of all DGs. A phase-locked loop (PLL) is essentially utilized to synchronize the CPLs with the MG. The controller gains of the inverters, CPLs, power sharing control, and PLL are optimally devised using particle swarm optimization (PSO). As a weighted objective function, the error in the DC voltage of the CPL and active power of the DG is minimized in the optimal problem based on the time-domain simulation. Under the presence of high penetrated CPLs, all controllers are coordinately tuned to ensure an enhanced dynamic stability of the MG. The impact of the highly penetrated CPLs on the MG dynamic stability is investigated. To confirm the effectiveness of the proposed technique, different disturbances are applied. The analysis shows that the MG system experiences the instability challenges due to the high penetrated CPLs. The simulation results confirm the effectiveness of the proposed method to improve the MG dynamic stability performance.

**Keywords:** constant power load; microgrid; dynamic stability; optimization; PLL; power-sharing control

**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/).

#### **1. Introduction**

Renewable energy sources (RESs) such as fuel cells, photovoltaic arrays (PVs), and wind are recently utilized to avoid the fossil fuels environmental distresses [1]. At the distribution level, passive and active loads are engaged with RESs to perform a microgrid (MG) [2,3]. A MG can operate either on autonomous or grid-connected modes. Addressing several challenges such as technologies, management, reliability, uncertainties, control, integration, islanding, operation, power quality, protection, and stability, MGs have been considered recently as a key topic [3–8]. A comprehensive review of MG technologies and their applications was presented [4]. Solar PV, wind, hydro, biomass, and conventional

**Citation:** Hassan, M.A.; Worku, M.Y.; Eladl, A.A.; Abido, M.A. Dynamic Stability Performance of Autonomous Microgrid Involving High Penetration Level of Constant Power Loads. *Mathematics* **2021**, *9*, 922. https://doi.org/10.3390/math9090922

Academic Editor: Nicu Bizon

Received: 12 December 2020 Accepted: 4 February 2021 Published: 21 April 2021

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

89

energy systems were involved in this MG. Considering PV, double-fed induction generator (DFIG)-based wind, diesel generator, and critical and non-critical loads, an efficient under frequency control and the energy management of an RESs-based MG were presented [5]. Additionally, an efficient power management control for MGs with energy storage was presented [6]. The proposed control scheme increases the reliability and resiliency of the MG. Both the MG and its controller were developed in a Real-Time Digital Simulator (RTDS). Due to the uncertainties of both loads and RESs, an optimal operation of RESs was probabilistically investigated [7]. An optimal PQ control scheme was proposed to control and share predefined injected real and reactive powers of the MG [8]. An optimal design of MGs in autonomous and grid-connected modes was introduced [3]. For both modes, the controller parameters of the MG are optimally designed to make the MG more stable after getting disturbed. The dynamic operation and control strategies for a hybrid MG involving wind, PV, fuel cell, and static VAR compensator (SVC) were examined. This stand-alone MG could effectively extract the maximum power from the wind and PV energy sources [9]. A static synchronous compensator (STATCOM) was controlled using a novel intelligent controller to reduce the power fluctuations, voltage support, and damping in an MG system [10]. To improve the MG protection system and reduce the maximum transient overvoltage of a wind turbine, a grounding scheme was modified [11]. An advanced demand-side management (DSM) and control strategy were introduced for an efficient energy management system (EMS) in smart microgrid (SMG) [12]. An optimal cost-effective EMS operation was firstly proposed based on a two-level genetic algorithm (GA) optimization problem and augmented with the time-of-use pricing (ToU) principle. Secondly, the SMG voltage and frequency were optimally regulated using an improved proportional integral derivative (PID)-based mixed sensitivity H-infinity (PID-MSH∞) control scheme while operating in islanded mode. The proposed DSM and control strategy harness the immense internet of things (IoT) aptitudes to ensure an economic and secure operation of the SMG. Depending on the MG operation modes, disturbances, and time frame, MG stability was classified in [13]. Additionally, a comprehensive review presented and addressed the challenges and effects of the instability MG problems. Load perturbations, changing operating conditions, and interactions between the load dynamics and generation dynamics significantly disturbed the MG stability [14]. Intensely, the MG stability depends on several parameters such as controller parameters, load dynamics, LC filters, and controller dynamics [3]. It was reported that the low-frequency modes are dominantly affected with both load demand and outer controller parameters. Meanwhile, the medium and high-frequency damped modes are mainly influenced with the load dynamics, filter components, and inner controller parameters [14]. Electrical loads are classified as passive and active loads. Resistive space heaters and incandescent lighting are common passive load examples. They are usually modeled as a resistor or an inductor– resistor combination. Meanwhile, electronics loads such as switching power supplies, motor drive systems, and electrical vehicles are considered as active loads. Recently, power electronics applications have been utilized in different applications such as RESs, electrical vehicles, MGs, and smart grids. Nevertheless, such active loads tend to behave like constant power loads (CPLs) [15].

CPLs have been tremendously used in distributed power systems. They are extensively involved in MGs with a main concern in stability studies [14–20]. It is worth mentioned that CPLs significantly reduce the MG damping [14]. A comprehensive review on CPLs compensation techniques in the DC microgrid (DCMG) and AC microgrid (ACMG) was presented and classified in [16]. The CPLs stability problem in MG was defined and analyzed [17]. Several compensation techniques were introduced to overcome this problem. CPLs characteristics such as negative incremental resistance, synchronization, and control loop dynamic with similar frequency range of the inverter affect considerably the MG dynamic [15]. CPLs show a negative incremental impedance. It means that the input current decreases with increasing supply voltage. Meanwhile, the absorbed power does not change with any input voltage fluctuations, which moderates the MG damping

causing instability or oscillatory response [12]. Modeling and analysis of IBMGs with CPLs were investigated using a new linear state-space model in [18]. A simple linear model corrected through a time-step simulation was proposed for CPLs. A sliding mode controller was developed for an MG system in the presence of CPLs to keep the output voltage constant at 480 V [19]. A robustness analysis of the sliding mode controller was performed. The performance of the proportional integral derivative (PID) was compared with the sliding mode controller to prove the superiority of the sliding mode controller over the PID controller. Popov's absolute stability theorem was utilized to analyze stability conditions for an AC MG in the presence of CPL [18]. Furthermore, the stability of the DCMG was investigated in [21–24]. A comprehensive small-signal model was derived to study the overall stability of the DCMG involving CPLs [21]. The instability issue induced by the CPLs was revealed using the impedance matching criteria. The virtual-impedance-based stabilizers were presented to enhance the damping of DCMGs with CPLs and guarantee the stable operation. Using the active power control of PV arrays, a virtual inertia control (VIC) was introduced to enhance the inertia of a hybrid PV Array-battery DCMG [22]. In this proposed VIC, there is no need for any high-power energy storage system such as supercapacitors. Impedance-based stability analysis was utilized to study the VIC impact on improving the stability margin of the DCMG in the presence of CPLs. A finite-time disturbance observer (FTDO)-based backstepping control strategy with finite-time disturbance observers was presented to ensure the large signal stability of DCMGs using high boost ratio interleaved converter interfaced energy storage systems (ESSs) [23]. The proposed controller is utilized for stabilizing interleaved double dual boost converter (IDDBC) feeding CPLs in DCMGs. It is not limited to IDDBC but also applicable to other types of interleaved converters, which achieves fast dynamics and accurate tracking with large signal stability. A robust passivity-based control (PBC) strategy was presented to solve the instability problem caused by CPLs in DCMG systems [24]. The strategy was designed to stabilize and regulate the DC-bus voltage of the DCMG.

CPL must be synchronized with MG to get the right power amount on the right time [25]. Regularly, phase-locked loop (PLL) is used to synchronize the CPL with MG, track the frequency, and extract the voltage phase angle of the MG [26]. A potential instability problem was raised because of the synchronization coupling and interaction between the synchronization unit and MG impedance [15]. It is worth mentioning that the PLL parameters should be carefully tuned to have a better MG dynamic performance [3]. Additionally, the CPLs control dynamics have a similar frequency range of the inverters. Therefore, studying the interaction between dynamics of the distributed generations (DGs) and CPLs should be essentially considered [27]. With high-level penetrations of CPLs, the MG stability will be more complicated and need more investigations. Having advantages such as flexibility, redundancy, and expandability, droop control techniques are proposed to improve the low-frequency damping in both steady-state and transient modes and overcome the stability problems related to the sudden disturbances [3,12,28,29]. A coordinated virtual impedance control strategy for DGs units was presented to overcome the mismatched line impedance and avoid inaccurate power sharing and circulating current [28]. Both virtual resistance and virtual inductance were simultaneously tuned to compensate the mismatched line impedance among DGs. The MG system stability was enhanced by increasing damping for the whole system. A generalized droop control (GDC) was proposed for a grid-supporting inverter based on a comparison between traditional droop control and virtual synchronous generator (VSG) control [30]. The proposed GDC can achieve satisfactory control performance and provide virtual inertia and damping properties in autonomous mode. The output active power of an inverter can follow the changing references quickly and accurately without large overshoot or oscillation in the grid-connected mode. The controller parameters and transient gains were designed and tuned using the trial-and-error method [27]. However, this method has significant drawbacks such as being time-consuming and failing to obtain the optimal settings [30]. Additionally, in large MGs, fixed-gain controllers cannot certainly adapt to disturbances

and load changes especially with parameters variation [31]. The proper selection of both MG and CPL parameters is essential to improve the power quality and system performance against load switching and different disturbances [27]. To overcome power system problems successfully, computational intelligence techniques such artificial neural networks, genetic algorithm (GA), fuzzy logic (FL), and particle swarm optimization (PSO) have been recently introduced [3,12,32–36]. These techniques are used to improve the MG transient performance [3]. However, their applications have some disadvantages [5]. A combined sizing and energy management methodology was formulated as a leader–follower problem [32]. The leader problem was focusing on sizing and aiming at selecting the optimal size for the MG components using a genetic algorithm. A low-complexity FL controller was designed and embedded in an energy management system for a residential grid-connected MG including RESs and storage capability [33]. The system assumes that neither the renewable generation nor the load demand is controllable. The main goal of the design was to minimize the grid power profile fluctuations while keeping the battery state of charge within secure limits [34]. Compared with other optimization techniques, especially GA, PSO has several advantages such as robustness, computational efficiency, simplicity, easy implementation, effective capability memory, and greater efficiency [3,12,35,36]. Additionally, using PSO can avoid some GA disadvantages such as converging toward the local solution rather than the global solution, especially with improperly defined objective function, and difficulties with the dynamic datasets [35]. Furthermore, it is worth mentioning that the best results are obtained using the PSO technique [36].

In this paper, MG stability with high-level penetrations of CPLs is analyzed and investigated. An autonomous MG including CPLs is modeled and presented. PLL is employed to synchronize the involved CPLs with the MG and track the MG frequency. An optimal design of the power-sharing controller, CPLs controllers, inverters controllers, and PLL gains is performed. The control problem is designed based on minimizing a weighted objective function to limit the error in the DC voltage and the measured active power. The DGs, CPLs, and PLL controllers are coordinately tuned to improve the MG dynamic stability. Additionally, the dynamic stability of the autonomous MG is examined. Different disturbances are applied to verify and assess the impact of the optimal power-sharing parameters on the MG stability with high-level penetrations of CPLs.

#### **2. Autonomous Microgrid Model**

The considered MG is shown in Figure 1. Three CPLs are fed from three inverter based DGs through coupling inductances, LC filters, and transmission lines. LC filters are imposed to filter out the high frequency switching noises. Current, voltage, and power controllers are employed to control the DGs. Emulating the operation of the synchronous generator, the droop controller illustrated in Figure 2 is designed to accurately share the DGs output powers, which depend mainly on the power angle and amplitude of the output voltage, respectively. The DGs output voltage and current (*vo* and *io*) are measured firstly to obtain the instantaneous real and reactive powers (*Pm* and *Qm*) as illustrated in (1). Secondly, the average real and reactive powers (*Pc* and *Qc*) are obtained from the instantaneous powers using a low pass filter as in (2). Finally, the average powers are used to obtain the frequency (ω) and d-axis reference voltage (*v*\**od*) as given in (3).

$$P\_m = \upsilon\_{od} i\_{od} + \upsilon\_{oq} i\_{oq} \ \ Q\_m = \upsilon\_{od} i\_{oq} - \upsilon\_{oq} i\_{od} \tag{1}$$

$$P\_{\mathcal{C}} = \frac{\omega\_{\mathcal{C}}}{\omega\_{\mathcal{C}} + s} P\_{\mathfrak{m}\prime} \ Q\_{\mathcal{C}} = \frac{\omega\_{\mathcal{C}}}{\omega\_{\mathcal{C}} + s} Q\_{\mathfrak{m}} \tag{2}$$

$$\begin{array}{ll} \omega = \omega\_{\text{n}} - m\_{p} P\_{\text{c}} & \stackrel{\bullet}{\theta} = \omega \\ v\_{od}^{\*} = V\_{\text{n}} - n\_{q} Q\_{\text{c}} & v\_{oq}^{\*} = 0 \end{array} \tag{3}$$

where *iodq* and *vodq* are the dq components of the DGs output current and voltage respectively, *ω<sup>c</sup>* is the cut-off frequency, *ω<sup>n</sup>* is the nominal angular frequency of DG, *Vn* is the nominal magnitude of the DG voltage, and *mp* and *nq* are the droop controller gains.

**Figure 1.** The considered microgrid.

**Figure 2.** Distributed generations (DGs) power droop controller.

To control the DGs output voltages and currents, two controllers are employed as shown in Figure 3. The proportional integral (PI) current and voltage controllers are used to generate the reference voltage and current signals, respectively. In both controllers, the reference and measured signals are compared to generate the reference signals. To mimic the output impedance of the voltage source, the feed-forward terms are engaged [4]. On a common reference frame (DQ), the state equations of the current and voltage controllers, coupling inductance, line and load currents, LC filter, and load voltages are given respectively in Equations (4)–(11).

$$\begin{aligned} \mathbf{i}\_{1d}^{\*} &= \mathbf{F} \mathbf{i}\_{od} - \omega\_n \mathbf{C}\_f \upsilon\_{oq} + \mathbf{K}\_{pv} (\upsilon\_{od}^{\*} - \upsilon\_{od}) + \mathbf{K}\_{iv} \int (\upsilon\_{od}^{\*} - \upsilon\_{od}) dt \\ \mathbf{i}\_{1q}^{\*} &= \mathbf{F} \mathbf{i}\_{oq} + \omega\_n \mathbf{C}\_f \upsilon\_{od} + \mathbf{K}\_{pv} (\upsilon\_{oq}^{\*} - \upsilon\_{oq}) + \mathbf{K}\_{iv} \int (\upsilon\_{oq}^{\*} - \upsilon\_{oq}) dt \end{aligned} \tag{4}$$

$$\begin{cases} \upsilon\_{\rm id}^{\*} = -\omega\_{n} \mathbf{L}\_{f} \dot{\mathbf{i}}\_{lq} + \mathbf{K}\_{pc} (\dot{\mathbf{i}}\_{ld}^{\*} - \dot{\mathbf{i}}\_{ld}) + \mathbf{K}\_{\rm ic} \int (\dot{\mathbf{i}}\_{ld}^{\*} - \dot{\mathbf{i}}\_{ld}) dt\\ \upsilon\_{\rm iq}^{\*} = \omega\_{n} \mathbf{L}\_{f} \dot{\mathbf{i}}\_{ld} + \mathbf{K}\_{pc} (\dot{\mathbf{i}}\_{lq}^{\*} - \dot{\mathbf{i}}\_{lq}) + \mathbf{K}\_{\rm ic} \int (\dot{\mathbf{i}}\_{lq}^{\*} - \dot{\mathbf{i}}\_{lq}) dt \end{cases} \tag{5}$$

$$\begin{array}{l} \frac{d\mathbf{i}\_{ld}}{dt} = -\frac{r\_f}{L\_f}\mathbf{i}\_{ld} + \omega \mathbf{i}\_{lq} + \frac{1}{L\_f}(v\_{id} - v\_{od})\\ \frac{d\mathbf{i}\_{lq}}{dt} = -\frac{r\_f}{L\_f}\mathbf{i}\_{lq} - \omega \mathbf{i}\_{ld} + \frac{1}{L\_f}(v\_{iq} - v\_{oq}) \end{array} \tag{6}$$

$$\begin{cases} \frac{d\mathbf{v}\_{od}}{dt} = \omega \mathbf{v}\_{oq} + \frac{1}{\mathbb{C}\_f}(\dot{\mathbf{i}}\_{ld} - \dot{\mathbf{i}}\_{od})\\ \frac{d\mathbf{v}\_{oq}}{dt} = -\omega \mathbf{v}\_{od} + \frac{1}{\mathbb{C}\_f}(\dot{\mathbf{i}}\_{lq} - \dot{\mathbf{i}}\_{oq}) \end{cases} \tag{7}$$

$$\begin{array}{l} \frac{d\dot{i}\_{od}}{dt} = -\frac{r\_c}{L\_c}\dot{i}\_{od} + \omega \dot{i}\_{oq} + \frac{1}{L\_c}(v\_{od} - v\_{bd})\\ \frac{d\dot{i}\_{oq}}{dt} = -\frac{r\_c}{L\_c}\dot{i}\_{oq} - \omega \dot{i}\_{od} + \frac{1}{L\_c}(v\_{oq} - v\_{bq}) \end{array} \tag{8}$$

$$\begin{array}{l} \frac{d\mathbf{i}\_{\rm lin\dot{D}i}}{dt} = -\frac{r\_{\rm lim\dot{e}}}{L\_{\rm lin\dot{e}}} \mathbf{i}\_{\rm line\dot{D}i} + \omega \mathbf{i}\_{\rm line\dot{Q}i} + \frac{1}{L\_{\rm lin\dot{e}}} (v\_{bDj} - v\_{bDk})\\ \frac{d\mathbf{i}\_{\rm lim\dot{Q}i}}{dt} = -\frac{r\_{\rm lim\dot{e}}}{L\_{\rm lin\dot{e}}} \mathbf{i}\_{\rm line\dot{Q}i} - \omega \mathbf{i}\_{\rm line\dot{Q}i} + \frac{1}{L\_{\rm lin\dot{e}}} (v\_{bQj} - v\_{bQk}) \end{array} \tag{9}$$

$$\begin{array}{l}\frac{di\_{loadDi}}{dt} = -\frac{R\_{loadi}}{L\_{loadi}}i\_{loadDi} + \omega i\_{loadQi} + \frac{1}{L\_{loadi}}v\_{bDi} \\\frac{di\_{loadQi}}{dt} = -\frac{R\_{loadi}}{L\_{loadi}}i\_{loadQi} - \omega i\_{loadDi} + \frac{1}{L\_{loadi}}v\_{bQi} \end{array} \tag{10}$$

$$\begin{split} \frac{dv\_{bDi}}{dt} &= \omega v\_{bQi} + \frac{1}{\mathsf{C}\_{f}} (i\_{oDi} - i\_{loadDi} \pm i\_{lineDi,j})\\ \frac{dv\_{bQi}}{dt} &= -\omega v\_{bDi} + \frac{1}{\mathsf{C}\_{f}} (i\_{oQi} - i\_{loadQi} \pm i\_{lineQi,j}) \end{split} \tag{11}$$

where *i*\**odq* and *v*\**odq* are the *dq* components of reference output current and voltage, *i*\**ldq* and *v*\**idq* are the dq components of the reference inductor current and inverter voltage, *ild* and *ilq* are the dq components of the inverter current, *ilineDQ* and *iloadDQ* are the DQ components of the line and load currents, *VbDQ* are the DQ load voltage components and *ioDQ* are the DQ output current components. *Lf*, *rf*, and *Cf* are the filter components. *rc*, *Lc*, *Lline*, and *rline* are the coupling inductor and line components, *Lload* and *rload* are the load parameters. *F* is the voltage controller feed-forward gain. *Kpc*, *Kic*, *Kpv*, and *Kiv* are the PI current and voltage controller parameters of each DG.

**Figure 3.** AC voltage and current controllers.

#### **3. Constant Power Load (CPL) Model**

Nowadays, CPLs have been recently used in MGs [14–24]. CPLs have two important characteristics: negative incremental resistance and control loop dynamic with a similar frequency range of the inverter [14]. The negative resistance property and the interaction between the DGs and CPLs reduce the system damping and lead to instability or unacceptable oscillatory responses [15]. Furthermore, the highly penetrated CPLs in an MG make the MG stability problem more sophisticated. The dynamic behavior of an MG challenges both stability and control effectiveness in the presence of CPLs. Several methods have been proposed to cope with the mentioned CPL instability [14–24]. The CPL circuit shown in Figure 4 is modeled in MATLAB. The model contains the rectifier bridge, DC load, LC filter, AC current, and DC voltage controllers, and PLL. The rectifier bridge is used to convert the AC into DC and feed the DC load. The AC current and DC voltage controllers are shown in Figure 5. The DC voltage controller is employed to control the DC voltage of the CPL and to generate the reference current of the current controller, while the current controller is utilized to control the AC inductor current and to generate the required rectifier pulses. The PLL depicted in Figure 6 is used to synchronize the CPLs with the MG, extract the phase angle, and deliver the reference voltage for the MG. To extract the grid frequency, one of the *dq* voltage components is devised to be constant. The *q*-component of the voltage of the point of common connection (PCC) and reference voltage are compared. The error signal is fed to the PI controller to generate the frequency. This frequency is compared with the reference frequency to extract the synchronized MG frequency. The synchronized frequency is integrated to obtain the inverter phase reference θ needed to convert from *abc* to *dq* and vice versa, as given in (13).

$$
\omega = k\_P^{\rm PLL} (v\_{oq} - v\_{oq}^\*) + k\_I^{\rm PLL} \int (v\_{oq} - v\_{oq}^\*) dt \tag{12}
$$

$$\theta = \int (\omega - \omega\_{ref})dt + \theta(0) \tag{13}$$

where *kp PLL* and *kI PLL* are the PLL controller parameters.

**Figure 4.** Constant power loads (CPL) circuit.

The common reference (*DQ*) frame of the whole MG, reference (*dqi*) frame of each DGi, and reference (*dqALj*) frame of the jth CPL are shown in Figure 7. These frames are rotated at frequencies *ωcom*, *ωi*, and *ωALj*, respectively. The angles *δ<sup>i</sup>* and *δALj* represent the angles between the DGi reference frame, CPL reference frame, and DQ frame, respectively. Each DG and CPL must be modeled on its rotating reference frame. DGs and CPLs share the MG DQ frame. The CPL current controller has the same state equations of the DG inverter. However, the CPL current has an opposite sign to the DG current because the CPL receives the current from the MG. The *dq* components of the inductor current are decoupled using the feed-forward as displayed in Figure 5. The CPLs state-space equations are given in (14)–(20).

$$
\upsilon\_{\rm idAL} \mathbf{i}\_{\rm idAL} + \upsilon\_{\rm iqAL} \mathbf{i}\_{\rm iqAL} = \mathbf{i}\_{\rm convAL} \upsilon\_{\rm DCAL} \tag{14}
$$

$$\frac{dv\_{DCAL}}{dt} = \frac{1}{\mathcal{C}\_{dcAL}} \mathbf{i}\_{convAL} - \frac{1}{\mathcal{R}\_{dcAL}\mathcal{C}\_{dcAL}} v\_{DCAL} \tag{15}$$

$$\mathbf{i}\_{\mathrm{ldAL}}^{\*} = \mathbf{K}\_{\mathrm{pv\\_AL}} (\mathbf{v}\_{\mathrm{DCAL}}^{\*} - \mathbf{v}\_{\mathrm{DCAL}}) + \mathbf{K}\_{\mathrm{iv\\_AL}} \int (\mathbf{v}\_{\mathrm{DCAL}}^{\*} - \mathbf{v}\_{\mathrm{DCAL}}) dt \tag{16}$$

$$\begin{array}{l}\boldsymbol{v}\_{\text{idAL}}^{\*} = \omega\_{\text{n}} \mathbf{L}\_{f\text{AL}} \mathbf{i}\_{\text{lqAL}} - \mathbf{K}\_{\text{pc\\_AL}} (\mathbf{i}\_{\text{ldAL}}^{\*} - \mathbf{i}\_{\text{ldAL}}) - \mathbf{K}\_{\text{ic\\_AL}} \int (\mathbf{i}\_{\text{ldAL}}^{\*} - \mathbf{i}\_{\text{ldAL}}) dt\\\boldsymbol{v}\_{\text{iqAL}}^{\*} = -\omega\_{\text{n}} \mathbf{L}\_{f\text{AL}} \mathbf{i}\_{\text{ldAL}} - \mathbf{K}\_{\text{pc\\_AL}} (\mathbf{i}\_{\text{lqAL}}^{\*} - \mathbf{i}\_{\text{lqAL}}) - \mathbf{K}\_{\text{ic\\_AL}} \int (\mathbf{i}\_{\text{lqAL}}^{\*} - \mathbf{i}\_{\text{lqAL}}) dt\end{array} \tag{17}$$

$$\begin{split} \frac{\dot{\mathbf{d}}\_{\rm IdAL}}{\mathbf{d}t} &= -\frac{r\_{fAL}}{\mathbf{L}\_{fAL}} \mathbf{i}\_{\rm IdAL} + \omega\_{AL} \mathbf{i}\_{\rm lqAL} + \frac{1}{\mathbf{L}\_{fAL}} (\upsilon\_{\rm idAL} - \upsilon\_{\rm odAL})\\ \frac{\dot{\mathbf{d}}\_{\rm lqAL}}{\mathbf{d}t} &= -\frac{r\_{fAL}}{\mathbf{L}\_{fAL}} \mathbf{i}\_{\rm lqAL} - \omega\_{AL} \mathbf{i}\_{\rm ldAL} + \frac{1}{\mathbf{L}\_{fAL}} (\upsilon\_{\rm iqAL} - \upsilon\_{\rm oqAL}) \end{split} \tag{18}$$

$$\begin{split} \frac{dv\_{odAL}}{dt} &= \omega\_{AL}v\_{oqAL} + \frac{1}{\mathbb{C}\_{fAL}}(\dot{\imath}\_{ldAL} - \dot{\imath}\_{odAL})\\ \frac{dv\_{oqAL}}{dt} &= -\omega\_{AL}v\_{odAL} + \frac{1}{\mathbb{C}\_{fAL}}(\dot{\imath}\_{lqAL} - \dot{\imath}\_{oqAL}) \end{split} \tag{19}$$

$$\begin{split} \frac{d\dot{l}\_{\rm oAL}}{dt} &= -\frac{r\_{cAL}}{L\_{cAL}}\dot{i}\_{\rm oAL} + \omega \dot{i}\_{\rm oqAL} + \frac{1}{L\_{cAL}}(v\_{\rm oAL} - v\_{\rm bdAL})\\ \frac{d\dot{l}\_{\rm oAL}}{dt} &= -\frac{r\_{cAL}}{L\_{cAL}}\dot{i}\_{\rm oqAL} - \omega\_{AL}\dot{i}\_{\rm odLL} + \frac{1}{L\_{cAL}}(v\_{\rm oqAL} - v\_{\rm bqAL}) \end{split} \tag{20}$$

where *vidqAL* and *iidqAL* are the dq components of the CPL output voltage (*viAL*) and current (*ilAL*) respectively; *iconvAL* is the DC side current of the CPL; *CdcAL* and *RdcAL* are the DC side capacitor components of the CPL; *LfAL* is the filter inductance of the CPL; and *kpv\_AL*, *kiv\_AL*, *Kpc\_AL*, and *Kic\_AL* are the DC voltage and AC current controllers' parameters of the CPL.

**Figure 5.** CPL controllers.

**Figure 6.** Phase-locked loop (PLL).

**Figure 7.** Common reference frame (DQ).

#### **4. Problem Formulation**

To enhance the MG stability, the controller and power-sharing parameters of both DGs and CPLs, and PLL parameters are cautiously tuned. One of the big advantages of obtaining optimal parameters is that the controller parameters can be obtained easily to get the stability of the MG. In this paper, the PSO technique is used to optimally tune these parameters. As reported in [33], compared with other optimization techniques, especially GA, the best results are obtained using the PSO method because of its easy implementation with less tuned parameters, effective memory, and greater efficiency for maintaining swarm diversity. The design problem is formulated as follows:

#### *4.1. Objective Function and Problem Constraints*

The optimal controller gains are established based on the time domain simulation. Therefore, the controller design problem has been solved using PSO. The error in the DC voltage and measured active power of the CPL has been curtailed using a time-domain weighted objective function (J). The problem is optimally designed and formulated with the parameter constraints as follows:

$$\text{Minimize } f = \int\_{t=0}^{t=t\_{\text{sim}}} \left[ \left( P\_m - P\_{ref} \right)^2 + \left( \mathbf{V}\_{dc} - \mathbf{V}\_{d \text{ref}} \right)^2 \right] t \, dt \tag{21}$$

Subject to

$$\mathbb{K}^{\text{min}} \le \mathbb{K} \le \mathbb{K}^{\text{max}},\\ m\_{\overline{\rho}} \le m\_{\overline{\rho}} \le m\_{\overline{\rho}}^{\text{max}},\\ m\_{\overline{\rho}\mathcal{L}} \le m\_{\overline{\rho}\mathcal{L}\mathcal{L}} \le m\_{\overline{\rho}\mathcal{L}\mathcal{L}} \le n\_{\overline{\rho}\mathcal{L}\mathcal{L}},\\ n\_{\overline{\eta}} \le n\_{\overline{\eta}} \le n\_{\overline{\eta}},\\ n\_{\overline{\rho}\mathcal{L}\mathcal{L}} \le n\_{\overline{\rho}\mathcal{L}\mathcal{L}} \le n\_{\overline{\rho}\mathcal{L}\mathcal{L}} \le n\_{\overline{\rho}\mathcal{L}\mathcal{L}}.\tag{22}$$

Bounded as *<sup>K</sup>min* ≤ *<sup>K</sup>* ≤ *<sup>K</sup>max*, the controller parameters are K = [*kpv*, *kiv*, *kpc*, *kic*, *kpv\_AL*, *kiv\_AL*, *kpc\_AL*, *kic\_AL*] *T. mp*, *nq*, *mp\_AL*, and *nq\_AL* are the power sharing gains. *kp PLL* and *kI PLL* are the PLL controller gains. To guarantee the minimum settling time, *t* is added.

#### *4.2. Particle Swarm Optimization*

In this paper, PSO is exploited to gain the optimal parameters. Based on the swarm behavior, a bird flock is filing in a stochastic manner for food searching. PSO is developed to emulate the swarm behavior in 1995 [31]. As an efficient optimization tool, PSO could poise between the local and global search methods. Behind its robustness and flexibility, PSO can enhance the search capability and overcome the premature convergence problem [32]. Figure 8 depicts the PSO computational flow. In a PSO algorithm, the population has *n* particles that represent candidate solutions. Each particle is an *m*–dimensional real-valued vector, where *m* is the number of optimized parameters. Therefore, each optimized parameter represents a dimension of the problem space. The PSO technique can be summarized as follows.


$$v\_{n+1}^i = uv\_n^i + c\_1 r\_1 \left(p\_{\text{best}} - k\_n^i\right) + c\_2 r\_2 \left(g\_{\text{best}} - k\_n^i\right) \tag{23}$$

where *r*<sup>1</sup> and *r*<sup>2</sup> are random numbers between 0 and 1; *c*<sup>1</sup> and *c*<sup>2</sup> are the "trust" parameters; *w* is the inertia weight.

At time *n*, *gbest* is the best position in the swarm; *pbest* is the best position for particle *i*. It is worth mentioning that based on its own thinking and memory, the particle changes its velocity. The second term is the PSO cognitive part, while the third term is the PSO social part. It is based on the social–psychological adaptation of knowledge.

• At iteration *n* + 1, the new particle position is determined based on the updated velocities as follows,

$$k\_{n+1}^{\bar{i}} = k\_n^{\bar{i}} + v\_{n+1}^{\bar{i}} \tag{24}$$

where *ki n+*<sup>1</sup> and *v<sup>i</sup> n+*<sup>1</sup> are the position and velocity of particle *i*, respectively.

**Figure 8.** Particle swarm optimization (PSO) computational flow.

The cost function J of each particle is updated depending on its new position. Compared with the previous one, the lowest one will be selected to be the global best *Jj*\*. Additionally, the individual best will be nominated as a global best.


#### *4.3. PSO Implementation*

The proposed PSO has been built in MATLAB. The maximum allowable velocity and initial inertia weight are the main parameters that affect the PSO performance. To have a good optimization performance, these parameters should be cautiously designated. In this paper, based on the authors' experiences, the selected PSO parameters are given as follows.


#### **5. Results and Discussion**

To investigate the proposed control effectiveness, a MATALB code has been created to model the MG shown in Figure 1. The model contains three CPLs (7.4 kVA) engaged with three identical DGs (10 kVA) through filters, coupling inductances, and transmission lines. Table 1 depicts the MG parameters. The optimal parameters are given in Table 2.

#### *5.1. Simulation Results*

To examine and verify the impact of the optimal controllers' parameters of the CPL, PLL, droop, and DGs on the MG stability, different disturbances have been applied. Firstly, a three-phase fault has been applied at CPL3. Figure 9a–d illustrate the active and reactive powers, output voltage, and output current responses of all DGs, respectively, while Figure 9e depicts the DC output voltage of the CPLs. At t = 3.3 s, the measured active powers of DG1, DG2, and DG3 have been increased from 1.4 to 2.4 p.u., from 0.4 to 1.5 p.u. and from 0.4 to 2.48 p.u., respectively. While the measured reactive powers of DG1, DG2, and DG3 have been increased from 0.384 to 1.14 p.u., from −0.04 to 0.435 p.u., and from 0.0 to 0.54 p.u., respectively. The measured d-axis voltages of DG1, DG2, and DG3 have been increased from 1.0 to 1.14, 1.15, and 1.28 p.u. respectively. The d-axis of the measured output currents of DG1 has been increased from 1.5 to 2.45 p.u. while the d-axis of the measured output currents of DG2 and DG3 have been increased from 0.5 to 1.6 and 3.48 p.u., respectively. The DC voltages of the three CPLs have been increased from 1.17 to 1.47, 1.39, and 1.38 p.u., respectively. As shown in Figure 9, with the high penetration level of CPLs, the system is getting stable within 2 s after the transient has been settled. The proposed controller needs this time to return back to the stable mode because of the high number of CPLs. In terms of overshoot and settling time, the results impressively show an enhanced and adequate damping MG performance under this fault. In addition, the DGs output powers have been tightly increased after occurring the fault directly.


#### **Table 1.** System parameters.

**Table 2.** Optimal parameters.


The three-phase fault has been relocated at CPL1 to check the controller effectiveness. Figure 10a,b illustrates the responses of the active power of the three DGs and DC output voltage of the CPLs, respectively. At t = 3.3 s, the measured active powers of DG1, DG2, and DG3 have been increased from 1.44 to 3.4 p.u., from 0.44 to 2.7 p.u., and from 0.44 to 1.5 p.u., respectively. Meanwhile, the DC voltages of the three CPLs have been increased from 1.17 to 1.45, 1.38, and 1.37 p.u., respectively. The results display satisfactory damping characteristics of the proposed controller for this disturbance. Moreover, Figure 11 illustrates the MG response when the voltage at CPL3 has been stepped down to 0.25 p.u. The measured active powers of DG1, DG2, and DG3 have been increased from 1.44 to 2.3 p.u., from 0.44 to 1.5 p.u., and from 0.44 to 2.45 p.u., respectively. Meanwhile, the DC voltages of the three

CPLs have been increased from 1.17 to 1.44, 1.37, and 1.35 p.u., respectively. The output responses display the satisfactory damping characteristics of the proposed controller. The DGs output power responses are displayed in Figure 11a, while Figure 10b depicts the DC voltage response of CPLs. It has been demonstrated that the system oscillations are highly damped, which shows the effectiveness of the proposed method.

**Figure 9.** *Cont*.

**Figure 9.** Microgrid response with a three-phase fault at CPL.3. (**a**) Measured active powers of DGs. (**b**) Measured reactive powers of DGs. (**c**) Measured d-axis voltages of DGs. (**d**) Measured d-axis currents of DGs. (**e**) DC voltages of CPLs.

Additionally, at t = 3.3 s, a three-phase fault is located at line 2. The line has been recovered at t = 3.6 s. During the fault, CPL1 and CPL2 have been fed from DG1 and DG2, while CPL3 has been fed from DG3. The system is getting stable after this disturbance. The DGs capability to support the loads is clearly illustrated in Figure 12. The DGs output power response is depicted in Figure 12a, while Figure 12b shows the DC voltage response of the CPLs. With the optimal settings, the DC reference voltage of CPL1 is stepped up to 1.1 p.u. The proposed controller has been investigated through the time domain simulation. The DGs output power responses are displayed in Figure 13a, while Figure 13b depicts the responses of the DGs output voltage for the considered disturbance.

**Figure 10.** Microgrid response with a three-phase fault at CPL1. (**a**) Measured active powers of DGs. (**b**) DC voltages of CPLs.

**Figure 11.** Microgrid response with a voltage step change at CPL.3. (**a**) Measured active powers of DGs. (**b**) DC voltages of CPLs.

**Figure 12.** Microgrid response with a fault at TL2. (**a**) Measured active powers of DGs. (**b**) DC voltages of CPLs.

**Figure 13.** Microgrid response with a reference DC voltage step change at CPL3. (**a**) Measured active powers of DGs. (**b**) DC voltages of CPLs.

For more investigations, the MG performance has been tested when DG1 has been lost. In this case, all CPLs are fed from DG2 and DG3. Figure 14a,b proves the responses of the DGs output power and DC voltage of CPLs for this disturbance. The output responses display the satisfactory damping characteristics of the proposed controller. The output responses show the controller capability for making the system stable after getting disturbance in both cases. With the proposed controller, the MG became stable after getting disturbed and has better dynamic performance. It can be seen from the different applied disturbances that despite variations in the DGs or CPLs side, the system is highly stable with no oscillatory behavior. This indicates the effectiveness of the proposed controller in mitigating the AC power and DC-bus voltage oscillations in the considered MG.

**Figure 14.** Microgrid response with losing DG1. (**a**) Measured active powers of DGs. (**b**) DC voltages of CPLs.

#### *5.2. Impacts of the Uncertainties of Controller Parameters*

In this section, the impacts of the uncertainties of controller parameters are investigated. A three-phase fault has been applied at CPL3 when the integral controller parameter (*Kic\_AL*) of the AC current of the CPL has been deviated from its optimal value by 10% from this value. The system dynamic response of the DGs output powers and DC voltages of the CPLs are depicted in Figure 15a,b. There is no variation in both DGs output power and DC voltages of the CPLs as compared with the results shown in Figure 9. It can be concluded that the optimal design has worked fine, since the system goes to stable mode with fast dynamics and accurate power sharing as expected.

**Figure 15.** Microgrid response with a three-phase fault at CPL3 with different value of *Kic\_AL*. (**a**) Measured active powers of DGs. (**b**) DC voltages of CPLs.

#### *5.3. Proposed Method Limitations*

As a result of the incremental negative impedance effects of CPLs, and the nonlinearity and time dependency of converters' operation, classical linear control methods such as a conventional proportional integral PI controller have stability limitations around the operating points. Of course, the problem will be more complicated with the presence of highly penetrated CPLs. To ensure large signal stability, nonlinear stabilizing control methods must be applied [17]. Different compensation techniques need to be addressed and examined to enhance the MG dynamic stability in the presence of high penetrated CPLs. Additionally, our lab capability could not help us verify the obtained results experimentally and examine the effectiveness of the proposed controller.

#### **6. Conclusions**

In this paper, MG stability with high penetration level of CPLs is examined and investigated. An autonomous MG including CPLs is modeled using MATALB. Current, voltage, and power controllers are optimally designed to enhance the transient response of the autonomous MG considering CPLs. A power droop controller is utilized to share the DGs output powers in the presence of high penetrated CPLs. PLL is employed to synchronize the involved CPLs with the MG and track the MG frequency. Based on error curtailing in the DC voltage of the CPL and measured active power of the DG, an optimal control design for the controllers of DGs, CPLs, and PLL is presented. Several disturbances are applied to assess the optimal parameters impact on the MG stability. The impact of the high penetration level of CPLs on MG stability is investigated. Additionally, the dynamic stability of the autonomous MG is examined under these disturbances. CPLs are a potential instability source for the MG system. It can be observed from the different applied disturbances in DGs or CPLs sides that the MG system is highly stable with no oscillatory behavior. The simulation results confirm the effectiveness of the proposed method to improve the performance of the MG dynamic stability in the presence of highly penetrated CPLs. The proposed controller provides a fast and accurate power control, an efficient damping characteristic, and satisfactory performance. However, the classical linear control methods such as a PI controller have stability limitations around the operating points. Future work will focus on hardware implementation, testing and verifying the proposed controller effectiveness. Additionally, different MG topologies can be used to study the destabilization effects of the high penetrated CPLs on the AC MGs.

**Author Contributions:** M.A.H. and M.A.A. initiated the idea, formulated the problem, performed the simulation, and analyzed the results. M.Y.W. and A.A.E. participated in the paper revision stage, contributed to enhancing the simulation results, and shared in paper writing. All authors have read and agreed to the published version of the manuscript.

**Funding:** The authors acknowledge the support provided by the Center for Engineering (CER), Research Institute at King Fahd University of Petroleum & Minerals. Abido would like also to acknowledge the funding support by King Abdullah City for Atomic and Renewable Energy (K.A. CARE), Energy Research & Innovation Center (ERIC) at KFUPM through the Direct Funded project #DF191004.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **Nomenclature**



#### **References**

