A Novel RPWN Selective Harmonic Elimination Method for Single-Phase Inverter

In the existing random pule width modulation (RPWM) selective harmonic elimination methods, the formula of switching cycle TN+1 is complex, and the duty ratio DN+1 of the next switching cycle needs to be calculated in advance. However, in the case of unknown TN+1, DN+1 is also difficult to calculate accurately, and the two parameters are based on each other. A novel selective harmonic elimination method in RPWM is proposed in this paper. The PWM voltage pulse is placed at the back of the switch cycle, which simplifies the formula of the switch cycle TN+1 and eliminates the need to calculate the duty ratio DN+1. Two kinds of RPWM selective harmonic elimination ideas are summarized. The general formulas of the switch cycle, the effective random number k, and the upper and lower limits of switch frequency corresponding to k are derived. The spectrum shaping of inverter output voltage can be realized without using digital filter in this method. Simple algorithm, small calculation and easy implementation are characteristics of the proposed method. The simulation and experimental results confirm the ability of the proposed method for reducing harmonics at the specific frequency in power spectral density (PSD).


Introduction
Random pulse width modulation (RPWM) is an effective method to suppress the electromagnetic interference (EMI) and the electromagnetic vibration and noise of the load [1]. As shown in Figure 1, RPWM can mainly be classified as 1) random switching frequency pulse width modulation (PWM) [2], 2) random pulse position PWM, 3) random switching PWM [3], 4) or hybrid random PWM [4]. According to the randomness of the pulse position, it can be divided into random lead-lag [5], random zero vector [6], random pulse center displacement [7], random pulse position [8], random phase-shifted PWM [9], variable delay random PWM [10], asymmetric carrier random PWM [11], single random pulse position [12], and fractal space vector modulation [13]. However, the traditional RPWM cannot suppress specific harmonics selectively, such as the resonance frequency of motors and other loads. The commonly used selective harmonic elimination pulse width modulation (SHEPWM) [14,15] can eliminate specific harmonics, but it is mainly aimed at low-order harmonics such as 6k ± 1 (k is the harmonic order), and has little effect on eliminating the resonance frequency of the loads. In order to shape the noise spectrum of the inverter output voltage, the method of random modulation for selectively reducing the noise power at one or more frequencies was proposed in [16], but this method led to an increase in the peak of power spectral density. The literature [17] can also reduce the noise power at a specific frequency, but with this method, the switching frequency of the inverter must be less than the resonance frequency. When the resonance frequency is low, the switching frequency of the inverter will be over low. The low-pass filters and band-pass filters are used in [18][19][20], respectively, to reduce the harmonic power in the specific frequency range. However, the digital filter brings large computation costs in [18][19][20], and the harmonics in the specific frequency range are avoided, increasing rather than being completely eliminated in the random spreadspectrum. In other words, the harmonic content in the specific frequency range is just not increased compared with the original.
In RPWM selective harmonic elimination method, the specific harmonics can be eliminated by canceling each other with the preceding and succeeding terms in the Fourier series of the output voltage for the inverter. Theoretically, the specific harmonics can be completely eliminated by this method, which is mainly aimed at high-order harmonics such as 7 kHz, 9 kHz, etc. In [21], only harmonics whose frequencies are larger than 20 kHz can be eliminated. However, there is little practical value for the reason that the resonant frequency of the load is mostly lower than 20 kHz. The problem in [21] was solved by the method in [22], and the harmonics whose frequencies are lower than 10 kHz can be eliminated. However, the calculation of Tn+1 in [22] is complicated, and Dn+1 needs to be calculated in advance. Because Dn+1 is calculated according to the midpoint of Tn+1, Tn+1 and Dn+1 are based on each other. In addition, the general formulas of the random number k and its corresponding switching frequency extreme value are not given in [22].
A novel RPWM selective harmonic elimination method for single-phase voltage source inverters (VSI) is proposed. In this method, the PWM pulse is placed at the back of the switching cycle. The calculation of switching cycle Tn+1 is simplified and the contradiction between Tn+1 and Dn+1 is solved. The general formulas of switching cycle and the random number k and its corresponding switching frequency extreme value are also given. The noise of the specific frequency and its multiples can be selectively reduced in this method while realizing the function of traditional RPWM.

