Current Compensation in Grid-Connected VSCs using Advanced Fuzzy Logic-based Fluffy-Built SVPWM Switching

A main focus in microgrids is the power quality issue. The used renewable sources fluctuate and this fluctuation has to be suppressed by designing a control variable to nullify the circulating current caused by voltage fluctuations and deviations. The switching losses across power electronic switches, harmonics, and circulating current are the issues that we discuss in this article. The proposed intelligent controller is an interface between a voltage-sourced converter and a utility grid that affords default switching patterns with less switching loss, less current harmonic content, and overcurrent protection, and is capable of handling the nonlinearities and uncertainties in the grid system. The interfaced controller needs to be synchronized to a utility grid to ensure that the grid–lattice network can be fine-tuned in order to inject/absorb the prominent complex reactive energy to/from the utility grid so as to maintain the variable power factor at unity, which, in turn, will improve the system’s overall efficiency for all connected nonlinear loads. The intelligent controller for stabilizing a smart grid is developed by implementing a fuzzy-built advance control configuration to achieve a faster dynamic response and a more suitable direct current link performance. The innovation in this study is the design of fuzzy-based space vector pulse width modulation controller that exploits the hysteresis current control and current compensation in a grid-connected voltage source converter. By using the proposed scheme, a current compensation strategy is proposed along with an advanced modulation controller to utilize the DC link voltage of a voltage source converter. To demonstrate the effectiveness of the proposed control scheme, offline digital time-domain simulations were carried out in MATLAB/Simulink, and the simulated results were verified using the experimental setup to prove the effectiveness, authenticity, and accuracy of the proposed method.


Introduction
In the present scenario, due to the depletion of conventional sources, the use of renewable energy resources plays a vital role in distributed generation. The amalgamation of various renewable and Vector-based modulation and regulation techniques use adaptive and nonlinear management strategies [23]. VSCs offer bidirectional power flow, constant DC voltage, and the elimination of harmonics. VSCs also have complementary passive filters for a variety of power quality issues [24,25]. The concept of vector management uses fuzzy logic management for current and DC voltage control in VSCs [26].

Z-Source Voltage Source Converter
The Z-Source VSC control technique used in µ grid is the most flexible and authenticated control technique and is more sensitive than the previously reported control techniques with proper AC voltage regulation. The Z Source over a VSC utilizes an interesting impedance system with a converter principle circuit and a power source. A two-port network structure with a split inductor needs more capacitors over the X-shape network. As shown in Figure 1, this is an extended impedance source (Z source ) coupled to a converter circuit.
Energies 2020, 13, x FOR PEER REVIEW 3 of 18 voltage hotspot converter is presented that exploits Tom's perusing fuzzy-built current SVPWM PI controller in a grid-connected VSC 1922. Vector-based modulation and regulation techniques use adaptive and nonlinear management strategies 23. VSCs offer bidirectional power flow, constant DC voltage, and the elimination of harmonics. VSCs also have complementary passive filters for a variety of power quality issues 24,25. The concept of vector management uses fuzzy logic management for current and DC voltage control in VSCs 26.

Z-Source Voltage Source Converter
The Z-Source VSC control technique used in µgrid is the most flexible and authenticated control technique and is more sensitive than the previously reported control techniques with proper AC voltage regulation. The ZSource over a VSC utilizes an interesting impedance system with a converter principle circuit and a power source. A two-port network structure with a split inductor needs more capacitors over the X-shape network. As shown in Figure 1, this is an extended impedance source (Zsource) coupled to a converter circuit.

