A Fuzzy-Rule-Based PV Inverter Controller to Enhance the Quality of Solar Power Supply: Experimental Test and Validation

This paper presents the development of fuzzy-based inverter controller for photovoltaic (PV) application to avoid the nonlinearity characteristic and fluctuations of PV inverter output. The fuzzy-based controller algorithm is employed in the PV inverter control system to optimize the duty cycles of the insulated-gate bipolar transistors (IGBTs) and to enhance the inverter outputs with lower harmonic contents and unity power factor. The developed fuzzy-based PV inverter controller is implemented in the MATLAB/Simulink models and experimentally tested in a dSPACE DS1104 process controller. The obtained simulation result of the developed fuzzy-based PV inverter controller is validated with experimental results under different performance conditions. It is seen that the experimental results of the switching signals, inverter voltage and current, control parameters, and total harmonic distortion (THD) of load current and output voltage of the PV inverter are closely matched with that of the simulation results. To validate the inverter performance, the proposed fuzzy-based PV inverter controller outperforms other studies with a voltage THD of 2.5% and a current THD of 3.5% with unity power factor.


Introduction
The solar photovoltaic (PV) is known as one of the important renewable energy resources and has notably increased in industries and remote areas over the past few years [1]. In addition, with proper equipment such as an inverter, a grid-connected system can be developed with the harvested energy [2]. In a PV system, the inverter plays an important role in providing a sine output waveform with suitable range of controlled frequency, voltage, and load, thus confirming the steady-state operation [3]. Some features of PV inverter characteristics are taken into account in designing the inverters, including simple design, stability, flexible control, unity power factor, high reliability, low total harmonic distortion (THD), high efficiency, and low cost [4,5]. In addition, the inverter size and weight are key features in designing inverters [6]. However, the vital issues in PV inverter design are the PV nonlinearity characteristic and fluctuation in the output [7]. Hence, stability, power quality, as well as reduction of as well as reduction of output fluctuation should be ensured when designing a PV inverter control system. A boost converter (DC to DC) is used for low output power conversion systems [8].
Generally, PV inverters are built to deliver power at unity power factor, particularly at full power. Nevertheless, PV inverters suffer from low power factor when the PV is not generating enough electricity due to weather fluctuations. In addition, the oversized inverter operating in 10-20% of the full-scale range has power factor values far lower than 0.9, possibly 0.5. Hence, an appropriate power factor controller is necessary to enhance the voltage profile of a solar PV inverter [9].
PV inverters use power electronic interfaces and pulse width modulation (PWM) switching to convert the DC power to an appropriate form of AC power. However, all PWM methods inherently generate harmonics that in turn cause current and voltage distortions. These harmonics have substantial effects on the power system operation, such as overheating, malfunction, and additional non-sinusoidal losses. Therefore, external filtering needs to be installed to reduce harmonics and switching noise [10]. Figure 1 shows the general inverter system for PV energy conversion, which consists of a PV panel, power converters, a system controller, and a filter [11,12]. All the elements are integrated in order to enable the appropriate operation of the solar energy conversion system. The objective of the energy conversion is to ensure that a stable voltage is supplied to the load by the controller and power converters. The successful operation of a PV system depends not only on inverter design but also on the performance of the controllers. There are opportunities to enhance the PV inverter controller design, since in many cases, PV system failure occurs due to inverter operation abnormalities [13]. The conversion process is fully dependent on controllers and their control algorithms [14]. Moreover, with the fluctuation nature of PV output and the variation of loads disturbances, the performances of inverters are greatly affected [15,16]. Thus, the good design of inverter controller is essential in order to improve inverter efficiency and performance in PV energy applications.
A number of controllers are employed in the implementation of pulse width modulation (PWM) techniques, e.g., sine pulse width modulation (SPWM) and space vector pulse width modulation (SVPWM), for generating and regulating output of inverters. The SVPWM method is more complex compared to SPWM, especially for multilevel inverters [17,18]. Some of the controllers include analogue circuit controllers, microcomputers, digital circuit controllers, FPGA, and digital signal processors (DSPs) [19]. Most of the controllers need suitable control algorithms, which require human expertise and substantial time [20]. Thus, there should be a platform whereby the design and development of the inverter controller algorithms can be simplified and the computational time can be shortened. Globally, researchers continue to develop and improve The successful operation of a PV system depends not only on inverter design but also on the performance of the controllers. There are opportunities to enhance the PV inverter controller design, since in many cases, PV system failure occurs due to inverter operation abnormalities [13]. The conversion process is fully dependent on controllers and their control algorithms [14]. Moreover, with the fluctuation nature of PV output and the variation of loads disturbances, the performances of inverters are greatly affected [15,16]. Thus, the good design of inverter controller is essential in order to improve inverter efficiency and performance in PV energy applications.
A number of controllers are employed in the implementation of pulse width modulation (PWM) techniques, e.g., sine pulse width modulation (SPWM) and space vector pulse width modulation (SVPWM), for generating and regulating output of inverters. The SVPWM method is more complex compared to SPWM, especially for multilevel inverters [17,18]. Some of the controllers include analogue circuit controllers, microcomputers, digital circuit controllers, FPGA, and digital signal processors (DSPs) [19]. Most of the controllers need suitable control algorithms, which require human expertise and substantial time [20]. Thus, there should be a platform whereby the design and development of the inverter controller algorithms can be simplified and the computational time can be shortened. Globally, researchers continue to develop and improve various areas of inverters, e.g., control algorithm, in an effort to support the application of renewable energy. There are many challenges of PV-inverted power such as the intermittence, fluctuation, nature of PV output, voltage regulation, harmonics, and efficiency [5]. Many methods have been investigated to lessen the impact of the PV shortcoming by adopting enhanced inverter control systems [21]. The quality and flexibility are the two most important features which are required for advanced research and product development of an inverter control system. However, this is something that the commercially available inverters are lacking in generating clean sine wave output waveforms.
To solve these highlighted issues and problems concerning inverters and controllers, fuzzy logic-based inverter control algorithms use the dSPACE controller to enable the developed control algorithm to be linked to the inverter. The aim of this paper is to validate the dSPACE-based fuzzy controlled inverter performance by comparing experimental and simulation results. Both in experiment and simulation, the inverter control parameters, switching signals, output voltages and currents, THD as well as existing methods are compared to justify the functional capability of the developed fuzzy-based inverter controller. Thus, using the proposed controller, a reliable and secure power can be supplied to customers with high-quality inverter output. Furthermore, the proposed system provides vast research area opportunities in further system improvement and upgrading.
The paper is structured as follows. Section 2 describes the mathematical model of the PV module used in this research. Section 3 details the proposed fuzzy inverter controller to address the output fluctuation problems of PV inverters. Section 4 presents the simulation model to verify the design of the fuzzy logic-based PV inverter control algorithm. In Section 5, the inverter prototype is developed and, accordingly, the performance is tested through experimental tests. In Section 6, the results are analysed by comparing the signal achieved from the simulation model with the actual signal attained from the inverter prototype. Finally, Section 7 delivers some concluding comments.