Strategy of Selective Harmonic Elimination in RPWM
The calculation of the switching cycle Tn+1 is very significant in the RPWM selective harmonic elimination method. The formula for Tn+1 and its corresponding pulse position in [22] are shown in Equation (1) and Figure 2a, where Dn and Dn+1 are the duty ratios of the nth and (n+1)th switching cycles, k is the random number, f0 is the frequency to be eliminated, and Tn is the nth switching cycle.
( ) The Dn+1 needs to be calculated in advance to calculate Tn+1 in Equation (1). In the strategy of SPWM, the duty ratio D is calculated as (1+Msin(ωt))/2, where M is the modulation ratio. The value of ωt is calculated according to the time of the midpoint in each switching cycle. Namely, the time of In order to shape the noise spectrum of the inverter output voltage, the method of random modulation for selectively reducing the noise power at one or more frequencies was proposed in [16], but this method led to an increase in the peak of power spectral density. The literature [17] can also reduce the noise power at a specific frequency, but with this method, the switching frequency of the inverter must be less than the resonance frequency. When the resonance frequency is low, the switching frequency of the inverter will be over low. The low-pass filters and band-pass filters are used in [18][19][20], respectively, to reduce the harmonic power in the specific frequency range. However, the digital filter brings large computation costs in [18][19][20], and the harmonics in the specific frequency range are avoided, increasing rather than being completely eliminated in the random spread-spectrum. In other words, the harmonic content in the specific frequency range is just not increased compared with the original.
In RPWM selective harmonic elimination method, the specific harmonics can be eliminated by canceling each other with the preceding and succeeding terms in the Fourier series of the output voltage for the inverter. Theoretically, the specific harmonics can be completely eliminated by this method, which is mainly aimed at high-order harmonics such as 7 kHz, 9 kHz, etc. In [21], only harmonics whose frequencies are larger than 20 kHz can be eliminated. However, there is little practical value for the reason that the resonant frequency of the load is mostly lower than 20 kHz. The problem in [21] was solved by the method in [22], and the harmonics whose frequencies are lower than 10 kHz can be eliminated. However, the calculation of T n+1 in [22] is complicated, and D n+1 needs to be calculated in advance. Because D n+1 is calculated according to the midpoint of T n+1 , T n+1 and D n+1 are based on each other. In addition, the general formulas of the random number k and its corresponding switching frequency extreme value are not given in [22].
A novel RPWM selective harmonic elimination method for single-phase voltage source inverters (VSI) is proposed. In this method, the PWM pulse is placed at the back of the switching cycle. The calculation of switching cycle T n+1 is simplified and the contradiction between T n+1 and D n+1 is solved. The general formulas of switching cycle and the random number k and its corresponding switching frequency extreme value are also given. The noise of the specific frequency and its multiples can be selectively reduced in this method while realizing the function of traditional RPWM.

Strategy of Selective Harmonic Elimination in RPWM
The calculation of the switching cycle T n+1 is very significant in the RPWM selective harmonic elimination method. The formula for T n+1 and its corresponding pulse position in [22] are shown in Equation (1) and Figure 2a, where D n and D n+1 are the duty ratios of the nth and (n+1)th switching cycles, k is the random number, f 0 is the frequency to be eliminated, and T n is the nth switching cycle.

of 10
As shown in Figure 2b, the PWM pulse is located at the back of the switching cycle in this paper. This sequence pulse can be regarded as the sum of the output voltage uAB and the DC-link voltage Vdc in single-phase VSI, as shown in Figure 3. If there are not the specific harmonics in the sequence pulse spectrum, there are not those harmonics in the output voltage uAB spectrum of single-phase VSI, either.   [15,16]. If c(f0) at the frequency to be eliminated is zero for any φ, the result in Equation (4) will also be zero. That is, selective harmonic elimination is realized in the spectrum of the sequence pulse. n n n n + 1 n

