A NOVEL TECHNIQUE FOR REAL TIME IMPLEMENTATION OF SHE PWM IN SINGLE PHASE MATRIX CONVERTER

Original scientific paper In this paper, a real time implementation of selective harmonic elimination pulse width modulation (SHEPWM) using a new technique known as Linearization Method for single phase Matrix converter (SPMC) is designed and discussed. SHEPWM for SPMC is designed using Real coded genetic algorithm (RGA), particle swarm optimization (PSO) and firefly algorithm (FFA). From the switching angle trajectory of these techniques, the trajectory of LM is designed. In the proposed technique, the optimum switching angles are obtained using simple mathematical calculations. A MATLAB simulation was carried out and FFT analysis of the simulated output voltage waveform confirms the effectiveness of the proposed method. An experimental setup was also developed and the switching angles and firing pulses are generated using Field Programmable Gate Array processor. The proposed method proves that it is much applicable in the industrial applications by virtue of its suitability in real time applications.


Introduction
Single phase Matrix converter was first implemented by Zuckerberge in 1997 [1].This converter can be functioned as generalised converter in other words as AC inverter, DC-DC chopper, AC-DC converter, AC-AC voltage controller and frequency controller [2÷5].The typical applications of SMPC include single phase induction motor drive [6], radio frequency resonant heating with unity power factor and sinusoidal input current [7,8], audio power amplification [9], and voltage compensation for sag and swell and to eliminate the harmonic content [10].For all the applications, the output voltage provided by the SPMC must meet the limitations on individual harmonics components as per EN 50160.In the conventional SMPC, the output voltage is less than the input ac voltage.The Z source concept was introduced to SMPC to provide the wide range of output ac voltage in buck-boost mode with step up/down frequency.Such converter is known as Z source buck-boost matrix converter [11÷14].
The common control technique for SMPC is based on high frequency carrier based PWM.The PWM technique offers good performance using high switching frequency and it leads to high switching losses and electromagnetic interferences which result in high d d ⁄ .This PWM technique is not applicable for the system in which switching losses are intolerable.To overcome these problems, fundamental switching frequency PWM techniques are preferred.The most commonly used fundamental switching frequency PWM technique is selective harmonic elimination (SHE) method [15,16].The main goal of SHE technique is to compute the optimized switching angles to reach the desired fundamental value and to eliminate the lower order harmonics.The defined objective function of a SHE method is a set of nonlinear transcendental equations with trigonometric terms which results in multiple solutions.Some of the traditional methods for solving the transcendental equations are Newton-Raphson method, resultant theory and theory of symmetrical polynomial technique.The Newton-Raphson method is numerical iterative method which requires good initial guess of solutions that are close to the exact solution.In resultant theory method and theory of symmetrical polynomial technique, the transcendental equations are converted into polynomial equations.When the order of the transcendental equations increases, the resultant polynomials become quite complex and it increases the complexity of the calculation.Recently non-traditional methods based on evolutionary algorithms such as genetic algorithms (GA), particle swarm optimization (PSO), bee colony optimization (BCO) have been employed for SHE problem [17÷19].Hopfield neural network based approach was also used to solve the SHEPWM problem [20].
In Selective harmonic mitigation (SHMPWM), the selected harmonic contents are restricted within the values specified by grid codes EN50160 and CIGRE WG 36-05 [21].In SHEPWM for N switching angles, N−1 number of harmonics can be eliminated but in SHMPWM, N 2 number of harmonics can be limited within the values specified by any grid code.
In this paper, SHEPWM for SPMC using RGA, PSO and FFA are also designed.The switching angles are obtained in offline using the optimization techniques due to their long convergence time and hence not applicable for real time applications.The objective of this paper is to design a method for real time implementation of SHEPWM in SPMC.From the switching angle trajectory of RGA, PSO and FFA, the trajectory of the proposed technique called as Linearization method (LM) is designed.The fundamental voltage, THD and the harmonic content of the proposed technique is compared with RGA, PSO and FFA and the results are compared and tabulated.

Circuit analysis
The SPMC consists of four switches SW 1 , SW 2, SW 3, SW 4 as illustrated in Fig. 1a.Bidirectional power flow in AC to AC converter demands the bidirectional switches that are capable of blocking voltages in both polarity and conduction of current in both directions.A discrete semiconductor fulfilling these requirements is not available in practice and hence an antiparallel IGBT, diode pair is used here.Theoretically the switching is simultaneous and instantaneous.In real time the finite switching times and delays in the circuit are taken into account.
The input and the output voltages are given by The switching sequence for the output frequency of 50 and 100 Hz are summarized in Tab. 1.At any time t two switches are ON.
Fig. 1b shows the ideal synthesized output voltage waveform of single phase matrix converter with the output frequency of 50 Hz.The waveform possesses N switching angles between 0 and π 2 .Since the square wave symmetry is preserved in the waveform, all the even harmonics are eliminated and odd harmonics alone present in the output.Among the N switching angles, one angle is used for the control of fundamental voltage and N−1 switching angles for the elimination of N−1 selected lower order harmonics.In this paper seven switching angles are generated.

