An Approach to Natural Sampling Using a Digital Sampling Technique for SPWM Multilevel Inverter Modulation

: This paper introduces an approach that applies a digital sampling technique for a sinusoidal pulse width modulation (SPWM) multilevel inverter modulation that reduces the total harmonic contents in the output voltage compared to that of classical regular sampling techniques. This new modulation emulates with a high degree of ﬁdelity a natural sampling pulse width modulation (PWM). The theoretical analysis of this new digital technique compared with natural sampling has been validated by simulations and through experiments with a built prototype that performed ﬁve–level inverter modulations with vertically displaced carriers in phase disposition. Both simulation and experimental results generate a SPWM output voltage with higher ﬁdelity than classic regular sampling techniques, allowing a reduction of the ﬁltering demands on the inverter output, which in turn can decrease the converter size and its manufacturing costs. As the presented technique is digital, the resulting modulation is more robust against switching noise, jitter, and other system perturbations and the modulation parameters can be changed easily, even in an automated way. For this reason, the modulation introduced here can be a useful tool to perform spectral analysis for different multilevel modulations and systems. software, M.M.-R.; validation, H.V.-B., M.M.-R., and C.R.; formal analysis, H.V.-B., M.M.-R., and C.R.; investigation, H.V.-B. and M.M.-R.; resources, H.V.-B., M.M.-R., and C.R.; data curation, M.M.-R.; writing—original draft preparation, H.V.-B., M.M.-R., and C.R.; writing—review and editing, H.V.-B., M.M.-R., M.R., and C.R.; visualization, H.V.-B., M.M.-R., M.R., and C.R.; supervision, H.V.-B.; project administration, H.V.-B.; funding acquisition, H.V.-B.


Introduction
A multilevel inverter (MI) is a power converter with switching components that enables diverse input voltages to be combined to generate a sinusoidal output waveform. The MIs that are most frequently cited in the literature are characterized by lower harmonic distortion and conduction losses than classic two-level inverters supplied at the same input voltage. Furthermore, the harmonic reduction is aligned with switching frequency reduction [1][2][3].
Several examples found in the literature demonstrate that the study about new topologies, new modulation and control techniques, as well applications are the focus of research nowadays [4,5]. Among recent multilevel topologies, a Hybrid Single T-Type Double H-Bridge Multilevel Inverter (STDH-MLI) has been proposed and produces 15 levels at the output using three DC voltage sources [6]. A 13-level topology is presented in Reference [1] with a reduced number of switches and DC voltage sources providing flexibility for higher voltage and power requirement based on the way the DC sources are connected. Hybrid multilevel configurations such as hybrid clamped, cascaded, flying capacitor based, and others have been also discussed and studied in Reference [4]. All these new multilevel power converter configurations have common features such as fewer switches devices, low total harmonic distortion (THD), easy circuit expansion, and better electromagnetic compatibility, among others [7][8][9]. The asymmetrical full bridge multilevel inverter (AFBMI) [10] is one type of diode-clamp MI, which is the converter under study in this work (see Figure 1). This topology is able to perform any multilevel modulation from 2 to 5 levels. When operating with 4 and 5 levels, the AFBMI converter uses less active or controllable switches than any other five-level converter and, therefore, is the most suitable to reduce conduction and switching losses. In addition, this topology can work with unbalanced power supplies, yielding a nonuniform level distribution [11]. Regarding modulation and control techniques for multilevel converters, one-cycle-control method [5], PWM strategies [12], selected harmonic elimination [13], predictive control [14], and others [15] have become the most studied strategies in the last years for several applications such as photovoltaic applications [16], wind energy conversion systems [17], active power filters [18], motor drives [19], and others [20].
This work will discuss the application of the sinusoidal pulse width modulation (SPWM) technique with AFBMI. The main contribution of this article is the discussion of several alternatives for calculating the switching instants, the analysis and a theoretical and experimental comparison of different sampling methods and the proposal of a novel sampling method [21][22][23][24].

