Fuzzy Logic Based Selective Harmonic Elimination for Single Phase Inverters

A R T I C L E I N F O A B S T R A C T Article history: Received: 04 May, 2018 Accepted: 22 June, 2018 Online: 26 June, 2018 A selective harmonic elimination system using fuzzy logic for the elimination of high magnitude harmonics with frequencies close to fundamental in the output voltage of single phase inverters is presented. The system does not require look up tables for storage of the data as in traditional harmonic elimination methods. The input of the fuzzy system is the modulation index values. The output of the fuzzy system provides the switching angles which are further used to construct the switching signal for the switches in the inverter. With this fuzzy logic based selective harmonic elimination system, predetermined dominant low rank harmonics are successfully eliminated. Simulations are made with Matlab/Simulink and the results are presented which show the effectiveness of the presented harmonic elimination system.


Introduction
This paper is an extension of work originally presented in 2017 XXVI International Scientific Conference Electronics (ET) [1]. The use of power electronic devices in industrial and consumer applications has resulted nonlinear sinusoidal voltage and current to be drawn from the source. These nonlinear loads distort the sinusoidal form of the alternating current which results harmonics in the electrical system. The power quality of an electrical system is determined by its harmonic content. These harmonics may be classified as voltage or current harmonics. These harmonics can occur either supply or load. Current harmonics are generated by the harmonics of the source voltage which are depend on the type of the load connected to supply which can be resistive, inductive or capacitive. Nonlinear operation of power converters feeding loads cause harmonics to be produced in the load. These harmonics cause extra heating in transformers and motors.
Supply harmonics are produced by the source with nonsinusoidal voltage or current waveforms. Supply harmonics produce extra loss, cause electromagnetic interference and ripple torques in ac motors [2].
A pulse width modulated inverter which converts dc source to ac supply with desired voltage and frequency is used in many electrical devices such as uninterruptable power supplies (ups), switch mode power supplies(smps), machine drives. However, it is seen that the output voltage of the inverters has higher harmonic content.
Among others [3][4], the pulse width modulation (pwm) technique is one of the commonly applied modulation strategy which controls the amplitude and frequency of the voltage produced by inverters.
Pwm techniques have been widely used in converter and inverter control where the switches are switched on and off number of times in each period. The controlled output signal is obtained by changing the width of these pulses. Different pwm methods have been developed to suppress harmonics in converters and inverters. These techniques can be summarized as One of the effective pwm method for the suppression of harmonics from the spectrum of the inverter output voltage is the selective harmonic elimination (SHE) technique [5][6][7].
The voltage or current waveform is represented by Fourier series expansion in SHE technique. The coefficients of the harmonics those will be eliminated are set to zero and the ASTESJ ISSN: 2415-6698 coefficient of the fundamental is set to the desired value. Hence, a set of nonlinear equation is obtained. This equation set need to be solved in terms of unknown switching angles for each value of modulation index. The number of equation depends on the number of harmonics to be eliminated [1].
For the offline approach the nonlinear equation set is solved for every modulation index values and stored in look up tables. These modulation index values used in the microcomputer for generating switching instants. A huge number of tables of data are required to be saved which also require large memory. This problem can be avoided by online approach. Therefore, intelligent methods are proposed for the SHE.
In this study, a fuzzy logic (FL) based SHE is presented. FL is used to obtain switching moments for the switching elements in the single-phase inverter.
The main contribution using FL is the fast response in real time operation constructing the pwm patterns for improving the inverter output voltage waveform. Whereas, in conventional methods the calculations of the switching instants are made off line. The controller needs a look up table to store the switching instants for SHE.

