#### Abstract

We present an advanced design methodology for pulse-width-modulated (PWM) DC-AC signal generation. Using design methods based on the Walsh transform, AC sinusoidal signals can be approximated by suitable PWM signals. For different AC amplitudes, the switching instants of the PWM signals can be efficiently computed by using appropriate systems of explicit linear equations. However, the equation systems provided by conventional implementations of this approach are typically only valid for a restricted interval of AC amplitudes and, in general, a supervised implementation of several equation systems is necessary to cover the full AC amplitude range. Additionally, obtaining suitable equation systems for designs with a large number of switching instants requires solving a complex optimization problem. In defining the constitutive pulses of a PWM signal, a suitable partition of the time interval is used as a reference system. In the new methodology, pulses are chosen to be symmetric with respect to the partition points, and the switching times are specified by means of switching ratios with respect to the endpoint subintervals. This approach leads to particularly simple Walsh series representations, introduces a remarkable computational simplification, and achieves excellent results in reducing the harmonic distortion.

#### 1. Introduction

*Pulse-width-modulated* (PWM) signals are a class of two-value piecewise functions that change values at a set of controlled switching instants . One important field of application of PWM signals is the generation of * alternating current* (AC) from * direct current* (DC) sources by means of electronic circuits called * inverters* [1–3]. More precisely, voltage PWM inverters use suitable switching signals to produce a sinusoidal AC voltage, with the desired amplitude and frequency, from a constant DC voltage source. The structure of a voltage PWM inverter is schematically depicted in Figure 1. In the practical implementation of this approach, two important design challenges arise: (i) fast and efficient algorithms are required for adaptive real-time computation of the switching instants , and (ii) harmonic distortion must be selectively reduced to produce a high-quality AC signal.

A first attempt to deal with these design problems is provided by the method of * programmed harmonic elimination* [4–8]. This method, however, presents the serious drawback of having to solve nonlinear equation systems. Some efforts to simplify these systems have been made in [9–12], and soft computing strategies have been considered in [13–17]. Nevertheless, determining a proper initial estimate for the switching times still remains as an unsolved difficulty.

A second line of solution is based on Walsh series representations. The orthogonal systems of Walsh functions [18–20] allow to establish an elegant link between the switching times and the harmonic amplitudes of a PWM signal [21, 22]. By taking advantage of this link, it is possible to give satisfactory responses to the design challenges: (i) systems of simple linear equations can be obtained for fast on-line computation of the switching instants for a given AC amplitude and, simultaneously, (ii) selective elimination of undesirable harmonics can be carried out.

This line of work is started in [23] and extended in [24–26], where the main elements of what we call * conventional design method* are presented. In this case, the main drawback is that the linear systems are only valid for a restricted interval of AC amplitudes and, in general, a supervised implementation of several linear systems is necessary to cover the full AC amplitude range. Moreover, obtaining suitable systems for a large number of switching instants requires solving a complex optimization problem.

The objective of this paper is to present an improved version of the conventional design method that produces linear systems valid for larger AC amplitude ranges. The new method, that we call * advanced design method*, also introduces a significant computational simplification and, moreover, presents interesting regularity patterns that make it possible to identify efficient design strategies for problems with a large number of switching instants. Some preliminary and partial results related to the improved method have been presented in [27–30].

The paper is organized as follows. In Section 2, some basic notations and fundamental theoretical elements are provided. In Section 3, the conventional design method is formulated in terms of switching ratios, and the main elements of the advanced design method are introduced. In Section 4, the problem of obtaining optimal switching strategies is discussed. Finally, conclusions are presented in Section 5.

#### 2. Theoretical Background

In this section, we provide some notations and theoretical elements that facilitate a clear presentation of the design methodologies discussed in the paper. In particular, we include a detailed discussion of Walsh series representations for signals with quarter-wave odd symmetry and their relation with the corresponding Fourier series representations.

The system of *Walsh functions* in
is a sequence of rectangular functions that alternate the values and take the value 0 at the discontinuities, which are always located at points of the form . In this work, the functions are arranged in the * increasing sequency-order*, where the index indicates the number of changes of sign. The first 16 elements of are schematically depicted in Figure 2, where the line with label corresponds to the graphic of the function , . For example, the line with label corresponds to the Walsh function , which takes the value in , the value in , and has a change of sign at . is a complete and orthogonal system in . Absolutely integrable functions in can be represented in the form of Walsh series
with
For , we obtain the system of *normalized Walsh functions *
which is a complete and orthonormal system in . Arbitrary functions can be expressed in terms of normalized functions in the form
By introducing the normalized time , the coefficients in (4) can be computed as
and a function defined in can be represented as a normalized Walsh series in the form
A signal has * quarter-wave odd* (QWO) symmetry in the interval if presents odd symmetry with respect to in the interval , and it also has even symmetry with respect to in the interval . The system of sinusoidal signals
with , and the sytem of Walsh functions
have QWO symmetry in . Signals that are absolutely integrable in , and present QWO symmetry in the interval, can be represented by a Fourier series of the form
where
Analogously, can be represented by a Walsh series of the form
where