Sampling Methods for Multilevel Converters
Vertically shifted carrier or multicarrier schemes have N − 1 carriers signals to generate N-level inverter output voltages. Also, N − 1 switching zones occur during one fundamental cycle. Carriers are organized as phase disposition (PD), phase opposition disposition (POD), alternative phase opposition disposition (APOD), and phase shift (PS) depending on their phases [25]. PD has been reported as the best method in most cases when compared against other methods, e.g., POD and APOD [26][27][28], mainly in diode clamped inverters. Nevertheless, an analysis of simulations and expressions should be complemented by an analysis of experimental data that considers the vast range of conditions in modulation techniques. Some conditions such as sampling methods [29,30], the modulation frequency ratio F C /F O (Switching frequency/Fundamental frequency), and the nonlinear characteristics of switching devices influence the resultant waveform and its spectrum. Here, we discuss the sampling methods for both the modulator signal and the carriers.
A SPWM modulating circuit can be analog or digital. In an analogical modulator, the modulating signal M a and the carriers are continuously generated and the switching moments are computed instantaneously for each active carrier within the interval [t 0 , t 0 + T C ]. The analogical method is known as natural sampling modulation. In a simple way, the carriers can be displaced by offset adjustments and their amplitudes modified in order to apply feed-forward compensation when the DC input supplies change in time. However, synchronization between the N − 1 carriers is not easily achieved because the switching frequency F C is not easy to adjust and is also susceptible to the tolerances of the oscillator. Furthermore, the carriers are susceptible to jitters. Sawtooth-shaped carriers have been used; however, symmetrical triangular carriers (standard carriers, Figure 2) are generally preferred because the ratio r i between the falling slope and the rising slope is equally distributed in time. This ratio r i of the carrier is also susceptible to tolerances, and it cannot be easily modified to different values. See Figure 3 for representations of nonstandard carriers. 0 To  In digital modulators, the carriers are produced by counters and comparators and switching moments are determined after comparing the regular sampled modulating signal. Among the diverse digital modulation techniques, both symmetrical regular sampling and asymmetrical regular sampling are well-known [31]. The first goal of a SPWM modulator is to create a waveform that contains the exact frequency component F O and amplitude M a . The second target is to reduce the harmonic components resulting from modulation. This harmonic content is not easy to verify when comparison has to be done with different criteria such as phase disposition, level distribution K, and modulation indexes M a and M f . However, in the time domain, the differences between the aforementioned criteria can be inspected by measuring the error in the switching instants X D and X U and eventually the pulse width D = X D − X U (see the red projection of natural sampling in Figure 4).

Time
Voltage + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +  Since pulse width modulation is an approach to a continuous reference using discrete DC voltage supplies, the multilevel conversion can be examined by comparing the use of natural sampling, symmetrical regular sampling, and asymmetrical regular sampling. Natural sampling occurs when the modulator signal is continuously compared with the triangular carrier. Symmetrical regular sampling occurs when the reference is sampled by M in Figure 4 at the center of the carrier (T C /2) and is held constant to be compared with the triangular carrier. Asymmetrical regular sampling handles the two samples A and B at time T C /4 and time 3 T C /4. The respective projections are seen in Figure 4. In these sampling methods, X D and X U are respectively the times of the rising and the falling slopes of the carrier. Although natural sampling implementation becomes more complicated as the levels of the inverter increase, this is the most suitable method for synthesizing a multilevel waveform with a high degree of fidelity. On the other hand, if one sample (symmetrical sampling) or two samples (asymmetrical sampling) of the reference signal are taken and a projection to the falling and rising slopes of the carrier is plotted, the switching moments can be easily computed with acceptable accuracy although the resultant harmonic contents is higher than in natural sampling.

Natural and Regular Sampling Methods for SPWM
The double Fourier series (DFS) expression is a helpful tool that can be used to validate harmonics calculations with a SPWM circuit based on the natural sampling method. Thus, the output waveform contains a spectrum that can be predetermined in advance by using a DFS expression. However, when obtaining the exact solution for switching moments, this analog modulator can encounter certain obstacles when it needs to modify the shape ratio of its carrier signals. Also, an analog modulation has disadvantages such as tolerance in passive elements and susceptibility to noise and temperature dependence. Additionally, there is no flexibility for configurations as there are for POD and APOD.
Because of its nature, a digital circuit is intended to implement regular sampling. SPWM is widely implemented digitally because this option offers low noise levels for carriers and modulator comparisons limited to the quantization error and has no temperature dependence. Also, fast configuration, in our particular case, enables the carrier slopes to be programmed. Furthermore, the digital modulator can be reconfigured to perform POD and APOD.
Digitally determined switching moments were previously implemented [29,30]. Basically, the method resampled the modulator signal using the resampling ratio rsr = F S /2F C , that is, when rsr = 4, four modulator samples were taken in one-carrier period T C . Therefore, for symmetrical sampling, the resampling ratio is rsr = 1, whereas for asymmetrical sampling, it is rsr = 2. Such carriers were standard shaped. Another precedent was the approach reported in References [32] and [33] where the curve of the sinusoidal modulating signal was assumed to be one single secant line during the carrier period; for every carrier interval, there was an elementary cell that represented the states of the inverter and their respective switching moments. On the basis of this elementary cell, a harmonic predictive model was elaborated to study in advance different PWM strategies digitally implemented later with standard carriers. In this paper, we propose an alternative method for modeling and carrying out SPWM that is as accurate and as close as possible to natural sampling methods. This method is pseudo-natural sampling and enables the harmonic contents to be predicted by modeling and then experimentally implementing SPWM using either a simulation tool or a digital control board whilst also allowing the carriers slopes to be modified.

