Sunteți pe pagina 1din 15

PCM-PWM analysis brief

Pulse width modulation is based on the simple fact that the mean value of a two-level
square wave is proportional to its duty-cycle. Thus any signal can be modulated as a
square wave by ensuring that the duty-cycle always corresponds to the signals
instantaneous value. This principle is shown in Figure 1.

Figure 1: Pulse Width Modulation (PWM)

The modulation can be done by comparing the signal to a constant slope carrier
moving from cmin to cmax within one time period T. If the output is switched between
’high’ and ’low’ at the crossing point between the carrier and the signal, and only
then, the signal is modulated as a square wave with modulation frequency ƒC=1/T.
Obviously, the signal amplitude must be bound within cmin and cmax to avoid clipping
in the modulation process. Consequently, the amplitude is usually normalized and
referred to as the modulation index, M where M∈[0,1].

Since the signal is compared to the carrier and modulated in the output waveform
once per period T, it is in reality sampled at ƒS=fC and the Nyquist theorem thereby
holds, fC must be at least twice the signal bandwidth. However, the Nyquist condition
is not sufficient. In addition, the slew-rate (SR) of the carrier must be higher than the
SR of the signal at all times to avoid multiple crossings points within one sample
period. For a sinusoid signal with M=1 and a sawtooth carrier this means that
fC > f ⋅ π where f is the signal bandwidth.

Also, the nonlinear nature of PWM will cause intermodulation of the carrier and the
signal frequencies. This increases the practical ratio necessary between the input and
modulation frequencies.
Classes of pulse width modulation

Pulse width modulation is generally categorised by three criteria; the sampling


method, the switching method and if modulation occurs on only one or both edges of
the pulses that comprise the PWM-signal.

The sampling method refers to whether the signal being modulated is a continuous-
time signal or if it already is a sampled signal. In the first case, the modulation is
referred to as Natural PWM or NPWM, as the signal being modulated is an analog,
natural signal. If the signal being modulated is sampled, i.e. uniform over the entire
PWM-period, the modulation is called Uniform PWM or UPWM. This is illustrated in
Figure 2.

Figure 2: UPWM and NPWM modulation schemes

It is apparent that converting LPCM into PWM is a case of UPWM-modulation.


Compared to the analog or reconstructed signal, a signal-dependent error is clearly
evident, causing UPWM to produce significant harmonic distortion. Several schemes
based on digital signal processing have been developed to compensate for this. Some
of the most familiar of these schemes are reviewed in [1] and [2].

The switching method describes how the output signal is controlled over the load.
Normally, the signal is switched between 1 and –1, to provide a pulse train as shown
in Figure 1. However, bridging the load allows for the use of a three-level PWM-
output, which eases the requirements for the switches by reducing the signal swing.
The two-level PWM scheme is often referred to as class-AD amplification, while the
three-level is called class-BD. This is illustrated in Figure 3 for the UPWM-case.

Figure 3: Class AD and Class BD PWM-modulation.


The circuit in a) shows the normal push-pull switching buffer while b) shows the
bridge. The use of a bridged output enables class-BD amplification as shown, which
reduces demands for settling and slew-rate. It should however be noted that class-BD
has considerable common-mode components. In class-BD the switcing signals A and
B are not complementary, but made from a differential input signal.

It can easily be seen from Figure 3 that the two output signals are equivalent by
looking at A and B separately. Due to the symmetry in both the input signal and the
carrier, B in class-BD is the same as B in class-AD, but inverted in time within the
sampling period. Since the bridge is identically connected to A and B in both cases,
Diffmean ∝ DA − DB is the same.

Finally, the PWM-scheme is classified by whether one or both edges are modulated.
The latter requires a double-sided or sawtooth carrier. Figure 4 shows the difference
between single-sided and double-sided modulation. With double sided modulation,
we have the same number of output transitions per period T, but have within this
period actually sampled the signal twice. Also, the carrier SR is doubled so the
requirement for fC f is halved.
Figure 4: Single-sided (SS) and double-sided (DS) PWM-modulation