Calculation for Switching Cycle
Insert Equations (2) and (3) in Equation (5) for calculating Equation (6). The D n+1 needs to be calculated in advance to calculate T n+1 in Equation (1). In the strategy of SPWM, the duty ratio D is calculated as (1+Msin(ωt))/2, where M is the modulation ratio. The value of ωt is calculated according to the time of the midpoint in each switching cycle. Namely, the time of the midpoint in T n+1 is used to calculate D n+1. Therefore, when T n+1 is unknown, the duty ratio D n+1 cannot be calculated. Moreover, Equation (1) is complex and there are many parameters in it.
As shown in Figure 2b, the PWM pulse is located at the back of the switching cycle in this paper. This sequence pulse can be regarded as the sum of the output voltage u AB and the DC-link voltage V dc in single-phase VSI, as shown in Figure 3. If there are not the specific harmonics in the sequence pulse spectrum, there are not those harmonics in the output voltage u AB spectrum of single-phase VSI, either.
Electronics 2020, 9, x FOR PEER REVIEW 3 of 10 the midpoint in Tn+1 is used to calculate Dn+1. Therefore, when Tn+1 is unknown, the duty ratio Dn+1 cannot be calculated. Moreover, Equation (1) is complex and there are many parameters in it. As shown in Figure 2b, the PWM pulse is located at the back of the switching cycle in this paper. This sequence pulse can be regarded as the sum of the output voltage uAB and the DC-link voltage Vdc in single-phase VSI, as shown in Figure 3. If there are not the specific harmonics in the sequence pulse spectrum, there are not those harmonics in the output voltage uAB spectrum of single-phase VSI, either.  The equation of the nth cycle of the sequence pulse is shown in Equation (2), where A is high value of output voltage and the equation of the sequence pulse is shown in Equation (3), where tn and tn+1 are the starting and ending time of the nth switching cycle. The Fourier transform of Equation (3) is given at Equation (4). The real and imaginary parts in Equation (4) are special cases of Equation (5) [15,16]. If c(f0) at the frequency to be eliminated is zero for any φ, the result in Equation (4) will also be zero. That is, selective harmonic elimination is realized in the spectrum of the sequence pulse. n n n n + 1 n

Calculation for Switching Cycle
Insert Equations (2) and (3) in Equation (5) for calculating Equation (6). The equation of the nth cycle of the sequence pulse is shown in Equation (2), where A is high value of output voltage and the equation of the sequence pulse is shown in Equation (3), where t n and t n+1 are the starting and ending time of the nth switching cycle. The Fourier transform of Equation (3) is given at Equation (4). The real and imaginary parts in Equation (4) are special cases of Equation (5) [15,16].
If c(f 0 ) at the frequency to be eliminated is zero for any ϕ, the result in Equation (4) will also be zero. That is, selective harmonic elimination is realized in the spectrum of the sequence pulse.
Two RPWM selective harmonic elimination ideas can be summarized on the basis of Equation (6). The first idea is that the first summation of the nth term is removed with the second summation of the (n+e)th term. The first summation of the (n+1)th term is removed with the second summation of the (n+e+1)th term, etc. The second idea is that the second summation of the nth term is removed with the first summation of the (n+e)th term. The second summation of the (n+1)th term is removed with the (n+e+1)th term of the first summation, etc. The following Equations (7)-(11) are given when e is equal to 1 and 2 according to the first idea, where e is a positive number.
The comparison between Equation (10) and Equation (1) shows that the calculation of T n+1 with the method in this paper is simpler than the method in [22]. In addition, there is no need to calculate D n+1 . Thereby, the contradiction between T n+1 and D n+1 is solved and it is conducive to practical application.