Solar PV Module Model
PV inverter fluctuations and its natural characteristics should be considered while designing a PV inverter control system. Thus, to ensure inverter output, the influence of PV output difference needs to be maintained at an optimal level. A PV module is constructed by connecting the solar cells in series or in parallel depending on the application. The equivalent circuit of s solar PV module is shown in Figure 2. The circuit is designed using an energy source generated by the solar irradiance G, a diode connected in parallel with the energy source, and a series resistance R s and a shunt resistance R sh [22]. various areas of inverters, e.g., control algorithm, in an effort to support the application of renewable energy.
There are many challenges of PV-inverted power such as the intermittence, fluctuation, nature of PV output, voltage regulation, harmonics, and efficiency [5]. Many methods have been investigated to lessen the impact of the PV shortcoming by adopting enhanced inverter control systems [21]. The quality and flexibility are the two most important features which are required for advanced research and product development of an inverter control system. However, this is something that the commercially available inverters are lacking in generating clean sine wave output waveforms.
To solve these highlighted issues and problems concerning inverters and controllers, fuzzy logic-based inverter control algorithms use the dSPACE controller to enable the developed control algorithm to be linked to the inverter. The aim of this paper is to validate the dSPACE-based fuzzy controlled inverter performance by comparing experimental and simulation results. Both in experiment and simulation, the inverter control parameters, switching signals, output voltages and currents, THD as well as existing methods are compared to justify the functional capability of the developed fuzzy-based inverter controller. Thus, using the proposed controller, a reliable and secure power can be supplied to customers with high-quality inverter output. Furthermore, the proposed system provides vast research area opportunities in further system improvement and upgrading.
The paper is structured as follows. Section 2 describes the mathematical model of the PV module used in this research. Section 3 details the proposed fuzzy inverter controller to address the output fluctuation problems of PV inverters. Section 4 presents the simulation model to verify the design of the fuzzy logic-based PV inverter control algorithm. In Section 5, the inverter prototype is developed and, accordingly, the performance is tested through experimental tests. In Section 6, the results are analysed by comparing the signal achieved from the simulation model with the actual signal attained from the inverter prototype. Finally, Section 7 delivers some concluding comments.