Selective Harmonic Elimination
SHE is a modulation method aiming to obtain the appropriate switching instants to suppress the low order harmonics. In SHE the switching moments are determined by using the desired magnitude of the fundamental and harmonics to be suppressed. Main aim is to determine switching angles so that the fundamental component is at the desired value and undesired harmonics which are the lower order harmonics are eliminated. Thus, Total Harmonic Distortion (THD) of the output voltage is also minimized. Figure 1 Shows a single phase full bridge inverter structure. In conventional pwm inverters the gate signals for the switching elements in the first leg are produced by comparing a sinusoidal modulation signal with a triangular carrier wave.
180° phase shifted signals of the first leg are applied to the second leg of the inverter. Thus, the gate signals for the switches S1, S4 and S2, S3 are synchronized. E S3 S1 S2 S4 g 1 g 2 g 3 g 4 Load Switching Signal Generation The technique used to eliminate or minimize low rank harmonics while keeping the magnitude of the fundamental component at desired value by appropriately choosing the switching angles of the voltage waveform of an inverter is known as the SHE [8][9][10][11]. With this technique, the magnitude of the fundamental component and the harmonics to be eliminated are determined and the corresponding switching angles are calculated.
The output voltage waveshape may be either bipolar or unipolar as in Figure 2 which shows normalized output voltage waveforms. In bipolar waveform, the output voltage is two level in which both +E and -E voltage pulses are used in each half period. In unipolar waveform, the output voltage is three level and only one of +E or -E voltage pulses are used in each half period. The output voltage waveshape of the SHE modulated inverter is constructed to have a quarter wave symmetry.
The two switches are not turned on or off in the same inverter leg at the same time. They are operated in a complementary manner that is, one switch turned on and other turned off in the same inverter leg. Thus, inverter need only two switching signals for the gate of upper switches which are produced by comparing a sinusoidal modulating wave and triangular carrier wave.
In the unipolar modulation two sinusoidal modulating wave with same magnitude but 180 out of phase are used. Switching signals for the gates of upper switches in the inverter legs are produced by comparing these two modulating waves with a sawtooth carrier.
The unipolar voltage waveform contains three states as presented in Figure 3. Signal pulses are generated with switching instants (α 1 , α 2 , α 3 ,..., α N ). Periodic signals can be constructed from a sum of sine and cosine functions. by a fundamental and a set of harmonic components. The coefficients of these functions can be obtained by applying Fourier transformation. Thus, the Fourier representation of the inverter output voltage is; Due to odd and quarter wave symmetry, even harmonics do not exist in the output voltage waveform and Fourier coefficients An and a 0 are equal to zero [12].  Figure 3. Inverter output voltage Only the odd harmonics with sine components exist in the output voltage, thus (1) can be written as: where Bn is the amplitude of the nth harmonic voltage and is given by and E is the dc bus voltage, =pf, f 1 is the frequency of the fundamental component and N is the number of switching angles per quarter cycle.
The goal of the SHE method is to determine the switching angles α 1 , α 2 ,…,α N in the inverter output voltage so that the amplitudes of the harmonic components B 3 , B 5 ,…,B N-1 are zero and the fundamental component B 1 equal to the desired amplitude.
Applying the constraints defined above and using (5), the following equation set can be obtained where n=1, 3, 5… N and N is the number of pulse in every quarter cycle.
The first equation in this equation set is used to adjust the amplitude of the fundamental and the others are used for the suppression of harmonics.
If the amplitude of the fundamental component B 1 need to be adjusted then where m is the modulation index which is the ratio of fundamental to the maximum obtainable fundamental.
The set of nonlinear equations in (7) need to be solved using numerical methods [15,16] to obtain the switching instants.
In this study, Newton-Raphson (NR) method, as in [17,18] which is developed for the solution of nonlinear equations is used to solve the nonlinear equation set given in (7). The switching angles are obtained by a program developed in Matlab for solving the nonlinear algebraic transcendental equations. Solution obtained from NR is used to setup the input/output membership functions in the fuzzy controller. Table 1 lists the angles for different m values for 10 harmonics to be eliminated.

Fuzzy Logic Controller
FL is a theory used to represent uncertain information. It is first formulated by Lotfi Zadeh in 1960s [19]. FL is a crisp model of a system. It uses rule base to convert crisp inputs to corresponding crisp output values. This technique has been successful especially when rules cannot be perfectly known and can be used in situations where the device cannot be described by mathematical models. Decision making capability of fuzzy logic controller (FLC) is achieved by human behavior.
Fuzzy systems provide a quick and approximate solution for complex systems which do not have exact mathematical model [20]. The real life and industrial applications of FL can be found in [21][22][23].
FL is realized in four steps which are the determination of fuzzy sets, definition of membership functions, construction of rules and defuzzification as shown in Figure 4.
Fuzzification is the first step in FL system. In this step, crisp input values are measured and converted to suitable linguistic variables using expert's knowledge and experience.
The second step is the development of rule data base which defines the principles of the controller in terms of the relationship between input and output. This step is known as Inference Engine and supplies the required information for control rules The last step is the conversion of the fuzzy outputs to control action which is called as Defuzzification which provides an actual control action. Two types of fuzzy inference system which are Mamdamitype and Sugeno-type can be used. These types are differ according to the determination of outputs. Sugeno-type inference produces an output that is either constant or linear mathematical expression.
Due to the use of numerical values at the input and outputs, Sugeno-type fuzzy system is used for the implementation of the input and output data. Figure 5 shows the input membership function.
The outputs of the fuzzy control system which are the switching angles are computed for a given input which is the modulation index as shown in Figure 6.
The input data are represented by 10 membership functions. Because 10 harmonics are going to be eliminated which requires 11 switching angle thus 11 outputs each has 50 constant type membership functions for the representation of output data are used in the fuzzy system. Totally 104 rules are used between the input membership functions and output membership functions.