Let us now consider the -term truncated Walsh series Clearly, has QWO symmetry and can be represented by the Fourier series with Note that, for simplicity, we have introduced the notations and in (15) and (16), respectively. By substituting (15) in (17), we obtain where Using the matrix the vector of Fourier coefficients can be easily computed from the vector of Walsh coefficients in the form It is worth to be noted that, by considering the property given in (6) and the angles a period-independent expression for the coefficients can be obtained in the form Thus, for example, to compute the element we only have to consider the nonzero values of the Walsh function in the quarter-period interval resulting The particular values corresponding to the matrix are displayed in (28)

#### 3. Design of PWM Signals for DC-AC Signal Generation

Let us consider the switching signal displayed in Figure 3, where is a constant and the values denote the switching time instants. Broadly speaking, the objective in PWM DC-AC signal generation consists in approximating a sinusoidal signal
by means of a suitable switching signal . For a given PWM signal with QWO symmetry in and Fourier representation
the * goodness of approximation* includes satisfying a three-criteria objective: (C1)*Matching the main frequency amplitude*(C2)*canceling the first ** non-fundamental harmonics*(C3)*producing a low distortion factor*

The * conventional design method* described in Section 3.1 allows to obtain systems of linear equations
which, for a given AC amplitude , make possible to compute a suitable PWM signal satisfying the design conditions (C1)–(C3). However, it must be highlighted that the linear systems provided by this approach are typically only valid for a restricted range of AC amplitudes
and, consequently, a supervised implementation of several linear systems can be necessary to cover the full sinusoidal amplitude range.

The *advanced design method*, presented in Section 3.2, introduces a clever modification in the conventional method that facilitates produceing linear systems with larger amplitude ranges. The new approach also introduces a significant computational simplification and, moreover, presents interesting regularity patterns that make it possible to identify efficient design strategies for large dimension problems.

The formulation of the conventional design method presented in this paper is based on the *switching ratios* with respect of the interval endpoint, which allow an elegant formulation of the conventional method and leads naturally to the new one.

*Remark 1. **Unipolar PWM signals*, which take the values and 0, are also used in PWM DC-AC signal generation. In this paper, the discussion will be focused on bipolar signals. A detailed account of the unipolar case can be found in [26].

*Remark 2. *Note that the relative importance of the harmonic amplitude in the distortion factor (33) decreases with the harmonic order. This is a convenient property for a wide class of practical applications, where the negative effects of the harmonics decrease with the harmonic order.

*Remark 3. *Some applications can require fast variations of the AC amplitude; consequently, the real-time computation of the PWM switching instants will demand simple and highly effective numerical procedures.

##### 3.1. Conventional Design Method

Let us assume that the interval
defines the operational range of the sinusoidal amplitude in (29). Let us also consider the signal
where is the DC amplitude, and is an amplitude-normalized PWM signal that takes the values and has QWO symmetry in . To satisfy the approximation criteria (C1) and (C2), the * conventional design method* uses PWM signals with * switching cycles* (pulses) in the quarter-wave interval . The th switching cycle starts at the * switching-down* instant , where the signal shifts from to , and ends at the * switching-up* instant , where the signal shifts back from to . The switching instants are selected according to the following rules.(R1) The quarter-wave interval is divided into intervals
where the partition points are
and is the smallest integer that satisfies
(R2) A system of indexes is chosen as
and a switching-down time is selected in each interval
(R3) The switching-up instants, , , are computed as follows:
(R4) Each interval , , can contain at most one switching time or . Using the *switching ratios* with respect to the interval endpoint
the switching-down instants can be expressed in the form
In the conventional method, the switching-up instants are independent of and can be written in terms of the step as
A PWM signal , designed according to the rules (R1)–(R4), is schematically displayed in Figure 4. In this case, we have switching cycles. The interval is divided into subintervals, with step . The switching-down indexes are and . The ratio defines the switching-down instant ; as , the corresponding switching-up instant is located at . The ratio defines . Now, and the associated switching-up instant is .