Random Number k and Its Corresponding Extreme Value of Switching Frequency
The following Equations ( (12) and (13)) for k max and k min are given by using Equation (10) if those conditions (f 0 , D max , D min , f ma , and f min ) are given, where k max and k min are the maximum and minimum values of random number k. D max and D min are the maximum and minimum values of the duty ratio. F max and f min are the maximum and minimum values of the instantaneous switching frequency of the inverter, which are usually preset.
Generally, there are many numbers for k that satisfy Equations (12) and (13), and the general formulas for f kmax and f kmin corresponding to each k are shown in Equations (14) and (15), where f kmax and f kmin are the maximum and minimum values of the switching frequencies corresponding to k. It can be seen from Equations (14) and (15) that the switching frequency of the inverter decreases with increasing k, or increases with decreasing k.
Electronics 2020, 9,489 5 of 10 It should be noted that the calculation result of Equation (14) may be negative if the k is small. It shows that the denominator can be zero without taking the extreme value of f, and the D and the maximum value of the frequency is +∞.

Calculation Process for Selective Harmonic Cancellation
As shown in Figure 4, the frequency to be eliminated (f 0 ) and the maximum value (f max ) and minimum value (f min ) of the instantaneous switching frequency are given in advance. The D max and D min are calculated according to the modulation ratio M. The range of the random number k can be acquired with the mentioned conditions inserted in Equations (12) and (13). T n+1 can be calculated with T n and D n inserted in Equation (10) when k is selected. Based on the above conditions, the PWM drive signals are generated by assigning a value to the comparison register in DSP TMS320F2812 to eliminate the harmonics at the specific frequency f 0 in RPWM. It should be noted that the calculation result of Equation (14) may be negative if the k is small. It shows that the denominator can be zero without taking the extreme value of f, and the D and the maximum value of the frequency is +∞.

Calculation Process for Selective Harmonic Cancellation
As shown in Figure 4, the frequency to be eliminated (f0) and the maximum value (fmax) and minimum value (fmin) of the instantaneous switching frequency are given in advance. The Dmax and Dmin are calculated according to the modulation ratio M. The range of the random number k can be acquired with the mentioned conditions inserted in Equations (12) and (13). Tn+1 can be calculated with Tn and Dn inserted in Equation (10) when k is selected. Based on the above conditions, the PWM drive signals are generated by assigning a value to the comparison register in DSP TMS320F2812 to eliminate the harmonics at the specific frequency f0 in RPWM.

Parameters of System
The experimental system is shown in Figure 5. The parameters of the simulation and experimental system are shown in Table 1. The power electronic component in the inverter is IGBT. The driving circuit adopts IGBT-integrated driving module DA962D and the system main control chip adopts 32-bit DSP TMS320F2812. The dead time of inverter is 4.27 μs. In the experiment, the oscilloscope is DS1052E and the power quality analyzer is HIOKI PW3198.

Parameters of System
The experimental system is shown in Figure 5. The parameters of the simulation and experimental system are shown in Table 1. The power electronic component in the inverter is IGBT. The driving circuit adopts IGBT-integrated driving module DA962D and the system main control chip adopts 32-bit DSP TMS320F2812. The dead time of inverter is 4.27 µs. In the experiment, the oscilloscope is DS1052E and the power quality analyzer is HIOKI PW3198. It should be noted that the calculation result of Equation (14) may be negative if the k is small. It shows that the denominator can be zero without taking the extreme value of f, and the D and the maximum value of the frequency is +∞.

Calculation Process for Selective Harmonic Cancellation
As shown in Figure 4, the frequency to be eliminated (f0) and the maximum value (fmax) and minimum value (fmin) of the instantaneous switching frequency are given in advance. The Dmax and Dmin are calculated according to the modulation ratio M. The range of the random number k can be acquired with the mentioned conditions inserted in Equations (12) and (13). Tn+1 can be calculated with Tn and Dn inserted in Equation (10) when k is selected. Based on the above conditions, the PWM drive signals are generated by assigning a value to the comparison register in DSP TMS320F2812 to eliminate the harmonics at the specific frequency f0 in RPWM.