It should also be noted that single-sided modulation can also be done on the leading
edge by using a descending sawtooth carrier. However, since leading edge and trailing
edge single sided modulation have the same properties, they will be treated as one in
this document.

To summarize, the different PWM techniques are listed in Table 1. As will become
apparent by the following analysis, they have different characteristics that must be
taken into consideration when designing a PWM-modulator.

Table 1: PWM-modulation techniques summary


NAD NADS
NPWM NADD
NBD NBDS
NBDD
UAD UADS
UPWM UADD
UBD UBDS
UBDD

In Table 1, N and U stands for natural and uniform respectively, AD and BD is the
class, while S is single-sided and D is double-sided modulation. Thus UBDS is
uniform sampling with a class-BD output signal and single-sided modulation.
Spectral analysis of PWM

Natural PWM (NPWM)

The framework for analysis of modulated, or “double periodic”, signals was laid out
by Bennett [3] as early as 1933. A three-dimensional visualisation model was
developed to help derive a double Fourier expansion necessary to describe the signal
in the frequency domain. Here, the spectrum will be derived for a NADS modulator
first, and then extended to the other topologies.

We start by defining a sinusoidal input signal with maximum range from 0 to 2π,
called u(y):

u(y) = π − M π sin(y) . Eq. 1

To generate the tree-dimensional illustration, we then define a surface F(x,y) as:

⎧1 x- x 2 π ≤ u(y)
F(x, y) = ⎨ Eq. 2
⎩0 otherwise

where x 2π is the closed multiple of 2π, less than or equal to x. F(x,y) will now be
sinusoidal in the x-direction and repetitive around x = 2π as shown in Figure 5.

Figure 5: Three-dimensional surface used to analyze PWM-modulation

If we relate the x and y values to time as

x = ω Ct
Eq. 3
y = ωt

we can define a plane in which each point in time will lie, both in the x and y
direction. This plane will go from origo to y = 2π and x = 2π ⋅ ω C / ω . We can then
use this to synthesize the pulse modulated wave since the xz-value of the intersection
between the plane and the surface will equal the PWM output. This is shown in Figure
6. The observant reader will notice that viewed from above, we have just drawn the
carrier as a constant line and repeated the input signal instead, which obviously gives
the same crossing points.

Figure 6: Surface with plane used to synthesize PWM output

This means that

PWM (t ) = F ( x, y ) x =ωC t , y =ωt . Eq. 4

If we imagine the xy-plane divided into squares with sides 2π in length, we see that
F(x,y) is identical within each such square. In other words it is periodic with 2π in
both the x and y direction as expected. A double Fourier series within those bounds
will thus provide the values of F(x,y) at any point in the square. By doing the
substitution in Eq. 3 we then have the value of F(x,y) at any
point along the plane, or rather the double Fourier series for the PWM-output, which
is exactly what we are looking for.

The general expression for the double Fourier series is:


1
F(x, y) = A00 + ∑ [A0n cos(ny) + B0n sin(ny)]
2 n =1

+ ∑ [Am0 cos(mx) + Bm 0 sin(mx)] Eq. 5
m =1
∞ ±∞
+ ∑ ∑ [Amn cos(mx + ny) + Bmn sin(mx + ny)]
m =1 n = ±1

where the Fourier coefficients expressed in complex form are:

2π 2π
1
∫ ∫ F(x, y)e
j (mx + ny)
Amn + jBmn = dxdy . Eq. 6
2π 2 0 0
Remembering the definition of F(x,y) in Eq. 2, Eq. 6 reduces to:

2 π π − M π sin y
1
Amn + jBmn =
2π 2 ∫
0

0
e j ( mx + ny )dxdy . Eq. 7

The innermost integral is straightforward to solve, while we in the outermost, unless


m is zero, get a cosine in the complex exponent. This integral can be generally solved
by using Bessels first integral, which is given in Eq. 8.


1
∫e dϕ = J n (x)
i⋅x cos(ϕ ) i⋅nϕ
e Eq. 8
2π i n 0

where Jn(x) is an n’th order Bessel-function of the first kind. The Bessel-function of
the first kind is defined as