Figure 1. Schematic diagram of a voltage source converter (VSC).
The ZSource impedance network connected to a VSC can provide a source of electric power to supply the grid in case of a reactive load at the grid side or absorb the excess complex reactive power from the AC grid towards the ZSource to maintain the VPF at unity. The DC bus voltages are associated with those of an energy source. The three-phase AC voltage is provided as an RMS value as stated in Equation (1). The voltages VA, VB, and VC are the RMS values of the voltages and are represented as VR(RMS), VY(RMS), and VB(RMS), respectively. (1) The direction of the current flow in the VSC is represented as per Equation (2).
If VVSC < Vac, the entire network structure works with respect to the leading current (the connected nonlinear load contains the capacitive source of power). The VSC absorbs the excess amount of complex reactive power at the load and the direction of the current flow is from the load to the source. If the network structure is working under a lagging load, VVSC > Vac, some of the power is supplied from the VSC to the grid so as to maintain the VPF at unity. In this case, the VSC functions as a capacitor and the VSC supplies the capacitor-sensitive control power to the AC utility grid as shown in Figure 2. The Z Source impedance network connected to a VSC can provide a source of electric power to supply the grid in case of a reactive load at the grid side or absorb the excess complex reactive power from the AC grid towards the Z Source to maintain the VPF at unity. The DC bus voltages are associated with those of an energy source. The three-phase AC voltage is provided as an RMS value as stated in Equation (1). The voltages V A , V B , and V C are the RMS values of the voltages and are represented as V R(RMS) , V Y(RMS) , and V B(RMS) , respectively.
The direction of the current flow in the VSC is represented as per Equation (2).
If V VSC < V ac , the entire network structure works with respect to the leading current (the connected nonlinear load contains the capacitive source of power). The VSC absorbs the excess amount of complex reactive power at the load and the direction of the current flow is from the load to the source. If the network structure is working under a lagging load, V VSC > V ac , some of the power is supplied from the VSC to the grid so as to maintain the VPF at unity. In this case, the VSC functions as a capacitor and the VSC supplies the capacitor-sensitive control power to the AC utility grid as shown in Figure 2. The ZSource VSC shown in Figure 2 contains an LC input and output filter with common ground. The VSC, when switched under various pulses, encounters switching ripples, and these ripples in the input current are reduced with the use of the LC filter constructed under the ZSource. A reduced snubber value is added across each switching device of the VSC to limit voltage overshoot. The snubber used across the switches provides commutation paths during dead times. An LC output filter in ZSource is required to reduce the large harmonic component that occurs at the output load. The designed ZSource is smaller in size when compared with other ZSource topologies.

Space Vector Representation
The space vector representation of the three-phase voltages Va(t), Vb(t), and Vc(t) with a space circulation of about 120° is given by Equation (3): where (4) (5) . (6) Substituting Equation (6) into Equation (3), we define the orthogonal system voltages as given in Equation (7) and Equation (8). The orthogonal system voltages  V and  V are calculated from the three-phase system voltages by using Clarke's/Park's transformation.
(7) The Z Source VSC shown in Figure 2 contains an LC input and output filter with common ground. The VSC, when switched under various pulses, encounters switching ripples, and these ripples in the input current are reduced with the use of the LC filter constructed under the Z Source. A reduced snubber value is added across each switching device of the VSC to limit voltage overshoot. The snubber used across the switches provides commutation paths during dead times. An LC output filter in Z Source is required to reduce the large harmonic component that occurs at the output load. The designed Z Source is smaller in size when compared with other Z Source topologies.

Space Vector Representation
The space vector representation of the three-phase voltages V a (t), V b (t), and V c (t) with a space circulation of about 120 • is given by Equation (3): where a = e jωt = e j2π/3 = cos 2π 3 + j sin 2π 3 (4) a = e j2ωt = e j4π/3 = cos 4π 3 + j sin 4π 3 (5) Substituting Equation (6) into Equation (3), we define the orthogonal system voltages as given in Equation (7) and Equation (8). The orthogonal system voltages V α and V β are calculated from the three-phase system voltages by using Clarke's/Park's transformation.