Formulation of transcendental equations
The Fourier series expansion of output voltage is where   and   are the Fourier coefficients;  is the order of the harmonic;   is the peak value of the output voltage.
The fundamental coefficients  1 and  1 are expressed as The fundamental coefficients   and   are expressed as The output voltage is articulated as where Let () be the objective function to be minimized and is defined as with the constrain where modulation index  =  1 .
The objective function ()is minimized subject to the condition in Eq. (10).Hence the desired output voltage is regulated over the range 0 to   by changing the modulation index and selected harmonics up to 13 th order are eliminated.

Real coded genetic algorithm
Genetic algorithm is inherently parallel because of simultaneous evaluation of many points in search space.Hence GA has reduced chance of converging to local optima and more chance to converge in global optima [14].Initially GA was designed to operate with binary codes.Now RGA is used due to their supreme behaviour such as reduced computational effort, absolute precision etc.The steps involved in RGA based approach are illustrated.
Step 1: Random generation of initial population Generating N switching angles is the solution to this problem.Each switching angle is a gene represented by real numbers.There are N genes in each chromosome.Each chromosome represents the solution to the problem.Population consists of sets of chromosomes.Population is initialized with random number between 0 and π 2 .
Step 2: Evaluation of fitness function The objective function in this study is to minimize the selected harmonics hence fitness function has to be minimized.Since all the optimization techniques are used only for maximization problem the fitness function is modified as below Fitness of each chromosome is computed.
Step 3: Generation of off spring Offspring is a new (Child) chromosome.From the fitness value of each chromosome the best parents are selected for reproduction.Tournament selection is used as selection mechanism in this work to avoid premature convergence.The selected parents are subjected to Simulated Binary Crossover (SBX) and polynomial mutation.Self-adaptive simulated binary crossover based RGA was successfully applied to various engineering optimization problems [15].

Simulated binary Crossover
In SBX crossover, two children solution   (1) and   (2) are wrought from the parent solution   (1) and   (2) .The SBX operator simulates the working principle of single point crossover on binary strings.

𝑦𝑦 𝑖𝑖
(1) = 0,5 The spread factor β is defined as the ratio of absolute difference in offspring values to that of parents' values. (1) Polynomial probability Distribution is a nonnegative real number known as crossover distribution index represents the distance of the children from the parent.

Non-uniform polynomial mutation
Newly generated offspring undergoes polynomial mutation operation to create mutated offspring.New offspring   is determined using where    and    are the upper and lower limit values.  is calculated from the polynomial probability distribution.The function is given by is the mutation distribution index/mutation constant and random number   ∈ [0,1].Newly generated offspring will become the population for the next generation.The procedure is repeated from step 2 till the stopping criterion is reached.The parameters used in the algorithm are given in Tab. 2.

Stopping criteria
The algorithm stops when any one of the following conditions occurs: 1) The number of iterations performed by the algorithm reaches the value of the maximum iteration.
2) The total number of objective function evaluations performed by the algorithm reaches the value of maximum evaluation.
3) The change in the objective function from one generation to the next successful poll is less than the objective function tolerance.

Particle Swarm Optimization (PSO)
PSO is a population based stochastic optimization technique developed by Ebernart and Kennedy inspired by social behaviour of bird flocking and fish schooling.The steps involved in PSO algorithm are given below.
Step 1: Random generation of initial population: It begins with the initialization of particle position (switching angles) between 0 to π 2 and velocities in N dimensional space.
Step 2: Evaluation of fitness function: In each iteration, the particle moves according to the velocity and changes its position.The fitness function is evaluated for each particle.
Step 3: Setting Pbest and Gbest: The best position reached among the particles during their search is the particle best (Pbest).The best fitness value reached by the particle in all the searches is the Global best (Gbest).
Step 4: Update the velocity and position of each particle: Let   and   represent the velocity and position of  ℎ particle.The velocity and position of each particle is updated as given below   The procedure is repeated from step 2 till the stopping criterion is reached.The stopping criteria of GA are applicable to PSO also.The parameters used in PSO algorithm are shown in Tab. 2.

Firefly Algorithm (FFA)
Firefly algorithm was first developed by Xin-She Yang in 2007 inspired by the flashing patterns and firefly communication via luminescent flashes in search for food.For simplicity, FA uses the following three rules: 1) Fireflies are unisex so that a firefly will be attracted by other fireflies regardless of their sex.
2) The attractiveness is proportional to the brightness and the less bright firefly will move towards the brighter one.The attractiveness and brightness will decrease as the distance between fireflies increases.If there is no brighter one than particular firefly, the brightest firefly will move randomly.
3) The brightness of a firefly is affected or determined by the landscape of the objective function to be optimized.
In FA, the attractiveness of the firefly is determined by its brightness which is equal to the objective function.
The FA is executed as follows: Step1 Step 2: Compute the brightness of each firefly The brightness of each firefly is determined by the objective function according to Eq. (11).The brightest firefly is chosen as global optimum.
Step 3: Obtain the attractiveness of each firefly The attractiveness of individual firefly varies with the distance  is given as The brightest firefly is the potential optimum for that individual firefly.The potential optimum need not be the global optimum.The less bright firefly  will move towards its potential optimum firefly  according to The last term is a randomization term whereas the second term is due to the attraction of   towards   .The brightest firefly will move randomly.