Definition of Pseudo-Natural Sampling SPWM
We discuss the concept of pseudo-natural sampling that can be seen in Figure 4 which compares the switching instant decisions of pseudo-natural sampling with those of the previously mentioned sampling methods. The pseudo-natural sampling method is carried out by using three samples ( Figure 4): one sample at the carrier period T C midpoint, namely sample M; one sample from the left side at the falling slope interval midpoint, namely sample A; and one sample from the right side at the rising slope interval midpoint, namely sample B. The secant segments AM and MB replace the modulating signal. The pair of segments AM and the falling slope are intersected to find X DP . In the same way, the pair of segments MB and the rising slope are intersected to find X UP [21]. Table 1 shows the comparison among switching instants and duty cycles with four sampling methods, including the introduced pseudo-natural method. The switching values are delimited in the first carrier period, that is, 0 ≤ t ≤ T C < T O for a switching ratio M f = 50. Taking this example is very illustrative, since the first carrier period is in the boundary of zero-crossing and the sinusoidal reference presents a high derivative. Table 1 also demonstrated how the duty cycle D in a carrier period can have different widths and be modulated at different instants if the four sampling methods are compared among them. The differences rely on the fact that the input signal is not constant during a carrier period, especially on the boundary of zero-crossing where the high derivative property implies that any digital sampling method should synthesize the incoming modulating signal as natural sampling does. Pseudo-natural sampling method is the option that best fits replacing natural sampling by means of a digital modulator.
Tables 2-4 compare the switching moments and duty cycles of the referred four sampling methods, including our novel pseudo-natural method. The switching values are delimited in the first carrier period, that is, 0 ≤ t ≤ T C < T O for a switching ratio M f = 50. This example is very illustrative because the first carrier period is on the zero-crossing boundary and the sinusoidal reference presents a high derivative. Figure 5 shows the switching interval and switching instants obtained by four sampling techniques that correspond with the square shown in Table 2 for case (a). The duty cycles of three techniques are compared with the resultant duty cycle of natural sampling in Tables 2-4. Such comparison results in the duty cycle error presented in the middle columns of these tables. Both the switching instants and the duty cycle of each switching interval contribute to the harmonic output spectrum. Table 1 also demonstrated how the duty cycle D in a carrier period can have different widths and be modulated at different times depending on which sampling method is used.
We noted that pseudo-natural sampling produces a duty cycle that is sufficiently close to that obtained with natural sampling. This enables us to use digital hardware to implement a SPWM modulation in which an experimental output waveform has a low degrading effect on the expected spectrum.   Table 2 for case (a).   Table 3. Comparison of sampling methods in the time and frequency domains: Regular symmetrical, regular asymmetrical, and pseudo-natural against natural sampling with PD-SPWM, E = 50 V, M f = 50, M a = 0.9, and r 1 = r 2 = r 3 = r 4 = 0.5 for (a) K = 0.3, (b) K = 0.5, and (c) K = 0.8.

Reference and Carrier Waveforms
Duty Cycle Error with Respect to Natural Sampling