of 16
The angle between V α and V β is represented by θ and is calculated as shown in Equation (9).
The above-mentioned relations provide us with the idea of transforming stationary 3Ø voltages into 2Ø voltages, determined along the orthogonal plane in the stationary reference frame (STRF) (αβ coordinates), by using Clarke's transformation as shown in Figure 3. V A , V B , V C are the 3Ø Voltages with respect to the stationary reference frame, which was mapped on to a 2Ø orthogonal αβ coordinate.
The three 3Ø sinusoidal voltages are considered to be a vector Energies 2020, 13, x FOR PEER REVIEW 5 of 18 (9) The above-mentioned relations provide us with the idea of transforming stationary voltages into voltages, determined along the orthogonal plane in the stationary reference frame (STRF) (αβ coordinates), by using Clarke's transformation as shown in Figure 3. are the with respect to the stationary reference frame, which was mapped on to a orthogonal αβ coordinate. The three sinusoidal voltages are considered to be a vector .

Figure 3. Determination of space vector pulse width modulation (SVPWM) sectors.
Each stage of the voltage vector needs a stage shift of about 120° to be different from the other components, as given in Equation (10) and Equation (11).
where S is a transformation matrix, which is defined in Equation (12): . (12) We substitute Equation (12) and Equation (10) into Equation (11) to obtain the orthogonal voltages in a three-axis system (the α component, the β component, and the no-load components) as given in Equation (13). Each stage of the voltage vector needs a stage shift of about 120 • to be different from the other components, as given in Equation (10) and Equation (11).
where S is a transformation matrix, which is defined in Equation (12): We substitute Equation (12) and Equation (10) into Equation (11) to obtain the orthogonal voltages in a three-axis system (the α component, the β component, and the no-load components) as given in Equation (13).
Energies 2020, 13, 1259 6 of 16 This Ø VSC needs eight switching states, which are produced by eight space vectors using the SVPWM vector V k and are given by Equation (14). This equation produces six active states that produce a non-zero voltage vector. The two non-active states produce a zero-voltage vector.

The Calculation of the Duty Cycle in SVPWM
To determine the on and off moments of the switches T on and T off , the sampling period T s has to be determined. The signal V ref needs to be turned on throughout the period T s , and, thus, the principal voltage vectors V 1 and V 2 need to be turned on during T 1 and T 2 , respectively. It proceeds similarly for each bit-vector that is accessible in the state space. The voltage vectors are given by Equation (15): Substituting Equation (15) into Equation (16), we have Rearranging Equation (17), we have Consequently,

SVPWM Fuzzy Controller
The nonlinear SVPWM controller does not provide a suitable current control scheme in a VSC-based microgrid. Hence, in the proposed scheme, a fuzzy-logic-based controller is presented to realize the control objectives so that SVPWM will provide complete control over the converter. The fuzzy-built SVPWM controller is also adaptable, which provides it with desirable performance for VSCs in microgrids with nonlinear loads.
A block diagram of a Z-source VSC with a fuzzy-logic-based SVPWM controller is shown in Figure 4. This controller provides an acceptable decoupled current slip and compensates for it to realize programmed advanced exchange control over the converter's output for a fitting run through a delay. The VSC's output is associated with the utility grid and the three-phase grid voltages given by Equation (21).
Energies 2020, 13, 1259 The grid voltage is represented in the synchronous reference frame (SYRF) (dq coordinates) by using Park's transformation as given in Equation (22).
In the STRF, we have Energies 2020, 13, x FOR PEER REVIEW 7 of 18

SVPWM Fuzzy Controller
The nonlinear SVPWM controller does not provide a suitable current control scheme in a VSC-based microgrid. Hence, in the proposed scheme, a fuzzy-logic-based controller is presented to realize the control objectives so that SVPWM will provide complete control over the converter. The fuzzy-built SVPWM controller is also adaptable, which provides it with desirable performance for VSCs in microgrids with nonlinear loads.
A block diagram of a Z-source VSC with a fuzzy-logic-based SVPWM controller is shown in Figure 4. This controller provides an acceptable decoupled current slip and compensates for it to realize programmed advanced exchange control over the converter's output for a fitting run through a delay. The VSC's output is associated with the utility grid and the three-phase grid voltages given by Equation (21).