Proposed linearization technique
In SHE elimination initially the objective function is formulated and the formulated function is solved either using conventional techniques or any one of the optimization techniques.In both the techniques the switching angles are derived in offline.The convergence times of RGA, PSO and FFA are 1,4e4, 1,07e4 and 5,3e3 for 100 iterations (generations) respectively.Due to this large convergence time, they are not applicable for real time implementation.The proposed linearization method overcomes these drawbacks.
The proposed algorithm is applicable for the system in which switching losses are intolerable and can tolerate the harmonics to a certain extent.In this technique, the objective function is not needed.From the switching angle trajectory of RGA, PSO and FFA, it is observed that the variation of switching angles is linear irrespective of number of angles [18].Due to the linearity nature, the switching angles are derived using formula as given below.
Let the number of switching angles N be 3.
In general, For any modulation index MI and switching angle N This technique can be extended for any number of switching angles and the modulation index can be changed in real time.

Results and discussion
To verify and validate the algorithms, programs are developed in MATLAB mfile code.The programs are run in Pentium-V computer operating at 1,4 GHz clock speed.The single phase matrix converter is realized in MATLAB/Simulink environment with the following parameters   = 100 V, R = 30 Ω,   = 50 Hz,   = 50 Hz.
Tab. 3 shows the harmonic contents of the order 3 to 13 for various modulation index in RGA, PSO and FFA.The required fundamental voltage is obtained in all the techniques.The error between the fundamental and actual voltage is lower in FFA than that of other algorithms.The harmonic contents in most of the MI are very low in FFA than others.The reason may be due to the following reasons 1) In GA, there is no straight forward method to determine the population size, mutation probability and crossover probability.2) PSO uses nonlinear updating equations whereas FA uses linear updating equations.
Fig. 2 shows the switching angle trajectory of GA, PSO, FFA and LM.The trajectories are almost linear.Fig. 3 shows the harmonic spectrum obtained using RGA, PSO, FFA and LM.It shows that 3 rd , 5 th , 7 th , 9 th ,11 th and 13 th harmonics are less than the specified limit.Fig. 4 shows the output voltage and harmonic spectrum in hardware which proves the algorithm is applicable for real time implementation.Fig. 5 shows the experimental setup of selective harmonic elimination of single phase matrix converter.The switching angles are derived using FPGA SPARTAN 3E kit.When the required modulation index is given, the FPGA controller calculates the switching angles and generates the required firing pulses for single phase matrix converter.
Tab. 4 shows the comparison of various components using LM in simulation and hardware.The harmonic contents are slightly higher than those of RGA, PSO and FFA but are lesser than the limits specified by grid code.The deviation in harmonic contents and fundamental voltage may be due to 1) The input frequency in simulation is 50 Hz.In real time the input frequency is 49,97 Hz.
2) The switching angle decimal accuracy in simulation is four digits but in real time it is two digits.

Conclusion
A new technique known as Linearization Method is proposed for SHE in single phase matrix converter in this paper.From the results it is concluded that 1) The proposed algorithm is applicable for the system in which switching losses are intolerable and can tolerate the harmonics to a certain extent.The switching frequency is the fundamental output frequency of the system.2) In this technique, the objective function is not needed.Hence the proposed method provides an alternative to engineering optimization problems and the optimum switching angles are derived using simple calculations.3) The selected harmonics in LM is less than that of grid code EN50160.4) This technique can be extended for N switching angles which eliminate N−1 selected harmonics for all modulation indexes.5) This technique was implemented in hardware and is suitable for real time applications.
Circuit diagram of single phase matrix converter; b) Synthesized output voltage (50 Hz) of SPMC

Figure 2 Figure 3 Figure 4 Figure 5
Figure 5 Experimental setup of SMPC

Table 1
Switching sequences -Velocity of  ℎ particle at iteration ,  1 and  2 -Acceleration factors,  1 and  2 -Uniform random numbers ∈ [0,1],    -Best position of  ℎ particle at iteration  ,   -Position of  ℎ particle at iteration ,    -Best position of the group till iteration ,   and   are initial and final weights,   -total number of iterations.
where   -Inertia weight at iteration  ,

Table 2
Parameters used in GA and PSO

Table 3
Comparison of THD and Harmonic Contents for different MI using RGA, PSO and FFA

Table 4
Comparison of various components using LM in simulation and hardware