(−1)m x 2 m
J n (x) = x n ∑ 2m+n
. Eq. 9
m=0 2 m!(m + n)!

If we use Bessels first integral to solve Eq. 7, we find the Fourier coefficients

A00 = 1
A0n = Am 0 = Amn = B00 = B0n,n ≠1 = 0
−M
B01 = Eq. 10
2
(−1)m +1 1
Bm 0 = J 0 (π mM ) +
πm πm
m +1
(−1)
Bmn = J (π mM )
πm n

and insert them into the double Fourier series in Eq. 5

M
FNADS (x, y) = 1 + sin(y)
2
⎡ sin(mx) − J 0 (π mM )


+∑ ⎢ sin(mx − mπ ) ⎥ . Eq. 11
m =1 ⎣ πm ⎦
⎡ J (π mM )
∞ ∞

−∑ ∑ ⎢ n sin(mx + ny − mπ ) ⎥
m =1 n = ±1 ⎣ π m ⎦
As we can see from the results we have a DC offset and the input signal as the two
first terms. Usually, the input signal is normalized to M by multiplying F(x,y) with 2.
The DC-term, that was added when defining the surface, can also be removed since
the input and output are usually symmetric around zero. Since we know from Eq. 3
that x=ωCt it is evident that the third term is the harmonics of the carrier. The fourth
term is intermodulation products between the carrier and its harmonics (mx) and the
input and its harmonics (ny) which depend heavily on the modulation index M. Also it
should be noted that NADS does not produce any harmonics of the input signal. If the
modulation frequency is adequately high, so that the intermodulation products are
kept out of the baseband and can be filtered away, NPWM-modulation is ideal in
terms of distortion.

The same analysis as for NADS can also be used for the other sampling methods.
However, as shown by Nielsen in [1], the remaining NPWM spectra can be found
using simple superposition.

For NBDS, the right superposition can be identified by looking at Figure 3. We can
see that one half of the output signal comes from a normal NADS-modulation, while
the negative half is the same modulation but with the input signal inverted, that is
phase shifted π radians. Thus it is intuitive that

F(x, y)NADS − F(x, ŷ)NADS


F(x, y)NBDS = , ŷ = y − π . Eq. 12
2

For NADD the same procedure is used. Modulating on the opposite edge is equivalent
to letting time move along the negative x-axis or defining a plane by using x = −ωC t .
The surface will then simply be defined as F(-x,y). If we halve the modulation index,
the expression for the double-sided modulation is formed by the summation of the
leading-edge and trailing-edge expressions, that is:

M
F ( x, y ) NADD = F ( x, y ) NADS + F (− x, y ) NADS , M→ . Eq. 13
2

NBDD obviously has the same relationship to NADD, as NBDS has to NADS i.e.

F ( x, y ) NADD − F ( x, yˆ ) NADD M
F ( x, y ) NBDD = , yˆ = y - π ,M→ . Eq. 14
2 2

When we find the expressions and use the relationship given in Eq. 4, we can tabulate
the properties of the different PWM-schemes.
Table 2: Properties of NPWM-schemes
n’th harmonic of m’th harmonic of carrier IM-component mωct ± nωt
signal nωt mωct
NADS 0 1 − J 0 ( mπ M ) cos( mπ ) 2 J n ( mπ M )
2
mπ mπ
NADD 0 4J0 ( mπ ) sin ⎛ mπ ⎞
M
2
4 J n ( mπ M
2 ) ⎛
sin ⎜ ( m + n)
π⎞

⎜ ⎟ mπ ⎝ 2⎠
mπ ⎝ 2 ⎠
NBDS 0 0 2 J n ( mπ M ) ⎛ nπ ⎞
sin ⎜

mπ ⎝ 2 ⎠
NBDD 0 0 4 J n ( mπ M2 ) ⎛ π ⎞ ⎛ nπ ⎞
sin ⎜ ( m + n ) ⎟ sin ⎜ ⎟
mπ ⎝ 2⎠ ⎝ 2 ⎠

