A novel algorithm of MGWO-based PI controller for a single-stage grid-connected flyback inverter with ZVS

An effective approach on zero-voltage switching scheme for a single-stage grid-connected flyback inverter along with the introduction of Modified Grey Wolf Optimizer technique based on the proportional integral controller is proposed. A focus on soft-switching is attained by means of permitting the grid-side negative current along the bidirectional switches held in the transformer’s secondary side. Consequently, there is a discharge of metal–oxide–semiconductor field-effect transistor’s output capacitor. This function led the primary switch to turn ON at the condition of zero voltage. Therefore, it is essential to optimize the reactive current level for attaining zero-voltage switching. Generally, the basic Grey Wolf Optimization has some more disadvantages of accuracy-solving and less capability of finding the fitness solutions. Hence, to overcome this, optimizer can be modified for further enhancement in the optimization process. Modified Grey Wolf Optimizer based on the proportional integral controller with pulse width modulation technique is used for controlling the switches; thereby zero-voltage switching triggering takes place which results in decreased total harmonic distortion. Finally, the simulations can be carried out based on the total harmonic distortion which helps to illustrate the effectiveness of the suggested algorithm. A 24-V, 325-W prototype has been carried out to verify the proposed system.


Introduction
Renewable energy sources have become more efficient compared to the other traditional sources in the past 5 years. The International Energy Agency predicts that approximately 60% of the forthcoming electrical power emerges from microgrids and stand-alone solar systems. The limitation of renewable energy resources with a random outcome could be alleviated by implementing the battery system. To manage the noxious gases and metal emissions from the fossil-fuel steam turbine generators, it is essential to extend the generation capability of the non-toxic and clean renewable energies. Photovoltaic (PV) systems connected with an alternating current grid are economical and need a reduced amount of maintenance than the other standalone systems, as there is no need for storage purpose batteries. Lead acid or Li-ion battery storage is used generally in the stand-alone systems that need excessive control and enhances the overall cost for both charging and discharging. Consequently, PV systems that were connected with grid reside in 99% of the whole installed facility when compared to the 1% of the stand-alone systems. On account of various PV module arrangements, the grid-connected inverter will be classified into string inverters, multistring inverters, alternating current module inverters and central inverters or microinverters. The module-integrated converter or microinverter is a converter with a less power rating of about 150-400 W at which a devoted grid-connected inverter was employed for all PV modules of the system. The major technical concerns on behalf of the inaccessible PV microinverters were to attain high efficiency on conversion, long life span and reduced rate of manufacturing cost. It is specified that microinverters are isolated, contains transformers of high frequency, switching losses and core losses were considered as the foremost concerns for attaining the enhanced efficiency [1,2].
To achieve a dependable incorporated unit by every PV panel, compact microinverter with a long life-span is preferred. To acquire the necessary output voltage in favour of altering the conditions of solar input, power conditioning systems are implemented as an interfacing system among the grid and the PV panels. In general, the power conditioning system contains two stages of conversion. One stage for boosting the solar voltage and the other is inverting stage. Thus, the cost of the system will increase and the efficiency decreases [3,4]. So, we consider the single conversion stage of the proposed system for an increase in efficiency and reduce the switching losses. Even though the method mentioned above has the advantages of enhancing the effectiveness by neither achieving softswitching nor different control operations, these have the downsides of decreasing the complication of controller and power density [5]. The author highlighted a comparison of soft-and hard-switching boost converter topology of PV systems. This in turn reduces the switching stress and switching losses using softswitching technique [6]. This researcher described that the major grid-connected PV systems challenge exclusive of galvanic separation. The review on converter topology was mainly focused on the contest among various converter kinds and several technologies of PV panel. This was being determined with the common voltage mode among the ground and PV string terminals. The leakage of ground current because of the voltage-time variation was the electric safety source, amplitude and the problems related to electromagnetic interference (EMI). The efficiency of conversion process was examined by means of comparing semiconductor power losses qualitatively [7].
These authors mentioned that the PV generation system gives a novel approach of power insertion system and it has the outcome of giving the power from the solar cell groups, changing the direct current power to the alternating current power with suitable electrical characteristics. The portion of the system that accomplish this alteration is the flyback inverter The traditional active clamp circuit in BCM or DCM functions for the flyback structure as drawback, which cannot release the full energy stored in the main switch of parasitic capacitance. Therefore, the zero-voltage switching (ZVS) is not suitably attained for the major switches [8].
The author stated that a split capacitor depends on the topology and uses a particular DC supply for generating the specified levels of output. The split capacitors were taken into consideration for attaining stepped output, thereby, implementing a time frame-based switching scheme (TFSS). The total switches are decreased by enhancing the harmonic factor. The output power was filtered then with the use of component passive inductor and was being synchronized for feeding grid power system [9].
The author implemented two supplemental sources of voltage which in turn exploits the passive component present in the auxiliary path. With the use of this technique, the features of soft switching were considered for the wide converter duty-cycles range. This output power value was independently achieved or the operation mode of the converter, and thus, soft-switching was considered in the region of whole converter operation. In addition, there was no existence of additional voltage stress at main switch. The voltage stress at the auxiliary switch was reduced on comparing the voltage stress at the main switches [10]. The author stated that the soft-switching power converters used for effective grid applications. The modular multilevel converter was signified as a significant resolution for the application of the grid as they were capable of extending the range of voltage output like an application of high voltage. This article reviews such a converter to a resonant account overview, not previously employed in the applications of high power, thereby examining how the grid application was performed [11]. The researcher suggested a new technique that augments the quality of power together with the power control for the grid-connected inverter. The work presented in turn act with analyzing and modelling of transformer-less grid-connected inverter together with the real and reactive power control. And it was examined for the decrease of total harmonic distortion (THD) [12].
The author presented a variable switching frequency of SPWM method for attaining ZVS at unity power factor in three-phase grid-connected VSI for two parallel 180°interleaved operations. A huge ZVS range could be attained with no sensor in addition, current zerocrossing or auxiliary circuit and detection circuit. The frequency of carrier wave was simple for calculating and to update with a digital control. The current ripple was predicted exactly and it is restricted for the minimization of circulation loss unnecessarily. At the inverter side, the high current ripple was cancelled considerably by means of interleaved parallel configuration. LCL filter was employed for attenuating the current ripple and for enhancing the grid-side power quality [13].
The researcher mentioned a full-bridge transformerless PV grid-connected inverter topologies with zerovoltage transition concept. Here, the SVS is applied to the high-frequency switches [14]. The author stated a novel boundary conduction mode to increase the output power. This scheme of operation takes the charge of transformer in reverse order to give the reactive current for ZVS. Here, the ZVS is maintained in both the primary and secondary switches [15]. The researcher stated a novel soft-switching flyback inverter for PV systems. The conventional flyback inverter has leakage inductance in transformer. So, it causes voltage surge across the switches. To overcome this, a snubber circuit is used. Here, soft-switching is achieved in main switch using an auxiliary switch. So, both the switches are operated at soft-switching condition and thus the snubber circuit is removed [16].
In this, a modified Grey Wolf Optimization technique is introduced for adjusting proportional integral (PI) controller parameters, thereby eliminating THD. This article is categorized as follows. The functional principle of the proposed topology and the circuit design are detailed in Section 2. The simulation results and experimental results are provided in Sections 3 and 4. Finally, to summarize this article, the conclusions are given in Section 5.