Fuzzy Controller for Current Error Compensation
On account of the drawbacks of the SVPWM controller, the SVPWM controller with fuzzy logic is implemented in a grid-tied VSC. As illustrated in Figures 5 and 6, the fuzzy controller includes two inputs, namely current and current error, and one output. The fuzzy current compensation controller (FC 3 ) examines the input current and current error and transforms the calculated dynamic error into legitimate qualities in the range of −1 to +1 by using the fuzzy rules stated in Table 1 for one cycle of operation. Table 1 lists the framed Fuzzy Rules by which the current compensation output and switching sequence are obtained. The control decision topology of the proposed FLC-based scheme is illustrated in Figure 7.

S.No
Fuzzy Conditions

If (Current is PM) and (Current_Error is PB) then (Switching_Seq_O/P is PB)
The normalized current input and the current error section are designated with a triangular membership function. Figure 7 illustrates the fuzzy control structure's output to compensate for the current to the grid structure. A fuzzy rule is specified for the current parameters that are connected under the grid based on a current normalized function. The membership function for the current compensation network is shown in Figure 8. The normalized current input and the current error section are designated with a triangular membership function. Figure 7 illustrates the fuzzy control structure's output to compensate for the current to the grid structure. A fuzzy rule is specified for the current parameters that are connected under the grid based on a current normalized function. The membership function for the current compensation network is shown in Figure 8.

Simulation Results
The simulation test results are presented in this section to show the effectiveness of the proposed fuzzy-logic-based SVPWM controller. Offline digital time-domain simulations were carried out in MATLAB/SIMULINK and experimental tests were conducted to verify the results of the simulations. Information about the three-phase stationary reference outline was transformed into dq coordinates by using Park's transformation. The reference voltage is shown in Figure 9.

Simulation Results
The simulation test results are presented in this section to show the effectiveness of the proposed fuzzy-logic-based SVPWM controller. Offline digital time-domain simulations were carried out in MATLAB/SIMULINK and experimental tests were conducted to verify the results of the simulations. Information about the three-phase stationary reference outline was transformed into dq coordinates by using Park's transformation. The reference voltage is shown in Figure 9.

Simulation Results
The simulation test results are presented in this section to show the effectiveness of the proposed fuzzy-logic-based SVPWM controller. Offline digital time-domain simulations were carried out in MATLAB/SIMULINK and experimental tests were conducted to verify the results of the simulations. Information about the three-phase stationary reference outline was transformed into dq coordinates by using Park's transformation. The reference voltage is shown in Figure 9. Measurements of the complex real and reactive power on the nonlinear load side were simulated and are shown in Figure 10. On the load side, the measured real power was 50 KW, and the measured reactive power was 25 W. On observing the real and reactive power of the grid system, it was clear that most of the power at the output was active power, the observed voltage and current were in phase, as shown in Figure 11, and, hence, the power factor at the load side was almost unity. Measurements of the complex real and reactive power on the nonlinear load side were simulated and are shown in Figure 10. On the load side, the measured real power was 50 KW, and the measured reactive power was 25 W. On observing the real and reactive power of the grid system, it was clear that most of the power at the output was active power, the observed voltage and current were in phase, as shown in Figure 11, and, hence, the power factor at the load side was almost unity.     The implementation of SVPWM defined the voltage vector and the reference voltage vector as traveling between the axis. The sector determination of the vector voltages is shown in Figure 12. The sectors of the reference voltages are likely to follow the determined sectors shown below.  Figure 13 shows the THD results from the VSC using the SVPWM controller. The analysis was carried out using a fast Fourier transform (FFT) with the Power graphical user interface (GUI). The FFT analysis of the VSC using the SVPWM controller was performed for one cycle among 50 cycles at a converter voltage of 323.9 V. The analysis resulted in a THD factor of 0.82%.  Figure 13 shows the THD results from the VSC using the SVPWM controller. The analysis was carried out using a fast Fourier transform (FFT) with the Power graphical user interface (GUI). The FFT analysis of the VSC using the SVPWM controller was performed for one cycle among 50 cycles at a converter voltage of 323.9 V. The analysis resulted in a THD factor of 0.82%.

