Signal Processing 92 (2012) 2444–2453
Contents lists available at SciVerse ScienceDirect
Signal Processing journal homepage: www.elsevier.com/locate/sigpro
A prefilter equalizer for pulse width modulation Sven Ole Aase n The Department of Electrical Engineering and Computer Science, The University of Stavanger, 4036 Stavanger, Norway
a r t i c l e in f o
abstract
Article history: Received 23 August 2011 Received in revised form 11 January 2012 Accepted 7 March 2012 Available online 14 March 2012
This article demonstrates the feasibility of pulse-width-modulation (PWM) of discrete time signals in a digital audio amplifier without inducing the nonlinear distortion usually associated with straightforward PWM. This is achieved by prefiltering the signal prior to the PWM mapping in such a manner that the overall result is distortion-free. All processing is done in the discrete time domain and relies on the interpretation of PWM as a Volterra filter. Computer simulations on CD music signals were performed. With no upsampling the distortion due to PWM gave a signal-to-noise-ratio (SNR) of approximately 45– 50 dB. Using the prefiltering scheme developed in this work, dramatic improvements of the reconstructed signal quality was demonstrated. The 9th order prefilter gave an SNR of well above 90 dB for the music signals tested. Experiments using the same signals upsampled with N ¼ 8 showed that a 3rd order prefilter was sufficient for removing PWM-induced distortion. & 2012 Elsevier B.V. All rights reserved.
Keywords: Pulse width modulation Digital audio amplifier Precompensation Volterra prefilter
1. Introduction Pulse-width-modulation (PWM) is being investigated as a viable technique for high-fidelity digital audio amplification [10,4,11]. The main principle of a digital amplifier, also called a class D amplifier, is shown in Fig. 1: An analog (top) or digital (bottom) signal is converted to a pulse-width-train signal and then filtered using a passive analog lowpass filter. The primary objective for this method is efficiency. Traditional analog amplifiers rarely exceed 20% power efficiency due to the power dissipation of the output stage. In a digital amplifier the output stage is a switching stage and can reach an efficiency of 90% or more [11]. The major drawback of this amplification scheme is the distortion inherent in the amplitude-to-width conversion process. Using an analog modulation signal u(t) as a starting point, Song and Sarwate [17] analyzed the
n
Tel.: þ 47 51832009. E-mail address:
[email protected]
0165-1684/$ - see front matter & 2012 Elsevier B.V. All rights reserved. doi:10.1016/j.sigpro.2012.03.006
frequency spectrum of PWM signals for a family of slightly different PWM techniques: Natural PWM (NPWM) and uniform PWM (UPWM), both in single-edged and doubleedged versions. Expressions for the Fourier transform of the PWM signal as a function of the modulating analog signal u(t) were found. The results showed that under weak conditions on the input signal u(t), there was no harmonic distortion of the modulating signal in the baseband when using NPWM, while this was the case for UPWM. It followed that in principle perfect reconstruction of the modulating signal was possible. Unfortunately, NPWM is inherently an analog technique suitable when the modulating signal is analog. For high-end audio, the signal source is a pulse-code-modulated (PCM) signal, and the use of NPWM must be adapted to the digital domain. In [11] this was implemented using an interpolation process. Several other methods have been suggested to emulate NPWM in the digital domain [9,13,14,7]. This article focuses on how to remove PWM-induced distortion using a precompensation technique. This is the same principle as used by Craven et al. [1], denoted ‘‘predistortion’’. The chosen PWM variant is uniform-sampling
S.O. Aase / Signal Processing 92 (2012) 2444–2453
2445
Fig. 1. Principle of a digital amplifier using PWM: Analog hybrid (top) and all-digital (bottom).
symmetric double-edge [17] which suffers from nonlinear distortion but which is easily implementable directly from PCM. It is shown that the whole nonlinear process of PWM combined with lowpass filtering, can be modeled as a Volterra filter [16]. This has the advantage that the distortion induced by the PWM process can be precompensated by an inverse Volterra filter, a so-called Volterra equalizer, using nonlinear filtering on the discrete time signal prior to the PWM mapping. The precompensation is completely digital in the sense that the PCM signal is converted to another PCM signal before the PWM modulation takes place. Due to the high resolution (16 bit or more) of available digital signal sources, a practical solution for a PCM-toPWM mapping has to reduce the time-resolution of PWM. This is achieved using a combination of upsampling with a factor N, typically N ¼8, and noise feedback coding (NFC) prior to the PWM mapping [10,11,8,7,15,12,5,18]. An extra bonus of this method is that the distortion associated with PWM is reduced since the pulse widths are decreased by a factor N. Upsampling in conjunction with Volterra equalization is also considered in this work. The article is organized as follows: In Section 2 PWM is modeled as a discrete time process. The model is further developed in Section 3, where a complete Volterra model for the PWM process is derived. Then, in Section 4 a Volterra prefilter for removal of PWM-induced distortion is presented. Section 5 considers the Volterra model for upsampled systems. This is followed by computer simulations in Section 6 and discussion and conclusion in Section 7. 2. PWM modeled as a discrete time process Denote by x(n) a real valued audio signal sampled at frequency Fs. Fig. 2 shows the process of digital-to-analog conversion using PWM followed by an ideal lowpass filter R(f) with cutoff frequency at F s =2. The resulting signal y(t) is the reconstructed analog audio signal which can be fed to a loudspeaker, as shown in Fig. 1. Note that since y(t) is bandlimited it can be sampled at the Nyquist frequency without loss of information. This allows for distortion analysis in the discrete time domain by direct comparison between x(n) and y(n), as shown in Fig. 2. In order to get to the core of the amplitude-to-width distortion process we analyze a stripped-down PWM scheme: The signal range is xðnÞ 2 ½0,K and each sample
Fig. 2. PWM interpreted as a discrete time process. x(n) is a discrete time audio signal, y(t) is the reconstructed analog audio signal, and y(n) is the sampled version used for computing the distortion when comparing with x(n).
Fig. 3. PWM of one signal sample.
x(n) is mapped into a 2-level pulse as shown in Fig. 3. The pulse p(t) has amplitude A and is centered around the time instant nTs corresponding to the discrete time index n, and T s ¼ 1=F s . This type of PWM has been termed uniform-sampling symmetric double-edge in [17] and double-sided uniform in [3]. For energy conservation the area of the pulse p(t) should be equal to x(n) and this implies that A ¼ K=T s . The modulation is full range in the sense that if xðnÞ ¼ K, adjacent pulses touch since the pulse width is Ts. Also note that this system is equivalent to a zero-centered system with xðnÞ 2 ½K=2,K=2 and pulse values 7A/2. In the following we compute the filter output signal produced by the PWM conversion of one signal sample, say xð0Þ, corresponding to continuous time instant t¼ 0. Denote by g(t) the contribution to the filter output y(t) when xð0Þ is converted. With reference to Fig. 3 and using the ideal filter unit pulse response
rðtÞ ¼
p sin t Ts
p
Ts
t
,
ð1Þ
2446
S.O. Aase / Signal Processing 92 (2012) 2444–2453
we get
3. PWM modeled as a Volterra filter Z
1
rðtÞpðttÞ dt p Z t þ ðxð0Þ=2KÞT s sin t Ts ¼A dt p
gðtÞ ¼ ðpnrÞðtÞ ¼
1
tðxð0Þ=2KÞT s
¼
AT s
Ts
t
Z p=T s ðt þ ðxð0Þ=2KÞT s Þ sinðtÞ
p
t
p=T s ðtðxð0Þ=2KÞT s Þ
dt:
ð2Þ
Evaluating this expression at sampling instances t ¼ nT s results in 2AT s xð0Þ ð3Þ gð0Þ ¼ Si p , 2K p xð0Þ xð0Þ Si np þ p Si np p , gðnT s Þ ¼ 2K 2K p AT s
n ¼ 7 1, 7 2, . . .
ð4Þ
where the sine integral function is defined as Z x sinðtÞ dt: SiðxÞ ¼
ð5Þ
0
t
3.1. Volterra filter definition If x is the input to a Volterra filter and y is the output, then 1 X
yðnÞ ¼
yq ðnÞ ¼
X i1
g n ðxÞ ¼ gðnT s Þ ¼
K x x Si np þ p Si np p , 2K 2K p
ð6Þ
g n ðxÞ ¼ g n ðxÞ,
n ¼ 1; 2, . . .
ð7Þ
and the throughput function as x n 2K g 0 ðxÞ ¼ Si p : 2K p
i ¼ 1
g i ðxðniÞÞ:
X hq ði1 , . . . ,iq Þxðni1 Þ xðniq Þ,
ð11Þ
iq
and hq ði1 , . . . ,iq Þ can be considered as a qth order impulse response characterizing the nonlinear behavior of the system [16].
ð8Þ
The error functions and the throughput function can be expanded using the Maclaurin series as g n ðxÞ ¼ an1 x þ an2 x2 þ an3 x3 þ ,
ð9Þ
ð12Þ
where the constant term is zero, i.e. an0 ¼ 0, since we have g n ð0Þ ¼ 0 8n. Normalizing the signal range to ½0, p (setting K ¼ p) we can compute the Maclaurin series: ^ 1 3 1 x þ x5 72 9600 1 1 1 x3 x5 þ g 1 ðxÞ ¼ 2 2 4 12p 480p 80p g 0 ðxÞ ¼ x
g 2 ðxÞ ¼ 1 X
ð10Þ
3.2. Maclaurin series
The concept of throughput and error functions is illustrated in Fig. 4: The PWM process spreads a single original sample xð0Þ out into the neighboring area in a nonlinear manner. Fig. 5 shows the throughput function and the first three error functions. All plots are normalized to K ¼ p. We observe that for small x the throughput function is close to the identity function. Correspondingly, all error functions are zero for x¼0 and increasing with x. Summing up the contributions from all input samples x(n), the sampled filter output can be written as
yðnÞ ¼
yq ðnÞ,
q¼1
where
Writing xð0Þ ¼ x, inserting A ¼ K=T s , and exploiting the even symmetry of gðÞ, we can now define the PWM nonlinear error functions as n
In the previous section we have an established a discrete time model for the PWM process resulting in nonlinear error functions describing a sample’s influence on its neighboring samples and a throughput function describing how much of the sample value that is retained at the correct time instant. In the following it is shown that using Maclaurin series expansion of the throughput and error functions, we can rewrite the PWM process as a Volterra filter.
1 1 1 3 x þ x5 48p2 1920p2 1280p4
^
Fig. 4. Discrete time result y(n) of PWM-induced distortion of signal sample xð0Þ ¼ x.
ð13Þ
S.O. Aase / Signal Processing 92 (2012) 2444–2453
3
0.25
2.5
0.2
2447
g1(x)
g0(x)
2 1.5
0.15 0.1
1 0.05
0.5 0
0
1
2
0
3
0
1
x
2
3
2
3
x
0
0.025
−0.01
0.02
g3(x)
g2(x)
−0.02 −0.03
0.015 0.01
−0.04 0.005
−0.05 −0.06
0
1
2
0
3
0
1
x
x
Fig. 5. Throughput function g0 and the first 3 error functions g1, g2 and g3.
The sine integral function has only odd powers of x in its Maclaurin expansion, and this property is transferred to the error functions and the throughput function. Later we shall see that this simplifies the filter equations for PWM equalization. Using the expansions above we can rewrite the PWM process as a Volterra filter with diagonal kernel function ( hq ðiÞ ¼ aiq , i1 ¼ i2 ¼ ¼ iq ¼ i, hq ði1 , . . . ,iq Þ ¼ ð14Þ 0, otherwise: This is also illustrated in Eq. (15). Each diagonal Volterra kernel function is constructed by picking the associated Maclaurin coefficients in a vertical manner
Combining Eqs. (9), (12), and (14), the PWM output signal can now be written as yðnÞ ¼
1 X i ¼ 1
g i ðxðniÞÞ ¼
1 1 X X
hq ðiÞxðniÞq :
ð16Þ
q ¼ 1 i ¼ 1
Comparing this with Eqs. (10) and (11) we observe that the PWM process in Fig. 2 has been converted to a (diagonal) Volterra model as seen in Fig. 7. The collection of kernel functions fh1 ,h2 ,h3 , . . .g is identified as a Volterra filter operator H.
4. PWM equalization using Volterra prefilter
^ g 0 ðxÞ
¼
a01 x
þ
a03 x3
þ
a05 x5
þ
g 1 ðxÞ g 2 ðxÞ
¼ ¼
a11 x a21 x
þ þ
a13 x3 a23 x3
þ þ
a15 x5 a25 x5
þ þ
ð15Þ
^ k
k
k
h1 ðÞ
h3 ðÞ
h5 ðÞ
Note that since g n ðxÞ ¼ g n ðxÞ, all filter kernels have even symmetry, hq ðiÞ ¼ hq ðiÞ, and that hq ðÞ ¼ 0 when q is even due to the lack of even components in Eq. (13). The first five nonzero filter kernels are plotted in Fig. 6.
The core idea of this work is to eliminate PWMinduced distortion by adjusting the signal prior to the PWM mapping in such a manner that the overall process is the identity operator. Fig. 8 depicts the method: Given the Volterra operator H corresponding to the PWM process, we want to find an operator F, denoted a prefilter equalizer, such that HJF ¼ I. This problem was addressed for general Volterra filters by Fang et al. [2]. Using a multidimensional z-transform methodology, they managed to construct pth order linearization operators of a nonlinear system. Following the results of [2], define the qth order nonlinear transfer
2448
S.O. Aase / Signal Processing 92 (2012) 2444–2453
h1(n)
1.5 1 0.5 0 −0.5 −15
−10
−5
0 n
5
10
15
−10
−5
0 n
5
10
15
−10
−5
0 n
5
10
15
−10
−5
0 n
5
10
15
−10
−5
0 n
5
10
15
h3(n)
0.02 0 −0.02 −15
5
h (n)
−4
2
x 10
0 −2 −15
h7(n)
−7
5
x 10
0 −5 −15
h9(n)
−9
2
x 10
0 −2 −15
Fig. 6. Volterra filter kernels h1, h3, h5, h7, and h9.
Fig. 7. Volterra model of PWM.
function of a Volterra filter H by X X iq 1 hq ði1 , . . . ,iq Þzi Hq ðz1 , . . . ,zq Þ ¼ 1 zq : i1
Fig. 8. Equalizing PWM using a prefilter: The audio signal u(n) is processed prior to the PWM mapping.
ð17Þ
iq
With reference to Eqs. (10) and (11), the Volterra operator can be interpreted as an infinite sum of its nonlinear transfer functions H¼
1 X
Hq :
ð18Þ
q¼1
With the definitions above, in [2] it was found that the general prefilter equalizer was given by the following nonlinear transfer functions: F 1 ðz1 Þ ¼ H1 ðz1 Þ1 F p ðz1 , . . . ,zp Þ ¼ H1 ðz1 z2 zp Þ1 p X X Hm ðz1 zk1 , . . . ,zpkm þ 1 zp Þ m ¼ 2 k1 þ þ km ¼ p
F k1 ðz1 , . . . ,zk1 Þ F km ðzpkm þ 1 , . . . ,zp Þ,
p ¼ 2; 3, . . . , ð19Þ
P1
so that F ¼ p ¼ 1 F p is the prefilter equalizer to the Volterra filter operator H. In practice the finite order P equalizer F^ ¼ Pp ¼ 1 F p is used to approximate the true prefilter equalizer F. In Appendix A the discrete time domain filter equations for the prefilter transfer functions up to order 9 are derived.
5. The Volterra model applied to upsampled systems Looking at the expressions for the throughput and error functions, Eqs. (6) and (8), we observe that they are independent of the sampling frequency Fs, or sample distance Ts. This implies that the Volterra model H of PWM can also be used for systems utilizing upsampling prior to the PWM mapping. With reference to Figs. 3 and 8, if the audio signal u(n) originally was sampled at F 0s , then upsampled to F s ¼ NF 0s , then the analysis performed in Sections 2–4 would still be valid. The only difference is that the Volterra output signal y(n) will contain noise due to PWM1 up to frequencies F s =2 ¼ NðF 0s =2Þ, whereas u(n) is bandlimited to F 0s =2. For analyzing the prefilter performance what matters is how well the PWM pulse train signal resembles the original analog signal u(t) when filtered through an (ideal) lowpass filter with cutoff frequency F 0s =2. This can be found by restricting the bandwidth of the Volterra output signal y(n) prior to comparison with the upsampled signal u(n). The error signal is found as eðnÞ ¼ uðnÞr F 0s =2 ðnÞnyðnÞ ¼ r F 0s =2 ðnÞnðuðnÞyðnÞÞ,
1
Assuming a nonideal prefilter.
ð20Þ
S.O. Aase / Signal Processing 92 (2012) 2444–2453
where r F 0s =2 ðnÞ is the unit pulse response of an ideal lowpass filter with cutoff frequency F 0s =2. 6. Computer experiments The prefiltering scheme was tested on two different music signals. The signals were ripped from CD at sampling frequency 44.1 kHz and 16 bits/sample. Only the first of the two stereo channels was used. Each signal has a duration of 30 s. The signals are summarized in Table 1. 6.1. PWM simulation The PWM process is simulated using the Volterra operator H as in Fig. 7 and Eq. (16). The summations are restricted to order 15 (q¼ 1,y,15) and the support of the filter kernels is 1000 r ir 1000. 6.2. Preprocessing All signals are normalized to a signal range of 0:9p and a mean value of p=2. Upsampled signals are interpolated using a 32-order IIR filter with cutoff frequency 22.05 kHz.
2449
Table 1 Audio music signals used for testing. Signal name
Description
Signal A Signal B
Shostakovich Violin Concerto No. 2 Bob Dylan ‘‘Like a rolling stone’’
6.5. Comparing performance with predistortion The performance of the Volterra prefilter is compared to that of the iterative predistortion technique due to Gerzon [6] and applied in a digital audio amplifier by Craven et al. [1]. In short, for an input signal u(n), the first step of the scheme is to compute the (predicted) distortion caused by the PWM process, and then subtract this distortion from u(n) as a pre-corrective measure. The scheme can be developed into an iterative process giving improved results. The Volterra model of PWM introduced in this work facilitates straightforward computation of predistorted signals: Using the notation developed in earlier sections, if we denote by u0 ðnÞ ¼ uðnÞ the original audio signal, then the successive Gerzon iterations can be written as ui ðnÞ ¼ uðnÞ þ ui1 ðnÞHðui1 ðnÞÞ,
i ¼ 1; 2, . . . ,
ð22Þ
so that ui(n) is the i’th approximation to the ideally predistorted signal.
6.3. Signal-to-noise evaluation 6.6. Outline of experiments Using the notation of Fig. 8, the difference between the original signal u(n) and the reconstructed and sampled signal y(n) is quantified using the signal-to-noise-ratio (SNR) in the standard manner ! SNR ¼ 10 log10
s2u
E½ðuðnÞyðnÞÞ2
,
ð21Þ
where the ensemble average is computed using time average over the signals used.2 For upsampled systems the SNR is computed as in Eq. (21), but with e(n) from Eq. (20) instead of uðnÞyðnÞ. 6.4. Choosing window size The order-recursive filters, Eqs. (A.8), (A.10), (A.12), (A.14), and (A.16) are used to find the Pth order approxP ^ imation xðnÞ ¼ Pp ¼ 1 xp ðnÞ to the true prefilter signal x(n). All summations are from 1 to 1 and must be truncated. The obvious choice of using a symmetric window from L to L turns out to have a balance problem: As seen in Fig. 6, the kernel functions oscillate with a sign change for every lag. Thus, using a symmetric window, the effect of window truncation is increased since such a window would lead to either positive or negative taps at both ends. It has been verified in experiments that a window defined from Lþ1 to L has significantly better performance for small values of L, and this is used in all simulations presented in the following. 2 Edge effects due to filtering are removed by leaving out the affected signal parts in the time average.
We split the experiments into two categories: No upsampling: The audio signal u(n) is a fullband signal. Direct application of PWM results in significant nonlinear distortion in the reconstructed analog signal y(t) and it is investigated how this can be combated using a Volterra prefilter of varying order/window size. The results are compared to the performance of Gerzon’s method using several iterations and a large scale model for the Volterra operator H as in Section 6.1. Upsampling with N¼8: The audio signal u(n) is a narrowband signal and PWM results in less distortion than in the previous case. The performance of low order Volterra prefilters is compared to that of the Gerzon method using only one iteration and simplified models for H. 6.7. Experiments without upsampling Figs. 9 and 10 show the obtained SNR using the prefilter scheme and Gerzon’s predistortion scheme on Signals A and B. For the Volterra prefilter we obtain saturation curves when L increases, with a slower saturation for larger order prefilters. This is due to the larger effective support of the higher order kernel functions, as seen in Fig. 6. For both signals the prefilter show similar performance. The signals obtain an SNR in the 92–94 dB range when using the best prefilter tested (9th order with L¼100). The predistortion scheme relies on the same PWM model for H as used when simulating the system, see Section 6.1. Even then, 4–5 iterations are necessary to obtain an SNR better than 90 dB.
2450
S.O. Aase / Signal Processing 92 (2012) 2444–2453
95
90
SNR (dB)
85
80
75
3rd order 5th order 7th order 9th order
70
65
60 20
30
40
50
60 L
70
80
90
100
95
90
SNR (dB)
85
80
75
70
65
60 1
2
3 Iterations
4
5
Fig. 9. SNR obtained for Signal A with no upsampling: Using Volterra prefilter with varying order/window size (top) and using predistortion with Gerzon-iterations (bottom). Without prefiltering or predistortion the PWM distortion gave an SNR equal to 49.7 dB.
Fig. 10. SNR obtained for Signal B with no upsampling: Using Volterra prefilter with varying order/window size (top) and using predistortion with Gerzon-iterations (bottom). Without prefiltering or predistortion the PWM distortion gave an SNR equal to 44.9 dB.
6.8. Experiments with upsampling
Gerzon iteration is identical to the output of the third order Volterra prefilter, see Eqs. (A.8) and (A.10). Thus, using the same window as in Section 6.4, we obtain exactly the same result for the two methods. In the 5th order case, the two methods differ in that the third order cross-term in Eq. (A.12) is not included in the expression for the predistorted signal. Still, the results obtained are practically identical, as stated in Fig. 11.
In this section the audio signals are upsampled with N ¼8 and lowpass filtered prior to PWM. This is a common procedure in many solutions for digital audio amplifiers, as mentioned in the introduction. Experiments showed no improvements when using prefilter order higher than 5. The results are shown in Fig. 11. There is a close connection between the Volterra prefilter and predistortion with one Gerzon iteration. This is seen when writing out the details of the Volterra filter operator H using the kernels found in Section 3: X X HðuðnÞÞ ¼ uðnÞ þ hp ðiÞuðniÞp , ð23Þ p ¼ 3;5,7,... i
and inserting this expression into the Gerzon iteration, Eq. (22) for i¼1 X X u1 ðnÞ ¼ 2uðnÞHðuðnÞÞ ¼ uðnÞ hp ðiÞuðniÞp : ð24Þ p ¼ 3;5,7,... i
If the order in the first sum is limited to p ¼3, we observe that the predistorted signal obtained in the 1st
7. Discussion and conclusions This work has introduced a Volterra model for PWM of audio signals enabling precompensation methods for removing PWM-induced distortion. This is done either by operator inversion (prefilter) or by the predistortion method due to Gerzon [6]. When using no upsampling, PWM produces nonlinear distortion corresponding to an SNR of 45–50 dB, and a high-order method of precompensation is necessary. As demonstrated in Section 6.7, using a 9th order prefilter the distortion is practically eliminated with an SNR well above 90 dB. The filtering complexity in this case, according to
S.O. Aase / Signal Processing 92 (2012) 2444–2453
construct symmetric PWM pulses as shown in Fig. 3 is 2:83 ms=ð2 256Þ ¼ 5:5 ns. Using straightforward 16 bit amplitude-to-width conversion with no upsampling, the calculation for the time resolution is 1=2 44 100 216 ¼ 0:17 ns which is currently difficult to achieve. The advantages of the proposed method can be summarized as follows:
110
105
SNR (dB)
100
95
3rd order 5th order
90
85 20
2451
30
40
50
60 L
70
80
90
100
1. A fully digital solution combined with straightforward PCM-to-PWM mapping using symmetric pulses. The prefilter stage can be done off-line, producing a modified PCM signal ready for PWM conversion at a later stage. 2. Makes it possible to have SNR control using prefiltering, without any upsampling prior to the PWM conversion. 3. Scalability: Given a target SNR, the method can be adapted to a wide range of multirate systems using different upsampling factors and prefilter orders.
110
105
Appendix A. Deriving filter equations for Volterra prefilter
SNR (dB)
100
The prefilter equations in Section 4 are general and applies to any Volterra filter. The Volterra filters defined in Eq. (14) are diagonal and this simplifies the prefilter equations as shown in the following.
95
90
80 20
A.1. Volterra filter simplifications
3rd order 5th order
85
30
40
50
60 L
70
80
90
100
Fig. 11. SNR obtained using Volterra prefilter with varying order/ window size and upsampling with N ¼ 8, Signal A (top) and Signal B (bottom). Practically identical results were obtained using predistortion with one Gerzon iteration and similar order/window size for the PWM operator H. Without prefiltering or predistortion the PWM distortion gave an SNR equal to 85.7 dB (Signal A) and 80.9 dB (Signal B).
Table A1 with L¼ 100, is 13Lþ41¼1341 multiplications/ sample, which is feasible at the CD standard sampling frequency of 44.1 kHz. It is also possible to perform the filtering off-line. The predistortion scheme is also working when using no upsampling, but a large scale model of PWM, combined with 4–5 iterations makes the computation excessive. In the upsampling case (N¼8), PWM produces nonlinear distortion corresponding to an SNR of 80–85 dB and less precompensation is called for. A 3rd order prefilter with L¼ 80 gave an SNR of well above 100 dB. This is equivalent to a predistortion filter as shown in Section 6.8. It would appear advantageous to construct a digital amplifier without using upsampling, but the time resolution needed is a challenge. Current solutions for digital amplifiers use upsampling, typically with N ¼8, combined with a noise shaping filter, thus reducing the bit resolution, typically to 8 bits, prior to the PWM mapping. With 8 bits there are only 256 different PWM widths in each 2:83 ms period (corresponding to the new sampling frequency 352.8 kHz), the time resolution needed to
From Eqs. (13) and (14) we obtain h1 ðnÞ ¼ dðnÞ and thus H1 ðz1 Þ ¼ 1. Also note that Hm ðÞ ¼ 0 when m is even. Due to the diagonal form of the Volterra filter kernels, the Hm term in Eq. (19) can be simplified as Hm ðz1 zk1 , . . . ,zpkm þ 1 zp Þ X X hm ði1 , . . . ,im Þðz1 zk1 Þi1 ðzpkm þ 1 zp Þim ¼ i1
¼
X
im
hm ðiÞðz1 zp Þi ¼ H0m ðz1 zp Þ,
ðA:1Þ
i
where H0m ðÞ denotes the associated diagonal form. Theorem 1. The prefilter transfer functions are zero for even indices, that is F p ¼ 0 for p ¼2, 4, 6,y. Proof. It is trivial to show that F 2 ¼ 0. Assume that F q ¼ 0 for even q when q op. The second sum in Eq. (19) is overall positive integer solutions to k1 þ þkm ¼ p, where m is odd and p is even. For each such solution, it follows that not all kis can be odd, that is there must be an even valued kl. Then, by assumption we have F kl ¼ 0 since kl o p. Therefore we must have Fp ¼0, and the result follows by induction. & This theorem implies that, in Eq. (19), in the second summation we only have to include constellations where all kis are odd. Theorem 2. Given m positive integers k01 , . . . ,k0m so that k01 þ þ k0m ¼ p, denote by Qm the number of different
2452
S.O. Aase / Signal Processing 92 (2012) 2444–2453
integer permutations. Then X H0m F k1 F km ¼ Q m H0m F k01 F k0m :
ðA:2Þ
k1 þ þ km ¼ p
From an implementation point of view, Theorem 3 allows the prefilter output to be efficiently computed in an order-recursive manner as shown in the following. First order:
Proof. Writing out the expression with argument details:
F 1 ðz1 Þ ¼ H1 ðz1 Þ1 ¼ 1,
H0m ðz1
Third order: In Eq. (19) only odd values of m need to be considered, and here the only constellation is m ¼3 and ðk1 k2 k3 Þ ¼ ð111Þ. This gives
zp ÞF k1 ðz1 , . . . ,zk1 ÞF k2 ðzk1 þ 1 , . . . ,zk1 þ k2 Þ
F km ðzpkm þ 1 , . . . ,zp Þ,
ðA:3Þ
we realize that a permutation of the kis simply would change the (nonoverlapping) index range of the z arguments of each Fk. Due to the diagonal form of the filter kernel, H0m is insensitive to such a change, and the expression remains unaltered save for a change in variable names, and the result follows. & Theorem 3. Given p, and m positive integers k1 , . . . ,km so that k1 þ þkm ¼ p, the contribution of the term H0m ðz1 zp ÞF k1 ðz1 , . . . ,zk1 Þ F km ðzpkm þ 1 , . . . ,zp Þ, to the discrete time equation for xp(n) is X hm ðiÞxk1 ðniÞ xkm ðniÞ:
ðA:4Þ
ðA:5Þ
Proof. Using the formula for the multidimensional z-transform, we can write
i
X X ik1 1 f k1 ði1 , . . . ,ik1 Þzi 1 zk1 ^
ipkm þ 1
¼
X ipkm þ 1 i f km ðipkm þ 1 , . . . ,ip Þzpk zp p m þ1 ip
X X X hm ðiÞ f k1 ði1 , . . . ,ik1 Þ f km ðipkm þ 1 , . . . ,ip Þ i
i1
ip ði þ ip Þ
z1ði þ i1 Þ zp
:
ðA:6Þ
Fifth order: By Theorem 1 we only have to consider odd values for the kis. For m ¼3 the only constellation is (113) and its two permutations. For m¼ 5 the only constellation is (11111). By Theorem 2 we have
H05 ðz1 z2 z3 z4 z5 ÞF 1 ðz1 ÞF 1 ðz2 ÞF 1 ðz3 ÞF 1 ðz4 ÞF 1 ðz5 Þ,
ðA:11Þ
and by Theorem 3 we get X X x5 ðnÞ ¼ 3 h3 ðiÞx1 ðniÞ2 x3 ðniÞ h5 ðiÞx1 ðniÞ5 :
ðA:12Þ
i
i1
ip
uðnii1 Þ uðniip Þ X X X hm ðiÞ f k1 ði1 , . . . ,ik1 Þuðnii1 Þ uðniik1 Þ ¼ i
^
X
ipkm þ 1
i1
ik1
X f km ðipkm þ 1 , . . . ,ip Þuðniipkm þ 1 Þ uðniip Þ ip
X ¼ hm ðiÞxk1 ðniÞ xkm ðniÞ:
&
i
H07 ðz1 z2 z3 z4 z5 z6 z7 ÞF 1 ðz1 ÞF 1 ðz2 ÞF 1 ðz3 ÞF 1 ðz4 ÞF 1 ðz5 Þ F 1 ðz6 ÞF 1 ðz7 Þ, ðA:13Þ and by Theorem 3 we get X X x7 ðnÞ ¼ 3 h3 ðiÞx1 ðniÞ2 x5 ðniÞ3 h3 ðiÞx1 ðniÞx3 ðniÞ2 i
Using Eqs. (11) and (17), and assuming the input signal u(n), the discrete time domain signal resulting from this expression is X X X hm ðiÞ f k1 ði1 , . . . ,ik1 Þ f km ðipkm þ 1 , . . . ,ip Þ i
ðA:10Þ
i
F 7 ðz1 ,z2 ,z3 ,z4 ,z5 ,z6 ,z7 Þ ¼ 3H03 ðz1 z2 z3 z4 z5 z6 z7 ÞF 1 ðz1 ÞF 1 ðz2 ÞF 5 ðz3 ,z4 ,z5 ,z6 ,z7 Þ 3H03 ðz1 z2 z3 z4 z5 z6 z7 ÞF 1 ðz1 ÞF 3 ðz2 ,z3 ,z4 ÞF 3 ðz5 ,z6 ,z7 Þ 5H05 ðz1 z2 z3 z4 z5 z6 z7 ÞF 1 ðz1 ÞF 1 ðz2 ÞF 1 ðz3 ÞF 1 ðz4 ÞF 3 ðz5 ,z6 ,z7 Þ
ik1
X
and by Theorem 3 we get X x3 ðnÞ ¼ h3 ðiÞx1 ðniÞ3 :
ðA:9Þ
Seventh order: For m¼3 the constellations are (115), (133) and their permutations. For m¼ 5 the constellation is (11113) and its permutations. For m¼7 we only have (1111111). This gives
H0m ðz1 zp ÞF k1 ðz1 , . . . ,zk1 Þ F km ðzpkm þ 1 , . . . ,zp Þ X ¼ hm ðiÞðz1 zp Þi
F 3 ðz1 ,z2 ,z3 Þ ¼ H03 ðz1 z2 z3 ÞF 1 ðz1 ÞF 1 ðz2 ÞF 1 ðz3 Þ,
ðA:8Þ
F 5 ðz1 ,z2 ,z3 ,z4 ,z5 Þ ¼ 3H03 ðz1 z2 z3 z4 z5 ÞF 1 ðz1 ÞF 1 ðz2 ÞF 3 ðz3 ,z4 ,z5 Þ
i
i1
so therefore x1 ðnÞ ¼ uðnÞ:
ðA:7Þ
i
A.2. Order-recursive time-domain equations Following Fig. 8, denote by u(n) the prefilter input, and P ^ xðnÞ ¼ Pp ¼ 1 xp ðnÞ the Pth order approximation to the true prefilter output x(n).
i
X X 5 h5 ðiÞx1 ðniÞ4 x3 ðniÞ h7 ðiÞx1 ðniÞ7 : i
i
ðA:14Þ Ninth order: For m¼3 the constellations are (117), (135), (333), and their permutations. For m ¼5 the constellations are (11115), (11133), and their permutations. For m¼7 we only have (1111113) and its permutations. For m ¼9 we only have (111111111). This gives F 9 ðz1 ,z2 ,z3 ,z4 ,z5 ,z6 ,z7 ,z8 ,z9 Þ ¼ 3H03 ðz1 z2 z3 z4 z5 z6 z7 z8 z9 ÞF 1 ðz1 ÞF 1 ðz2 Þ F 7 ðz3 ,z4 ,z5 ,z6 ,z7 ,z8 ,z9 Þ 6H03 ðz1 z2 z3 z4 z5 z6 z7 z8 z9 ÞF 1 ðz1 ÞF 3 ðz2 ,z3 ,z4 Þ F 5 ðz5 ,z6 ,z7 ,z8 ,z9 Þ H03 ðz1 z2 z3 z4 z5 z6 z7 z8 z9 ÞF 3 ðz1 ,z2 ,z3 Þ F 3 ðz4 ,z5 ,z6 ÞF 3 ðz7 ,z8 ,z9 Þ 5H05 ðz1 z2 z3 z4 z5 z6 z7 z8 z9 ÞF 1 ðz1 ÞF 1 ðz2 Þ F 1 ðz3 ÞF 1 ðz4 ÞF 5 ðz5 ,z6 ,z7 ,z8 ,z9 Þ 10H05 ðz1 z2 z3 z4 z5 z6 z7 z8 z9 ÞF 1 ðz1 ÞF 1 ðz2 Þ F 1 ðz3 ÞF 3 ðz4 ,z5 ,z6 ÞF 3 ðz7 ,z8 ,z9 Þ
S.O. Aase / Signal Processing 92 (2012) 2444–2453
Table A1 Filter complexity as a function of the window size parameter L. Prefilter order Multiplications/ P sample 3 5 7 9
Lþ 3 3Lþ 9 6Lþ 20 13Lþ 41
7H07 ðz1 z2 z3 z4 z5 z6 z7 z8 z9 ÞF 1 ðz1 ÞF 1 ðz2 Þ F 1 ðz3 ÞF 1 ðz4 ÞF 1 ðz5 ÞF 1 ðz6 ÞF 3 ðz7 ,z8 ,z9 Þ H09 ðz1 z2 z3 z4 z5 z6 z7 z8 z9 Þ F 1 ðz1 ÞF 1 ðz2 ÞF 1 ðz3 ÞF 1 ðz4 ÞF 1 ðz5 ÞF 1 ðz6 ÞF 1 ðz7 ÞF 1 ðz8 ÞF 1 ðz9 Þ, ðA:15Þ and by Theorem 3 we get X x9 ðnÞ ¼ 3 h3 ðiÞuðniÞ2 x7 ðniÞ i X 6 h3 ðiÞuðniÞx3 ðniÞx5 ðniÞ
X Xi h3 ðiÞx3 ðniÞ3 5 h5 ðiÞuðniÞ4 x5 ðniÞ i
10
i X h5 ðiÞuðniÞ3 x3 ðniÞ2
Xi X 7 h7 ðiÞuðniÞ6 x3 ðniÞ h9 ðiÞuðniÞ9 : i
ðA:16Þ
i
The PWM Volterra filter kernels h3 ,h5 ,h7 , . . . all have even symmetry, and this also reduces the filter complexity. Table A1 shows the necessary total number of multiplications per sample when using increasing order for the prefilter. References [1] P. Craven, L. Hand, B. Attwood, J. Andersen, Digital PWM amplifier using nonlinear feedback and predistortion, in: Proceedings of the AES 128th Convention, 2010.
2453
[2] Y.W. Fang, L.C. Jiao, X.D. Zhang, On the convergence of Volterra filter equalizers using a pth-order inverse approach, IEEE Transactions on Signal Processing 49 (8) (2001) 1734–1744. [3] A.C. Floros, J.N. Mourjopoulos, A novel and efficient PCM to PWM converter for digital audio amplifiers, in: Proceedings of ICECS, 1999, pp. 165–168. [4] A.C. Floros, J.N. Mourjopoulos, A distortion-free PWM coder for alldigital audio amplifiers, in: Presented at the 110th Convention of the Audio Engineering Society, 2001. [5] T. Forzley, R. Mason, A low power class d audio amplifier with discrete time loop filter compensation, in: Circuits and Systems and TAISA Conference, 2009, pp. 1–4. [6] M.A. Gerzon, Predistortion techniques for complex but predictable transmission systems, Journal of the Audio Engineering Society 20 (1972) 475–482. [7] X. Gong, J.G. Harris, A precompensation algorithm for PWM-based digital audio amplifiers for portable applications, in: Circuits and Systems ISCAS, 2007, pp. 1577–1580. [8] J.W. Jung, M.J. Hawksford, An oversampled digital PWM linearization technique for digital-to-analog conversion, IEEE Transactions on Circuits and Systems 51 (9) (2004) 1781–1789. [9] P.H. Mellor, S.P. Leigh, M.G. Cheetham, Digital sampling process for audio class D, pulse width modulated, power amplifier, Electronic Letters 28 (1) (1992) 56–58. [10] K. Nielsen, A review and comparison of pulse width modulation (PWM) methods for analog and digital input switching power amplifiers, in: Presented at the 102nd AES Convention, 1997. [11] C. Pascual, Z. Song, P.T. Krein, D.V. Sarwate, P. Midya, W.J. Roeckner, High-fidelity PWM inverter for digital audio amplification: spectral analysis, real-time DSP implementation, and results, IEEE Transactions on Power Electronics 18 (1) (2003) 473–485. [12] S. Ramaswamy, J. Krishnan, B. Forejt, J. Joy, M. Burns, G. Burra, A high-performance digital-input class-D amplifier with direct battery connection in a 90 nm digital CMOS process, in: IEEE International Solid-State Circuits Conference, 2008, pp. 436–438. [13] M. Sandler, Digital amplification for consumer audio, in: IEEE International Conference on Consumer Electronics, 2000. [14] S. Saponara, L. Fanucci, P. Terreni, Oversampled and noise-shaped pulse-width modulator for high-fidelity digital audio amplifier, in: Proceedings of ICECS, 2006, pp. 830–833. [15] Y. Sato, M. Jiang, Output waveform improvement of high switching frequency PWM inverters introducing digital signal processing, in: Power Conversion Conference PCCON, 2007, pp. 800–803. [16] G.L. Sicuranza, Theory and approximation of polynomial filters, in: Circuits and Systems Tutorials, Tutorial I: Fundamentals of Nonlinear Signal Processing, 1994, pp. 50–58. [17] Z. Song, D.V. Sarwate, The frequency spectrum of pulse width modulated signals, Signal Processing 83 (1) (2003) 2227–2258. [18] Z. Yu, H. Feng, A method of error correction for digital class D power amplifiers, in: Microelectronics and Electronics PRIMEASIA, 2010, pp. 153–156.