Proposed work
This section delivers a complete description of the proposed methodology ( Figure 1).

Solar data acquirement
The solar panel consists of five polycrystalline siliconsolar modules, each with a nominal capacity of 220 WP. The solar modules are linked in sequence. The PV string has the maximum power point tracker that has a capability of not < 95.0%. A solar cell generates energy when illuminated by photons. The P-N junction is the core feature for PV cells and can consume solar radiation. It arises when the photon crosses the gap from the material section and travel through the array directly as the load of the solar cell is connected to it prior to the light stops. The solar model consists of a PN diode, current source and some resistance; Equation (1) reveals that the current provided by the solar cell in the series resistance of R s is relatively small and that the shunt one of R s h is relatively high. These two resistors are not taken into consideration to make simulation simpler The solar panel can produce the DC reference voltage. In this work, an efficient technique for attaining ZVS of the primary switch was implemented. At this, grid allows the reduced level of reactive current for charging the flyback transformer's magnetizing inductance, so that it is capable of offering negative current for the primary metal-oxide-semiconductor fieldeffect transistors (MOSFET's). The modified Grey Wolf optimizer (MGWO)-based proportional integral controller is introduced for adjusting the proportional integral controller's parameter at which ZVS triggering takes place. PWM pulses are produced from the pulse generator with the aid of MGWO-PI and it is given to the primary switch. Owing to simple digital realization and finer DC bus utilization, space vector PWM is a growing trend in usage. However, a secondary side of flyback transformer provides the load point. As awaited, both switches Sacp1 and Sacn1 (or Sacp2 and Sacn2) cannot be turned ON simultaneously because a short circuit occurs in them. The switching states are termed as four defined non-zero vectors (states 1, 2, 3 and 4) and one undefined zero vector (state 5). The condition of undefined state should be averted to be continually competent in defining the AC output voltage for the states 1, 2, 3 and 4. Then, the constant amplitude of SVPWM pulses is produced and it is given to the bidirectional switches. From this, optimized value of pulse width modulation is generated in an enhanced manner and this will be fed to primary switch and bidirectional switches of the flyback inverter. A LC filter is used to retrieve the original modulation signal. This in turn eliminates or reduces the switching losses.
To enable the grid-side reactive current, the diode and secondary switch of the conservative flyback inverter were interchanged by the secondary switches. The output capacitance of the primary MOSFET gets discharged by the negative current of the transformer's primary side, thus contributing access for a primary switch to turn ON ZVS. The LC filter can control the rate of rise of output voltage of the inverter and also decrease the common mode noise of load. As it is significant to manage the complete grid-side reactive current, the MOSFETs are performed at the variable switching frequencies. For the function of change in frequency in circuit, the peak value of inductor negative current was managed for optimizing the flow of reactive current. This type of negative current not just supports primary MOSFET's soft-switching; however, it offers ZVS turn ON of the other switch. Figure 2 shows the circuit diagram of the proposed system. The scheme consists of a PV cell, decoupling  capacitor, centre tap flyback transformer with primary switch, secondary bidirectional switches and filter circuit on the grid side. The primary winding of flyback transformer gets charged up, when the primary switch Sm is in ON state. Then, the stored energy in the secondary winding of flyback transformer is given to the grid through the bidirectional switches. By switching Sacp1 or Sacn1 during the positive or negative half cycle, the energy is transferred to the grid. Therefore, soft switching is attained in primary switch and secondary bidirectional switches by the MGWO-based PI controller ( Figure 3).