Solar PV Module Model
PV inverter fluctuations and its natural characteristics should be considered while designing a PV inverter control system. Thus, to ensure inverter output, the influence of PV output difference needs to be maintained at an optimal level. A PV module is constructed by connecting the solar cells in series or in parallel depending on the application. The equivalent circuit of s solar PV module is shown in Figure 2. The circuit is designed using an energy source generated by the solar irradiance G, a diode connected in parallel with the energy source, and a series resistance Rs and a shunt resistance Rsh [22]. The equivalent circuit of a PV cell can be expressed mathematically using in the following Equations (1)-(5) (Assume R S << R sh ) where I PV is the output current of the PV cell (A); I ph is the photocurrent (A); q is the electron charge and is 1.6 × 10 −19 C; V PV is the output voltage of the PV cell (V); R S is the series resistance (Ω); K is the Boltzman constant (1.3805 × 10 −23 J/K); T C is the temperature of the PV cell (K); and a is the diode ideality factor (1.2). The solar PV module photocurrent I ph is expressed as follows: where G is the solar irradiation (W/m 2 ); G re f is the solar irradiation under reference conditions (1000 W/m 2 ); I SC is the short-circuit current (A); µ SC is the coefficient of the short-circuit current (0.0017A/ o C); and T re f is the reference temperature of the PV cell (K). Solar PV module reverse saturation current I 0 is estimated as follows: where E G is the band gap energy of the semiconductor and is 1.1 eV.
The reference reverse saturation current, I 0,re f is determined by, Here, V OC : Open circuit voltage (V); N S : number of solar PV cells connected in series. In view of Equation (1), the output current of PV module is determined as follows: where N P is the number of solar PV cells connected in parallel.

The Proposed Fuzzy Inverter Controller
There is a need to acquire a voltage control to maintain a constant PV inverter output due to the DC input power fluctuation. The problem can be addressed by using an efficient inverter control system using a fuzzy logic control (FLC) system. A FLC-based control algorithm is developed using the appropriate choice of input variables, membership functions, and fuzzy rules. FLC architecture is used to build a fuzzy logic inverter control algorithm in which an error in discrete time, e(k), and the rate of change error, de(k)/dt, are selected to be the input variables while u(k) is chosen to be the fuzzy control output variable. An error is calculated by subtracting the process output from the desired value. In this case, the inverter output voltage is considered as the FLC output. The inverter output voltage and the desired value should be very close to each other in a steady-state condition.

Rule-Based Fuzzy Decision
In this research, the double inputs and single output are employed to construct the FLC structure. During fuzzy control operation, each input variable and output are normalized in the boundary between −1 and +1 in order to obtain satisfactory perfection. The five membership functions of type triangular and two of type trapezoidal are used as input variables, as displayed in Figure 3. A fuzzy set including two input variables and one output variable are used in this research work and are presented as NB (negative big), NM (negative medium), NS (negative small), ZE (zero), PS (positive small), PM (positive medium), and PB (positive big) [23,24]. structure. During fuzzy control operation, each input variable and output are normalized in the boundary between −1 and +1 in order to obtain satisfactory perfection. The five membership functions of type triangular and two of type trapezoidal are used as input variables, as displayed in Figure 3. A fuzzy set including two input variables and one output variable are used in this research work and are presented as NB (negative big), NM (negative medium), NS (negative small), ZE (zero), PS (positive small), PM (positive medium), and PB (positive big) [23,24]. A total of 49 possible rules can be generated from the seven membership functions (fuzzy sets) of each input variable. To ease the design of the controller, fuzzy membership functions and fuzzy rules are developed and presented in Table 1. Then, these rules are transferred manually to the FLC "Rules Editor" individually.
When the system operates, the discrete-time output of the fuzzy controller, u (k + 1) Ts, varies in every sampling interval, Ts, until an equilibrium condition is achieved, as shown in Equation (6) [25]. A total of 49 possible rules can be generated from the seven membership functions (fuzzy sets) of each input variable. To ease the design of the controller, fuzzy membership functions and fuzzy rules are developed and presented in Table 1. Then, these rules are transferred manually to the FLC "Rules Editor" individually.
When the system operates, the discrete-time output of the fuzzy controller, u (k + 1) T s , varies in every sampling interval, T s , until an equilibrium condition is achieved, as shown in Equation (6) [25].
where ∆u(kT s ) denotes the present value of the fuzzy output at t = kT S and k denotes the value of 0, 1, 2, 3, . . . Then, conversion or extraction of a crisp value output (real signal or non-fuzzy output), u, from a FLC output is called the defuzzification process [26]. It transforms the numeral output of the fuzzy controller to a physical means (control signal) that can actually drive the course to produce the expected outputs. Then, the crisp output values are converted from the fuzzy firing by the center of gravity (COG). The crisp control action is executed by COG, which is characterized as the fuzzy controller output, as revealed in Equation (7) [27,28]. COG calculates the weighted mean of the fuzzy region and finds the "balance" point of the solution in the fuzzy region [25]. where u k represents the discrete element of output value (fuzzy set) and µ k (u k ) denotes the membership function (value).

