*Article* **A Dragonfly Optimization Algorithm for Extracting Maximum Power of Grid-Interfaced PV Systems**

**Ehtisham Lodhi 1,2 , Fei-Yue Wang <sup>3</sup> , Gang Xiong 1,4,\* , Ghulam Ali Mallah <sup>5</sup> , Muhammad Yaqoob Javed <sup>6</sup> , Tariku Sinshaw Tamir 1,2 and David Wenzhong Gao <sup>7</sup>**


**Abstract:** Currently, grid-connected Photovoltaic (PV) systems are widely encouraged to meet increasing energy demands. However, there are many urgent issues to tackle that are associated with PV systems. Among them, partial shading is the most severe issue as it reduces efficiency. To achieve maximum power, PV system utilizes the maximum power point-tracking (MPPT) algorithms. This paper proposed a two-level converter system for optimizing the PV power and injecting that power into the grid network. The boost converter is used to regulate the MPPT algorithm. To make the grid-tied PV system operate under non-uniform weather conditions, dragonfly optimization algorithm (DOA)-based MPPT was put forward and applied due to its ability to trace the global peak and its higher efficiency and shorter response time. Furthermore, in order to validate the overall performance of the proposed technique, comparative analysis of DOA with adaptive cuckoo search optimization (ACSO) algorithm, fruit fly optimization algorithm combined with general regression neural network (FFO-GRNN), improved particle swarm optimization (IPSO), and PSO and Perturb and Observe (P&O) algorithm were presented by using Matlab/Simulink. Subsequently, a voltage source inverter (VSI) was utilized to regulate the active and reactive power injected into the grid with high efficiency and minimum total harmonic distortion (THD). The instantaneous reactive power was adjusted to zero for maintaining the unity power factor. The results obtained through Matlab/Simulink demonstrated that power injected into the grid is approximately constant when using the DOA MPPT algorithm. Hence, the grid-tied PV system's overall performance under partial shading was found to be highly satisfactory and acceptable.

**Keywords:** photovoltaic (PV); partial shading; maximum power point tracking (MPPT); dragonfly optimization algorithm (DOA); adaptive cuckoo search optimization (ACSO); fruit fly optimization algorithm combined with general regression neural network (FFO-GRNN); improved particle swarm optimization (IPSO); voltage source inverter (VSI); total harmonic distortion (THD)

### **1. Introduction**

Renewable energy resources have emerged as an important source of energy over the last few decades. The wind, solar, fuel cells, biomass, geothermal, and hydrothermal are leading energy resources. The wind, hydrothermal, and geothermal energy resources are highly localized compared with other energy resources [1]. The sunlight is a supreme,

**Citation:** Lodhi, E.; Wang, F.-Y.; Xiong, G.; Mallah, G.A.; Javed, M.Y.; Tamir, T.S.; Gao, D.W. A Dragonfly Optimization Algorithm for Extracting Maximum Power of Grid-Interfaced PV Systems. *Sustainability* **2021**, *13*, 778. https:// doi.org/10.3390/su131910778

Academic Editors: Sheraz Aslam, Herodotos Herodotou and Nouman Ashraf

Received: 8 August 2021 Accepted: 22 September 2021 Published: 28 September 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/).

abundant, and viable means of renewable energy that can accommodate growing public energy demands [2,3]. The PV system is also attractive owing to its scalability, simple architecture, lack of fuel cost, low carbon footprint, being free of noise, and friendliness to the environment [4,5]. PV systems can be categorized into two major groups, i.e., utilityinterfaced PV systems and standalone PV systems [6]. There are many urgent issues to tackle that are associated with PV systems. Partial shading is the most severe issue of the PV system, as it distinctly diminishes the efficiency and output power of the PV array. During partial shading, the P-V trajectory will become more distinct and complex due to the availability of numerous peaks. Moreover, nonlinear behavior is also observed in the I-V characteristic curve because of variation in temperature and irradiance [7,8]. The characteristic curves have a special, single MPP at which the system works with supreme efficiency. The block diagram of grid-interfaced PV systems is presented in Figure 1, which usually comprises PV arrays and boost converters to improve DC voltage. The system is then connected with a three-phase inverter to convert DC voltage to AC voltage, and then sent into the power grid. The boost converter is exceptionally helpful to increase the DC voltage generated from the PV array [9]. The switching of the boost converter is regulated by the MPPT method based on the duty cycle. The MPP can be calculated by using various MPPT methodologies. A brief survey of these techniques is presented in [10]. The proficiency of these techniques can be evaluated by tracking speed, maximum power achieved, complexity, the number of sensors required, and time to reach the MPP.

**Figure 1.** The block diagram of the proposed Grid-Connected PV System.

The MPPT techniques can be categorized into conventional and intelligent techniques. The progress in this field of MPPT algorithms continues due to multiple optimization solutions [11]. To certify the better operation under the condition of uniform irradiance, some conventional MPPT techniques are proposed, such as Perturb and Observe (P&O) [12], Hill climbing (HC) [13], Incremental conductance (INC) [14]. Fractional short circuit current is also proposed and performed well under normal weather conditions [15], and modified P&O-based MPPT is implemented under single-solution optimization [16]. These approaches experience the oscillations in the MPP that consequences overall sustained loss in power and efficiency of the PV system. Furthermore, under partial shading, the above-mentioned conventional techniques are stuck at local peaks and fail to reach the global peak, surely reducing the PV system's proficiency and effectiveness.

To resolve the precedent drawbacks in conventional MPPT techniques, researchers proposed numerous algorithms by employing different methodologies in the literature. The intelligent MPPT control uses artificial intelligence-based techniques, like artificial neural networks (ANN) techniques [17], genetic algorithm [18], fuzzy logic controller (FLC), and neuro-fuzzy algorithms [19], which are proposed to track the global MPP with short response times and handle the nonlinear relationship between variables. Training neural networks requires thousands of datasets to be modeled for non-uniform weather conditions [20]. However, applying these MPPT methodologies to acquire the maximum