As we can see, all schemes have IM-components that depend heavily on the
modulation index M. However, class-BD has no harmonics of the carrier present. This
means that at low input levels, the output has very little high-frequency content. When
the input is idle, there is actually no HF-content at all in class-BD, which can also be
seen from the first switching period in Figure 3. In addition, the IM-components with
even n are eliminated. We can also see that the argument of the Bessel-function is
halved with double-sided modulation, which means the high-frequency components
are considerably lower in amplitude. Also, IM is in this case only present when (m+n)
is odd.

Since audio-signals have high dynamic range and thus on average quite low M, class-
BD is clearly advantageous in terms of efficiency. The disadvantage is the common-
mode content that can be seen in Figure 3. Double-sided modulation also has an
advantage in that you double the effective sampling frequency without increasing the
transition frequency (and thus the switching losses) on the output.
Uniform PWM (UPWM)

Spectral analysis of uniform pulse width modulation was first shown by Black [4] and
is based on the same method as used for NPWM.

The input to the UPWM-modulator is the signal from a sample-and-hold circuit or a


LPCM-code. It is the sample value this signal has at the start of the modulation period
that determines the pulse width, as can be seen from Figure 2. In the three
dimensional illustration this will be equivalent to letting the plane that intersects with
the surface have a constant value within a 2π-period in the x-direction. In Figure 7 a
top-view of the surface and the plane is shown. It is clearly seen that when evaluating
a sinusoid input signal, the value at the start of each period is what determines the
pulse width, thus it is equivalent to the uniform PWM-modulation in Figure 2.

Figure 7: Top view of projection surface with UPWM plane

Following the same procedure as before, the UADS-modulation is used to derivate the
necessary expressions, while the rest is found using superposition. In Figure 7, the
dotted line shows the NPWM-plane while the solid line shows the UPWM-plane, it is
clear that we here modulate the input value at the sample instant.

We start again with Eq. 2, repeated here for clarity:

⎧1 x- x 2 π ≤ u(y)
F(x, y) = ⎨ . Eq. 15
⎩0 otherwise
Since the plane here is a stepped constant contour, reaching y=2π when
x = (ωC ω ) ⋅ 2π , it must be defined by:

x = ωC t
ω Eq. 16
y= x
ωC 2π

Due to the discontinuities the double Fourier method can not be used directly, the xy-
plane must be transformed in such a way that the discontinuous sampling contour
maps on to a continuous straight line. This is done by defining:

ω
v= y+ ( x − x 2π ) Eq. 17
ωC

since then Eq. 16 can be replaced with

x = ωC t
. Eq. 18
v = ωt

The new, transformed surface FT(x,v) is now limited by:

⎛ ω ⎞ ⎛ ω ⎞
uT ( x, v) = π − M π sin ⎜ v − ( x − x 2π ) ⎟ = π − M π sin ⎜ v − x⎟ . Eq. 19
⎝ ωC ⎠ ⎝ ωC ⎠

To be able to find the Fourier coefficients we use the substitution:

ω
w=v− x Eq. 20
ωC

since then:

uT ( x, v) = π − M π sin( w) Eq. 21

and

2π 2π
1
∫ ∫ F ( x , v )e
j ( mx + nv )
Amn + jBmn = dxdv Eq. 22
2π 2 T
0 0

thus becomes:
2π π − M π sin( w )
1
e(
j mx + n( w + (ω ωC ) x ) )
Amn + jBmn =
2π 2 ∫0

0
dxdw Eq. 23

which can be solved quite easily using the Bessel-function. When found, the Fourier
coefficients are inserted into the equation for the double Fourier-series (Eq. 5) and the
expression for UADS is found. This is given in Eq. 24.

∞ J n (nπ M ω
)
F ( x, y )UADS = 1 + ∑ sin ( ny )
ωC

n =1 nπ ω
ωC

⎡ sin(mx) − J 0 (π mM ) ⎤
+∑ ⎢ sin(mx − mπ ) ⎥ . Eq. 24
m =1 ⎣ πm ⎦
∞ ±∞ ⎡ J (π ( n ω + m) M ) ⎤
−∑ ∑ ⎢ ( )
ωC
π
n
sin mx + ny − m ⎥
m =1 n =±1 ⎢
⎣ π ( n ω
ωC
+ m ) ⎥⎦