For the PWM signal , defined by the system of switching indexes and the vector of switching ratios let us consider the truncated Walsh series where is the number of subintervals in . Taking into account that the Walsh functions with are constant in the intervals and observing that it follows that the Walsh functions are constant in the interior points of the intervals defined in the rule (R1). From (14), the coefficient in (49) can be computed as where , and . Using the normalized time , we can obtain the following period-free expression for : with . By computing the integrals in (54), we get The vector of Walsh coefficients admits the matrix expression where is a matrix with elements and is a vector with elements According to the discussion in Section 2, the vector which contains the first coefficients of the Fourier series representation can be computed in the form and considering (57), we obtain with For the sinusoidal signal (29), let us consider a given AC amplitude and the system of switching indexes (41). If there exists a vector of switching ratios that satisfies with then the conditions (C1) and (C2) are satisfied by the signal where and is the amplitude-normalized PWM signal defined by the switching instants (45) and (46), corresponding to the switching ratios (65).

To illustrate the implementation of the conventional method, let us consider the problem of regulating the fundamental amplitude and canceling the first nonfundamental harmonic. In this case, and the number of subintervals in is . For the particular system of switching indexes the matrices (58) and (59) take the values and the matrix is formed by the first two rows of the matrix displayed in (28). Equation (66) produces the linear system To compute the regulation range of the system (71), we can consider the auxiliary system obtained by isolating in the different equations of the system (71), and compute the values Clearly, for any normalized amplitude satisfying a suitable system of switching ratios can be computed. For the current example, we obtain the particular values which mean that the linear system (71) allows computing a suitable PWM signal to regulate the amplitude of the fundamental frequency in the range 33.7%–94.1% of the maximum AC amplitude.

##### 3.2. Advanced Design Method

In the new approach, the design of the normalized PWM signal is carried out following the same rules (R1), (R2), and (R4) used in the conventional method, but in this case, the switching indexes satisfy and the switching-down instants are followed by the switching-up instants This new switching scheme is displayed in Figure 5, where the symmetrical arrangement of the switching instants and with respect to the interval endpoint can be clearly appreciated. The coefficients (54) of the truncated Walsh series (49) have now the form The vector of Walsh coefficients (56) admits the matrix expression (57), but now the elements of the matrix take the form and the elements of the vector are The coefficients can be easily computed by considering the matrix , with elements The th row of contains the sign sequence of the Walsh function for a homogeneous partition of the interval with step . Now, we have and the th column of can be obtained by adding the columns and of , and multiplying by . The coefficients can also be expressed in terms of the elements as and could be computed by adding the columns of . However, it is not necessary to perform this computation because (81) always produces the vector Clearly, the rest of the design procedure described in Section 3.1 and the discussion about the regulation range remain valid for the new approach.

To illustrate the implementation of the advanced method, let us consider the design problem presented in the previous section, with , and the switching indexes and . For a homogeneous partition of the interval with step , the system of Walsh functions produces the matrix of sign sequences According to (83), the matrix is and from (84), the value of is which coincides with the value indicated in (85). Finally, using (64) and (66) with the matrix introduced in the previous subsection, and the matrices and given in (88) and (89), we obtain the linear system and from the associated auxiliary system we get the modulation range This example clearly shows that the advanced design method introduces an important computational simplification. Moreover, by comparing the values in (75) and (92), it can be appreciated that the advanced method also produces significantly larger modulation ranges.

*Remark 4. *The sign sequences generated by the Walsh functions , , for a homogeneous partition of with step are coincident with the sign sequences generated by the Walsh functions , , for a homogeneous partition of with step . Considering the property (6), the matrix can be computed by using the sign sequences of the functions , , for a homogeneous partition of with step . For example, the matrix presented in (87) can be obtained from the sign sequences of the Walsh functions , , for a homogeneous partition of with step (see Figure 2).

*Remark 5. *From the previous remark and (84), we have
In consequence, , and for , as indicated in (85).

*Remark 6. *Offline computations are carried out to design the linear systems and . Then, these linear systems can be used for fast real-time computation of suitable PWM signals.

#### 4. Optimal Switching Strategies

According to the results in Section 3, PWM signals with switching cycles in the quarter-period interval can be conveniently designed to modulate the normalized fundamental-frequency amplitude and cancel the first nonfundamental odd harmonics. In the design procedure, the quarter-period interval is divided into subintervals, and a suitable system of switching indexes is selected. Each system determines a PWM signal that satisfies the design conditions for a certain normalized-amplitude interval Obviously, the interval length is a meaningful design parameter. Values of close to 1 indicate designs of practical interest. Additionally, unfeasible designs are obtained for negative values of .

The main objective of this section is to design PWM signals with optimal amplitude ranges (95). For clarity and simplicity, we will initially focus the discussion on signals with switching cycles in the quarter-period interval. In this case, the interval is divided into subintervals as follows: The design of a specific PWM signal starts by selecting a system of switching indexes which determine the starting subintervals for the switching cycles. The number of different index systems is This huge number clearly shows that strategies based on exhaustive exploration are not viable, even for moderate values of .