power is a costly and time-consuming task. It will also implement a control system much harder for grid-interfaced PV systems [21].

On the other hand, evolutionary techniques are usually employed, and among them, the particle swarm optimization (PSO) technique is usually preferred [22,23]. It is a simple and efficient technique that predominantly deals with multimodal and irregular issues. However, this cannot reach the global maxima owing to random numbers rooted in particles velocity. Consequently, the efficiency of this method is affected, which leads to premature convergence. Recently proposed soft-computing MPPT algorithms include flower optimization [24], cat swarm optimization [25], artificial bee colony [26], grey wolf optimization [27], and moth flame optimization [28]. The MPPT controllers have shown reasonable performance and better response to track the MPP under partial shading. However, these techniques exhibit some drawbacks, including comprehensive mathematical modeling, tuning of multiple parameters, and requiring a large population to perform optimization tasks. If the size of the sample population decreases, the success rate to determine the global MPP also drops.

The hybrid MPPT algorithms are also used in the literature to locate the MPP for improving the search speed with fewer steady-state oscillations [29–32]. In Ant colony optimization (ACO)-integrated P&O optimization-based MPPT algorithm, the P&O was employed for local search and ACO for global search [29]. In [30], diversification was added by combining differential evolution (DE) with PSO algorithm-based MPPT. The DE is used even while PSO is employed for odd iterations to reach MPP. The GWO-based MPPT is used in combination with the P&O algorithm for improving the convergence time. The GWO was employed in the early stage, while P&O was used at the final stage [31]. The deterministic PSO combined with the INC-based MPPT algorithm was presented in [32]. The INC was used to search local mode, while the PSO deterministically updated the velocity without using random numbers. However, the important benefit of the evolutionary algorithm was lost due to the removal of randomization. Hence, it may not trace the global MPP. Furthermore, suppose the irradiance level is less than 500 W/m<sup>2</sup> . In that case, the interaction between PV array and grid network will be more complicated, and undesirable reactive power will occur, which diminishes the overall PV system [33]. The overall efficiency of grid-interfaced PV systems is consequent of a combination of the following components: PV array (approx. 18–44%), inverter (approx. 95%), and MPPT (approx. 98%), as described in [34]. Hence, modern control systems work on the MPPT side to improve grid-interfaced PV systems' efficiency.

After a comprehensive analysis, it was noticed that mostly global MPPT methodologies deal with partial shading for a standalone PV system and have not often discussed partial shading for grid-interfaced PV systems. Therefore, this paper suggested a dragonfly optimization algorithm (DOA)-based MPPT methodology to overcome these issues. The novelty of this research work is to employ the DOA-based MPPT technique working under partial shading conditions for grid-interfaced PV systems. The comprehensive analysis was presented based on a novel DOA MPPT technique to trace the global MPP under partial shading conditions. Furthermore, the results of DOA, compared with those of P&O, PSO, ACSO, IPSO, and FFO-GRNN algorithms, prove the advancement in proficiency, reliability, and robustness of DOA to reach global MPP. A dual-level interfacing scheme based on a boost converter and three-phase VSI was presented to interface the PV system with the grid. The switching of the boost converter was controlled by duty cycle through the DOA-based global MPPT technique. The VSI comprises two regulating loops, i.e., an external DC voltage and an internal current normalization loop. The voltage loop normalizes the output power from the PV module to the grid and stabilizes the grid's power flow. However current control loop was used to regulate the injected current to the grid and keep it in phase with the grid voltage to achieve a unified power factor. Finally, the accuracy of the projected scheme was verified successfully by simulation in MATLAB/Simulink. The important contributions of the research are listed below:


The rest of this paper is organized as follows. In Section 2, PV modeling under partial shading is built. Then, the DOA-based global MPPT technique is presented in Section 3. The inverter control methodology is illustrated in Section 4. Subsequently, the simulation results are shown and analyzed in Section 5. Eventually, Section 6 concludes the paper.

#### **2. Modeling of PV Array and Partial Shading**

### *2.1. PV Array Modelling*

The solar cell is mostly composed of silicon (Si) crystalline material that conducts electricity when sunlight falls on solar cell and it converts the sunlight into electrical energy. In literature, the common models used for PV cells are based on one-diode and two-diode electrical circuit equivalent models. However, the one-diode model is preferred over the other because of its simple structure and easy implementation [35]. The equivalent model for solar cells is presented in Figure 2. By utilizing Kirchhoff's current rule (KCL), we can acquire the load current as presented in Equation (1):

$$I = I\_{\rm sc} - I\_R \left( e \frac{(I.R\_S + V)q}{K.A.T} - 1 \right) - \left( \frac{V + I.R\_s}{R\_p} \right) \tag{1}$$

where *I* is the output current of PV cell; *V* represents the output voltage, *Isc* is used to show the short-circuit cell's current, *q* represents the electronic charge, *I<sup>R</sup>* is the reverse saturation current, *K* is Boltzmann's constant, *T* is temperature of the PV Module and *A* is the ideality factor of diode, *R<sup>s</sup>* represents the resistance in series, and *R<sup>p</sup>* is the resistance in parallel. However, the value of *I* bypass current is very low and approaches zero. The resistance in parallel is also of huge quantity. Hence, Equation (1) can easily be transformed into Equation (2):

$$I = I\_{\rm sc} - I\_R \left( e \frac{(I.R\_S + V)q}{K.A.T} - 1 \right) \tag{2}$$

**Figure 2.** Single photovoltaic cell-equivalent circuit diagram.