Parameters of System
The experimental system is shown in Figure 5. The parameters of the simulation and experimental system are shown in Table 1. The power electronic component in the inverter is IGBT. The driving circuit adopts IGBT-integrated driving module DA962D and the system main control chip adopts 32-bit DSP TMS320F2812. The dead time of inverter is 4.27 μs. In the experiment, the oscilloscope is DS1052E and the power quality analyzer is HIOKI PW3198.

Results and Analysis
The simulation waveforms of output voltage power spectral density (PSD) for single-phase VSI are shown in Figure 6. The traditional SPWM of fixed switching frequency (3 kHz) is adopted in Figure 6a. As seen from Figure 6a, the harmonics are mainly concentrated near 3 kHz and its multiples. Compared with the fixed switching frequency SPWM, it can be seen from Figure 6b with traditional RPWM that there is no outstanding peak in PSD. Figure 6c-e adopt the proposed method in this paper. The frequency to be eliminated (f 0 ) is 7 kHz. The modulation ratio M is 0.9, 0.7, and 0.5, respectively. Harmonics can be distributed randomly and can be reduced greatly at f 0 and its multiples.

Results and Analysis
The simulation waveforms of output voltage power spectral density (PSD) for single-phase VSI are shown in Figure 6. The traditional SPWM of fixed switching frequency (3 kHz) is adopted in Figure 6a. As seen from Figure 6a, the harmonics are mainly concentrated near 3 kHz and its multiples. Compared with the fixed switching frequency SPWM, it can be seen from Figure 6b with traditional RPWM that there is no outstanding peak in PSD. Figure 6c-e adopt the proposed method in this paper. The frequency to be eliminated (f0) is 7 kHz. The modulation ratio M is 0.9, 0.7, and 0.5, respectively. Harmonics can be distributed randomly and can be reduced greatly at f0 and its multiples.