MGWO-based PI controller
In grid-connected system, the control algorithm is essential to precise and accurate the phase angle of grid voltage (sin_cosθ ). So, we can attain the real and reactive power control between the inverter and grid. Phase-locked loop (PLL) is the frequent method for calculating the phase angle of grid voltage and frequency. For complete quality control, the synchronization of grid and current control is the deciding factor. Error in the phase angle evaluation can lead to notable errors in between the inverter voltage and grid power. So, it is necessary to consider the design of grid synchronization. MGWO-based PI controller act as a filter in the phase-locked loop, which finds out the PLL dynamics. Mostly, it can be affected by unbalance and harmonics in the grid voltage. So, there is a compromise between the filtering harmonics in PLL. Then, the continuous Laplace S-domain of 3∅ PLL model is extracted. The closed-loop system of second-order transfer function of dq-PLL with one zero can be written as where s is relative damping factor, and sn is system natural frequency. Here, the x, y, z describes the transient performance of the system in time domain. In the view of transfer function, we can finalize that the better character of PLL response is attained by varying the parameter value of MGWO-based PI controller.
The following mathematical expressions are the bandwidth frequency for first-order filter This specifies the importance of PLL design, in considering the real-grid voltage conditions. In general, the conventional GWO is easy in programming and simply understandable. Nevertheless, it has shortcomings such as giving up the half part of repetition process for exploration and remaining half part for exploitation. It neglects the precise stability of contact between them to give an exact global optimum assessment. The integrated MGWO is focused to vary the PI controller's parameters, anywhere the communication amid exploration and exploitation is achieved by two groups of grey wolves as self-determination. For extensive utilization, supportive hunt of four grey wolves are employed. And for deep investigation, several scouts are adopted to non-selective explore groups. Figure 4 depicts the proposed MGWO-based PI controller block ( Figure 5).
The algorithm for MGWO approach is shown below: The mathematical representation of the wolf's surrounding grey methodology can be defined as If obj fn < α p &&obj fn < β p β p = obj fn End If obj fn < α p &&obj fn > β p &&obj fn < γ p γ p = obj fn End end end.
where A is the vectors coefficient, − → X * is the vector of the best solution, − → X is the position vector, T is the iteration, and N is the absolute value, and (·) indicates as element-by-element multiplication. When a better solution is found, the position of the best solution is updated where − → s in Equations (7) and (8) is linearly reduced from 2 to 0 through the number of iteration (stages of investigation and exploitation) and is an arbitrary vector in the range of [0, 1]. This parameter is altered to maintain the equilibrium between analysis and phases of exploitation. Here, the whale and the prey location are balanced; whales follow at random according to each other's role. − → A is used to render the search agent push further from the reference whale with random values > 1 or less −1. The search agent status has been changed by a randomly chosen search agent at the inquiry level rather than by the strongest search agency open to it. The quest phase is manually based on the vector fluctuation. On the basis of one another, humpback whales are searching blindly for the best position. For optimal global position, The mathematical representation can be written as follows From that, the optimal solutions were obtained. Where − → X rand is a random whale position vector selected from the current population.
The controller's transition function is usually written as an Equation (10) p(s) e(s) To attain soft-switching, MGWO-based PI modulation is proposed in this system. MGWO aids in tuning the parameters like K p and K i of PI controller. The parameters are initialized by taking the input DC source, u dc as lower and upper limits. Agents can search upto maximum number of iterations, based on upper and lower bound limits. Alpha, beta and gamma positions are being updated and it is followed by the calculation of objective function. Then, the values of best fitness functions are generated for the Kp and Ki parameters. Accordingly, the pulses are produced from the MGWO-based PI controller and the change in duty cycle takes place. As per the state of switching ON and OFF condition, the ZVS is being achieved in the ON state condition of the system. Consequently, the controller output is given as a pulse for both primary switch and a flyback inverter. At that time, the system acts as per the switching mode condition which is deliberated briefly in the switching modes of operation by generation of pulses. In the transmission line, power is being transmitted for grid. Hence, the effectual compensation of power was carried with the utilization of this estimation. And it provides lesser THD in the output waveform.