Many PV cells are connected in series to form a PV module that is capable of delivering higher power. Usually, a single module is comprised of (36, 72, 96, and 128) cells connected in series and are currently available in markets [9]. These PV modules, in turn, associated in parallel and series combinations to increase the current and voltage, respectively, to form the PV string. The combination of PV strings is referred to as a PV array. These PV arrays have the capacity to produce power according to the desired demand. The BP MSX 120 panel was used here and the specifications of the module under the standard conditions (25 ◦C and 100 W/m<sup>2</sup> irradiance) are shown in Table 1, and those of the 12-KW PV system are presented in Table 2. Assume that *N<sup>s</sup>* is the number of cells arranged in series scheme and *N<sup>p</sup>* is the number of cells settled in parallel. Hence, Equation (2) can be converted into Equation (3).

$$I = I\_{\rm sc} N\_p - I\_R N\_\mathbf{s} \left( e \frac{\left( \frac{N\_p}{N\_s} I.R\_S + V \right) q}{K.A.T.N\_\mathbf{s}} - 1 \right) \tag{3}$$


**Table 1.** The BP-MSX 120 Module specification (25 ◦C and 1000 W/m<sup>2</sup> ).

**Table 2.** Characteristics of 12 KW PV system.


#### *2.2. Behavior of PV Array under Partial Shading*

When environmental circumstances like irradiance and temperature are not varying with the passage of time, then PV output power is assumed to be stable. If there is a cloudy sky or other obstacle in the way of PV modules, radiation to the PV array declines. As a result, the power diminishes and a variation in the nature of typical PV characteristic graph is observed. The output characteristics of the PV system are dissimilar during uniform irradiation and under partial shading. The extent of sun radiation on PV array declines during partial shading. Therefore, the power output of array decreases, and a variation in the performance can be observed in the PV's characteristic curve [6]. When the intensity of radiation is similar, there will be only one power peak for all the modules. However, when the intensity of irradiance is dissimilar, the PV's characteristic curve has various local peaks but just one global peak. Herein, the PV system was composed of three PV arrays connected in series. The different levels of irradiance were applied on the PV array for establishing partial shading, and are shown in Figure 3 and organized in Table 3. The output characteristics (P-V and I-V) graphs of the PV system for partial-shading case-1 and partial-shading case-2 corresponding to divers irradiance levels are presented in Figure 4a,b respectively. Both cases had multiple local peaks and had only one global peak. Moreover, local peaks are indicated with the help of red dots while the global peaks are indicated with the help of green dots.

**Figure 3.** Irradiance configuration for: (**a**) normal condition, (**b**) partial-shading condition.


**Table 3.** PV array irradiance level for different partial-shading cases.

#### *2.3. Boost Converter Modelling*

The DC-DC boost converter is usually employed as an interfacing bridge between the PV array and inverter. The typical circuit diagram of the boost converter is shown in Figure 5. This can be used to raise the PV array voltage to the appropriate level for grid synchronization and trace global MPP by resorting to DOA. The sizing of the boost converter (value of inductor, input capacitor, and output capacitor) parameters is presented in Appendix A. From [36] and [37], the value of the inductor was measured by utilizing Equation (4), where *D<sup>m</sup>* D<sup>m</sup> is the value of duty cycle, switching frequency is shown by *fs*fs, while output maximum voltage is presented by *Vom* , and ∆*I<sup>r</sup>* is the inductance ripple current.

$$L \ge \frac{V\_{om} \cdot D\_m (1 - D\_m)}{f\_s \cdot \Delta I\_r} \tag{4}$$

The input capacitor and the group of PV arrays were arranged in parallel combinations. It is the capacitor at the input of the boost converter. This capacitance was calculated in [37] and represented by Equation (5), where the value of the current at max power is *Iom*, *D<sup>m</sup>* represents duty cycle, and *Vpv*\_*mmpp* is the output voltage of the system at MPP.

$$\mathbf{C}\_{in} \ge \left[ \frac{I\_{om} \cdot \left( D\_m \right)^2}{0.02 \left( 1 - D\_m \right) f\_\text{s} \cdot V\_{pv\\_mmpp}} \right] \tag{5}$$

The capacitor in parallel with the load is called an output capacitor or DC-link capacitor. It is the capacitor at the output of the boost converter. The most vital function of this capacitor is to confine voltage to the predetermined level and reduce the ripple content from the PV source [38]. To measure the size of the output capacitor, Equation (6)

was employed, where *D<sup>m</sup>* represents duty cycle, *Vout* is the output voltage of the boost converter, *Rout* is output load of boost converter, and ∆*Vout* is ripple output voltage.

*Vout*·*D<sup>m</sup>*

(6)

**Figure 4.** (**a**) P-V characteristics of the array, (**b**) I-V characteristics of the array under partial shading.

**Figure 5.** The typical circuit diagram of the boost converter.

#### **3. MPPT Algorithms**

#### *3.1. Dragonfly Optimization Algorithm (DOA)*

The dragonfly optimization algorithm (DOA) is a kind of evolutionary algorithm and an intelligent search-optimization technique. The idea is originated in the static and dynamic behavior of dragonflies. The small cluster of dragonflies that hunt for prey in a small locality are categorized as a static swarm. The movement of flies is characterized by abrupt and rapid changes in their respective flight paths. On the other hand, a large cluster of flies that maintains a constant direction of motion over a lengthy distance with the aim to migrate from one point to another is categorized as a dynamic swarm. Since the aim of these dragonflies in a swarm is similar to the optimization problem, the static behavior of swarm dragonflies (DFs) are used to characterize the exploitation phase, while the dynamic behavior of swarm DFs is used to characterize the exploration phase. This establishes the foundation of DOA. To derive the mathematical model for signifying the flies' motion in a cluster, five features of dragonflies, i.e., separation, alignment, cohesion, food, and enemy are described. The *Sep<sup>i</sup>* , *A*lg*<sup>i</sup>* , *Coh<sup>i</sup>* , *A f<sup>i</sup>* , and *Ee<sup>i</sup>* are used to represent separation, alignment, cohesion, food, and enemy features of an *i* individual dragonfly in a cluster. The acronym list of DOA variables is shown in Table 4. These feature of flies can be represented by mathematical equations as follows:

**Table 4.** Acronym list for DOA variables.


To maximize the search space and avoid collision, the distance between adjacent DFs is necessary within the given locality. Let *i* is represent the number of individuals in a cluster with *'n'* neighbors. The Separation *Sep<sup>i</sup>* of the *i* individual in a cluster is shown with the help of Equation (7), as shown below., where *x* is the current position of DF and *xk* is the position of the *k*th neighboring DF.

$$Step\_i = \sum\_{k=1}^{n} (\mathbf{x} - \mathbf{x}\_k) \tag{7}$$

Matching the velocities of the individual with other DFs with in the same locality is based on alignment term *Alg<sup>i</sup>* as represented in Equation (8). Here, *V<sup>k</sup>* is the velocity of the *k*th neighboring DF.

$$Alg\_i = \frac{\sum\_{k=1}^{n} V\_k}{n} \tag{8}$$

All the individuals of DF in a cluster are inclined to move in the direction of the mass center of neighboring DFs. The cohesion feature *Coh<sup>i</sup>* of DF is determined by Equation (9):

$$\text{Coh}\_{\text{l}} = \frac{\sum\_{k=1}^{n} (V\_k)}{n} \tag{9}$$

All the individuals in a cluster tend to move in the direction of food, as it is essential for living. The attraction for food *A f<sup>i</sup>* feature at location *xf ood* is acquired by following Equation (10).

$$Af\_{\mathbb{I}} = \mathfrak{x}\_{food} - \mathfrak{x} \tag{10}$$

All the individuals in a cluster tend to move away from the enemy. The enemy feature *Ee<sup>i</sup>* at location of enemy *x<sup>e</sup>* can be calculated by Equation (11).

$$E e\_l = \mathfrak{x}\_\mathfrak{e} + \mathfrak{x} \tag{11}$$

The behavior of DFs in a cluster is influenced by the combining all the five attributes. The updated location of the individual DFs is calculated by step ∆*x<sup>i</sup>* and denoted in Equation (12).

$$\mathbf{x}\_{i} = \mathbf{x}\_{i} + \Delta \mathbf{x}\_{i} \tag{12}$$

$$
\Delta \mathbf{x}\_{i} = w \Delta \mathbf{x}\_{i} + (a.Sep\_{i} + b.A \mathbf{l}\_{\mathbf{g}\_{i}} + c.Coh\_{i} + d.Af\_{i} + e.Ee\_{i}) \tag{13}
$$

where *w* is the inertial weight, and *a*, *b*, and *c* are the separation, alignment, and cohesion weights, respectively, whereas *d* is used to represent the food factor and the enemy factor is represented by *e*. The *Sep<sup>i</sup>* , *A*lg*<sup>i</sup>* , *Coh<sup>i</sup>* , *A f<sup>i</sup>* , and *Ee<sup>i</sup>* are used to represent separation, alignment, cohesion, food, and enemy features of an *i* individual dragonfly in a cluster. The variation in the explorative and exploitative behaviors of the DFs can be realized by using different values of parameters. The flow chart of DOA is also displayed in Figure 6.

**Figure 6.** Flow diagram of the proposed DOA algorithm.

#### *3.2. Application of DOA for MPPT Problem*

The DOA can also be applied to track the global MPP of the PV system under partial shading. The particles are initialized around the search space. The existing location of DF is considered as the duty cycle. The constraints used for DOA is tabulated in Table 5. The pseudo code for the application of DOA for the MPPT problem is also presented in Figure 7. The important phases involved in the execution of DOA are described as below:


**Table 5.** Constraints for DOA.


### *3.3. Comparison of DOA with Other MPPT Techniques*

The suggested DOA technique was compared with other widely used conventional and intelligent MPPT algorithms, including the Perturb and Observe (P&O) algorithm, the Particle Swarm Optimization (PSO) algorithm, an improved version of the PSO algorithm (IPSO), the adaptive cuckoo search optimization (ACSO) algorithm, and fruit fly optimization combined with a general-regression neural network (FFO-GRNN). The P&O approach experienced the oscillations and failed to reach global MPP. Subsequently, it caused an overall sustained loss in power and efficiency of the PV system [12]. The PSO algorithm was inspired by the swarm behavior of particles and is a kind of evolutionary technique. Moreover, it is a simple and efficient technique, predominantly dealing with irregular issues [22]. However, during local power peaks, when particles were caught by undesirable states in the course of searching and evolution processes, the exploration capacity was quickly lost. As a result, the efficiency of PSO was affected and this led towards premature convergence. Therefore, in order to overcome these shortcomings, an Improved PSO (IPSO) algorithm is introduced [6]. The IPSO has shown better performance as compared with the PSO algorithm. The ACSO-based MPPT algorithm was employed to determine the MPP during non-uniform weather conditions, and it showed better performance than Cuckoo search optimization. Furthermore, the FFO algorithm with GRNN was also utilized to trace the global MPP under partial shading conditions. It showed better searching ability

and efficiency as compared with other MPPT algorithms [17]. All these aforementioned techniques were applied on the PV system to study their performance behavior under non-uniform irradiance and partial-shading conditions. Detailed comparisons among these MPPT techniques are presented in the simulation results and discussion section of this paper.


**Figure 7.** Pseudocode for the DOA algorithm.

#### **4. Inverter Control Methodology**

The fundamental purpose of the inverter is to associate the PV array with the power grid. In a similar time, the inverter is employed to keep up the voltage at output of the boost converter, i.e., the DC link of the inverter and controlling the power (active and reactive), which are sent to the grid under partial shading. The various parts relating to the work of this system are presented in Figure 8. The performance of the overall system can be expressed by Equation (14), where *Uabc* and *Iabc* are the grid voltages and currents, and *eabc* are the voltages of converters.

$$
\mathcal{U}I\_{abc} = e\_{abc} + \mathcal{R}.I\_{abc} + L\frac{d}{dt}(\mathcal{U}\_{abc})\tag{14}
$$