As we can see, the harmonics of the carrier are the same, while the intermodulation
products have actually decreased somewhat. Much more important however, is the
fact that severe harmonic components of the input signal have been introduced. This
is baseband distortion that can not be filtered away.

The spectra for the other uniform PWM methods are found by using identical
superposition as for natural PWM. There are however two ways to do double-sided
uniform modulation. The same input sample can be used to cover both edges, which is
called symmetrical double-sided UPWM-modulation. Alternatively, one sample can
be used to modulate the rising-edge of the signal, and the next to modulate the falling
edge. This is called asymmetrical double-sided UPWM-modulation. Also, since time
is continuously defined by x and v rather than x and y, the superposition in the double-
sided case will be a little different. The variable v must be phase-shifted, by one
period in the case of symmetrical and half a period in the case of symmetrical. Thus, it
boils down to:

FT ( x, v)UADS − FT ( x, vˆ)UADS
FT ( x, v)UBDS = , vˆ = v − π
2
M
FT ( x, v)UADD _ symm = FT ( x, v)UADS + FT (− x, v − 2π ω
ωC UADS) , M→
2 . Eq. 25
M
FT ( x, v)UADD _ asymm = FT ( x, v)UADS + FT (− x, v − π ω
)
ωC UADS , M→
2
FT ( x, v)UADD − F ( x, vˆ)UADD
FT ( x, v)UBDD = , vˆ = v - π
2
The properties of the different UPWM-schemes are tabulated in Table 3. As we can
see, they have the same relationship as the NPWM-methods when it comes to
harmonics of the carrier and intermodulation, although as mentioned the IM-values
have a lower absolute value. Thus the qualitative evaluation of these factors is the
same in both cases.
However, the forward harmonics of the signal is of much greater importance. The
distortion in UADS is severe, and THD can be as high as -20dB when the modulation
index is close to 1. The second harmonic is worst, with decreasing amplitude for
higher components. With UADD only odd harmonics are present, and the THD is
thusly considerably better. To use class-BD operation decreases the distortion
significantly, the level of the harmonics is approximately 20dB lower than for class-
AD. UBDD in addition cancels out the even harmonics and is clearly the best of the
four when it comes to performance.

But regardless of the scheme used, UPWM can not provide high-fidelity performance
without very high oversampling or some sort of linearization algorithm. The latter is
an important research area, and solutions have been presented by [1], [2], [5], [6] and
others. Most of them are based on either interpolating samples or recalculating the
sample values based on a real-time derivation of the NPWM crossing point. This is
however a computationally complex task and the methods are often more suitable for
DSP than ASIC implementation.

Table 3:Properties of NPWM-schemes


n’th harmonic of signal nωt m’th harmonic of
carrier mωct
UADS 2 J n ( nπ M ω
ωC
) 2(1 − J 0 ( mπ M ) cos( mπ ))
nπ ω mπ
ωC

UADD 4 J n ( nπ M
2
ω
)⎛⎛ ω ⎞ nπ ⎞ 4J0 ( mπ M2 ) sin ⎛ mπ ⎞
+ 1⎟
ωC
(sym.) sin ⎜⎜ ⎜ ⎟⎟ ⎜ ⎟
nπ ⎝ ⎝ ωC ⎠ 2 ⎠ mπ ⎝ 2 ⎠
ω
ωC