Inverter Control Algorithm
Stabilized 50 Hz sinusoidal output voltage and frequency are generated by the inverter control system. In addition, the harmonic distortion content of the output waveform is to be controlled to a minimized level according to the standard. The aim of the control strategy is to minimize the DC input variation by controlling the constant DC input voltage of the inverter. The PWM signals are generated for the inverter switching devices to accomplish the objectives. Moreover, unity power factor is obtained by ensuring the in-phase condition of the output voltage and current waveform. The control operation is performed by assessing the duty cycle. A digital signal processor (DSP) is used for the development of an embedded controller system. The inverter PWM control algorithm flowchart is illustrated in Figure 4.   Figure 4. The flow chart of the inverter control algorithm.

PWM Signal Generation
The PWM signals are produced from the dq components at the last phase of the control algorithm. At this point, the abc coordinate frame is used for transforming the components. After, a triangular wave with a 6050-Hz signal is used for comparative analysis and generation of the inverter switching frequency. The inverter switches are converted to produce an SPWM signal [29]. The SPWM controls the pulse width of the inverter insulated-gate bipolar transistors (IGBTs) in order to deliver sine-wave-shaped AC voltages. A control signal (sinusoidal) is produced to It is observed that PWM signal generation is required for the generation of an IGBT duty cycle at the final process. Firstly, the boost converter IGBT, PWM boost duty cycle, is assigned to achieve the required inverter DC voltage at the input stage. Then, the sensing operation of the inverter output voltages, v a , v b , and v c , is implemented. After, the voltage regulation process is executed by transforming the voltage values into dq coordinate frames where the voltages v d and v q are compared to their respective reference voltages v dref and v qref . At this point, the voltage comparison process generates an error signal, which in turn is converted into duty cycle generation for the inverter PWM inv . A higher duty cycle is created by the positive error, while a relatively lower duty cycle is produced by the negative error. This procedure continues until a lowest error level in voltage is achieved which confirms the steady-state condition.
The system studies need to be carried out to ensure the desired current, frequency, and output voltage while transferring the maximum PV power to the load through implementation of the control algorithm. The voltage controller control strategy is employed for switching signal generation for a standalone three-phase inverter.

PWM Signal Generation
The PWM signals are produced from the dq components at the last phase of the control algorithm. At this point, the abc coordinate frame is used for transforming the components. After, a triangular wave with a 6050-Hz signal is used for comparative analysis and generation of the inverter switching frequency. The inverter switches are converted to produce an SPWM signal [29]. The SPWM controls the pulse width of the inverter insulated-gate bipolar transistors (IGBTs) in order to deliver sine-wave-shaped AC voltages. A control signal (sinusoidal) is produced to modulate the duty cycles of IGBTs (sinusoidal), which in turns helps to obtain the frequency and voltage of the inverter at desired levels.
The harmonics are produced from the voltage value, which are noticed as sidebands, centered around the switching frequency, and its multiple, as expressed in Equation (8) [29]. Nevertheless, a nearly sinusoidal-shaped output waveform is achieved with the help of an appropriate filter. This filter operates as high impedance and low impedance for higher order frequency and lower order frequency, respectively. Hence, the cutoff frequency is usually set at 1 or 2 times higher than the fundamental frequency, which is 200 Hz [30].
where k represents an integer, f control denotes the control signal (sinusoidal) frequency, and M f represents the frequency modulation index. The root mean square (RMS) value for the line voltage of the inverter output is controlled by the amplitude modulation index. The modulation index is assessed by taking the ratio of the control signal, V control , and the triangular signal, V triangular . The output voltage differs from 0 to 0.612V dc by changing the modulation index from 0 to 1. The width of the switching time or duty cycle is associated with the modulation index. However, the overmodulation phenomenon occurs if the values are increased beyond the values which results in more harmonics in the output waveform, and this should be avoided.
The minimum requirement of the inverter DC input voltage can be determined with the output voltage of 415 V (rms) and the modulation index of 0.9 (maximum). The output voltage can be achieved from 0 to 0.612 V dc with change of module index, having values between 0 and 1. However, a value of more than 1 leads to an overmodulation phenomenon, which results in harmonics in the output waveform. Thus, it is recommended that it should be maintained in the range of 0.9. The three-phase load is linked to the filter output [31]. Entire operations are managed by the controller, such as the power-switching device control as well as voltage and current control.