The stationary *abc* and the synchronously rotating *dq* reference frames were used for the implementation of this methodology. The vector control, grid voltage, and current are portrayed as vectors in the α-β reference frame. The process of changing the stationary three-phase *abc* coordinates system to the rotating *dq* coordinate frame system is called the *d-q* transformation. This change can be performed in two steps. The clark and inverse clark transformations are utilized to change over the factors into *α-β* reference stationary edge and vice versa. Essentially, for transformation of the value from the stationary α-β reference frame into the rotating *d-q* reference, the park and inverse-park transformations are required. The alteration of axes for vector-control frames is displayed in Figure 9. By employing *abc* to *dq* transformation, voltages and currents can be expressed by Equation (15) for the *dq* frame of reference revolving at *ω.* The Equations (16) and (17) present voltage in the *dq* reference frame, as shown below.

$$
\mathcal{R}\begin{pmatrix} \mathcal{U}\_d \\ \mathcal{U}\_q \end{pmatrix} = \mathcal{R}\begin{pmatrix} \mathcal{I}\_d \\ \mathcal{I}\_q \end{pmatrix} + L\begin{pmatrix} \mathcal{I}\_d \\ \mathcal{I}\_q \end{pmatrix} + L\begin{pmatrix} \mathcal{0} & -\omega \\ \omega & \mathcal{0} \end{pmatrix}\begin{pmatrix} \mathcal{I}\_d \\ \mathcal{I}\_q \end{pmatrix} + \begin{bmatrix} \mathcal{e}\_d \\ \mathcal{e}\_q \end{bmatrix} \tag{15}
$$

$$
\Delta U\_d - e\_d = L \frac{d}{dt} (I\_d) + R.I\_d - \omega L I\_q \tag{16}
$$

$$
\omega L\_q - e\_q = L \frac{d}{dt} \left( I\_q \right) + R.I\_q - \omega L I\_d \tag{17}
$$

**Figure 8.** The block diagram of the controller for the grid-connected PV system.

**Figure 9.** The alteration of axes for vector-control frames.

The synchronization of the grid plays a significant part in grid-interfaced PV systems. The PLL control strategy is employed to synchronize the output signal with the reference input signal according to phase and frequency [39]. The block of three-phase PLL block can be accessed by employing MATLAB/Simulink.

#### *4.1. Voltage and Current Control Strategy*

The approach used for regulating the inverter contains two controlling loops, as presented in Figure 8. The regulatory approach has an internal current and an external voltage-control loop. The function of the internal current-regulating loop is to regulate the injected current to the grid and keep it in phase with the grid voltage to provide power factor unity and reduce the harmonics. The AC grid current references are delivered by an external voltage-regulating loop. The external voltage-regulatory loop is used to normalize DC voltage and stabilizes the grid's power flow. The synchronous frame-of-reference *dq* control adopts (*abc* to *dq*) reference frame conversion to transfer the grid voltage and current to the *dq* reference frame. The voltage, after transformation, detects the phase and frequency of the grid.

In Figure 8, the value of *U*\**PV* is correlated with a given value of *UPV*, and the PI regulator achieves the difference for the static control of DC voltage. Since *Isd* can achieve DC voltage regulation, the reference value of the active current inner loop *I\*sd* is given by the output of the external DC voltage loop, thus realistically controlling the active power of the grid-connected inverter output. The reference value of the inner-loop reactive current *I\*qs* is determined by the amount of reactive power required by the grid network. When *I\*qs* = 0, the reactive power output of the grid inverter is zero, and only the active power is transmitted to the grid, which is then operated in the unit power-factor state. The internal current-loop controller and external voltage-controller parameters can be measured by the transfer-function model of the PID tuning algorithm by employing Matlab/Simulink [40]. The values of *Kp* and *Ks* for the voltage PI controller were 9.5 and 20. The values of *Kp* and *Ks* for the current PI controller were 0.5 and 50. The period of sampling time was taken as 1 µ second.

#### *4.2. SVPWM Technology*

The three-phase inverter comprised six power switches from S1 to S6, as shown in Figure 8, all of which were regulated by the standards of space-vector pulse-width modulation (SVPWM). The SVPWM methods are characterized by consistent amplitude, but the duty cycle of every period is different. The voltage in the *abc* frame ought to be presented in the *dq* frame for the SVPWM [40]. Voltages might be characterized as vectors set in search space. These vectors are used for the switching of the inverter compared with switch combinations.

#### *4.3. Grid Connected Filter*

Since providing a sinusoidal line current to the grid without harmonic distortion was the utmost significant objective of this research, an inverter capable of filtering must be connected with the power grid. The filter can also minimize the switching losses. Therefore, to design the filter that meets these requirements as much as possible, 10% rated current output was used as the ripple output current. The value of the inductor and capacitor can be calculated by Equations (18) and (19), respectively [39].

$$L \geq \frac{V\_{dc-side}}{16. f\_s \Delta I\_L} \tag{18}$$

$$C \ge \frac{10}{3 \ast 2\pi \ast f \ast \left(V\_{rated}\right)^2} \tag{19}$$

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

The credibility of the proposed DOA-based MPPT algorithm was verified through two different cases, i.e., partial-shading case-1 and case-2. For the implementation of partial shading, diverse irradiance was applied to three PV arrays associated with the series connection. Those diverse levels of irradiance are given in Table 3. The MATLAB/Simulink was used for analyzing these MPPT methodologies. Furthermore, the suggested DOA technique was compared with the conventional P&O algorithm, PSO algorithm, IPSO algorithm, ACSO algorithm, and FFO-GRNN algorithm.

#### *5.1. Partial Shading Case-1*