Switching Signal Generation
The switching instants corresponding to each m are determined by solving the nonlinear equation set for every value of m. These m and switching angles values are used in FLC. The m is used as the input to FLC and the output of this controller is the corresponding switching angles.
The switching instants obtained from FLC for a given m value are used as inputs for generation of switching signals.
As in traditional pwm methods, the switching angles produced by FL are compared with a timer content with specified frequency to produce pwm switching signals. Figure 7 shows the generation of the switching signals for elimination of three harmonics i.e. N=4. In this system the switching angles are a1=23.56º, a2=39.26º, a3=48.96º and a4=89.20º. If the frequency is 50 Hz, the switching signals are obtained by comparing the timer content which is the triangular wave with the switching angles. Because of the symmetry, only the half period is given in this figure.
The Simulink block used to obtain the switching signals is shown in Figure 8.
The signals are constructed by comparison of switching instants with the sawtooth carrier and given to inverter switches as in Figure 9. Figure 10 represents a switching signals generation of 3 harmonic elimination. Switching Angle Figure 7. Switching signal generation for elimination of three harmonics

Simulation Results
To present the effectiveness of FL based SHE, a model of the system is implemented for the simulations using Matlab/Simulink. The Simulink block is given in Figure 11 where the aim is to eliminate 10 voltage harmonics (3,5,7,9,11,13,15,17,19,21). The switching angles and the corresponding switching times for N=11 and m=0.9 are given in Table 2. Figure 11. Simulink block of FL based SHE For better visualization, a period of the waveform is shown in Figure 12 where horizontal axis is converted to degrees. Figure 13 shows the inverter output voltage and filtered current waveform when N=11 and m=0.9.
The spectrum of the voltage is presented in Figure 14. The harmonics 3,5,7,9,11,13,15,17,19,21 are all eliminated from this spectrum. A change in m from 0.8 to 1 is applied at time t=0.1s and the voltage waveform obtained is presented in Figure 15. The output voltage spectra are given in Figure 16 and Figure 17 for the cases m=0.8 and m=1 respectively. Figure 18 is given to clearly see the effect of this change in the voltage waveform. 10 low rank harmonics are eliminated from the spectra.
To show the effectiveness of the presented FL based harmonic elimination system, the first fifteen harmonics which are 3,5,7,9,11,13,15,17,19,21,23,25,27,29, and 31 st harmonics are taken to be eliminated. The output voltage waveform and its spectrum are given in Figure 19 and Figure 20. It is clearly seen that 15 predefined harmonics are eliminated. The total harmonic distortion was also examined with the FL based SHE method. THD values are 18.52% and 13.71% for the elimination of 10 harmonics and 15 harmonics. The same load is used in both situations. By using this technique THD is also reduced.

Conclusion
The output voltage of inverters is nonsinusoidal because of the nonlinear switching characteristics of the switches. This voltage contains harmonics with high magnitude with frequencies near fundamental. Distorted voltage used in electronic equipment may reduce the power quality and cause defects. Thus the output voltage waveform of inverters need to be improved. In this study, a FL based SHE for single phase inverters is presented. FL system is used for the computation of switching angles using modulation index. The switching signals are generated for the switches of the inverter using the output of the fuzzy system. Matlab/Simuink programming environment is used to implement the presented SHE for single phase pwm inverter. Various modulation indices are used for the simulations. Some results are given to show the effectiveness of the technique. The simulation results verified the elimination of the selected harmonics from the frequency spectrum of the voltage waveform. Total harmonic distortion is also reduced by using the presented technique.

Conflict of Interest
The authors declare that there is no conflict of interests regarding the publication of this paper.