Simulation Model
The MATLAB/Simulink environment is used to simulate and implement the three-phase inverter system model, which includes the PV integration of the inverter system and fuzzy logic-based inverter control algorithm. The simulation is carried out for justification of hardware implementation of the PV inverter. The data from simulation model validates and verifies the design of the implemented PV inverter in which a fuzzy control algorithm can effectively run in a real-time environment. The specifications of the parameters for the simulation model and prototype implementation for the fuzzy-based inverter controller are shown in Table 2.  Figure 5 shows the control algorithm for an inverter (three-phase) in a stand-alone application. It is observed that the algorithm includes several functional blocks including direct-quadrature transformation (abc to dq), fuzzy logic controllers, PWM signal generator and signal converter, and phase lock loop (PLL)-type frequency synchronization. The stable operation of frequency control is provided by the PLL block so that the output frequency can reach a desired frequency. The power is delivered only to the local loads in standalone mode. In a voltage-control scheme, the output voltages of the inverter operate and are expressed in Equations (9)- (11). The three phase voltages are displaced 120 • to each other and has a unity power factor which is transformed to dq components.
where V m represents the voltage magnitude and ω denotes the output frequency. This is to ensure that these parameters are able to be used by controllers for controlling purposes. In the case of balanced three-phase circuits, the transformation from three AC quantities into the two DC quantities occurs. Then, the imaginary DC quantities are preceded through the simplified computation before the inverse transformation process operates to recover the actual three-phase outcomes. The simplification of the three-phase synchronous machines analysis is often performed by this transformation. Moreover, the control operation of three-phase inverters is done by this transformation. The Park transformation [32] and internal synchronizing signal or 50 Hz PLL local are used for axes transformations.  Figure 5 shows the control algorithm for an inverter (three-phase) in a stand-alone application. It is observed that the algorithm includes several functional blocks including direct-quadrature transformation (abc to dq), fuzzy logic controllers, PWM signal generator and signal converter, and phase lock loop (PLL)-type frequency synchronization. The stable operation of frequency control is provided by the PLL block so that the output frequency can reach a desired frequency. The power is delivered only to the local loads in standalone mode. In a voltage-control scheme, the output voltages of the inverter operate and are expressed in Equations (9)- (11). The three phase voltages are displaced 120° to each other and has a unity power factor which is transformed to dq components.
where Vm represents the voltage magnitude and ω denotes the output frequency. This is to ensure that these parameters are able to be used by controllers for controlling purposes. In the case of balanced three-phase circuits, the transformation from three AC quantities into the two DC quantities occurs. Then, the imaginary DC quantities are preceded through the simplified computation before the inverse transformation process operates to recover the actual three-phase outcomes. The simplification of the three-phase synchronous machines analysis is often performed by this transformation. Moreover, the control operation of three-phase inverters is done by this transformation. The Park transformation [32] and internal synchronizing signal or 50 Hz PLL local are used for axes transformations.
The fuzzy control algorithm is applied in the inverter system by transforming the three-phase voltages from the synchronous reference frame (abc) into the static reference frame (dq). Accordingly, the two-phase coordinate system is developed from the three-phase coordinate system with the fundamental angular frequency ω. In the majority of cases, the three-phase variables, such as voltage or current, sums to zero, and thus, for balanced system, the zero sequence components will be omitted. The condition of this conversion is that the three-phase load should be The fuzzy control algorithm is applied in the inverter system by transforming the three-phase voltages from the synchronous reference frame (abc) into the static reference frame (dq). Accordingly, the two-phase coordinate system is developed from the three-phase coordinate system with the fundamental angular frequency ω. In the majority of cases, the three-phase variables, such as voltage or current, sums to zero, and thus, for balanced system, the zero sequence components will be omitted. The condition of this conversion is that the three-phase load should be a balanced load while neglecting the ν o term in the dq coordinate frame, which means only the ν d and ν q terms are left.
The time-varying AC quantities are converted into DC quantities by applying the transformation matrix. In matrix form, the three-phase equations are shown as follow: In balance loads, the axes transformation is then described by Equation (9).
In both transient and steady-state conditions, the fuzzy logic controllers can keep track of the reference voltage; thus, the error is reduced and the steadiness in the inverter output voltages is achieved. Then, error voltages are calculated by controlling the direct axis voltages, ν d , and the quadrature axis voltage, ν q , at their dq reference voltages, ν dref and ν qref , respectively. After, the voltage regulation is executed by feeding the error and change of error voltages to the fuzzy logic controllers. The dq quantities of voltage and current are multiplied by the inverse transformation matrix to ensure than the three output quantities are achieved in the inverter. The output voltage is expressed in Equation (11) with phase voltage v a of 240 V rms , line to line voltage v ab of 415 V rms , and frequency of 50 Hz.

Experimental Setup
As part of the prototype development of the inverter, a performance evaluation is essential to verify conformance with the simulation. In doing so, an experimental setup has been constructed in the laboratory. A block diagram is used to explain the experimaental arranagements as illustrated in Figure 6. regulation is executed by feeding the error and change of error voltages to the fuzzy logic controllers. The dq quantities of voltage and current are multiplied by the inverse transformation matrix to ensure than the three output quantities are achieved in the inverter. The output voltage is expressed in Equation (11)