In this case, partial shading occurred when PV arrays did not experience identical irradiance. The diverse irradiance (600 W/m<sup>2</sup> , 800 W/m<sup>2</sup> , and 1000 W/m<sup>2</sup> ) was applied to three PV arrays associated with the series connection. The power voltage characteristic curve for this case is visualized in Figure 4a with two local and one global peak at the power levels of 3578 W, 5813 W, and 9250 W respectively. In this section, the research was carried out according to the maximum power attained using the abovementioned MPPT techniques under partial-shading case-1.

Overall, the performance of the DOA-based MPPT algorithm was outclassed in every aspect. Both DOA and FFO-GRNN procedures had comparable prospects in the attainment of global MPP. The suggested DOA entirely nullified the oscillations while achieving global MPP. The steady power achieved by DOA, FFO-GRNN, IPSO, ACSO, PSO, and P&O was 9189 W, 9003 W, 8889 W, 8982 W, 8767 W, and 5196 W, respectively. Under these circumstances, the power, voltage, and current plots of the concerned techniques are displayed in Figure 10a–c, respectively. The oscillations were higher in the P&O technique, and local peaks could easily trap them. Hence, a significant decrease in efficiency was observed. The PSO method could reach the local peak shortly, but consecutive oscillation caused huge energy and proficiency loss, reaching the global peak after 0.47 s with oscillations. The FFO-GRNN technique also easily captured the global maxima and exhibited a tracking time of around 0.33 s. The IPSO technique was not too disturbed by the local peaks and stabilized at global maxima peak within 0.38 s, and it displayed fewer fluctuations compared with PSO. The tracking time to achieve the maximum peak for the ACSO technique was around 0.46 s. The proposed DOA was not affected by the local peak and tracked the global peak without a loss in power. The DOA was the fastest one to stabilize at a global peak, within 0.28 s, as depicted in Figure 10a.

Among these MPPT techniques, DOA achieved the highest efficiency of about 99.34%; subsequently, FFO-GRNN realized 97.32%, while the IPSO method achieved 97.10%. After that, ACSO attained an efficiency of 96.09%. Moreover, PSO attained 94.77% efficiency. The least efficiency of about 56.17% was attained by P&O. In terms of convergence speed, DOA effectively traced the global peak within 0.28 s while FFO-GRNN tracked after 0.33 s. The proposed DOA technique appeared to stabilize at a global peak in fewer iterations and showed a very quick response. The detailed comparative analysis of these concerned techniques under these circumstances is also presented in Table 6.

**Figure 10.** *Cont*.

**Figure 10.** (**a**) Power comparison, (**b**) Voltage comparison, (**c**) Current comparison of P&O, PSO, IPSO, and DOA algorithms under partial-shading case-1.



#### *5.2. Partial Shading Case-2*

To make this investigation and relative study further inclusive, we considered an additional partial-shading case, in which diverse irradiance (800 W/m<sup>2</sup> , 500 W/m<sup>2</sup> , and 450 W/m<sup>2</sup> ) was applied to three modules associated in series connection. The powervoltage curve for this case is visualized in Figure 4a with two local peaks and only one

global peak at the power levels of 2022 W, 3357 W, and 4240 W, respectively. In this section, the research was carried out according to maximum power attained using the abovementioned MPPT techniques under partial-shading case-2.

In general, the suggested DOA technique showed better and more efficient results compared with other concerned methodologies. The output power achieved by DOA, FFO-GRNN, IPSO, ACSO, PSO, and P&O techniques was 4211 W, 4094 W, 4032 W, 3979 W, 3948 W, and 2216 W, respectively. Under these circumstances, the power, voltage, and current plots of the concerned techniques are displayed in Figure 11a–c, respectively. The proposed DOA technique was not disturbed by the local peaks and stabilized at global peak power within 0.32 s. It displays fewer fluctuations compared with other MPPT methodologies. The FFO-based GRNN technique also showed better efficiency and touched the global peak after 0.30 s. The IPSO technique showed better efficiency and output power results than PSO, experienced oscillation, and stabilized at the global peak after 0.35 s. The ACSO algorithm achieved a global peak within 0.33 s, just after the IPSO technique. Figure 11a also demonstrates that PSO was affected by local peaks. Its scatter plot exhibited large oscillations in output power, caused loss in energy and efficiency, and reached the global peak after 0.44 s. Moreover, under these circumstances, the conventional P&O technique was stuck at the local peak. It failed to reach the global peak, which will surely reduce the proficiency and effectiveness of the PV system. *Sustainability* **2021**, *13*, x FOR PEER REVIEW 16 of 27

**Figure 11.** *Cont*.

**MPPT Techniques**

**Sensed Variables**

*Sustainability* **2021**, *13*, x FOR PEER REVIEW 17 of 27

**Figure 11.** (**a**) Power comparison, (**b**) Voltage comparison, (**c**) Current comparison of P&O, PSO, IPSO, and DOA algo‐ rithms under partial‐shading case‐2. **Figure 11.** (**a**) Power comparison, (**b**) Voltage comparison, (**c**) Current comparison of P&O, PSO, IPSO, and DOA algorithms under partial-shading case-2.

**Table 6.** Performance analysis of different MPPT algorithms. **Steady State Error Tracking Speed GMPP Tracking Tracking Accuracy Efficiency Complexity Cost** P&O V, I High Fast No Low Less Low Cheap PSO V, I Moderate Fast Yes Medium High Medium Moderate ACSO V, I Less Fast Yes High High High Expensive IPSO V, I Less Fast Yes High High High Expensive FFO‐GRNN V, I Less Fast Yes High High High Expensive DOA V, I Less Fast Yes High High High Expensive *5.3. PV Array Interfaced with Grid Network* Afterinvestigating the simulation results of the DOA algorithm compared with those Among these MPPT techniques, DOA achieved the highest efficiency, of about 99.31%. Next, FFO-GRNN maintained 97.32% efficiency. The IPSO method attained a 95.09% efficiency rate, while the ACSO technique upheld an efficacy of around 93.84%, whereas PSO attained 93.11% efficiency. Moreover, the P&O technique showed very little efficiency of around 52.26%. The DOA appeared to stabilize at a global peak in fewer iterations and showed a very quick response. The proposed DOA-based MPPT technique has improved tracking ability, faster convergence rate, and reduced power loss in a steady state. Thereby, these characteristics make DOA an excellent option to be utilized under different shading conditions. The comparison of these concerned techniques regarding convergence time, maximum power tracked, and efficiency are also tabulated in Table 6. The overall performance analysis of these MPPT algorithms regarding the steady-state error, tracking speed, complexity, accuracy, and cost are recorded in Table 7.


