A Fast Convergent Homotopy Perturbation Method for Solving Selective Harmonics Elimination PWM Problem in Multi Level Inverter

Pulse width modulation (PWM) control for power converters have been vastly investigated and used in many industrial application. For medium voltage and high power applications, low switching frequency PWM techniques are preferred over high switching frequency-based PWM techniques. The preprogrammed low switching frequency-based PWM technique known as selective harmonics elimination (SHE) gives the better quality waveform at a lower switching frequency. The main difficulty in applying SHE PWM is in solving of non-linear transcendental equations for obtaining switching angles. Several methods have been proposed for computation of switching angles that include numerical techniques, optimization techniques, and algebraic techniques. However, the computation of switching angles is still a challenging task in the application of SHE PWM. In this paper, a novel fast convergent homotopy perturbation method (HPM) is proposed to compute switching angles for a multilevel inverter at a faster rate. The solutions obtained by the proposed technique is as accurate as obtained by the algebraic methods with no dependency on the initial guess. The proposed technique can compute the higher number of switching angles with multiple solutions in some modulation index range. A prototype is developed and the computed switching angles have been verified using field-programmable gate arrays (FPGA) controller to validate the results for practical applications.


I. INTRODUCTION
Pulse width Modulation (PWM) techniques have been extensively investigated and used for the efficient operation of power electronics converter in the past. It produces desired fundamental component at the output with minimum undesired harmonics components [1]. However, the main focus was on high switching frequency-based PWM techniques, such as carrier-based modulation (SPWM) and space vectorbased modulation (SVPWM). In SPWM, a high-frequency carrier is continuously compared with a fundamental component (desired component), and at the intersection points, The associate editor coordinating the review of this manuscript and approving it for publication was Zhilei Yao . the pulses are generated. In space vector PWM, the distinct switching states are first identified, and then these vectors are applied to obtain the desired output. The main advantage of high switching frequency (in kHz) techniques includes having the desired output components along with shifting of harmonics component at switching frequency as sideband and thus higher switching frequency will result in the minimum filtering [1]- [3] requirement. In the past, two-level voltage source inverters (VSI's) have been mainly used, and various PWM techniques have been implemented for twolevel VSI's. However, higher power processing requirement creates the opportunity to develop new converter topologies to meet the increasing power demands with limited semiconductor device voltage and current ratings.
The main multilevel topologies such as cascaded H-bridge (CHB), neutral point clamped (NPC), flying capacitor (FC), active neutral point clamped (ANPC), modular multilevel converter (MMC), and various reduced device count emerging topologies have been investigated and developed in the recent years [4], [5]. The essential features of these topologies include better quality output waveforms (Stepped) and thus lower total harmonics distortion (THD), lower devise switching frequency, use of low voltage and current rating semiconductor switches, and production of small dv/dt at switches [5]. Since the output waveform's quality is kept as per IEEE 591 standard, the high switching frequency-based PWM techniques are preferred for the operation and control of these multilevel inverter topologies [2]. However, in high-power application of multilevel converter, switching losses also need to be considered, affecting efficiency considerably. In this context, the low switching frequency based PWM techniques such as selective harmonics elimination (SHE), selective harmonics mitigation (SHM), optimum pulse width modulation techniques (OPWM), synchronous optimum pulse width modulation (SOPWM), pulse width amplitude modulation and THD minimization PWM techniques [6]- [12]. These methods are referred to as the pre-programmed PWM techniques as it is optimized as per requirement, such as eliminating particular harmonics, minimizing specific harmonics to particular level, and controlling overall harmonics content in the output waveform [13]- [15]. In SHE-PWM, the lower order harmonics are considered for complete elimination while maintaining the required fundamental component simultaneously [16]. The number of switching angles considered in quarter-wave will decide the number of harmonics that can be eliminated from the output waveform. More the number of switching angles is considered, more harmonics are eliminated from the output waveform but at the cost of higher switching losses [17]. Thus, it is a trade-off between switching loss and output power quality. The non-transcendental SHE equations, obtained after Fourier series analysis, provide different solutions as a modulation index function: a unique solution, multiple solutions, and no solution [18]. The multiple solutions in some modulation index range give different THD, and the following non eliminated harmonics in the output waveform. Thus it is essential to find all the solutions from the derived system of non-linear non-transcendental equations [19].
To solve the system of simultaneous SHE equations, several methods have been proposed in literature over the years [9], [20]. These can be broadly classified as numerical techniques-based iterative methods, metaheuristic-based optimizations methods, and algebraic methods [21]. The numerical-based iterative techniques are fast convergent, and solutions up to the desired accuracy are obtained. However, the main challenge in utilizing these techniques involves the proper selection of initial guesses and computation of derivatives in every iteration, which results in divergence in the solution and singularity problems [22], [23]. In metaheuristic techniques, a single objective function is solved with different constraints on the harmonics levels. The objective function is optimized with modern techniques such as particle swarm optimization (PSO), modified PSO, genetic algorithm (GA), differential evolution (DE), ant colony optimization (ACO), artificial bee colony (ABC), teaching-learning (TL) optimization, hybrid PSO and GA optimization, grey wolf optimization etc. [24]- [29]. The main challenge in utilizing a metaheuristic-based optimization technique includes a slow convergence rate, proper selection of algorithm parameters, initial guess, and more computational time for the entire modulation index range [24], [25], [30]- [33]. In algebraic methods, the SHE equations are transformed into algebraic equations using the trigonometric formulas and then solved using the Walsh method, symmetric polynomial methods, and Groebner bases [20]. The algebraic methods are capable of giving all the solutions from the SHE equation with exact values. However, the polynomial degree increases many folds with an increase in the number of switching angles, and thus these methods are used only for computation of few switching angles [22]. The capacitor voltage balancing using SHE-PWM for low device count multilevel topologies have been addressed in [34]. The real application of SHE-PWM have been successfully implemented using artificial neural network (ANN), Data fitting, hopfield neural network, etc. [35]- [39]. The switching angles first computed using any of the method discussed above and then real time implementation for various application is applied.
This paper proposes a novel homotopy perturbation method (HPM) for the computation of switching angles in SHE-PWM. The proposed method is accurate, robust, fast convergent, and capable of computing all the switching angles with any random initial guess. Various multilevel waveforms such as three-level waveforms, multilevel stepped waveforms have been considered, and the switching angles have been computed. The accurate multiple solutions with a faster computational algorithm confirm the robust operation of the proposed HPM technique. The obtained solutions are as exact as obtained by the algebraic methods but can solve for more number of switching angles as compared to algebraic methods. The harmonics profile for various modulation indexes is given to confirm the accuracy of the computational results. The sensitivity analyses of the computed solutions are also given with comparative analysis of different methods. The Computational results are verified by the hardware results using field-programmable gate arrays (FPGA) for various cases. The dynamic load change results for resistive and resistive-inductive load have been given for 11-level stepped waveform with variation in load from no-load to half-load to full load.
The paper is organized as follows: In section II, mathematical modeling and problem formulation for three-level and the multilevel stepped waveform is discussed, in section III, HPM computational procedure is discussed, in section IV, the selected computational results of switching angle trajectories for various cases by the proposed HPM technique is given, in Section V, sensitivity analysis is given, in section VI, VOLUME 9, 2021 laboratory setup of multilevel inverter and digital control is discussed. Also, selected hardware results are given for resistive resistive-inductive loads, and finally, in section VII conclusion of the work is given.

II. PROBLEM FORMULATION
The main objective in SHE PWM is to obtain switching angles so that the desired fundamental frequency component is achieved and the elimination of specific low order harmonics components from the output waveform. The set of simultaneous mathematical equations are obtained after applying the Fourier series decomposition of the output waveform, and then homotopy perturbation is implemented to calculate the switching angles. The generalized cascaded H-bridge multilevel inverter circuit and a quarter-wave generalized symmetrical output voltage waveform are shown in Fig.1(a) and Fig.1(b). Three voltage levels such as +Vdc, 0, or -Vdc are obtained from proper switching of the semiconductor switches from individual H-cells. The number of positive and negative pulses in a cycle determines the possible number of harmonics for elimination. Fourier series expansion is utilized to analyze the output waveform shown in Fig. 1 (b). The general Fourier series expansion of the stepped waveform shown in Fig.1 (b) is given by (1).
(a n cos(nωt)+b n sin(nωt)) For simplicity, the waveforms are considered to have odd quarter-wave symmetry. In such a scenario, the Fourier coefficients a0 and an, are zero, and the even harmonics components will be zero. The Fourier coefficient bn, after simplification, is given by (2), where n represents harmonic order and N total number of switching transitions in quarter periods.
And for staircase waveform, from cascaded H bridge inverter it will be given by (3).
The triplen harmonics for a balanced three-phase system automatically will get canceled. So the output waveform can be considered as having the desired fundamental component and several nontriplen odd-order harmonics components and can be expressed by (4) and (5) for three-level waveform and multilevel waveforms.
The N-1 harmonics can be eliminated from the output waveform (usually the lower order) if N number of switching transitions are considered quarterly. One degree of freedom is reserved for obtaining the desired fundamental component magnitude. The generalized expression for having desired fundamental component and elimination of specific low order harmonics components eliminated from the output waveform in three-level and multilevel stepped waveforms are given in (6) and (7), respectively.
S is the number of steps, and M represents the modulation index. The ratio between the fundamental component's magnitude and the maximum achievable magnitude is given by (8).
The above equations must satisfy the minimum, maximum and non-equality constraints, expressed in (9).
The equations in (6) and (7) are considered simultaneous, highly non-linear, and transcendental. Their solution may give multiple solutions, unique solution or no solution at different modulation index values and is therefore not straightforward.

III. HPM SOLVING PROCEDURE
An advanced technique is proposed here to obtain all the possible solutions from the expressions (6) and (7) which are further rewritten in matrix form as: where, f k : R n → R. Also let the switching angles, α ∈ R n . In vector form α is expressed as (11), where α k ∈ R and k = 1, 2 . . . n.
Then in the homotopy perturbation method, the systems of equations (let us say two functions in two variables) which are considered to be solved can be rearranged as given in (12): where, f 1 , f 2 : R 2 → R, and let α * = (α 1 , α 2 ) T makes () to zero, that is, it is the solution of the problem. Let γ = (γ 1 , γ 2 ) T , be the initial guess which is very close to the actual solution α * . The Taylor series expansion of (1) near γ will result in (13).
The expression in (13) can be written in the following form as: After solving (14), (15) is obtained, which represents the solution for the switching angles.
where, inverse Jacobian is: In homotopy perturbation method, the construction of Homotopy function for (14) is → R 2 and it should satisfy (11) and thus (17) is obtained as: where, λ is the embedding parameter and after substituting (18) is obtained as: Here the embedding parameter λ increases monotonically from 0 to 1 as trivial problem and H (ᾱ, 0) is continuously deformed to main formulation H (ᾱ, 1) = F(ᾱ) = 0. The λ is used as expanding parameter to get (20) in HPM.
The approximate solution of (3) is then obtained as in (21).
The convergence of series in (20) is given in (III). The application of HPM for (21) can be obtained from the above expression as (23), shown at the bottom of the next page:

VOLUME 9, 2021
By equating the terms of identical power of λ, the following expressions are obtained in (26)-(28): After substituting the above expressions in (20), it will result in (24), as shown at the bottom of the page, and simplification will result in (25), as shown at the bottom of the page. The above formulation allows the following two iterative methods to solve the system of non-linear equations given as: i. For a given θ n = p n q n calculate the approximate solution θ n+1 = p n+1 q n+1 : ii. or a given θ n = p n q n calculate the approximate solution The flowchart for computing switching angles, storing results and computing total harmonics distortion for each solution set is shown in Fig. (2). The software code is developed and run for each cases to obtain the accurate switching angles for any voltage source converter topology. The scheme can also be implemented for reduce device count topologies.

IV. COMPUTATIONAL RESULTS BY HPM
The proposed HPM technique discussed in the previous section is used to compute the switching angles. Various cases of stepped waveform of multilevel inverter have been considered, and the selected results have been given to confirm the capability of the proposed techniques to compute  the exact solutions at a fast convergent rate with negligible dependence on the initial guess. The lower order, nontriplen harmonics are considered for elimination from the output waveform since the triplen harmonics will automatically get canceled from the line voltage in a three-phase balanced system. The modulation index represents the desired fundamental component of the output voltage. For stepped waveforms of 7, 11, 15, 19, 23, 27 levels, the switching angles trajectories as a modulation index function are shown in Fig. 3. The solution trajectories confirm the multiple solutions, no solution and unique solution in a wide modulation index range with accuracy in solutions as close to as obtained in algebraic methods. Similarly, the solution trajectories for three-level waveforms for 3, 5, 7, 11, and 13 switching angles in a quarter period are shown in Fig. 4     11 th , and 13 th , are entirely removed from the output waveform. The maximum error in the harmonics equations defined in (7) has values of 1.02×10 −7 , 2.97×10 −14 , 1.41×10 −7 , 1.77×10 −10 , and 4.50×10 −7 , respectively. The convergence rate or the number of iterations for the HPM algorithm to achieve this accuracy is 8,9,9,8, and 14, respectively. The convergent rates, maximum error and time of computation for various modulation indexes are shown in Table 1. The total harmonics distortion (%THD) in line voltage for 11level cascaded H-bridge inverter is shown in Fig. (6), which has been computed using (29), and it indicates that different solutions for a particular modulation index have different values. Therefore the optimum solution may be selected based on the minimum %THD value of the solution.  assessed using the following expression: Here the objective function is continuous and differentiable at all points in the defined space, which is a crucial hypothesis in the sensitivity analysis. The SHE PWM techniques' performance under variation in switching angle values from the computed values is essential. The harmonics distortion's sensitivity is determined by having a slight variation in switching angles from the optimum solution obtained from the differential evolution-based optimization technique in a broader range of solutions.
The second and first-order performance function derivatives are utilized to assess parameter variation on performance by second-order sensitivity analysis. It increases the accuracy in sensitivity analysis, and unlike the first-order derivative, the optimal point does not necessarily converge to zero points. For multivariable, the use of Taylor series expansion by considering both first and second-order terms results as: The effect of slight variations in the switching angles to the harmonic distortion is determined and compared after the optimum swathing angles are obtained. The desired equation for computation of desired fundamental and undesired low order harmonics is given as: In (32), V 1 is the fundamental voltage, which is the desired part and, n 1 , n 2 , n 3 . . . are the targeted harmonics for elimination. For a 5-variable case, the 5 th , 7 th , 11 th , and 13 th order harmonics are chosen as these are the lowest order harmonics in a balanced 3-phase system. The optimized solution to (32) is considered for validating the results from both the optimization and sensitivity analyses. The switching angles for a harmonics minimization scheme with five switching angles considered for sensitivity analysis, the objective function (OF) shown in (33) is used in [40].
The elimination of 5 th , 7 th , 11 th , and 13 th orders are considered and are given as: For the exact computed switching angles (α 1 , α 2 , . . . α 5 ), R is zero, as shown in the table. However, in the practical implementation, a small deviation in these switching angles will result in a deviation in R from zero. The sensitivity analysis described is used to calculate R's deviation with different %age deviations in switching angles. The incremental error per degree of deviation in switching angles is shown in Table 2. All first and second-order derivatives are calculated, and then R is represented by the expansion given in (31) for the variations in the switching angles. Alternatively, the permissible deviation in switching angle α to limit the harmonics distortion within the specified range can be evaluated. If a value HR = √ 2 (and let HR ≤ 2%) as a design constraint. Hence the maximum permitted error in switching angle α can be derived from (30) and (31). At the optimum VOLUME 9, 2021 point, the partial second derivative is given as: where, and, The worst-case situation from smallest variation in α is assured in (36) by having the max function, which occurs from the proper selection of + and − signs. The various sensitivity cases are given in Table 3.

VI. EXPERIMENTAL VALIDATION
The computed switching angles by HPM discussed in the previous sections have been validated by hardware developed in the laboratory. The schematic and complete hardware setup of power rating of 1.5 kW is shown in Fig. 8(a) and Fig. 8(b), respectively. The field-programmable gate array (FPGA) from VIRTEX-5 XC5VLX50T is used as a digital controller as it has a sizable amount of logic components and area unit programmable logic devices. The control   code for switching devices is converted into very high definition language (VHDL) by using the Xilinx logic blocks compatible with Simulink library to generate gate pulses. The individual logic elements connections are programmed by VHDL and create a logical function, i.e., digital hardware. Since at present, the available microcontrollers are capable of providing only six pairs of PWM signals, which is not sufficient for multilevel converter operation. However, the FPGA may provide multiple PWM signals useful in a multilevel converter system. Also, with the clock signal, an FPGA may run all the operations in parallel, and hence it updates all gate signals simultaneously, which is an advantage over a digital signal processor (DSP). There are one or more LUTs on each flip-flop of PLB. There are many  vendors such as Xilinx, Altera, Atmel, Lattice, etc., who provide a wide range of FPGAs. The complete hardware setup includes the multilevel converter with gate drivers, programmable dc supply, FPGA controller, oscilloscope, and harmonics analyzer is shown in Fig. 8(b). The components ratings of the prototype developed in the laboratory is given in Table 4. For various switching angle cases and modulation indexes, the experimental results have been obtained. The concept is validated through selected results shown in Fig. 9 for three-level waveforms for different switching angles in a quarter-period while considering eliminating lower-order non-triplen harmonics for elimination. The corresponding harmonics profiles are given in Fig. 10. The harmonics profiles shows that the targeted harmonic order are absent in the output voltage waveform. The voltage and current waveform for resistive and resistive-inductive load is shown in Fig. 11(a) and Fig. 11(b) for M = 0.80 and M = 0.82, respectively. The corresponding harmonics profiles for output voltage are shown in Fig. 11(c) and Fig. 11(d), respectively. The targeted harmonics for elimination are absent in the harmonics profile. Thus, the experimental results exhibit that the harmonics elimination's hardware results are in agreement with the computational results.

VII. CONCLUSION
A novel fast convergent homotopy perturbation method was proposed in this paper to solve the selective-harmonic elimination-based pulse width modulation problem. The generalized mathematical modeling was first established for three-level and stepped waveforms. The proposed technique have been implemented to solve the highly non-linear transcendental system of equations. The selected computed results for switching angle trajectories as a function of modulation index were given for three level and stepped waveforms for various switching angle cases. The number of iterations and computational time have been reduced drastically in the proposed technique. Different numbers of solutions were obtained as the modulation index varies and thus offers increased degree of freedom. The obtained solutions were as accurate as of the algebraic methods, which were confirmed from the output waveform's harmonic profile. Moreover, in algebraic methods, the number of switching angle computations is limited. A prototype was developed in the laboratory to validate the switching angles. An FPGA controller was used to generate the gate pulses, and the harmonic analyzer was employed to capture the harmonics profile. The dynamic performance have been shown by suddenly  He has published widely in international journals and conferences his research findings related to power electronics, variable speed drives, and renewable energy sources. He has authored/coauthored more than 450 research articles and four books and several chapters in edited books. He has supervised several large research and development projects worth more than multi-million USD. He has supervised and co-supervised several Ph.D. students. His research interests include smart grid, complex energy transition, active distribution networks, electric vehicles drivetrain, sustainable development and energy security, distributed energy generation, and multiphase motor drive systems.
He He is currently working as an Assistant Professor with the Department of Electrical Engineering, AMU, where he is working on developing and modulating novel asymmetrical multilevel converters for renewable energy applications. He is also working on matrix converters when it is subjected to input side unbalancing. He has previously worked as a Senior Research Fellow for nine months and as an Assistant Professor with the Department of Electrical Engineering, from 2016 to 2019. He has also worked as a Visiting Researcher at Qatar University, in 2018. He has published various new multilevel topologies for patents and is the author of articles in IEEE TRANSACTIONS/journals and IET journals, and several international conference papers. He is also the author of two book chapters in Power Electronics Handbook (Elsevier). His research interests include ac-ac and dc-ac power converter topologies, their analysis and modulation, and their application in renewable energy systems connected to the grid or stand-alone systems.
Dr. Ali is a Life Member of SSI, India, and has delivered various lectures in national and international workshops. ABDELLAHI SIDI AHMED (Member, IEEE) received the B.Sc. degree in electrical engineering from Qatar University, Doha, Qatar, in 2015, where he is currently pursuing the master's degree. In 2015, he worked as a Research Assistant for one year in an internal-granted project related to islanding problems in micro-grids. He is a Senior Electrical Engineer at Qatari Emiri Engineering Corporations (QECE), Qatar Armed Forces. His research interests include EV-grid integration, smart grid, grid-connected DG renewable energy sources, and THD mitigation. He received the Best Student Employee Award for working as a Math Tutor and an Academic Support Advisor with the Student Learning Support Center (SLSC), Qatar University, from 2011 to 2014.