Experimental Setup
As part of the prototype development of the inverter, a performance evaluation is essential to verify conformance with the simulation. In doing so, an experimental setup has been constructed in the laboratory. A block diagram is used to explain the experimaental arranagements as illustrated in Figure 6. Meanwhile, Figure 7 illustrates the view of the experimental setup of the proposed fuzzy-rule-based PV inverter controller with the related components and equipments. The equipments are a digital oscilloscope, a fluke power quality analyzer, analog voltage and current meters, current clamps, a step-up transformer, and a load bank. The inverter prototype consists of the dc input and ac output terminals, filter capacitors and inductors, an IGBT driving circuit, voltage and current sensors, a voltage attenuation circuit, upper and lower IGBT sections, a step-up transformer, snubbers, thermistors, a dc input switch, and an inverter power on/off switch.
Meanwhile, Figure 7 illustrates the view of the experimental setup of the proposed fuzzy-rule-based PV inverter controller with the related components and equipments. The equipments are a digital oscilloscope, a fluke power quality analyzer, analog voltage and current meters, current clamps, a step-up transformer, and a load bank. The inverter prototype consists of the dc input and ac output terminals, filter capacitors and inductors, an IGBT driving circuit, voltage and current sensors, a voltage attenuation circuit, upper and lower IGBT sections, a step-up transformer, snubbers, thermistors, a dc input switch, and an inverter power on/off switch.

Test and Validation of the Proposed Fuzzy-Rule-Based PV Inverter Controller
The efficiency of the proposed inverter control system is justified by comparing the signal waveforms obtained from the simulation with the actual signal obtained from the inverter prototype. The compared waveforms are PWM switching signal, dead-time delay, inverter phase voltage and current waveforms, controller's parameters component, load current, and voltage waveform THD. Meanwhile, Figure 7 illustrates the view of the experimental setup of the proposed fuzzy-rule-based PV inverter controller with the related components and equipments. The equipments are a digital oscilloscope, a fluke power quality analyzer, analog voltage and current meters, current clamps, a step-up transformer, and a load bank. The inverter prototype consists of the dc input and ac output terminals, filter capacitors and inductors, an IGBT driving circuit, voltage and current sensors, a voltage attenuation circuit, upper and lower IGBT sections, a step-up transformer, snubbers, thermistors, a dc input switch, and an inverter power on/off switch.

Test and Validation of the Proposed Fuzzy-Rule-Based PV Inverter Controller
The efficiency of the proposed inverter control system is justified by comparing the signal waveforms obtained from the simulation with the actual signal obtained from the inverter prototype. The compared waveforms are PWM switching signal, dead-time delay, inverter phase voltage and current waveforms, controller's parameters component, load current, and voltage waveform THD.

Test and Validation of the Proposed Fuzzy-Rule-Based PV Inverter Controller
The efficiency of the proposed inverter control system is justified by comparing the signal waveforms obtained from the simulation with the actual signal obtained from the inverter prototype. The compared waveforms are PWM switching signal, dead-time delay, inverter phase voltage and current waveforms, controller's parameters component, load current, and voltage waveform THD.

Validation of PWM Switching Signal
The comparison of the generated PWM switching signal of the simulation and experiment is demonstrated in Figure 9. It is clearly observed that both signals are in conformance with each other and acquire frequencies of 6050 Hz. In practice, this signal level should be slightly higher than 15 V to ensure the IGBT is switched on properly.
Meanwhile, the comparison of the dead-time implementation between the simulation and experiment is illustrated in Figure 10 in which both acquire the delay time for the device switching transition.
It is noted that the dead-time of the experiment is slightly larger compared to that of the simulation so as to provide maximum protection for the IGBTs, considering the tolerances of the actual devices.

Validation of PWM Switching Signal
The comparison of the generated PWM switching signal of the simulation and experiment is demonstrated in Figure 9. It is clearly observed that both signals are in conformance with each other and acquire frequencies of 6050 Hz. In practice, this signal level should be slightly higher than 15 V to ensure the IGBT is switched on properly. Meanwhile, the comparison of the dead-time implementation between the simulation and experiment is illustrated in Figure 10 in which both acquire the delay time for the device switching transition. It is noted that the dead-time of the experiment is slightly larger compared to that of the simulation so as to provide maximum protection for the IGBTs, considering the tolerances of the actual devices. Figure 11 shows the comparison of the inverter phase voltage waveforms of the simulation and experiment. It is noticed that both waveforms not only are balanced but also acquire similarities in terms of shape and quality, frequency, and voltage level. However, Figure 11b shows a 2-V neutral voltage, which is mainly from the source transformer. The neutral-to-ground voltage of 2 V or less is acceptable and is determined by the rule-of-thumb employed in many industry applications. The comparison of voltage waveforms between the simulation and experiment is illustrated in Figure 12. Both the simulation and experimental output waveforms are regulated to 1 p.u., which signifies the capability of supplying a contant output voltage to the AC load.  Figure 11 shows the comparison of the inverter phase voltage waveforms of the simulation and experiment. It is noticed that both waveforms not only are balanced but also acquire similarities in terms of shape and quality, frequency, and voltage level. However, Figure 11b shows a 2-V neutral voltage, which is mainly from the source transformer. The neutral-to-ground voltage of 2 V or less is acceptable and is determined by the rule-of-thumb employed in many industry applications. The comparison of voltage waveforms between the simulation and experiment is illustrated in Figure 12. Both the simulation and experimental output waveforms are regulated to 1 p.u., which signifies the capability of supplying a contant output voltage to the AC load.