THD Analysis
Energies 2020, 13, 1259 12 of 16 Figure 13 shows the THD results from the VSC using the SVPWM controller. The analysis was carried out using a fast Fourier transform (FFT) with the Power graphical user interface (GUI). The FFT analysis of the VSC using the SVPWM controller was performed for one cycle among 50 cycles at a converter voltage of 323.9 V. The analysis resulted in a THD factor of 0.82%. Figure 13. The THD of the converter using the SVPWM controller. Figure 14 shows the simulation test of the THD on the load side. The simulation test was carried out in the FFT window of the Power GUI for one cycle at a voltage of 168 V. The load yield will be 168 V at the fundamental frequency with a THD of about 0.05%. On observing the results, it was clear that the proposed controller produced better efficiency and a harmonic distortion of 0.82% in the converter section and 0.05% on the load side when compared with the conventional SVPWM controller. Figure 13. The THD of the converter using the SVPWM controller. Figure 14 shows the simulation test of the THD on the load side. The simulation test was carried out in the FFT window of the Power GUI for one cycle at a voltage of 168 V. The load yield will be 168 V at the fundamental frequency with a THD of about 0.05%. On observing the results, it was clear that the proposed controller produced better efficiency and a harmonic distortion of 0.82% in the converter section and 0.05% on the load side when compared with the conventional SVPWM controller.

Experimental Results
The hardware configuration of an SVPWM-controlled solar inverter is shown in Figure 15. The solar panel was kept outside, and the rating of the solar panel is as shown in Table 2.