Exploratory studies, conducted with small values of , indicate that constraining the starting point of the switching cycles within blocks of four consecutive subintervals produces no negative effect in the optimization problem. Consequently, the switching indexes can be selected satisfying Under this constrained selection scheme, the number of different systems is reduced to a more tractable value It should be highlighted, however, that these index systems can be infeasible for a variety of reasons, for example, violating the design rule (R4) or condition (76), or producing negative values for . The numbers of feasible switching index systems obtained with the conventional and advanced design methods are presented in Table 1, which also includes the number of feasible index systems that produce amplitude intervals (95) with length in the ranges The data in Table 1 clearly indicate the superiority of the advanced method in providing feasible index systems . This superiority is particularly remarkable for large values of .

The optimal index system for the conventional design method is which produces the following system of linear equations to compute the switching ratios: The PWM signal and the harmonic distribution obtained for a DC amplitude V, a fundamental frequency of 50 Hz, and the AC amplitude V are displayed in Figure 6. The corresponding switching instants can be computed by setting the normalized amplitude in (104), and by considering (45) and (46) with a period ms. The PWM signal and the harmonic distribution for the same DC amplitude and frequency, and V are displayed in Figure 7.

For the advanced method, we obtain the optimal index system with an associated linear system The PWM signals and the harmonic distributions obtained for the DC amplitude V, a fundamental frequency of 50 Hz, and the AC amplitudes V and V are displayed in Figures 8 and 9, respectively. In this case, the switching instants are obtained from the linear system in (106), (77), and (78).

The values of the optimal amplitude intervals achieved by the conventional and advanced design methods for the optimal switching index systems (103) and (105), respectively, are presented in Table 2. Also in this case, the data show the superiority of the advanced method, which can practically cover the whole modulation interval with a single linear system . In contrast, the best solution provided by the conventional method only covers the normalized amplitude interval 54.7%–98.5%.

Regarding the harmonic distortion, the values of the distortion factor (33) obtained for the optimal advanced design (see values in Figures 8 and 9) are inferior to the corresponding ones obtained for the optimal conventional design (see values in Figures 6 and 7). Moreover, the harmonic distributions of the optimal advanced design present a very regular pattern, which contrasts sharply with the uneven harmonic distributions of the optimal conventional design.

Finally, one of the most outstanding features of the new approach is that the design methodology discussed for can be extended to larger values by selecting the system of switching indexes which, using a common computational notation, can be represented in the form where and are the first and last elements of the index sequence, respectively, and 4 is the step. The PWM signal and the harmonic distribution obtained in the case with the index system are displayed in Figure 10 (for a fundamental frequency of 50 Hz and V). This design strategy has been successfully applied to the values , , obtaining in all the cases a normalized-amplitude regulation interval of 5%–100% and the well-shaped harmonic distribution observed in Figures 8, 9, and 10.

*Remark 7. *The strategy for selective harmonic elimination discussed in Section 3 uses an -term truncated Walsh series (49) to represent the PWM signal. Consequently, condition (32) is only approximately satisfied, and the first non-fundamental harmonics are not fully eliminated by small values of . This fact can be appreciated in Figures 7–10. For , the number of terms in the truncated Walsh series is . Hence, an accurate representation of the PWM signal is obtained by moderate values of , and this residual harmonic distortion is practically removed (see Figure 10).

#### 5. Conclusions

In this paper, an advanced design method for DC-AC signal generation using pulse-width-modulated (PWM) signals has been presented. The new method is based on the Walsh transform and introduces significant improvements with respect to the current design methodologies. In particular, the new approach presents the following features. (i) * Efficient real-time operation.* The switching instants of the PWM signal can be easily computed by means of explicit linear systems. Moreover, these linear systems are valid for a wide AC-amplitude range. (ii) * Improved harmonic distortion attenuation.* A prescribed number of initial harmonics can be fully eliminated, and the residual harmonics present a particularly well-shaped distribution. (iii) * Large-dimension extensibility*. Optimal switching strategies for PWM signals with a large number of pulses can be directly obtained, without solving costly optimization problems.

In this work, the discussion has been focused on the problem of DC-AC signal generation. However, the proposed approach can also be of interest in other fields as, for example, power measurement [31].

#### Acknowledgments

This work was partially supported by the Spanish Ministry of Economy and Competitiveness through Grant DPI2012-32375/FEDER and by the Norwegian Center of Offshore Wind Energy (NORCOWE) under Grant 193821/S60 from the Research Council of Norway (RCN). NORCOWE is a consortium with partners from industry and science, hosted by the Christian Michelsen Research.