Results and Analysis
The simulation waveforms of output voltage power spectral density (PSD) for single-phase VSI are shown in Figure 6. The traditional SPWM of fixed switching frequency (3 kHz) is adopted in Figure 6a. As seen from Figure 6a, the harmonics are mainly concentrated near 3 kHz and its multiples. Compared with the fixed switching frequency SPWM, it can be seen from Figure 6b with traditional RPWM that there is no outstanding peak in PSD. Figure 6c-e adopt the proposed method in this paper. The frequency to be eliminated (f0) is 7 kHz. The modulation ratio M is 0.9, 0.7, and 0.5, respectively. Harmonics can be distributed randomly and can be reduced greatly at f0 and its multiples.      The experimental waveforms of output voltage and current PSD for single-phase VSI are shown in Figure 9. It can be seen that the harmonics near f0 and its multiples are significantly reduced when f0 is taken at 7 kHz and 9 kHz, respectively. The experimental results are basically consistent with the simulation results. As seen from the waveforms in Figure 6 and Figure 9, there are obvious gaps in the range of several hundred hertz around f0 and its multiples. The reason is that the frequencies close to f0 will also be reduced when the harmonic at f0 is completely eliminated. Moreover, the closer it is to f0, the more it is reduced. The influence of system error can be overcome by this characteristic. Thus, the correctness of proposed method is proved by simulation and experimental results. The distributions of switching frequencies for two set numbers (k and k1) when f0 is 7 kHz and M is 0.9 are shown in Figure 10. All set random numbers k = 1, 2, 3, 4, 5, 6, 7, 8, 9 and smaller set numbers k1 = 1, 2, 3, 4 for single-phase inverter are used for proposed method when switching frequencies are selected to eliminate harmonic at 7 kHz. In Figure 10, the switching frequencies have been selected randomly from 1.5 kHz to 8 kHz and the average switching frequency is equal to 2894 Hz (solid line). The distribution of switching frequencies gradually decreases and the randomness is good. By using k1, the average switching frequency is increased to 3723 Hz (dot line). It can be known from Equations The experimental waveforms of output voltage and current PSD for single-phase VSI are shown in Figure 9. It can be seen that the harmonics near f 0 and its multiples are significantly reduced when f 0 is taken at 7 kHz and 9 kHz, respectively. The experimental results are basically consistent with the simulation results. As seen from the waveforms in Figures 6 and 9, there are obvious gaps in the range of several hundred hertz around f 0 and its multiples. The reason is that the frequencies close to f 0 will also be reduced when the harmonic at f 0 is completely eliminated. Moreover, the closer it is to f 0 , the more it is reduced. The influence of system error can be overcome by this characteristic. Thus, the correctness of proposed method is proved by simulation and experimental results. The experimental waveforms of output voltage and current PSD for single-phase VSI are shown in Figure 9. It can be seen that the harmonics near f0 and its multiples are significantly reduced when f0 is taken at 7 kHz and 9 kHz, respectively. The experimental results are basically consistent with the simulation results. As seen from the waveforms in Figure 6 and Figure 9, there are obvious gaps in the range of several hundred hertz around f0 and its multiples. The reason is that the frequencies close to f0 will also be reduced when the harmonic at f0 is completely eliminated. Moreover, the closer it is to f0, the more it is reduced. The influence of system error can be overcome by this characteristic. Thus, the correctness of proposed method is proved by simulation and experimental results. The distributions of switching frequencies for two set numbers (k and k1) when f0 is 7 kHz and M is 0.9 are shown in Figure 10. All set random numbers k = 1, 2, 3, 4, 5, 6, 7, 8, 9 and smaller set numbers k1 = 1, 2, 3, 4 for single-phase inverter are used for proposed method when switching frequencies are selected to eliminate harmonic at 7 kHz. In Figure 10, the switching frequencies have been selected randomly from 1.5 kHz to 8 kHz and the average switching frequency is equal to 2894 Hz (solid line). The distribution of switching frequencies gradually decreases and the randomness is good. By using k1, the average switching frequency is increased to 3723 Hz (dot line). It can be known from Equations The distributions of switching frequencies for two set numbers (k and k 1 ) when f 0 is 7 kHz and M is 0.9 are shown in Figure 10. All set random numbers k = 1, 2, 3, 4, 5, 6, 7, 8, 9 and smaller set numbers k 1 = 1, 2, 3, 4 for single-phase inverter are used for proposed method when switching frequencies are selected to eliminate harmonic at 7 kHz. In Figure 10, the switching frequencies have been selected randomly from 1.5 kHz to 8 kHz and the average switching frequency is equal to 2894 Hz (solid line). The distribution of switching frequencies gradually decreases and the randomness is good. By using k 1 , the average switching frequency is increased to 3723 Hz (dot line). It can be known from Equations (14) and (15) that the random number k is inversely proportional to f kmax and f kmin . The average switching frequency can be increased by using smaller k when the average switching frequency is low to prevent the increase of current ripples. The average switching frequency can be reduced by using larger k when the average switching frequency is high. In addition, the larger f 0 is, the more k can be selected.
Electronics 2020, 9, x FOR PEER REVIEW 8 of 10 (14) and (15) that the random number k is inversely proportional to fkmax and fkmin. The average switching frequency can be increased by using smaller k when the average switching frequency is low to prevent the increase of current ripples. The average switching frequency can be reduced by using larger k when the average switching frequency is high. In addition, the larger f0 is, the more k can be selected. M=0.9 f 0 =7k Hz Figure 10. Distribution of switching frequencies by using the set numbers of k and k1. Figure 11 is the experimental waveforms for the output voltage and current of the single-phase VSI when M is 0.9 and f0 is 7 kHz. As can be seen from Figure 11, the voltage pulse width varies randomly in each switching cycle affected by k and D. The current waveform of the inverter is sinusoidal. The enlarged waveforms of Figure 11 are shown in Figure 12. With other cases unchanged, the larger the switching cycle is, the larger the current ripples are.