Experimental Results
The hardware configuration of an SVPWM-controlled solar inverter is shown in Figure 15. The solar panel was kept outside, and the rating of the solar panel is as shown in Table 2. The generated inverter output was connected to a nonlinear inductive load with a rating of 3 KW. The VSI was made to operate as a STATCOM to compensate for the reactive power. A digital modulation technique was designed and used to switch the inversion system. The digital switching technique provides advantages as it works with '0' and '1'. This technique provides higher precision, enhanced system performance, and better system stability and flexibility. The use of digital SVPWM allows the entire system to utilize 100% of the DC link bus voltage. The system was tested for THD, and the THD value was found to be less than 2.7% for a linear load and less than 3.15% for a nonlinear load. The response of the system under dynamic conditions was less than 2.5% at full load with a recovery time of <1.25% (<25 ms). The THD of the grid-connected inverter with the SPWM controller was 0.71%, whereas the THD of the grid-connected inverter with the SVPWM controller was 0.11%. Hence, the overall efficiency of the inverter was improved. The result of a comparative analysis of the grid-connected solar inverter using the SPWM controller and the grid-connected solar inverter using the SVPWM controller is shown in Table 3. The system's performance was tested with different load ranges, and its efficiency is tabulated in Table 4. The efficiency in the case of the SPWM controller was low, with a value of 75.91%, due to the lower utilization of the bus voltage and a more distorted output. The distorted output had an average THD value of 0.71%. The maximum efficiency was attained when using the SVPWM controller as the bus voltage was completely utilized. With the SVPWM controller, the THD value was reduced to an average of 0.11% and the system's efficiency was around 90.5% at maximum load.   The solar output was connected to the inverter board. The fuzzy-logic-based SVPWM controller controlled the inverter board. The inverter board was configured with six IGBT switches (model: FGB20N60SFD) controlled by the SVPWM controller. From the experimental circuit, it was observed that, at T c = 25 • C and an inductive load of 250 W, the increase in time was 15 ns and the loss across the switches was 0.17 mJ during off-time and 0.35 mJ during on-time. At a full load of 1.5 KW, it was observed that the increase in temperature was 125 • C and the losses across the switches were 0.58 mJ during off-time and 0.20 mJ during on-time. The power switches were working with less than six active states. The voltage and current were more or less in phase, in which the measured power factor was unity. The V out of the inverter was found to have no distortion and, hence, the system was able to attain the maximum efficiency of 90.5% at a load of 1.25 KW. As the amount of distortion was reduced, the system's performance and its efficiency improved.
The generated inverter output was connected to a nonlinear inductive load with a rating of 3 KW. The VSI was made to operate as a STATCOM to compensate for the reactive power. A digital modulation technique was designed and used to switch the inversion system. The digital switching technique provides advantages as it works with '0' and '1'. This technique provides higher precision, enhanced system performance, and better system stability and flexibility. The use of digital SVPWM allows the entire system to utilize 100% of the DC link bus voltage. The system was tested for THD, and the THD value was found to be less than 2.7% for a linear load and less than 3.15% for a nonlinear load. The response of the system under dynamic conditions was less than 2.5% at full load with a recovery time of <1.25% (<25 ms). The THD of the grid-connected inverter with the SPWM controller was 0.71%, whereas the THD of the grid-connected inverter with the SVPWM controller was 0.11%. Hence, the overall efficiency of the inverter was improved. The result of a comparative analysis of the grid-connected solar inverter using the SPWM controller and the grid-connected solar inverter using the SVPWM controller is shown in Table 3. The system's performance was tested with different load ranges, and its efficiency is tabulated in Table 4. The efficiency in the case of the SPWM controller was low, with a value of 75.91%, due to the lower utilization of the bus voltage and a more distorted output. The distorted output had an average THD value of 0.71%. The maximum efficiency was attained when using the SVPWM controller as the bus voltage was completely utilized. With the SVPWM controller, the THD value was reduced to an average of 0.11% and the system's efficiency was around 90.5% at maximum load.

Conclusions
In the present study, a microgrid model with a fuzzy-logic-based SVPWM controller was designed to provide excellent output performance, optimized efficiency, and high reliability. The effect of the integration of the system was tested with an installed solar system with an induction motor as a load. The designed control structure's effectiveness was tested in MATLAB/SIMULINK in terms of circulating current, dynamic response, and THD. A Z-source converter with an input/output filter was presented to reduce the large harmonic component. The dynamic response of the system was good under transient conditions. The experimental results show that the Z Source converter produced no voltage spike across the switch. The utilization of the DC bus voltage was increased by 15% and the harmonic distortion was decreased compared with the conventional PWM technique. By using SVPWM fuzzy switching, the peak switch current at the time of switching and losses in the switches can be reduced. Therefore, there is less stress on the converter's controls and the perceptible noise can also be minimized. Effectual means for power transformation between the source and the load in a wide range of electric power conversion applications was developed with the design of the Z-source VSC with a fuzzy-logic-based SVPWM controller. The system's THD was tested, and it was found that the THD value was less than 2.7% for a linear load and less than 3.15% for a nonlinear load. The response of the system under dynamic conditions was less than 2.5% at full load with a recovery time of <1.25% (<25 ms). The THD of the grid-connected inverter with the SPWM controller was 0.71%, whereas the THD of the grid-connected inverter with the SVPWM controller was 0.11%. Hence, the overall efficiency of the inverter was improved. The results of a comparison, in terms of THD level, between the SPWM and SVPWM controllers in islanding mode are presented in Table 3. The designed fuzzy-logic-based SVPWM controller provides an increase in bus voltage utilization, less current harmonic content, a reduction in voltage spikes across the switches, a reduction in harmonic distortion, an improvement in power quality, and a completely stable system.