0
UBDS ( nπ M ) ⎛ nπ ⎞
ω
2Jn ωC
sin ⎜ ⎟
nπ ω
ωC
⎝ 2 ⎠
⎛⎛ ω 0
UBDD 4 J n ( nπ M
2
ω
) ⎞ nπ ⎞ ⎛ nπ ⎞
+ 1⎟
ωC
(sym.) sin ⎜⎜ ⎜ ⎟⎟ sin ⎜ ⎟
nπ ω
ωC ⎝ ⎝ ωC ⎠ 2 ⎠ ⎝ 2 ⎠
IM-component mωct ± nωt
UADS 2 J n (( m + n ωω )π M )
C
ω
(m + n ωC )π
UADD 4 J n (( m + n ωω )π ⎛⎛ M
2 ) ⎛ ω ⎞⎞ π ⎞
C
sin ⎜ ⎜ m + n ⎜ 1 + ⎟ ⎟⎟ ⎟⎟
(sym.)
( m + n ωω )π ⎜⎜ ωC
C ⎝⎝ ⎝ ⎠⎠ 2 ⎠
UBDS 2 J n (( m + n ωω )π M ) ⎛ nπ ⎞
C
sin ⎜ ⎟
(m + n ω
ωC )π ⎝ 2 ⎠
UBDD (
4 J n ( m + n ωω )π M
2 ) sin ⎛ ⎛ m + n ⎛1 + ω ⎞ ⎞ π ⎞ ⎛ nπ ⎞
⎜⎜ ⎜⎜ ⎜ ⎟ ⎟ ⎟ sin ⎜ ⎟
C
(sym.)
( m + n ωω )π
C ⎝⎝ ⎝ ωC ⎠ ⎟⎠ 2 ⎟⎠ ⎝ 2 ⎠
Asymmetrical UxDD; use same expression as for symmetrical UxDD, but replace ωC
with
ωC
2 and sin (( ω
ωC
+1 ) ) with sin (

2

2 ).
Figure 8 shows THD vs. fC for the different UPWM schemes with an input signal at
10kHz and M=1. Even with an UBDD modulator, to achieve high-end performance,
more than 100-110dB THD, fC must be several Mhz. To realize a PWM-modulator at
such speeds is exceedingly difficult. In Class-D power amplifiers, where large
currents are switched, it is practically impossible.

THD vs fc for UPWM-modulators


0

-20

-40

UADS

-60
THD [dB]

-80

-100

UBDS

UADD

-120
UBDD

-140
0 2 4 6 8 10 12
Fc [Mhz] 6
x 10

Figure 8: THD vs. fc for different modulators, fin = 10kHz, M=1

It should also be noted that the derived expressions apply for ideal PWM-modulation.
In practical applications, nonideal effects like dead-time and limited rise- and fall-
time will degrade the performance further. These effects will of course become more
prevalent as the switching frequency increases and thus counteract the gain won by
increasing fC .

When converting digitally from LPCM to PWM, modulator resolution is also a key
parameter. For 16-bit resolution there must be 65.536 unique pulse width values
within a sample period T. This means that the digital logic must run at 65.536 ⋅ f S
which is obviously not feasible. Consequently, oversampling and noise-shaping is
used together with a fewer-bit modulator. Still, the switching frequency must be kept
within reasonable bounds, especially for high-power applications, and an optimum
has to be found based on exhaustive simulations on the actual topology.

In available PWM-amplifiers, an oversampling ratio of 8-16 together with an 8-10 bit


modulator is typically used. Predistortion-based signal processing algorithms are
usually employed to prevent the UPWM-distortion.
[1]: Nielsen, Karsten: “A Review and Comparison of Pulse Width Modulation
Methods For Analog and Digital Input Switching Power Amplifiers.” Audio
Engineering Society Preprint 4446 (G4), March 1997.

[2]: Pascual, César: “Computationally Efficient Conversion From Pulse-Code


Modulation to Naturally Sampled Pulse-Width Modulation”, Audio
Engineering Society Convention Paper 5198, September 2000.

[3]: W.R. Bennett: “New Results In The Calculation of Modulation Products”, Bell
Syst. Tech Journal, 1933, 12 p. 228-243.

[4]: H.S. Black: “Modulation Theory”, Van Nostrand, 1953.

[5]: J.M. Goldberg & M. Sandler: “New High Accuracy Pulse Width Modulation
Based Digital-to-Analogue Converter / Power Amplifier”. IEEE Proc.
Circuits, Devices and Systems, Vol 141, no. 4, August 1994.

[6]: P.H. Mellor et al: “Reduction of Spectral Distortion in Class-D Amplifiers by


an Enhanced Pulse Width Modulation Process”, IEEE Proceedings, vol 138,
No. 4, August 1991

S-ar putea să vă placă și