Conclusions
In this paper, a novel RPWM selective harmonic elimination method for single-phase VSI is proposed. A new pulse position which is placed at the back of the switching cycle is provided for RPWM selective harmonic elimination method. By using that, it can remove harmonics with certain frequency from output voltage and current. In fact, this has been done using switching cycle determination by switching cycles in the previous cycle and duty ratio. Compared with the fixed Figure 10. Distribution of switching frequencies by using the set numbers of k and k 1. Figure 11 is the experimental waveforms for the output voltage and current of the single-phase VSI when M is 0.9 and f 0 is 7 kHz. As can be seen from Figure 11, the voltage pulse width varies randomly in each switching cycle affected by k and D. The current waveform of the inverter is sinusoidal.
Electronics 2020, 9, x FOR PEER REVIEW 8 of 10 (14) and (15) that the random number k is inversely proportional to fkmax and fkmin. The average switching frequency can be increased by using smaller k when the average switching frequency is low to prevent the increase of current ripples. The average switching frequency can be reduced by using larger k when the average switching frequency is high. In addition, the larger f0 is, the more k can be selected. M=0.9 f 0 =7k Hz Figure 10. Distribution of switching frequencies by using the set numbers of k and k1. Figure 11 is the experimental waveforms for the output voltage and current of the single-phase VSI when M is 0.9 and f0 is 7 kHz. As can be seen from Figure 11, the voltage pulse width varies randomly in each switching cycle affected by k and D. The current waveform of the inverter is sinusoidal. The enlarged waveforms of Figure 11 are shown in Figure 12. With other cases unchanged, the larger the switching cycle is, the larger the current ripples are.

Conclusions
In this paper, a novel RPWM selective harmonic elimination method for single-phase VSI is proposed. A new pulse position which is placed at the back of the switching cycle is provided for RPWM selective harmonic elimination method. By using that, it can remove harmonics with certain frequency from output voltage and current. In fact, this has been done using switching cycle determination by switching cycles in the previous cycle and duty ratio. Compared with the fixed The enlarged waveforms of Figure 11 are shown in Figure 12. With other cases unchanged, the larger the switching cycle is, the larger the current ripples are.
Electronics 2020, 9, x FOR PEER REVIEW 8 of 10 (14) and (15) that the random number k is inversely proportional to fkmax and fkmin. The average switching frequency can be increased by using smaller k when the average switching frequency is low to prevent the increase of current ripples. The average switching frequency can be reduced by using larger k when the average switching frequency is high. In addition, the larger f0 is, the more k can be selected. M=0.9 f 0 =7k Hz Figure 10. Distribution of switching frequencies by using the set numbers of k and k1. Figure 11 is the experimental waveforms for the output voltage and current of the single-phase VSI when M is 0.9 and f0 is 7 kHz. As can be seen from Figure 11, the voltage pulse width varies randomly in each switching cycle affected by k and D. The current waveform of the inverter is sinusoidal. The enlarged waveforms of Figure 11 are shown in Figure 12. With other cases unchanged, the larger the switching cycle is, the larger the current ripples are.

Conclusions
In this paper, a novel RPWM selective harmonic elimination method for single-phase VSI is proposed. A new pulse position which is placed at the back of the switching cycle is provided for RPWM selective harmonic elimination method. By using that, it can remove harmonics with certain frequency from output voltage and current. In fact, this has been done using switching cycle determination by switching cycles in the previous cycle and duty ratio. Compared with the fixed

Conclusions
In this paper, a novel RPWM selective harmonic elimination method for single-phase VSI is proposed. A new pulse position which is placed at the back of the switching cycle is provided for RPWM selective harmonic elimination method. By using that, it can remove harmonics with certain frequency from output voltage and current. In fact, this has been done using switching cycle determination by switching cycles in the previous cycle and duty ratio. Compared with the fixed switching frequency SPWM and the traditional RPWM, the harmonics can be distributed uniformly in certain frequency range, and some unwanted harmonics can be eliminated successfully with the proposed method. A new pulse position for the RPWM selective harmonic elimination method is introduced in this paper, which is beneficial to improve the randomness of RPWM. When calculating T n+1 , D n+1 does not need to be calculated first. The random arrangement of the pulse position in switching cycle is worth studying in next steps.