*Article* **Performance Improvement of H8 Transformerless Grid-Tied Inverter Using Model Predictive Control Considering a Weak Grid**

**Sherif A. Zaid 1,2, \* , Hani Albalawi 1,2 , Hossam AbdelMeguid 3 , Tareq A. Alhmiedat <sup>4</sup> and Abualkasim Bakeer 5**


**Abstract:** There is increasing utilization of photovoltaic (PV) grid-connected systems in modern power networks. Currently, PV grid-connected systems utilize transformerless inverters that have the advantages of being low cost, low weight, a small size, and highly efficient. Unfortunately, these inverters have an earth leakage current problem due to the absence of galvanic isolation. This phenomenon represents safety and electrical problems for those systems. Recently, the H8 transformerless inverter was introduced to eliminate the earth leakage current. The present study proposes improving the performance of an H8 transformerless inverter using model predictive control (MPC). The inverter was supplied by PV energy and attached to the grid through an LCL filter. During system modeling, the grid weakness was identified. The discrete model of the overall system, including the PV panel, the boost converter, the H8 transformerless inverter, and the controllers, was derived. Then, the introduced H8 transformerless inverter system was simulated and analyzed by the Matlab/Simulink program. The proposed system response using MPC was tested under step disturbances in the PV insolation level. Moreover, the effect of the weak and strong grid operations was considered. The simulation results indicate that the MPC controller has better performance and high-quality injected power. Despite the excellent performance of the strong grid, the nearly weak grid performance is acceptable. Moreover, the Hardware-in-the-Loop (HIL) of the proposed system was implemented using the DSP target LaunchPadXLTMS320F28379D kit to validate the simulation results. Finally, the system performance under the parameter variations showed good robustness.

**Keywords:** photovoltaic; leakage current; common-mode voltage; model predictive control; transformerless inverter; H8; weak grid

#### **1. Introduction**

Photovoltaic (PV) energy has become one of the most important energy resources in the world. For most countries, solar energy is available in large amounts without being exhausted. Moreover, it has many merits, such as being noise-free, reliable, a long-life, maintenance-free, and it is clean energy [1]. In recent years, the cost of PV systems has decreased to a level that enables their spread worldwide. In addition, rapid advancements in the power electronics field have aided in the development of grid-tied PV systems, which have the advantages of no storage units, good efficiency, and better cost [2].

Grid-tied PV systems have two categories: transformer or transformerless systems. Nevertheless, transformerless grid-connected PV systems are preferred due to their small

**Citation:** Zaid, S.A.; Albalawi, H.; AbdelMeguid, H.; Alhmiedat, T.A.; Bakeer, A. Performance Improvement of H8 Transformerless Grid-Tied Inverter Using Model Predictive Control Considering a Weak Grid. *Processes* **2022**, *10*, 1243. https:// doi.org/10.3390/pr10071243

Academic Editor: Zhiwei Gao

Received: 18 May 2022 Accepted: 18 June 2022 Published: 22 June 2022

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

**Copyright:** © 2022 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/).

size, low cost, and high efficiency [3–5]. Usually, transformerless grid-tied PV systems have an inverter type called a transformerless inverter. These inverters have different topologies and modulation techniques [6]. However, this type of inverter has some problems, such as lack of galvanic isolation with the grid and the earth leakage current not matching the limitation recommended by the standards [7]. The presence of the leakage capacitance of the PV array and the absence of the galvanic isolation with the grid are the general causes of the earth leakage current. For any transformerless inverter topology, the earth leakage current origin is the inverter's Common-Mode Voltage (CMV) variations [8]. The problemsolving direction is to reduce the CMV variations or ideally make them constant [9]. This target can be achieved in two ways: either by modifying the inverter topology or by introducing a modulation scheme that limits the CMV variations.

Many topologies and modulation techniques have been introduced for single-phase transformerless inverters [10]. On the other hand, the three-phase transformerless inverters have a higher leakage current and power rating. Hence, fewer attempts have been made to modulate three-phase transformerless inverters [11]. The first attempts were made by references [12,13], where they introduced many modulation schemes for the conventional three-phase topology. However, they concluded that the modulation techniques were not sufficient to reduce the earth leakage current. Hence, introducing new topologies is an important issue in order to eliminate the earth leakage current.