Experimental Prototype Description
The experimental prototype encompassed three main sections, namely the power stage circuit, the driving circuitry, and the modulation controller system, as illustrated in Figure 6. The power stage section contains the power switching components, the connection plugs for input and output voltages, and the group of reservoir capacitors to stiffen the input voltages. In the second section, the pulses calculated and created by the digital signal processor (DSP) are optically isolated and conditioned for each metal-oxide-semiconductor field-effect transistor (MOSFET). A multiple output transformer is used in order to obtain the AC supplies for seven auxiliary DC sources: one for the optical isolators and six more for each dedicated buffering circuit that transmits the pulses to their respective MOSFETs. Finally, the modulation controller system is where we implemented the pseudo-natural sampling method in a phase disposition PWM controller built into a TMS320F2812 DSP Development Kit. This kit tool is an embedded system including a hardware/software platform in which a PWM algorithm can be written, compiled, and executed as a program. In the TMS320F2812 DSP Development Kit, the configuration of output and input ports and internal hardware is flexible and the switching pulses of the asymmetric full bridge multilevel inverter can be transferred through an optically isolated driving circuit. Table 5 summarizes the binary values for each MOSFET in every switched level or status at the output of the inverter.
According to Table 5, to drive the multilevel inverter switches, three complementary pairs of driving signals are required. To take advantage of the available hardware in the DSP, the two DSP timers T0 and T1 are used. The master timer T0 is used as the carrier period generator with a fixed value of T C = 400 µs. The slave timer T1 is updated every T c seconds by means of a master timer T0 interruption. Then, T1 is refreshed by changing the values of its registers, namely "Dnhold" (XDP) and "Uphold" (XUP), according the values depicted in Figure 7.
The operating procedure is as follows. The counter starts from zero, increasing its value until the actual value of "Uphold" register is reached. At the same time, the counter value is compared with the value of the "Dnhold" register. While the counter value is bigger than the "Dnhold", the timer T1 output state is high; on the contrary, T1 state is low [21]. Due to the internal clock configuration in the DSP, the maximum count value for the "Uphold" is 30,000, which corresponds to the maximum XUP value, 400 µs. Figure 7. Generation of switching edges X DP and X UP .
As described in Section 3.2, pseudo-natural modulation requires only three samples per cycle, namely A at T c /4, M at T c /2, and finally B at 3T c /4, to be implemented. This approximation of the analog modulation (natural sampling) consists of replacing the analog modulating signal with two secant segments AM and MB. The intersection of the segment AM and the carrier falling slope gives the expression of X DP . In the same way, the intersection of segment MB and the rising slope delivers X UP . According to that, Equation (1) gives the value of both switching instants expressed in counts.
However, after several tests, some wrong frequency components on the base-band zone were detected in certain cases. It was found that the dependence of r (and 1 − r) in the denominators of Equation (1) produced overflow conditions in the DSP at some particular cases. To solve this problem, Equation (1) was rewritten to eliminate these factors from the fraction denominators, leading to Equation (2) [21]. X DP (counts) = 30,000 ( (2)

Performance of Diverse Sampling Methods
Despite our focus on PD-SPWM, as shown in Tables 2-4, we have presented in the preceding section the results of other types of modulation to demonstrate the flexibility of our DSP-based modulator. The error in pseudo-natural sampling and in both symmetrical and asymmetrical regular sampling were calculated considering the natural sampling switching instants as the correct or idieal ones. These comparisons have included different criteria such as the phase disposition, the level distribution of input DC supplies, the modulation frequency index, and the use of different carrier shape ratios. In all these scenarios, the pseudo-natural sampling has proved to be a reliable method with improved accuracy over symmetrical and asymmetrical regular samplings (see the resemblance between the theoretical and the experimental results in Table 6). Different performance figures can be used to evaluate the quality of an inverter output waveform, and normally, total harmonic distortion (THD) is a common performance figure. In case of stand-alone inverters, the harmonic content can be evaluated with the voltage THD V , whereas for grid-connected inverters, the injection of current harmonics in the grid can be quantified with THD I . A common expression to calculate THD is given in Equation (3), where V h and I h are the hth-order harmonic amplitudes and V 1 and I 1 are the amplitudes of the fundamental components, which are 50 Hz.
Nevertheless, in any modulation, the number of harmonics produced is infinite, and for practical reasons, when THD is calculated with only a limited number of harmonics N, Equation (3) gives only an approximated value of THD. An alternative proposed in Reference [34] calculates the THD value using the rms value of the voltage instead of its harmonics: where and This rms-based THD expression has also the advantage of including the THD caused by the DC component, different from Equation (4), where the DC effect in inverter THD is not considered. As has been shown throughout the paper, the pseudo-natural modulation presented here reproduces with more fidelity the switching instants X DP and X UP of a natural modulation than conventional symmetrical and asymmetrical regular modulations because, among other things, it uses three samples. The higher fidelity of this modulation guarantees that pseudo-natural modulation signal V PW M will have less THD V than the other digital modulations. The THD V value has been calculated and measured in many cases and is always far below the 5% reference code given by the European and American standards, IEC 61000 and IEEE 519-1992, respectively. Table 6. Pseudo-natural against natural sampling with PD-SPWM, E = 50 V, M f = 50, and M a = 0.9 for (a) K = 0.5 and r 1 = r 2 = r 3 = r 4 = 0.5; (b) K = 0.5 and r 1 = r 2 = r 3 = r 4 = 1; abd (c) K = 0.3,r 1 = 0.2, r 2 = 0.6, r 3 = 0.7, and r 4 = 0.4. ---As a matter of example, in Figure 8, five different modulations are presented for a given level distribution K = 0.5; a symmetrical carrier set, which is a carrier slope factor r = 0.5 for all the carriers; and four different amplitude modulation indexes from M a = 0.6 to M a = 0.9. The figure represented here is the cumulative THD V . The horizontal axis of the four graphs given in Figure 8 is the number of harmonics N that have been considered calculating THD V .

Experimental Output Waveform and Its Spectrum
Although the inverter prototype has a switching frequency of F S = 2.5 kHz with a frequency modulation index M F = 50, the inverter output low-pass filter has a corner frequency at F C = 2 kHz. For this reason, no more than 40 harmonics are considered to calculate the cumulative THD V of the inverter output voltage V PW M before the output filter effect. Beyond the switching frequency, the effect of the output filter reduces the negative effects of high-order harmonics, namely, the lateral-bands around the switching frequency and its multiples 2F S , 3F S , and so on.

Conclusions
Several modulation techniques have been reviewed to determine the sampling methods used to create the switching instants. MATLAB was used to simulate the switching times calculation. Symmetrical regular sampling and asymmetrical regular sampling have been compared with natural sampling by calculating their respective switching instants. The error of the resultant duty cycle and the error of the output harmonics with respect to the output modulation obtained by natural sampling have been presented. Pseudo-natural sampling has been introduced as a digital approach that takes advantage of digital modulator circuits and, at the same time, yields high fidelity outputs similar to that of an analog modulator. This makes the pseudo-natural modulation an interesting and reliable choice for modulating output waveforms with a high degree of fidelity and low distortion. The error in the duty cycle and the resultant output harmonic by pseudo-natural sampling is small if compared with those classical techniques.
Pseudo-natural sampling requires three samples per cycle, namely A at T c /4, M at T c /2, and finally B at 3T c /4. Although when compared to other digital modulations, symmetrical regular sampling requires a sample per cycle (M at T c /2) and asymmetrical sampling requires two (A at T c /4, and B at 3T c /4), the fidelity emulating the analog natural sampling is clearly superior, as shown in the experimental results of this paper, with little additional computational and hardware cost, considering, for example, the enormous speed of actual sampler circuits and digital platforms.
On the other hand, substituting an analogical modulation by a digital equivalent has two main advantages. The first one is the suppression of switching noise and jitter effects that can affect the comparators of any PWM analogical modulation. The second one is the easy reconfiguration of the modulation parameters and the repeatability of the experiments. These two issues are especially important if a spectral study of a multilevel modulation for spectral optimization purposes must be carried out. In a multilevel modulation, the amplitude modulation index as well as the carrier frequencies, amplitudes, and slopes have a direct impact on the inverter output spectrum. The possibility of having a digital modulation practically equivalent to a analog one but with all its parameters easily changeable, even in an automated way, not only represents a good tool to carry the spectral analysis but also can be used by itself to simplify the realization of the multilevel inverters modulators, making them more robust to switching noise and other perturbations.
The modulation research has been applied to the AFBMI converter presented in this paper. This circuit topology has the smallest number of switching devices for five-level modulation and as a suitable alternative for carrying out the experimental verification of SPWM using pseudo-natural sampling. The experimental results confirm the feasibility and good performance of pseudo-natural sampling. Among all the common advantages of multilevel modulation, there is the possibility of making high-power and high-voltage inverters for traction applications. Here, using low switching frequency devices (2.5 kHz to 5 kHz) like the insulated-gate bipolar transistors (IGBT's) becomes mandatory, the lateral bands of a sinusoidal modulation become very near to the main component at 50-60 Hz, and then a clean output spectrum modulation is desirable to simplify the inverter output filter design.
In this context, the modification of carrier slopes or nonstandard carriers opens up the possibility of research into alternatives in which the set of carrier slopes can be reconfigured or programmed in order to reduce the harmonic components. Frequency modulation indexes that define the integer number of switching intervals of the AFBMI modulation, M f = F C /F O L max , L min For an active carrier, the adjacent levels when L min < V O (t) < L max t rise Rise time in a carrier signal r i Carrier shape ratio of a triangular carrier, where r i = t rise /T C r 1 , r 2 , r 3 , r 4 Set of shape ratios in a five level inverter rms Root mean square THD Total harmonic distortion