Analysis of switching mode operation
In this, the elaborated modes of action of the switching cycle are presented. For the optimization of the reactive current amount that is needed for ZVS, the frequency with variable switching was being exploited. This switching cycle was split into six modes of operation. As the inverter's switching frequency is higher than the grid frequency, the varying quantities of grid frequency were constant throughout one switching cycle. It represents the overall scheme of proposed flyback inverter. In this, PV source is present followed by primary switch, transformer and four switches of flyback inverter which is connected to the grid side. Thus, the system acts and varies as per the ZVS given to the primary switch and flyback inverter, where it generates the stabilized flow of power or current which is then stored in the grid.

Mode I
At the beginning of the switching cycle, the primary switch is turned ON. A secondary switch S acp1 kept ON throughout the total positive half of the AC cycle, while in the total negative half of the AC cycle, S acn1 remains ON. Figure 6 provided here depicts the circuit component, which was active at this interval. The input solar voltage is applied in this mode over the transformer's magnetizing inductance L m . Therefore, there is an increase in the primary current.

Mode II
At the beginning of this mode, switch S m is turned OFF, while the secondary switches remain ON. The drainsource voltage is not able to enhance the high voltage instantly, because of the output capacitor existence over the primary MOSFET. The drain-source voltage increase over the switch S m is delayed due to the capacitor C sn charging. This mode moves towards the end once the capacitor was charged to its highest V dc + Nv ac value. This change of switch S m from ON state to OFF state occurs in a short period (Figure 7).