In the literature review, many topologies of the transformerless inverter have been proposed to reduce the earth leakage current [14–28]. A simple topology that incorporates 4-arms instead of 3-arms was introduced and tested with some modulation schemes [14,15]. Nevertheless, the supplied power quality and the current total harmonic distortion (THD) were low. Moreover, the control system was complicated. The topologies of the multilevel inverters have been adapted to work in transformerless mode with some modifications and modulation techniques [16,17]. However, the number of switches is high, and the overall system efficiency is low. According to references [18–20], the H7 topology is the three-phase version of the single-phase H5 transformerless inverter. There were many modulation schemes suitable for the H7 topology. However, the reduction in the earth's leakage current was limited. A more recent topology named H8 was introduced [21–26]. It consists of the traditional 3-arm transformerless inverter connected to the DC bus via two series power transistors. It may be regarded as the three-phase image of the famous 1-ϕ H6 transformerless inverter topology. The first proposed H8 inverter topology was created to reduce the Common Mode Voltage (CMV) for electrical drives [21,22]. Then, the idea was used for transformerless PV grid-connected systems. In reference [23], the proposed topology combined the merits of both the AC bypass circuit and DC bypass structures. The results showed a low leakage current and a small THD of the grid current. However, the modulation used was the traditional scheme, and the controller utilized had a low response. The performance of the conventional B6-type voltage source inverter was compared to the H8 topology in [24]. Nevertheless, the efficiency was low, and the system had a poor dynamic response. Reference [25] modified the H8 to obtain zero CMV variations. The technique depended on entering and leaving the zero-voltage vector using a modified configuration and the control scheme. The results of [26] indicated that the H8 topology had better performance than the H7 due to the 50% reduction in CMV amplitude. Hence, the leakage current attenuation improved with the H8 topology. Another version of the H8 inverter called oH8 was proposed [26]. It has been shown that for a given CMV, the parasitic capacitor voltage of oH8, the clamped DC bus version of H8, is higher than that of H8. Hence, the leakage current of oH8 would be higher than for the H8 topology.

Another common problem for grid-connected inverters is the restriction of the grid's weakness. It is recommended in the standards of the distributed generation system that the grid-connected inverters should be tied to power systems that have Short-Circuit Ratio (SCR) >20, which corresponds to a grid impedance of 5% [27,28]. The grid-tied inverters act stably with the power system when the SCR is kept within the previous range. However, the spread of distributed renewable energy resources with long transmission lines causes

the utility grid to possess weak grid performance. The power system is considered to be weak if SCR < 3 [29]. Moreover, the voltage at the Point of Common Coupling (PCC) should be kept at a low harmonic content to avoid voltage distortion problems at the PCC. Hence, the grid-tied inverter should be designed to supply current with a high harmonic rejection and satisfy the standard limitations on the injected grid current [30].

Recently, a major focus has been given to the promising control technique, Model Predictive Control (MPC). It has been adapted for the control of the grid tide inverters [31]. Perfect response and simple implementation are the great merits of the MPC controller. It has been applied to control 3-level transformerless inverters to minimize the earth leakage current [32]. However, the proposed system is complex. The MPC control technique has been adapted for neutral point clamped inverters [33]. Though the earth leakage current is reduced, the proposed system efficiency is lower.

In this research paper, a PV energized H8 transformerless inverter that utilizes the MPC scheme as a controller is introduced. A boost converter was attached to the PV terminals to ensure the Maximum Power Point Tracking (MPPT) operation. The output of the boost converter was the DC bus of the power system. It must be controlled to be constant at a certain designed value to achieve whole system stability and ensure power balance. The H8 transformerless inverter was supplied by the DC bus and tied to the grid using an LCL filter to minimize the injected harmonics. As the MPC algorithm relies mainly on the system discrete model, the whole system model was derived. The LCL filter and the grid weakness characteristics were represented by the grid internal impedance determined by the model. Hence, the MPC control scheme was applied to the H8 transformerless inverter. Then, the introduced system was simulated and analyzed using the Matlab/Simulink platform. The proposed system response using the MPC was tested under step disturbances in the PV insolation level. Moreover, the effects of the nearly weak and strong grid operations were considered. The simulation results indicate that the MPC controller has better performance and high-quality injected power. Despite the excellent performance of the strong grid, the nearly weak grid performance is also acceptable. The objectives of this research are to:


The arrangement of the paper is as follows: Section 2 explains the topology and operation of the H8 Transformerless Inverter. Section 3 demonstrates the MPC of the H8 Transformerless Inverter. The system controllers are described in Section 4. Section 5 introduces the weak grid operation of the H8 transformerless inverter. The simulation results are discussed in Section 6, while the paper's conclusions are provided in Section 7.

#### **2. H8 Transformerless Inverter Structure and Operation**

Figure 1 presents the power circuit of the introduced system. It was a PV-powered grid-connected H8 transformerless inverter. The PV array represented the power generator for the system. The output of the array was attached to a boost converter. It was used to implement the MPPT conditions for the PV array. The output of the boost converter was the system DC bus that feeds the H8 transformerless inverter. The H8 transformerless inverter may be considered as the 3-ϕ version of the 1-ϕ H6 transformerless inverter. Its power circuit had eight switches, as shown in Figure 1. It was introduced to reduce the earth leakage current in the grid-connected systems. The topology of the H8 inverter was formed by adding two additional switches, (*Q*<sup>7</sup> and *Q*8). Their function was to decouple the inverter from the PV during the freewheeling periods of the inverter. Hence, there was no path for an earth leakage current. The H8 transformerless inverter acted as a 3-ϕ two-level inverter. Therefore, it had eight switching states or voltage vectors (V0, V1, V2,

V3, V4, V5, V6, and V7). The inverter operating voltage vector depended on the controller objectives. The decoupling switches (*Q*<sup>7</sup> and *Q*8) were on together for all active voltage vectors. Nevertheless, during the null voltage vectors, the decoupling switches (*Q*<sup>7</sup> and *Q*8) were modulated according to the following switching functions [25]: = ଼ = ത + ̅+ ̅ φ Vഥ Vഥ<sup>ଵ</sup> Vഥ<sup>ଶ</sup> Vഥ<sup>ଷ</sup> Vഥ<sup>ସ</sup> Vഥ<sup>ହ</sup> Vഥ Vഥ

$$Q\_7 = Q\_8 = A\overline{B} + B\overline{C} + C\overline{A} \tag{1}$$

φ Vഥ Vഥ<sup>ଵ</sup> Vഥ<sup>ଶ</sup> Vഥ<sup>ଷ</sup>

where (*A*, *B*, and *C*) were the logic states of the inverter upper switches. = ଼ = ത + ̅+ ̅

Vഥ<sup>ସ</sup> Vഥ<sup>ହ</sup> Vഥ Vഥ

**Figure 1.** The power circuit of the proposed system.

The configurations of the H8 transformerless inverter for different switching states of the inverter are shown in Figure 2.

**Figure 2.** The configurations of the H8 inverter for (**a**) the active states and (**b**,**c**) the zero states.

#### *2.1. CMV Model of the H8 Transformerless Inverter*

In this section, the CMV of the H8 inverter is analyzed. The CMV variations of the gridconnected inverters must be minimized or ideally constant. The H8 inverter CMV depends on its terminal voltages (*VuN*, *VvN*, and *VwN*,); they can be calculated as follows [20]:

$$V\_{\rm CMV} = \frac{V\_{\rm uN} + V\_{\rm vN} + V\_{\rm wN}}{3} \rightarrow V\_{\rm CMV} = \frac{V\_{\rm uM} + V\_{\rm vM} + V\_{\rm wM}}{3} + V\_{\rm MN}.\tag{2}$$

However, the H8 inverter terminal voltages and the voltage *VMN* depend on the operating voltage vector or switching state. Based on the switching state, the corresponding CMV value can be determined as shown in Table 1. This can be summarized as follows:

**Table 1.** The H8 transformerless inverter CMVs.



Therefore, the levels of the CMV of the H8 inverter were limited to ( <sup>1</sup> <sup>3</sup>*Vdc* and <sup>2</sup> <sup>3</sup>*Vdc*). However, the CMV was limited to ( <sup>1</sup> <sup>3</sup>*Vdc*, 2 <sup>3</sup>*Vdc*, and *Vdc*) for the recent inverter H7 [20]. Consequently, the peak variations of the CMV were reduced, which decreased the leakage current. The idea behind this improvement is the disconnection of the PV from the grid during the freewheeling periods using the switches *Q*<sup>7</sup> and *Q*8.