of other concerned MPPT algorithms, it demonstrated advancement in reliability, effi‐ ciency, and robustness of DOA to achieve the global MPP. Therefore, this section simu‐ **Table 7.** Comparison of different parameters concerned MPPT techniques under partial shading.

#### *5.3. PV Array Interfaced with Grid Network*

After investigating the simulation results of the DOA algorithm compared with those of other concerned MPPT algorithms, it demonstrated advancement in reliability, efficiency, and robustness of DOA to achieve the global MPP. Therefore, this section simulates the grid interfaced PV system by utilizing the DOA algorithm and analyzed it under partialshading case-1. The PV arrays received different irradiances (600 W/m<sup>2</sup> , 800 W/m<sup>2</sup> , and 1000 W/m<sup>2</sup> ), while the temperature was constant at 25 ◦C. The simulation setup for the grid-interfaced PV system under partial shading by the DOA MPPT technique can be seen in Figure 12. It can be observed from Figure 10a,b that the values of the output power and a voltage obtained from the boost converter were 9189 W and 490 V, respectively. The response time of DOA was also much shorter relative to conventional P&O, PSO, IPSO ACSO, and FFO with the GRNN algorithms, although the existence of partial shading makes it hard to stay at the best optimal point.

**Figure 12.** Simulation setup for the grid-interfaced PV system under partial shading by employing DOA MPPT Technique.

The frequency of the grid was assumed to be 50 Hz, and the sinusoidal current output from grid connection can be viewed in Figure 13a, between −18 A and +18 A. Figure 13b presents the zoom view of three-phase sinusoidal current. The peak-to-peak voltage of the analog grid was 311 V, which can also be seen in Figure 13c, while Figure 13d presents the zoom view of three-phase voltage. The amplitude of peak voltage was switched between 311 V and +311 V. Figure 13e presents the voltage and current of the power grid, and Figure 13f presents the zoom view of the grid voltage and current. Both the voltage and current were in phase, which is very important in maintaining the unity of power factor. The inverters have to diagnose voltage anomalies in the grid-interfaced PV system. In this research, the requirement for grid voltage was 311 V (peak-to-peak) or 220 V (RMS voltage). For instance, it can be observed in Figure 13c that, initially, the voltage disturbance was small, but after a short span of time (about 0.08 s), it quickly retained the three-phase voltage of the grid network at 311 V (peak-to-peak). Hence, it also fulfilled the relative requirement of the grid.

**Figure 13.** *Cont*.

**Figure 13.** (**a**) Waveforms of the 3-phase grid current, (**b**) Zoomed view of the 3-phase grid current, (**c**) Waveforms for the 3-phase grid voltage, (**d**) Zoomed view of the 3-phase grid voltage, (**e**) Amplitude of the grid voltage and current, (**f**) Zoomed-view amplitude of the grid voltage and current.

The parameters in the *dq* transformation are visualized in Figure 14a. We can see in this figure that the value of *Id* was around 30 Amperes, while the value of *Iq* was around zero Amperes. The value of voltage *Ud* was around 385 V, while the value of *Uq* was around zero Volts. The values of DC voltage and current are shown in Figure 14b. The figure demonstrates that the value of the current was around 20 A, while the value of the voltage was around 530V. This is the same voltage generated by the boost converter and given to the input side of the inverter as DC voltage. The input current to the inverter was around 20 A. The value of the active power generated by the grid can be viewed in Figure 14c, whose value was around 9.2 KW. The reactive power also reached zero, as shown in Figure 14d. As the received power approached zero, the power factor was close to unity.

**Figure 14.** *Cont*.

**Figure 14.** (**a**) Current and voltages from *dq* transformation, (**b**) DC link voltage and current, (**c**) Active power received by the grid. (**d**) Reactive power received by the grid.

The THD of the grid-interfaced PV system is the most significant power quality component. The notable concern of the grid is to comply with the THD requirement of grid interconnection standards. The Fast Fourier Transform (FFT) analysis was utilized to observe the fundamental and harmonic components in the output injected-current waveform. The THD of the grid-associated current was analyzed and compared with the standard of IEEE 519. In line with the IEEE standard, THD of the grid-connected current must be below 5% of the fundamental current frequency at the rated inverter output, since the high-order harmonics of current will cause adverse effects on a variety of equipment related to the power grid. The THD of the system is shown in Figure 15a. The magnitude of fundamental harmonics was more than 3.25%. In comparison, the magnitude of the 3rd and 5th harmonic components were 0.38% and 2.78%, respectively. The magnitude of the 7th harmonics was 2.07%, and the 9th was around 0.17%. It is obvious from Figure 15a that after the 7th harmonics, the current decreased significantly. In these circumstances, the THD was 3.76%, which is less than 5%, and meets the criteria of IEEE standard 519 for distribution into the grid. Therefore, the system performance of THD is reasonable.

According to the 929 standards of IEEE, the power factor must be greater than 0.85 (leading or lagging). The grid-linked PV inverter is intended to normalize the grid current with a unity power factor. In this way, an inverter is responsible for regulating the power factor. Herein, we can learn from Figure 15b that power factor reached unity. The PV system ought to be synchronized with the power grid. Meanwhile, the frequency range must not exceed the limit (49.2–50.6) Hz for the slight PV system, as defined by the 929 standards of IEEE. In this study, frequency was also within these limits, as displayed in Figure 15c. Consequently, frequency follows the standard requirement.