Validation of Inverter Voltage and Current Waveforms
Considering the similarities exhibited by the phase current waveforms collected from the simulation and experiment, both acquire the same frequency and phase angle, as shown Figure 13. However, the experimental current waveform has a slight distortion, which can be seen by the tiny ripples. It is noted that the dead-time of the experiment is slightly larger compared to that of the simulation so as to provide maximum protection for the IGBTs, considering the tolerances of the actual devices. Figure 11 shows the comparison of the inverter phase voltage waveforms of the simulation and experiment. It is noticed that both waveforms not only are balanced but also acquire similarities in terms of shape and quality, frequency, and voltage level. However, Figure 11b shows a 2-V neutral voltage, which is mainly from the source transformer. The neutral-to-ground voltage of 2 V or less is acceptable and is determined by the rule-of-thumb employed in many industry applications. The comparison of voltage waveforms between the simulation and experiment is illustrated in Figure 12. Both the simulation and experimental output waveforms are regulated to 1 p.u., which signifies the capability of supplying a contant output voltage to the AC load. Considering the similarities exhibited by the phase current waveforms collected from the simulation and experiment, both acquire the same frequency and phase angle, as shown Figure 13. However, the experimental current waveform has a slight distortion, which can be seen by the tiny ripples.

Validation of Inverter Voltage and Current Waveforms
(a) Considering the similarities exhibited by the phase current waveforms collected from the simulation and experiment, both acquire the same frequency and phase angle, as shown Figure 13. However, the experimental current waveform has a slight distortion, which can be seen by the tiny ripples.
(a) Considering the similarities exhibited by the phase current waveforms collected from the simulation and experiment, both acquire the same frequency and phase angle, as shown Figure 13. However, the experimental current waveform has a slight distortion, which can be seen by the tiny ripples. (a)

Validation of Inverter Control Parameters
The comparison of controller parameters between the simulation and the experiment are displayed from Figure 14 to Figure 16. In Figure 14, the direct voltage component, vd, of both the simulation and experiment are in conformance with each other. It is observed that it has a well-controlled steady-state response, except during the period of zero to 0.4 seconds. Nevertheless, the parameter is well tracked and regulated at the level of 1 p.u. as anticipated in the simulation. Like the direct voltage, the quadrature voltage, vq, for both the simulation and experiment show similar characteristics of zero-voltage tracking capability. This can be seen in Figure 15, whereby the controller is capable of regulating the parameter at the zero level very accurately. As for the "change of error" parameter, Figure 16 depicts the controller vd "change of error" waveforms for the simulation and experiment. It is noticed that the controller manages to regulate the change of error to a very minimum level (zero level) during the operation. This implies the significance of the inverter output voltage regulation characteristic.

Validation of Inverter Control Parameters
The comparison of controller parameters between the simulation and the experiment are displayed from Figures 14-16. In Figure 14, the direct voltage component, v d , of both the simulation and experiment are in conformance with each other. It is observed that it has a well-controlled steady-state response, except during the period of zero to 0.4 s. Nevertheless, the parameter is well tracked and regulated at the level of 1 p.u. as anticipated in the simulation.

Validation of Inverter Control Parameters
The comparison of controller parameters between the simulation and the experiment are displayed from Figure 14 to Figure 16. In Figure 14, the direct voltage component, vd, of both the simulation and experiment are in conformance with each other. It is observed that it has a well-controlled steady-state response, except during the period of zero to 0.4 seconds. Nevertheless, the parameter is well tracked and regulated at the level of 1 p.u. as anticipated in the simulation. Like the direct voltage, the quadrature voltage, vq, for both the simulation and experiment show similar characteristics of zero-voltage tracking capability. This can be seen in Figure 15, whereby the controller is capable of regulating the parameter at the zero level very accurately. As for the "change of error" parameter, Figure 16 depicts the controller vd "change of error" waveforms for the simulation and experiment. It is noticed that the controller manages to regulate the change of error to a very minimum level (zero level) during the operation. This implies the significance of the inverter output voltage regulation characteristic. Like the direct voltage, the quadrature voltage, v q , for both the simulation and experiment show similar characteristics of zero-voltage tracking capability. This can be seen in Figure 15, whereby the controller is capable of regulating the parameter at the zero level very accurately. As for the "change of error" parameter, Figure 16 depicts the controller v d "change of error" waveforms for the simulation and experiment. It is noticed that the controller manages to regulate the change of error to a very minimum level (zero level) during the operation. This implies the significance of the inverter output voltage regulation characteristic.