#### *2.2. Earth Leakage Current Path of the H8 Transformerless Inverter*

Figure 3 shows the earth leakage current path the of H8 transformerless inverter with the PV panel [20]. The circuit indicates that the CMV source should be alternating for the earth leakage current to flow. Hence, if the CMV variations remain limited, the serious leakage current will be greatly reduced. The instantaneous CMV is conditional on the switching modulation of the H8 transformerless inverter. Consequently, introducing a new modulation strategy that can reduce the CMV will aid the leakage current reduction. Moreover, the H8 transformerless inverter control technique affects the inverter modulation, which will reduce the leakage current reduction.

The H8 transformerless inverter controller may be either a one-shot controller or a modulator-based controller. In the one-shot controller, the inverter switching states are produced directly from the control algorithm, such as the MPC. However, the modulatorbased controller must have a modulator to generate the inverter switching states. Hence, the modulation technique must be selected from the commonly known (SPWM, SVPWM, etc.).

**Figure 3.** The CMV model of the H8 transformerless inverter.

#### **3. Model Predictive Control of the H8 Transformerless Inverter**

The basic structure of the MPC controller for a certain system is based on the system's discrete-model. Hence, the starting point in planning the MPC controller is the investigation of the discrete model of the system. Applying Kirchhoff lows to the inverter output filter shown in Figure 1, we have:

$$
\begin{bmatrix} L\_{\mathcal{g}f} \begin{bmatrix} \frac{d\overline{I}\_{\mathcal{g}}}{dt} \end{bmatrix} \\ L\_f \begin{pmatrix} \frac{d\overline{I}\_{inv}}{dt} \end{pmatrix} \\ C\_f \begin{pmatrix} \frac{d\overline{I}\_{inv}}{dt} \end{pmatrix} \\ C\_f \begin{pmatrix} \frac{d\overline{V}\_{\mathcal{C}}}{dt} \end{pmatrix} \end{bmatrix} = \begin{bmatrix} \overline{V}\_{\mathcal{C}} - \overline{V}\_{\mathcal{S}} \\ \overline{V}\_{inv} - \overline{V}\_{\mathcal{C}} \\ \overline{I}\_f - \overline{I}\_{\mathcal{S}} \end{bmatrix}, \ L\_{\mathcal{S}f} = L\_{\mathcal{S}} + L\_{f\prime} \tag{3}
$$

̅ , ത ത ̅ ௩ ത ௩ where (*Ig*, *Vg*) are the grid current and voltage space vectors, (*V <sup>f</sup>* ) is the filter capacitor space voltage vector, (*Iinv*) is the inverter current space vector, (*Vinv*) is the inverter space vector voltage, (*Rg*, *Lg*) is the grid impedance, (*r<sup>f</sup>* , *L<sup>f</sup>* ) are the filter inductor parameters, and (*C<sup>f</sup>* ) is the filter capacitance.

The state-space form of Equation (3) is:

$$
\begin{bmatrix}
\frac{d\overline{I}\_{\mathcal{S}}}{dt} \\
\frac{d\overline{I}\_{inv}}{dt} \\
\frac{d\overline{V}\_{f}}{dt}
\end{bmatrix} = \begin{bmatrix}
\frac{-\frac{1}{\mathcal{L}}(R\_{\mathcal{S}}+r\_{f})}{L\_{\mathcal{S}f}} & 0 & \frac{1}{L\_{\mathcal{S}f}} \\
\begin{bmatrix}
\mathbf{0} & \frac{-r\_{f}}{L\_{f}} & \frac{-1}{L\_{f}} \\
\mathbf{0} & \frac{-1}{L\_{f}} & \frac{1}{L\_{f}}
\end{bmatrix} \begin{bmatrix}
\overline{I}\_{\mathcal{S}} \\
\overline{I}\_{inv} \\
\overline{V}\_{f}
\end{bmatrix} + \begin{bmatrix}
0 \\
\frac{1}{L\_{f}} \\
0
\end{bmatrix} \overline{V}\_{inv} + \begin{bmatrix}
\frac{-1}{L\_{\mathcal{S}}} \\
0 \\
0
\end{bmatrix} \overline{V}\_{\mathcal{S}}.\tag{4}
$$