**Figure 15.** (**a**) Plot showing the percentage of the THD, (**b**) Power factor of a grid, (**c**) Frequency of a grid network under partial shading.

#### **6. Conclusions**

This section outlines the key areas introduced in this study and a recommended plan for applying the DOA-based global MPPT technique for grid-interfaced PV systems. The dual-stage arrangement for grid-interfaced PV systems was presented in this research work. This arrangement consisted of a DC-DC boost converter and inverter to

link the PV array with the grid network. The boost converter switching was regulated by utilizing the dragonfly optimization algorithm (DOA) based on the duty cycle. The proposed DOA-based MPPT technique was capable of finding and following the global peak, irrespective of the variation in shading pattern, with less oscillations around the steady state. The DOA-based MPPT technique was evaluated and compared with widely used MPPT techniques, such as P&O, PSO, IPSO, ACSO, and FFO-GRNN algorithms, under different shading patterns. The simulation results showed that the suggested DOA technique significantly out-performed the competing techniques in terms of response time, oscillations reduction, robustness, accuracy convergence speed, and power efficiency. The VSI was utilized to regulate the active and reactive power injected into grid simultaneously. To maintain the unity power factor operation, instantaneous reactive power flow was adjusted to zero. The three-phase PLL was employed to lock the inverter phase and frequency with the grid. Finally, the simulation of the overall grid-associated PV system was carried out by means of MATLAB/Simulink. The simulation results showed that THD the grid current, power factor, and frequency were within the IEEE's standard limits. Hence, the proposed DOA-based MPPT is an effective technique to practically enhance the output and overall performance of the grid-interfaced PV systems under all shading conditions.

**Author Contributions:** Conceptualization, E.L., F.-Y.W., M.Y.J.; methodology, E.L., M.Y.J.; software, E.L., T.S.T.; validation, E.L., M.Y.J.; formal analysis, G.A.M., D.W.G.; investigation, T.S.T., D.W.G.; resources, G.X., F.-Y.W.; data curation, E.L., M.Y.J.; writing—original draft preparation, E.L.; writing—review and editing, F.-Y.W., G.X., T.S.T., D.W.G.; visualization, G.A.M., D.W.G.; supervision, F.-Y.W., G.X.; project administration, F.-Y.W., G.X.; funding acquisition, F.-Y.W., G.X. All authors have read and agreed to the published version of the manuscript.

**Funding:** The work is funded by the National Key R&D Program of China (2018AAA0101502) and the Science and technology project of SGCC (State Grid Corporation of China): fundamental theory of human-in-the-loop hybrid-augmented intelligence for power grid dispatch and control.

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

#### **Appendix A**

In this section, the design of boost converter (value of inductor, input capacitor and output capacitor) is discussed in detail. The parameters for the sizing of boost converter is shown in Table A1.

**Table A1.** Design parameters for the sizing of boost converter.


The value of inductor is measured by Equation (A1), where *D<sup>m</sup>* is the value of duty cycle at MPP, switching frequency is shown by *f<sup>s</sup>* , while output maximum voltage is presented by *Vom* and ∆*I<sup>r</sup>* ∆Ilrippleis the inductance ripple current. The inductor L is calculated with the following Equation (A1) [39]:

$$L \ge \frac{V\_{om} \cdot D\_m (1 - D\_m)}{f\_s \cdot \Delta I\_r} \tag{A1}$$

where *Vom* is 540 V, *f<sup>s</sup>* is 10,000 and the value of duty cycle *D<sup>m</sup>* is obtained from:

$$\frac{V\_{out}}{V\_{in}} = \frac{T}{t\_{off}} = \frac{1}{1 - D\_m}$$

$$D\_m = 1 - \frac{V\_{in}}{V\_{out}} = 1 - \frac{337}{540}$$

$$D\_m = 0.3759 = 0.38$$

The output maximum current is given by:

$$I\_{om} = \frac{P\_{out}}{V\_{out}}$$

The converter is supposed no loss. The PV input power is the output power.

$$I\_{om} = \frac{12,000}{540} = 22.22 \text{ A}$$

The resistive load is given by:

$$R\_{load} = \frac{V\_{out}}{I\_{om}}$$

$$R\_{load} = \frac{540}{22.22} = 24.3 \,\Omega$$

Hence, inductor *L* is calculated by putting values in Equation (4).

$$L \ge \frac{540 \ast 0.38 \ast (1 - 0.38)}{10,000 \ast 2 \ast 35.6 \ast 0.1}$$
 
$$L \ge 1.78 \ mH$$

The input Capacitor is calculated from Equation (A2). Where the value of current at max power is *Iom*, *D<sup>m</sup>* represents duty cycle and *Vpv*\_*mmpp* is the output voltage of the system at MPP.

$$\mathbb{C}\_{in} \ge \left[ \frac{I\_{om.} \left( D\_m \right)^2}{0.02 (1 - D\_m) f\_{s.} V\_{p\upsilon\_{\perp} mnp} p} \right] \tag{A2}$$

$$\mathbb{C}\_{in} \ge \left[ \frac{22.22 \ast (0.38)^2}{0.02 \ast (1 - 0.38) \ast 10,000 \ast 337} \right]$$

$$\mathbb{C}\_{in} \ge 76.7 \text{ } \mu F$$

To measure the size of output capacitor, Equation (A3) is employed. Where *Vout* is the output voltage of the boost converter, *D<sup>m</sup>* represents duty cycle, *Rout* is output load of boost converter, ∆*Vout* is ripple output voltage.

$$\mathcal{C}\_{out} \ge \left[\frac{V\_{out} \cdot D\_m}{f\_s \cdot \Delta V\_{out} \cdot R\_{out}}\right] \tag{A3}$$

$$\mathcal{C}\_{out} \ge \left[\frac{540 \ast 0.38}{10000 \ast 5.4 \ast 24.3}\right]$$

$$\mathcal{C} \ge 156 \,\mu F$$

### **References**

