**1. Introduction**

Random pulse width modulation (RPWM) is an e ffective 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 6*k* ± 1 (*k* is the harmonic order), and has little e ffect on eliminating the resonance frequency of the loads.

**Figure 1.** Random pulse width modulation (PWM) techniques.

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–20], respectively, to reduce the harmonic power in the specific frequency range. However, the digital filter brings large computation costs in [18–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+<sup>1</sup> in [22] is complicated, and *D*n+<sup>1</sup> needs to be calculated in advance. Because *D*n+<sup>1</sup> is calculated according to the midpoint of *T*n+1, *T*n+<sup>1</sup> and *D*n+<sup>1</sup> 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*+<sup>1</sup> is simplified and the contradiction between *Tn*+<sup>1</sup> and *D*n+<sup>1</sup> 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.

#### **2. Strategy of Selective Harmonic Elimination in RPWM**

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

$$T\_{n+1} = \frac{2k - f\_0 T\_n (1 + D\_n)}{f\_0 (1 + D\_{n+1})} \tag{1}$$

**Figure 2.** The PWM pulse is located at (**a**) the center of switching cycle; (**b**) the back of switching cycle.

The *D*n+<sup>1</sup> needs to be calculated in advance to calculate *T*n+<sup>1</sup> in Equation (1). In the strategy of SPWM, the duty ratio *D* is calculated as (1+*M*sin(ω*<sup>t</sup>*))/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+<sup>1</sup> is used to calculate *D*n+1. Therefore, when *T*n+<sup>1</sup> is unknown, the duty ratio *D*n+<sup>1</sup> 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.

**Figure 3.** Topology of single-phase voltage source inverter.

The equation of the *n*th 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+<sup>1</sup> are the starting and ending time of the *n*th 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.

$$\mathbf{g\_n}(t) = \begin{cases} A & t\_\mathbf{n} + (1 - D\_\mathbf{n})T\_\mathbf{n} \le t < t\_{\mathbf{n}+1} \\ 0 & \text{otherwise} \end{cases} \tag{2}$$

$$\mathbf{g}(\mathbf{t}) = \lim\_{N \to \infty} \sum\_{n=1}^{N} \mathbf{g}\_n(t) \tag{3}$$

$$G(f) = \int\_{-\infty}^{\infty} g(t)e^{-j\omega t}dt = \int\_{-\infty}^{\infty} g(t)\cos(\omega t)dt - j\int\_{-\infty}^{\infty} g(t)\sin(\omega t)dt\tag{4}$$

$$c(f\_0) = \int\_{-\infty}^{\infty} g(t) \sin(2\pi f\_0 t + \varphi) dt\tag{5}$$

#### **3. Strategy for Novel RPWM Selective Harmonic Elimination**

#### *3.1. Calculation for Switching Cycle*

Insert Equations (2) and (3) in Equation (5) for calculating Equation (6).

$$\text{tr}(f\mathfrak{g}) = \lim\_{N \to \infty} \sum\_{m=1}^{N} \left( \int\_{\mathfrak{m} + (1 - D\_{\mathfrak{m}})T\_{m}}^{\mathfrak{d}} A \sin(2\pi f\_{0}t + \mathfrak{q})dt \right) = \frac{A}{2\pi f\_{0}} \sum\_{m=1}^{\mathfrak{q}\mathfrak{q}} \left( \cos[2\pi f\_{0} \left[t\_{m} + (1 - D\_{\mathfrak{m}})T\_{m}\right] + \mathfrak{q}] - \cos(2\pi f\_{0}t\_{m+1} + \mathfrak{q}) \right) \tag{6}$$

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 *n*th term is removed with the second summation of the (*n*+*e*)th term. The first summation of the (*n*<sup>+</sup>1)th term is removed with the second summation of the (*n*+*e*<sup>+</sup>1)th term, etc. The second idea is that the second summation of the *n*th term is removed with the first summation of the (*n*+*e*)th term. The second summation of the (*n*<sup>+</sup>1)th term is removed with the (*n*+*e*<sup>+</sup>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.

$$\cos\{2\pi f\_0[t\_n + (1 - D\_n)T\_n] + \varphi\} - \cos(2\pi f\_0 t\_{n+\varepsilon+1} + \varphi) = 0\tag{7}$$

$$2\pi f\_0 t\_{n+\varepsilon+1} + \varphi = 2\pi f\_0 [t\_n + (1 - D\_n)T\_n] + \varphi + 2k\pi \tag{8}$$

$$T\_n = \frac{1}{1 - D\_n} \left( \sum\_{m=n}^{n+\varepsilon} T\_m - \frac{k}{f\_0} \right) \tag{9}$$

$$T\_{n+1} = \frac{k}{f\_0} - D\_n T\_n \ (e = 1) \tag{10}$$

$$T\_{n+2} = \frac{k}{f\_0} - D\_n T\_n - T\_{n+1} \text{ ( $\varepsilon = 2$ )}\tag{11}$$

The comparison between Equation (10) and Equation (1) shows that the calculation of *Tn*+<sup>1</sup> with the method in this paper is simpler than the method in [22]. In addition, there is no need to calculate *Dn*+1. Thereby, the contradiction between *Tn*+<sup>1</sup> and *Dn*+<sup>1</sup> is solved and it is conducive to practical application.

#### *3.2. Random Number k and Its Corresponding Extreme Value of Switching Frequency*

The following Equations ((12) and (13)) for *kmax* and *kmin* are given by using Equation (10) if those conditions (*f* 0, *Dmax*, *Dmin*, *fma*, and *fmin* ) are given, where *kmax* and *kmin* are the maximum and minimum values of random number *k. Dmax* and *Dmin* are the maximum and minimum values of the duty ratio. *Fmax* and *fmin* are the maximum and minimum values of the instantaneous switching frequency of the inverter, which are usually preset.

$$k\_{\text{max}} \le \frac{f\_0 (1 + D\_{\text{max}})}{f\_{\text{min}}} \tag{12}$$

$$k\_{\rm min} \ge \frac{f\_0 (1 + D\_{\rm min})}{f\_{\rm max}} \tag{13}$$

Generally, there are many numbers for *k* that satisfy Equations (12) and (13), and the general formulas for *fkmax* and *fkmin* corresponding to each *k* are shown in Equations (14) and (15), where *fkmax* and *fkmin* 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*.

$$f\_{\text{kmax}} = \frac{1}{\frac{k}{f\_0} - \frac{D\_{\text{max}}}{f\_{\text{min}}}} \tag{14}$$

$$f\_{k\text{min}} = \frac{1}{\frac{k}{f\_0} - \frac{D\_{\text{min}}}{f\_{\text{max}}}} \tag{15}$$

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 +∞.

#### *3.3. Calculation Process for Selective Harmonic Cancellation*

As shown in Figure 4, the frequency to be eliminated (*f* 0) 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*+<sup>1</sup> 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 *f* 0 in RPWM.

**Figure 4.** Flow chart of switching cycle calculation.

#### **4. Simulation and Experiment**

#### *4.1. 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.

**Figure 5.** Experimental system.


**Table 1.** System parameters.

#### *4.2. 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.

**Figure 6.** Simulated waveforms of voltage power spectral density (PSD). (**a**) Fixed switching frequency; (**b**) Traditional RPWM; and proposed method when *f* 0 = 7 kHz (**c**) *M* = 0.9; (**d**) *M* = 0.7; (**e**) *M* = 0.5.

Figure 7 is the simulation waveforms for the output voltage and current of the single-phase VSI when *M* is 0.9 and *f* 0 is 7 kHz. The enlarged waveforms of Figure 7 are shown in Figure 8.

**Figure 7.** Simulated waveforms of single-phase inverter (**a**) voltage; (**b**) current.

**Figure 8.** Enlarged waveform of Figure 7.

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.

**Figure 9.** Experimental waveforms of PSD when *M* is 0.9. (**a**) The PSD of voltage when *f* 0 is 7 kHz; (**b**) the PSD of voltage when *f* 0 is 9 kHz; (**c**) the PSD of current when *f* 0 is 7 kHz; (**d**) the PSD of current when *f* 0 is 9 kHz.

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.

**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.

**Figure 11.** Experimental waveforms of single-phase inverter (**a**) voltage; (**b**) current.

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.

**Figure 12.** Enlarged waveform of Figure 11.