This may be simplified as:

$$\frac{d\overline{Y}}{dt} = \alpha \overline{Y} + \beta \overline{V}\_{inv} + \gamma \overline{V}\_{\mathcal{G}'} \tag{5}$$

⎡ ି(ோା) 0 ଵ ⎤ where the state vector (*Y*) and the constant matrices (*α*, *β*, and *γ*) are defined as:

ௗത

$$
\overline{Y} = \begin{bmatrix} \overline{I}\_{\mathcal{S}} \\ \overline{I}\_{inv} \end{bmatrix}, \; \mathfrak{a} = \begin{bmatrix} -(\mathsf{I}\_{\mathcal{S}} + r\_f) & \mathbf{0} & \frac{1}{\mathsf{L}\_{\mathcal{S}f}} \\ \overline{I}\_{\mathcal{S}f} & \mathbf{0} & \frac{-r\_f}{\mathsf{L}\_f} \\ \overline{V}\_f \end{bmatrix}, \; \mathfrak{a} = \begin{bmatrix} -(\mathsf{I}\_{\mathcal{S}} + r\_f) & \mathbf{0} & \frac{1}{\mathsf{L}\_{\mathcal{S}f}} \\ \mathbf{0} & \frac{-r\_f}{\mathsf{L}\_f} & \frac{-1}{\mathsf{L}\_f} \\ \frac{-1}{\mathsf{C}\_f} & \frac{1}{\mathsf{C}\_f} & \mathbf{0} \end{bmatrix}, \; \mathcal{B} = \begin{bmatrix} \mathbf{0} \\ \frac{1}{\mathsf{L}\_f} \\ \mathbf{0} \end{bmatrix}, \; \gamma = \begin{bmatrix} \frac{-1}{\mathsf{L}\_{\mathcal{S}}} \\ \mathbf{0} \\ \mathbf{0} \end{bmatrix}. \tag{6}
$$

We assumed that the sampling period was (*T*). The model input was the inverter space voltage vector, and the DC link voltage was considered the disturbance. Hence, the continuous state-space model of Equation (5) can be transformed into the discrete-time state-space model using the backward Euler technique [34]. Although the forward Euler method requires an extra computation at each iteration, the backward Euler method has great stability properties, and its local truncation error is much smaller than using the forward Euler method [35]. Therefore: ത( + 1) = ఈ்ത() + ఈఛ ் ത + ௩ ఈఛ ் ത 

$$
\overline{Y}(k+1) = e^{aT}\overline{Y}(k) + \int\_0^T e^{a\tau}\beta d\tau \overline{V}\_{inv} + \int\_0^T e^{a\tau}\gamma d\tau \overline{V}\_{\mathcal{S}}.\tag{7}
$$

Hence, the discrete model of the H8 transformerless inverter was obtained using Equation (7). The algorithm of the MPC utilizes the discrete model to predict the controlled quantities at the next sample. For all possible switching states, a cost function was built and calculated to select the voltage vector that gives the minimum error. The introduced cost function (*g*) is: = (ఈ െ ఈ ∗ ) <sup>ଶ</sup> + (ఉ െ ఉ ∗ ) ଶ

$$\mathbf{g} = \left(\dot{\mathbf{i}}\_{\mathcal{S}^{\mathfrak{A}}} - \dot{\mathbf{i}}\_{\mathcal{S}^{\mathfrak{A}}}^{\*}\right)^{2} + \left(\dot{\mathbf{i}}\_{\mathcal{S}^{\mathfrak{A}}} - \dot{\mathbf{i}}\_{\mathcal{S}^{\mathfrak{A}}}^{\*}\right)^{2},\tag{8}$$

where (*igα*, *igβ*) are the *α*-*β* compositions of the grid current, and (*i \* <sup>g</sup>α*, *i \* <sup>g</sup>β*) are the reference *α*-*β* compositions of the grid current.

#### **4. System Controllers**

*α β*

A single-line diagram of the proposed system incorporating the system controllers is shown in Figure 4. It had two main controllers namely the power and the H8 transformerless inverter controllers. The power controller included two controllers called the MPPT and the DC-link voltage controllers. As the set point of the DC link controller was constant, the PID controller would be the best choice due to its high stability and good performance for constant set point systems [36]. However, the set point of the H8 transformerless inverter controller was sinusoidal. Hence, the PI was not suitable, and the MPC controller was adapted. To ensure stability, the MPC response, the controller of the inner loop, should be faster than the DC link controller (PID). These controllers are discussed in detail in the next paragraphs. The whole control system is demonstrated in the following subsections.

**Figure 4.** The single line diagram of the proposed system incorporates the system controllers.

#### *4.1. Power Controller*

The system incorporated two controllers, the MPPT controller and the DC-link voltage controller. The MPPT controller was utilized to take out the peak power from the PV panel. Therefore, it improved the system utilization. The idea was to control the boost converter input current by regulating the converter duty cycle. The controller type was bang-bang with a ±5% band. The reference current was generated by the MPPT algorithm unit, the incremental conductance [16]. That unit measured the instantaneous PV current and voltage and output the reference current for the MPPT controller.

The DC-link voltage controller forced the *Vdc* to track its reference. This controller regulated the power transfer from the PV to the grid. Its reference voltage value was recommended by the system design values, 650 V for the proposed system [20]. The controller output the reference current for the H8 transformerless inverter. A simple Proportion Integral Derivative (PID) controller was employed. Its output (*AG*) and action are represented for discrete operation using:

$$A\_G(z) = \left[k\_P + k\_I \frac{Tz}{z-1} + k\_D \frac{z-1}{Tz}\right] e(z),\tag{9}$$

where *e*(*z*) is the error signal, and (*kP*, *k<sup>I</sup>* , and *kD*) are the PID controller gains. Those gains are tuned using the Ziegler-Nichols technique. This tuning algorithm may be implemented using the next sequence [37]:


$$K\_{\rm P} = 0.35 \, K\_{\rm cp} \quad \text{and} \quad K\_{\rm I} = 0.8 \, K\_{\rm P}/T\_s \tag{10}$$

#### *4.2. H8 Transformerless Inverter Controller*

The H8 transformerless inverter is a current-controlled voltage source inverter. It has a controller that regulates its output current *I<sup>g</sup>* to be AC, which is compatible with the grid voltage and frequency. Moreover, the output current should be supplied at the unity power factor. This controller utilized the MPC scheme to achieve its goals. The MPC controller output was the optimum switching state for the H8 transformerless inverter. Finally, it produced the H8 inverter switches' pulses. The algorithm of the MPC technique was essentially a discrete control. At startup, the system variables were measured. Then, with the help of the system model, the system variables for the next samples were predicted to optimize the system response. The optimization process for the H8 transformerless inverter was to select the switching state that forced the errors in the controlled variables as close as possible to zero. To accomplish the switching state optimization, an optimization function, sometimes called the cost function, was calculated for each switching state. The switching state that provided the minimum value of the cost function was considered the optimal state and was sent to the converter switches in the following sample. The cost function was adapted to minimize the error in the grid current, which was a 3-ϕ of zero phase shift with the grid voltage reference generated by a Phase Locked Loop (PLL). The most commonly used PLL for weak grid systems is the Synchronous Reference Frame (SRF) PLL. A block diagram of the SRF PLL is shown in Figure 5a. The PLL measures the grid voltage at the PCC, which may be distorted due to the grid's internal impedance [30]. It generates 3-ϕ signals (*Ug*) synchronized to the ideal grid voltages with unity amplitude. The reference currents ( *I<sup>g</sup> re f*) for the MPC controller were generated by multiplying the PLL output signal with the reference amplitude (*AG*) produced by the DC-link controller output.

$$
\overline{I}\_{\mathcal{S}}|\_{ref}(k) = A\_{\mathcal{G}} \overline{\mathcal{U}}\_{\mathcal{S}}(k), \tag{11}
$$

where (*k*) is the order of the sample. A flowchart for the MPC algorithm is presented in Figure 5b.

**Figure 5.** (**a**) The SRF PLL Block diagram. (**b**) The flowchart of the MPC algorithm for the proposed system.

#### **5. Weak Grid Operation of the H8 Transformerless Inverter**

Grid-connected inverters are greatly affected by grid characteristics. The main property that decides its characteristics is the SCR of the grid. Consequently, electrical grids may be classified as strong and weak grids, according to the value of their SCR [30]. Weak grids are characterized by SCR < 3. Grid-connected inverters are recommended to operate stably for grids that have SCR > 20. Many problems have been recorded for the inverters tied to grids that have low SCR values. Instability, the PLL operation disturbed, low power quality, and high distortion at the PCC are some of those problems. To improve the performance of the H8 transformerless inverter when connected to a low SCR grid, a modified PLL was utilized for the proposed system. It has a band-pass filter to assess harmonic attenuation. Moreover, the MPC controller supported the improvement.

#### **6. Simulation Results**

Matlab simulations of the proposed grid-connected H8 transformerless inverter supplied by PV were implemented. The system rating and simulation parameters are listed in Table 2. The system photovoltaic array was formed of 6 × 960 cells. Figure 6 shows the response of the proposed system to step variations in the insolation level for the strong grid. These step variations were (100%, 75%, 50%, 30%, and 75%) at the times (0, 0.2 s, 0.4 s, 0.6 s, and 0.8 s). Figure 6a shows the response of *Vpcc*, *Ig*, *Vdc*, and *IL*. *Vpcc* was sinusoidal with constant amplitude and equaled the grid rated values irrespective of the grid current value or the insolation level. This issue is essential for a strong grid. The grid current *I<sup>g</sup>* is also shown. It was also sinusoidal with a unity power factor. However, its amplitude

varied according to the MPPT power extracted from the PV. Moreover, the figure showed the *Vdc* response. It had a good response as the maximum overshoot was limited to 1.5%. Finally, the earth leakage current (*IL*) response is presented in the figure. It was limited to small values except for some spikes at the disturbance times. However, its maximum RMS value was 100 mA, which is much lower than the standard value [7].

**Table 2.** Simulation Parameters.


**Figure 6.** The response of the proposed system to step variations in the isolation level, @ strong-grid, (**a**) *Vpcc*, *Ig*, *Vdc*, and *IL*, (**b**) *Ipv*, *VAB*, *VCM*, and the output power.

Figure 6b shows the response of *Ipv*, *VAB*, *VCM*, and the output power. The *Ipv* tracked well the reference recommended by the MPPT controller. The H8 inverter output voltage *VAB* is also demonstrated in the figure. As the conventional 3-ϕ inverter, its instantaneous value was limited to ±*Vdc*. Further, the levels of the CMV of the H8 inverter were limited to ( <sup>1</sup> <sup>3</sup>*Vdc* and <sup>2</sup> <sup>3</sup>*Vdc*). However, the output power of the H8 transformerless inverter tracked the MPPT power of the PV with some electrical losses. φ భ య ௗ and <sup>మ</sup> య ௗ

Ω

Figure 7 shows the response of the proposed system when supplying a weak grid. It was disturbed by the same step variations in the insolation level as that of the strong grid. Figure 7a shows the response of *Vpcc*, *Ig*, *Vdc*, and *IL*. *Vpcc* was sinusoidal with a constant amplitude, slightly higher than the grid rated voltage value to allow the power flow to the grid. The grid current, *Ig*, is also shown. It was also sinusoidal with a unity power factor. However, its amplitude varied according to the MPPT power extracted from the PV. The *Vdc* response had a better response than the strong grid counterpart. Here, the maximum overshoot was limited to (0.75%). The response of *I<sup>L</sup>* is also presented in the figure. It had a slightly higher instantaneous value than that of the strong. However, its maximum RMS value was 150 mA, which was also within the standard limits.

**Figure 7.** The response of the proposed system to step variations in the isolation level, @ weak-grid, (**a**) *Vpcc*, *Ig*, *Vdc*, and *IL,* (**b**) *Ipv*, *VAB*, *VCM*, and the output power.

Figure 7b shows the response of *Ipv*, *VAB*, *VCM*, and the output power. The *Ipv* tracked well with the reference recommended by the MPPT controller. The responses of the *VAB*, CMV, and grid power had a similar figure to that for the strong grid.

The fast Fourier transform analysis of the supplied grid current for the two cases, strong-grid and weak-grid, is presented in Figure 8a,b, respectively. Nevertheless, the harmonics in the case of the weak-grid were higher than in the strong-grid case. The lowerorder harmonics were presented with a weak grid. Moreover, the fundamental component of the grid current was slightly higher in the case of the strong grid. The THD of the grid current was 1.36% for the strong grid case, which was better than the corresponding weak grid value, which was 2.06%. Figure 8c shows the Bode plot of the LCL filter based on the simulation parameters.

**Figure 8.** The spectrum of Ig for (**a**) a strong-grid, (**b**) a weak-grid (@100%insolation), and (**c**) the LCL filter frequency response.

The effect of varying insolation levels and grid SCR on the RMS of the leakage current is shown in Figure 9a. The leakage current decreased with the insolation level. However, it was roughly reduced with the increase in the SCR of the grid. Moreover, the effect of varying insolation levels and grid SCR on the THD of the I<sup>g</sup> is shown in Figure 9b. The THD value improved with the increase in both the SCR and the insolation level.

The Hardware-in-the-Loop (HIL) simulator was used to validate the proposed controller of the MPC for the H8 inverter as shown in Figure 10. The power circuit was modelled as a MATLAB model in the host personal computer (Host-PC), while the DSP target executed the proposed MPC after receiving the required signals from the Host-PC. The interface between the Host-PC and the controller board was installed using the virtual serial COM port. The data exchange was triggered at each sampling interval. The results of the HIL simulation in the case of the weak grid are provided in Figure 11. It is clear that the grid current was corresponding to the insolation levels, and the DC-link voltage was maintained constant at around 650 V.

**Figure 9.** The effect of varying insolation levels and grid SCR on: (**a**) the RMS of the leakage current and (**b**) the THD of Ig.

**Figure 10.** Schematic diagram of the HIL simulation based on the DSP target Launch-PadXLTMS320F28379D kit.

**Figure 11.** The response of the proposed system to step variations in the isolation level with the HIL simulation, @ weak grid.

In order to test the robustness of the proposed system against system parameter variations, some of the system parameter were forced to change, increasing the PV temperature and series resistance by 10%. Moreover, the grid impedance was decreased by 10%. The simulation results shown in Figure 12 indicate that the grid current and the DC link voltage, for example, had a stable and robust response against parameter variations.

**Figure 12.** The response of the proposed system under parameters uncertainty, @ weak grid.

#### **7. Conclusions**

This research introduced the application of the MPC control algorithm to an H8 transformerless inverter. The inverter was grid-tied and supplied by a PV panel. The MPPT condition of the PV was achieved using a boost converter, and an LCL filter was used to connect the H8 inverter with the grid. The dynamic discrete models of the H8 transformerless inverter, including the filter and the grid weakness, were derived. Hence, the MPC control algorithm was developed for the system. The results of the simulation, using Matlab/Simulink platform, indicated a large reduction in the earth leakage current of the proposed system with the MPC controller. The maximum measured RMS value of the earth leakage currents were 100 mA and 150 mA for the strong and weak grid cases, respectively. These values were much lower than the limiting standard values. At the same time, the injected grid currents were perfect AC with pure active power. These currents had high quality with a THD less than 5% with insolation levels greater than 50%, for the strong and weak grid cases. The effects of varying the solar insolation level and grid SCR on the RMS of the leakage current and the injected current THD were studied. However, the performance was better for high insolation levels than for lower levels. The proposed system stability against model parameters uncertainties was tested by increasing the PV temperature and series resistance by ten percent, and the grid impedance was decreased by ten percent. Despite the modeling errors, the system performance was stable with high accuracy. Moreover, the results from the hardware HIL implementation of the system validated the simulation results.

**Author Contributions:** S.A.Z. conceived and designed the system, derived the model, and analyzed the results. H.A. (Hossam AbdelMeguid) and T.A.A. helped with collecting the funding, resources validation, and visualization, and H.A. (Hani Albalawi) supported the manuscript proofreading and writing. A.B. helps in the validation and visualization phase. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by the University of Tabuk, Grant Number S-1441-0172 at https://www.ut.edu.sa/web/deanship-of-scientific-research/home (accessed on 18 August 2020).

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

**Informed Consent Statement:** Informed consent was obtained from all individual participants included in the study.

**Data Availability Statement:** Data is available from the authors upon reasonable request.

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

#### **References**