Mode III
When the capacitor C sn is charged completely to their peak value, then the stored energy in the transformer's magnetizing inductor is being conveyed to the grid. This could be made feasible with any one of the secondary switch S acp1 or S acn1 relying on the positive or negative half-cycle of the grid voltage, when it was in ON condition. Figure 8 features the operable switch S acp1 and anti-parallel diode switch S acp2 for the positive half of line cycle.

Mode IV
During the initiation of this mode, the anti-parallel diode switch S acp2 or S acn2 is being conducted as the grid voltage polarity. Under ZVS condition based on the grid voltage polarity, either S acp2 or S acn2 is turned ON, once the secondary current becomes zero. The current at the secondary side alters their direction and initiates the magnetizing inductance charging in the opposite direction as the bidirectional switches are ON. At that time, the bidirectional switch (S acp2 or S acn2 ) is turned OFF once i sec matches the reference value. Figure 9 shown below represents that both the switches S acp1 and S acp2 are ON throughout this time for a positive halfcycle, thereby letting the secondary current to alter their direction. The observed voltage over the transformer's magnetizing inductance remains in an identical state at the mode III and mode IV.

Mode V
This mode of action starts once the secondary switches was turned OFF. Hence, the total switches are in the OFF state throughout the mode. As the transformer    inductance, L m was charged in the previous mode in opposite direction, the current flows in the inductor at the direction for passing energy stored in L m to the primary capacitor. Finally, the primary current is m is negative throughout this mode. The voltage over switch S m set up to slowly decrease as the capacitor over the switch set up to discharge. This mode moves the end by a full capacitor discharge over the switch (Figure 10).

Mode VI
In view of the fact the capacitor is discharged completely, the voltage of drain-source in the primary switch S m virtually equals to zero. This in turn makes the conduction of anti-parallel diode switch. Thus,  there is a continuous increase in magnetizing current from the negative value. As the voltage of drain source has imposed to zero, the primary switch is turned ON with ZVS during this mode. It was noticed that mode II, mode V and mode VI happen at the switching process. So, these modes of time intervals are somewhat small on comparing the modes of I, III and IV.
At last, the flaws are eradicated with this proposed system, which incorporates the MGWO-based PI controller. This scheme reduces the system switching losses and increases the overall efficiency. So, the increased energy is given to the grid (Figure 11).

Simulation results
This section offers a detailed depiction of the performance analysis of proposed system.

PV voltage and PV current before primary switch ON
The performance analysis of the PV voltage and PV current before the primary switch ON state is represented in the graphical form of Figures 12 and 13. The voltage value of photovoltaic panel for our simulation outcome is 133 V, current value is 85 A and power rating is 11.3 KW for 30°C and 1000 W/cm 2 .