Validation of Inverter Voltage and Current THD Level
The comparison between the simulated and experimental load current and voltage waveform THDs are depicted in Figures 17 and 18, respectively. Obviously, the simulated current and voltage THD level acquires better and lower percentage levels compared to the experimental ones.

Validation of Inverter Voltage and Current THD Level
The comparison between the simulated and experimental load current and voltage waveform THDs are depicted in Figures 17 and 18, respectively. Obviously, the simulated current and voltage THD level acquires better and lower percentage levels compared to the experimental ones.

Validation of Inverter Voltage and Current THD Level
The comparison between the simulated and experimental load current and voltage waveform THDs are depicted in Figures 17 and 18, respectively. Obviously, the simulated current and voltage THD level acquires better and lower percentage levels compared to the experimental ones. Fundamental Fourier transform analysis of the simulation model shows that the load current and voltage THD percentage levels are 0.19% and 0.16%, respectively. The current and voltage THD percentage levels are found to be 3.5% and 2.5%, respectively, when using the prototype and are within 5%, as stated in the IEEE Std 519-1992 standard. Indeed, in practice, the results obtained tend to be influenced by many uncontrolled aspects, such as the surrounding electrical noise, which might come from the domestic power line, high switching frequency, and long cables and wires. Table 3 presents the comparison of various inverter systems where the key parameters are used for analysis, including topology, hardware, switching technique, power factor, current THD, and voltage THD. Usually, two-or three-level types of inverters have easy implementation as designing the topology and control algorithm are not trivial. Apparently, the design of these types of inverters seems to be more feasible since the overall system algorithm is simplified and the inverter physical size and weight are reduced. A composite control algorithm exhibits high computational complexity in switching signals generation. Moreover, the cost of the overall system is raised with the increasing number of semiconductor switches. It is noticed in Table 3 that the proposed developed inverter controller performance is satisfactory in terms of harmonic reduction, power factor, switching technique, and hardware requirement compared to the other available methods.

Conclusions
A data-driven fuzzy-based inverter controller for enhancement of the quality of PV power supply is presented to solve the nonlinearity characteristic and output fluctuation problems of PV Fundamental Fourier transform analysis of the simulation model shows that the load current and voltage THD percentage levels are 0.19% and 0.16%, respectively. The current and voltage THD percentage levels are found to be 3.5% and 2.5%, respectively, when using the prototype and are within 5%, as stated in the IEEE Std 519-1992 standard. Indeed, in practice, the results obtained tend to be influenced by many uncontrolled aspects, such as the surrounding electrical noise, which might come from the domestic power line, high switching frequency, and long cables and wires. Table 3 presents the comparison of various inverter systems where the key parameters are used for analysis, including topology, hardware, switching technique, power factor, current THD, and voltage THD. Usually, two-or three-level types of inverters have easy implementation as designing the topology and control algorithm are not trivial. Apparently, the design of these types of inverters seems to be more feasible since the overall system algorithm is simplified and the inverter physical size and weight are reduced. A composite control algorithm exhibits high computational complexity in switching signals generation. Moreover, the cost of the overall system is raised with the increasing number of semiconductor switches. It is noticed in Table 3 that the proposed developed inverter controller performance is satisfactory in terms of harmonic reduction, power factor, switching technique, and hardware requirement compared to the other available methods.

Conclusions
A data-driven fuzzy-based inverter controller for enhancement of the quality of PV power supply is presented to solve the nonlinearity characteristic and output fluctuation problems of PV inverter AC outputs. In the inverter controller designed in this paper, FLC is used to optimize the duty cycles of IGBTs to generate optimized PWM control signals for inverter gate drive to achieve a stabilized inverter output. A MATLAB/Simulink environment is employed to develop a real-time fuzzy-based PV inverter controller model, and the dSPACE DS1104 controller board is used for hardware implementation. Both simulation and experimental tests are carried out for verification and validation of the proposed controller using various control signals such as PWM switching signals, phase voltages and currents, output voltage waveform, controller direct and quadrature voltages, change of error value, and THD of load current and output voltage of the PV inverter. The experimental results exhibited a good agreement between the control signals, output voltage, and current responses obtained in the simulation results. Also, the proposed PV inverter controller outperforms the other existing methods available in the literature in terms of the voltage and current THDs.