Switching pulses
The various switches were employed and the pulses are generated in terms of ON and OFF state condition using modified Grey Wolf optimization technique based on PI controller (Figure 14).    Figure 15 shows that the various gate pulses of the switches are compared with their switch voltages. In that, when the voltage across the switch is zero, then the corresponding pulse is given. Hereby, soft-switching is attained by modified Grey Wolf optimization technique based on PI controller. Figure 16 indicates that the grid voltage and grid current are in phase with one another. So, the reactive power inject to the grid is insignificant.  Figure 17 illustrates the performance study of THD in the proposed system. In this, THD is 0.84% at initial time of 0.02 s, when the MGWO-based PI controller is in starting condition. Figure 18 shows that when the MGWO-based PI controller is under running condition, the THD value is reduced to 0.16% with 50 Hz frequency at start time of 0.1 s. From the analysis, it was apparent that the proposed system is capable of reducing the THD level, which signifies that the proposed method is better (Table 1).

Total harmonic distortion
Thus, from the comparative analysis it was evident that the proposed THD value is attained as lower value than the existing method [17].

Experimental results
The experimental hardware set-up is shown in which a 24 V (UTL brand) and 325 W polycrystalline solar panel is utilized as the renewable source of energy. The solar panel output is connected with MPPT flyback converter. The current feedback of an analog signal is being connected with the PIC controller using  shunt resistor. Similarly, with the use of voltage divider the DC-to-DC converter's output voltage analog value is linked to the controller. AIR2110 gate driver is employed among MOSFET and controller to make the MOSFET switch of DC-to-DC converter in proper condition. For flyback inverter, the filtered constant output DC supply is linked as source and AC supply and LC filter were connected in the output, so as to fine tune the output. The MOSFET is chosen as a power switch at the 21 rating, inverter operation at 600 V (STP25N60).
With gate driver circuit, all these MOSFETs are connected. The SVPWM is generated by the PIC controller and given to the gate driver. At first, 50% duty cycle is chosen for flyback converter by controller, after that the feedback output voltage will consequently alter.
Although 50 KHz switching speed one sample current value is taken for estimating the new duty cycle, once the current measured is elevated after that the duty cycle is decreased vice versa. Then, the output of flyback converter filters and rectifier circuits are eradicating the fluctuation. In the secondary circuit of flyback transformer block, boosted output 315 V is inverted into AC as 230 V, 50 HZ and maximum output current of 2 A with overall efficiency 96.42% is obtained. At this time, SVPWM and closed-loop operation were used. Thus, the flyback inverter pulses are fine tuned for each output cycle. In case, there is a change in output, set value is compared to the output in which the value is different and is then computed as error signal. With respect to MGWO-based PI controller, the value of modulation index will be changed. For flyback inverter, the eradicated new PWM is generated [18].
This process makes sure that the proper operation of power switches is in sequence. This method leads to the stabilization of the process across switches, thus the soft-switching is done here. The output voltage and current are distorted, because of the switching action. To decrease this distortion, the LC filter circuit is connected to the output. The inductor in turn eliminates the current distortion and the capacitor eradicates the voltage distortion. At last, the AC supply is linked with inductive element (Figures 19-24). A prototype model is checked at 12 noon ( Table 2). The listing of hardware details is shown in table provided below based on the reference paper [18] ( Table 3).

Conclusion
This article suggested a change to the GWO incited by the hunting actions of the grey wolves in creation. To attain the proper terms between exploration and  exploitation, further accelerate the convergence and increase the optimization accuracy of GWO, a MGWO is used. The re-enactment results show the proposed MGWO was better. An approach of soft-switching is attained by means of permitting the negative grid current via the bidirectional switches kept in the transformer's secondary side. Therefore, the discharge of optimizing reactive current takes place. MGWO aids in tuning the parameters like Kp and Ki of PI controller for ZVS triggering from which the rate of THD and the switching losses are reduced. Finally, the LC filter is employed in which the power is balanced and it is stored in the grid. So, it increases the efficiency of the proposed system. The outcomes demonstrate the fitness and prevalence of MGWO over existing metaheuristic calculations and it has a capacity to turn into a powerful device for taking care of advanced electrical issues. Further improvement can be made by detecting fault in the transmission line by means of FACTS device incorporation.

Disclosure statement
No potential conflict of interest was reported by the author(s).