Chien Chengtseng2008

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Design of Fractional Delay FIR Filter Using Discrete

Fourier Transform Interpolation Method

Chien-Cheng Tseng Su-Ling Lee


Depart. of Computer and Communication Engineering Depart. of Computer Sci. and Information Engi.
National Kaohsiung First University of Sci. and Tech. Chung-Jung Christian University
Kaohsiung, Taiwan Tainan, Taiwan
tcc@ccms.nkfust.edu.tw lilee@mail.cjcu.edu.tw

Abstract—In this paper, the design of fractional delay possible have been developed. Two typical approaches are
FIR filter is investigated. First, the interpolation formula Lagrange interpolation method and window method.
of a discrete-time sequence is derived by using discrete On the other hand, the discrete Fourier transform (DFT) is
Fourier transform (DFT). Then, the DFT-based defined as follows:
interpolation formula is applied to design fractional N −1

delay FIR filter by using suitable index mapping. The X (k ) = ¦ x ( n )W N


kn
0 ≤ k ≤ N −1
n =0 (3)
filter coefficients are easily computed because a closed-
N −1
form design is obtained. Finally, design examples are 1 − kn
x (n ) = ¦ X ( k )W N 0 ≤ n ≤ N −1
demonstrated to show that the proposed DFT method N k =0
has smaller design error than those of the conventional − j 2π
window and Lagrange fractional delay FIR filters when where W N = e N . It is well known that zero padding in
using the same design parameters. the frequency domain provides interpolation in the time
domain. Therefore, we should be able to use zero padding in
the high frequency range of the DFT domain as a means of
I. INTRODUCTION
interpolating finite-duration, discrete-time signals. The
In many signal processing applications, there is a need for details can be found in the literature [6]-[10]. So far, the
a delay which is a fractional of the sampling period. These relation between sinc-based interpolation and fractional
applications include beam steering of antenna arrays, time delay filter has been studied in [11]. However, the method
adjustment in digital receivers, modeling of music that uses DFT interpolation to design fractional delay filter
instruments, speech coding and synthesis, comb filter design has not been investigated. In this paper, we will study how
and analog digital conversion, etc. [1]-[3]. An excellent to use DFT interpolation concept to design fractional delay
survey of the fractional delay filter design is presented in FIR filters. The main advantage is that the filter coefficients
tutorial paper [1]. Recently, the relationships among h ( r ) are easily computed because a closed-form design is
fractional delay, differentiator, Nyquist filter, lowpass filter obtained.
and diamond-shaped filter have been established such that
fractional delay becomes a versatile building block in the II. DFT INTERPOLATION METHOD
designs of these practical filters [4][5]. The ideal frequency In this section, the DFT interpolation formula of even-
response of fractional delay filter is given by
length sequence will be derived. Given DFT X ( k ) of an
D(ω ) = e− jω ( I + d ) (1) even-length real-valued sequence x ( n ) , let us define the
where I is a positive integer and d is a fractional number in zero-padded DFT as
the interval [0,1). The transfer function of the FIR filter of
­ LX ( k ) 0 ≤ k ≤ N2 − 1
length N used to approximate this specification is given by °1
N −1
N
°° 2 LX ( 2 ) k = N2
−r
H (z) = ¦ h(r ) z (2)
X d ( k ) = ®0 N
+ 1 ≤ k ≤ M − N2 − 1
(4)
r =0 2
° 1 LX ( N ) k = M − N2
So far, several methods of designing an FIR filter H ( z ) to °2 2

fit fractional delay specification D (ω ) as closely as °¯ LX ( k − M + N ) M − N2 + 1 ≤ k ≤ M − 1

978-1-4244-1684-4/08/$25.00 ©2008 IEEE 1156


Also, we assume M is an integer multiple of N , say x d ( n ) = T1 + T2
M = LN , where L is called interpolation factor. The −1 N
­ 2
§ − 2π mk 2π nk · ½ (11)
above DFT has zero values in the high frequency range and N −1 ° 1 + 2 ¦ cos ¨ + ¸°
1 ° © N M ¹°
satisfies the following conjugate symmetry condition: = ¦ x( m )® k =1
¾
X d ( M − k ) = X d ( k )* 1≤ k ≤ N
(5)
N m =0 ° + ( − 1) m cos § n π N · °
2 °¯ ¨ ¸ °¿
© M ¹
Now, the interpolated sequence x d (n ) is chosen as the
It can be shown that the above interpolator satisfies the
length-M inverse DFT of X d (k ) , i.e., following equality:
1 M −1 xd (iL ) = x (i ) (12)
xd ( n ) = ¦X d ( k )W M− kn
M k =0
Because the sequence x d (n ) is the interpolated version of
§ −1
N
M −1 · (6) the sequence x (n ) with factor L , we have the following
1 2
¨ ¦ X ( k )W M− kn + − kn ¸
= ¦ X ( k )W relation:
N ¨ k =0 k = M − N2 + 1
M
¸
© ¹ x d (iL + p ) ≈ x (i + Lp ) (13)
+
1
2N
(
−Nn − ( M − N2 ) n
X ( N2 )W M 2 + X ( N2 )W M ) for 0 ≤ p ≤ L − 1 and 0 ≤ i ≤ N − 1 . Combining Eq.(11)
Let k ' = M − k and using the equality W M− Mn = 1 and and Eq.(13), we have
x ( i + Lp ) ≈ x d ( iL + p )
Eq.(5), the second term in Eq.(6) can be written as
−1 N
M −1
N
2
−1 ­ 2
§ 2π ( i + Lp − m ) k · ½ (14)
− kn
= ¦ X ( M − k ' )W − ( M − k ') n °1 + 2 ¦ cos ¨¨
N −1 ¸¸ °
¦ X ( k )W
k = M − N2 +1
M
k ' =1
M =
1
¦ x ( m ) ® k =1 © N ¹¾
(7) N m=0
N
2
−1
°
¯ + ( − 1) cos π ( i + L )
m p
( ) °
¿
= ¦ X (k ' ) W * k 'n N −1

k ' =1
M
= ¦ x ( m )b ( m , i + p
L )
m =0
Substituting Eq.(7) into Eq.(6) and using the equality
−(M − N Nn where the interpolation basis is given by
= W M2 , we have
)n
WM 2
­
N
2
−1
§ 2π (i + Lp − m ) k · ½
−1 N
1 °1 + 2 ¦ cos ¨¨ ¸¸ ° (15)
ª º
1
( )» b ( m , i + Lp ) = N
2
− kn ® k =1 © ¹¾
xd (n) = « X (0) + ¦ X ( k )WM + X ( k ) WM
* kn
N °
¯ + ( − 1) cos (π (i + L ) )
N m p °
«¬ k =1 »¼ (8) ¿

+
1
2N
−N n N
X ( N2 ) WM 2 + WM2
n
( ) Using the identities cos(θ1 − θ2 ) = cos(θ1) cos(θ2 ) + sin(θ1 ) sin(θ2 ) ,
cos( m π ) = ( − 1) m and sin(mπ ) = 0 , we have
Using the DFT defined in Eq.(3), the first term in Eq.(8) can ( − 1 ) m cos( π ( i + p
L ))
be written as (16)
N
−1
= cos( m π ) cos( π ( i + p
L ))
1 N −1 ª º
( )
2

T1 = ¦ x ( m ) «1 + ¦ W Nmk W M− kn + W N− mk W Mkn » § 2 π ( i + Lp − m ) N2 ·
N m =0 «¬ k =1 »¼ (9) = cos ¨¨ ¸
¸
© N ¹
−1 N
1 N −1 ª 2
§ − 2π mk 2πnk ·º Substituting Eq.(16) into Eq.(15), the basis can be rewritten
= ¦ x ( m ) « 1 + 2 ¦ cos ¨ + ¸»
N © N M ¹ ¼» as
m =0 ¬« k =1
N
N 1 2 § 2π ( i + Lp − m ) k · (17)
Moreover, using the equality W N2 = − 1 , the second term in b ( m , i + L ) = ¦ β k cos ¨¨
p
¸¸
N k =0 © N ¹
Eq.(8) can be written as
( )
1
where
− n n N N
T2 = X ( N2 ) W M + WM 2 2
­1 k = 0, N2
2N βk = ® (18)
1 N −1 § nπN · (10) N
¯2 k = 1,2 ," , N2 − 1
=
m
¦
2N m=0
x ( m )W N 2 cos ¨
© M ¹
¸ 2

Finally, one remark is made. Let t = i + Lp , then the value


1 N −1
§ nπN ·
= ¦ ( − 1) m x ( m ) cos ¨© M ¸¹ of t can be any real number in [0,N) if interpolation factor L
N m=0
approaches infinity. Substituting t = i + Lp into Eq.(14), we
Substituting Eq.(9) and Eq.(10) into Eq.(8), the sequence
get
x d (n ) becomes the form:

1157
N −1 Based on this result and Eq.(17), the coefficients h(r ) for
x (t ) ≈ ¦ x ( m )b ( m , t ) (19) even N DFT interpolation formula are given by
m =0 N
1 2
§ 2π ( r − I − d ) k ·
This means that the continuous-time signal x (t ) can be h(r ) =
N
¦β
k =0
k cos ¨
© N
¸
¹
(27)
approximately reconstructed from its samples x(0), x(1), ...,
x(N-1) in the range [0,N) by using continuous-time This result looks similar to Dirichlet kernel in [11].
interpolation basis b ( m , t ) . Substituting Eq.(27) into Eq.(2), the FIR filter H (z ) is the
designed DFT-based fractional delay filter. Fig.2(a)(b)
III. DESIGN OF FRACTIONAL DELAY FIR FILTER shows the magnitude response and group delay of the
In this section, we will use the DFT interpolation formula proposed DFT-based fractional delay FIR filter for N=80,
to obtain the transfer function of fractional delay FIR filter. I=40, and d=0.5. Obviously, the specification is fitted well.
As shown in Fig.1, when a signal s (n ) passes through the
IV. COMPARISONS
FIR filter H (z ) in Eq.(2), its output is the weighted
In this section, numerical examples are used to
average of the integer delayed samples s (n ) , s(n − 1) , demonstrate the effectiveness of the proposed DFT-based
s ( n − 2 ) ,..., s ( n − N + 1) , i.e., method. To evaluate performance, the normalized root mean
N −1 squares (NRMS) error is used and defined by
y (n ) = ¦ h(r )s (n − r ) (20) § απ jω
2
·2
1

r =0 ¨ ³ H ( e ) − D (ω ) d ω ¸ (28)

E = ¨ 0
απ 2 ¸ × 100 %
If the frequency response H (e ) approximates the ¨ ω ω ¸
© ³0 D ( ) d
¹
specification D (ω ) in Eq.(1) well, then this weighted The error is only computed in the frequency band [ 0 , απ ] .
average output y (n ) is almost the same as the fractional Obviously, the smaller the NRMS error E is, the better the
delayed sample s ( n − I − d ) , i.e., performance of design method is.
y (n) ≈ s (n − I − d ) (21) Example 1: In this example, we compare the DFT-based
design with the conventional window method. Taking the
Combining Eq.(20) with Eq.(21), it yields
N −1
inverse discrete-time Fourier transform of D ( ω ) in Eq.(1),
s (n − I − d ) ≈ ¦ h( r ) s (n − r ) (22) the ideal impulse response is given by
r =0 sin( π ( r − I − d ))
h id ( r ) = (29)
Moreover, from Eq.(19), the DFT interpolation formula is π (r − I − d )
given by
N −1
Then, the filter coefficients h(r ) are computed by
x (t ) ≈ ¦ x ( m )b ( m , t ) (23) h ( r ) = w ( r ) hid ( r ) for the conventional window method.
m=0 The design parameters are chosen as N=80, I=40 and
Now, the problem is how to link two expressions in Eq.(22) α = 0 .95 . Fig.3(a) shows the NRMS error curve (solid
and Eq.(23) to obtain filter coefficients h(r ) because basis line) of the rectangular window case (i.e. w( r ) = 1 ) for
b ( m , t ) has been known. In the following, the index d ∈ [ 0 ,1) . The dashed line is the error curve of DFT
mapping will be used to solve this problem. After we method. From these results, it is clear that the error of DFT
choose x (t ) = s ( n − ( N − 1) + t ) , then Eq.(23) can be design is smaller than the error of rectangular window
rewritten as method. Moreover, Fig.3(b) shows the NRMS error curve
N −1 (solid line) of the case of Hamming window defined by
s(n − ( N − 1) + t ) ≈ ¦ s(n − ( N − 1) + m)b(m, t ) (24) § 2π r ·
w ( r ) = 0 . 54 − 0 . 46 cos ¨ ¸ (30)
m =0
© N −1¹
Let m = N − 1 − r and t = N − 1 − I − d , Eq.(24) The dashed line in Fig.3(b) is the error curve of window
reduces to the following form: DFT method, i.e., filter coefficient h(r ) in Eq.(27) is
N −1
s(n − I − d ) ≈ ¦s(n − r)b(N −1− r, N −1 − I − d ) (25) replaced by w( r ) h( r ) . Clearly, window DFT method
r =0 gives smaller design error. Fig.4(a)(b) shows the magnitude
Comparing Eq.(22) with Eq.(25), it is clear that the filter response and group delay of fractional delay FIR filters
coefficients h(r ) are designed by conventional Hamming window method for
N=80, I=40, and d=0.5. Fig.4(c)(d) shows the magnitude
h(r ) = b( N − 1 − r , N − 1 − I − d ) (26) response and group delay of the Hamming window DFT-
based fractional delay FIR filters for N=80, I=40, and

1158
d=0.5. Obviously, window DFT method has smaller error (a) (b)
ripple than conventional window method in group delay 1.5 42

response. 41.5

Example 2: In this example, we compare the DFT-based

magnitude response
1 41
design with the conventional Lagrange method whose filter

group delay
coefficients are given by 40.5

N −1
I + d − k
h (r ) = ∏
0.5 40
(31)
k = 0,k ≠ r r − k 39.5

When the design parameters are chosen as N=100, I=50 and 0


0 0.2 0.4 0.6 0.8 1
39
0 0.2 0.4 0.6 0.8 1
d ∈ [ 0 ,1) , Fig.5(a)(b) shows the NRMS error curve (solid normalized frequency normalized frequency

line) of the Lagrange method for α = 0 .8 and α = 0 .95 . Fig. 2 The designed result of DFT fractional delay FIR filter. (a) Magnitude
The dashed line is the error curve of DFT method. From this response. (b) Group delay response.
result, it is clear that DFT method provides better result than (a) (b)
Lagrange method in the high frequency range. However, 1.8 0.4

1.6
Lagrange approach has smaller error in the low frequency 0.35

region because it is a maximally flat design at ω = 0 .


1.4
0.3

NRMS error E (%)

NRMS error E (%)


1.2
0.25
1
V. CONCLUSIONS 0.8
0.2

0.15
In this paper, the discrete Fourier transform has been 0.6
0.1
0.4
presented to design fractional delay FIR filter. However, 0.05
0.2
only one-dimensional DFT based design is considered here. 0 0
Thus, it is interesting to design two-dimensional fractional 0 0.2 0.4 0.6
fractional number d
0.8 1 0 0.2 0.4 0.6
fractional number d
0.8 1

delay FIR filter by using discrete Fourier transform in the


future. Fig.3 The NRMS error curve (solid line) of the window method. The
dashed line is the error curve of DFT method. (a) Rectangular window
(b) Hamming window.
REFERENCES
(a) (b)
[1] T. I. Laakso, V. Valimaki, M. Karjalainen and U.K. Laine, "Splitting 1.5 42
the unit delay: tool for fractional delay filter design," IEEE Signal 41.5
magnitude response

Processing Magazine, pp.30-60, Jan. 1996. 1 41

group delay
[2] S.C. Pei, P.H. Wang and H.S. Lin, “Closed-form design of maximally 40.5
flat FIR fractional delay filter,” IEEE Signal Processing Letters, 0.5 40
vol.13, pp.405-408, July 2006. 39.5
[3] T.B. Deng and Y. Lian, "Weighted-least-squares design of variable 0 39
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
fractional-delay FIR filters using coefficient symmetry," IEEE Trans. normalized frequency normalized frequency
on Signal Processing, vol.54, pp.3023-3038, Aug. 2006. (c) (d)
1.5 42
[4] C.C. Tseng, "Improved design of digital fractional order
41.5
magnitude response

differentiators using fractional sample delay," IEEE Trans. on


1 41
group delay

Circuits and Systems-I, vol.53, pp.193-203, Jan. 2006.


40.5
[5] C.C. Tseng, "Designs of fractional delay filter, Nyquist filter, lowpass
0.5 40
filter and diamond-shaped filter," Signal Processing, vol.87, pp.584-
39.5
601, Apr. 2007.
0 39
[6] D. Fraser, "Interpolation by the FFT revisited- an experimental 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
normalized frequency normalized frequency
investigation," IEEE Trans. on Acoust., Speech and Signal
Processing, vol.37, pp.665-675, May 1989. Fig.4 The magnitude response and group delay of fractional delay FIR
[7] Z.W. Wang, J.J. Soltis and W.C. Miller, "Improved approach to filters. (a)(b) Conventional Hamming method, (c)(d) Hamming
interpolation using the FFT," Electronics Letters, vol.28, pp.2320- window DFT-based method.
2322, Dec. 1992.
[8] T.J. Cavicchi, "DFT time-domain interpolation," IEE Proc.-F, 0.05
(a)
7
(b)

vol.139, pp.207-211, June 1992.


6
[9] M.D. Macleod, "Fast interpolation by FFT with greatly increased 0.04
accuracy," Electronics Letters, vol.29, pp.1200-1201, June 1993. 5
NRMS error E (%)

NRMS error E (%)

[10] T.J. Cavicchi, Digital Signal Processing, John Wiley & Sons, 2000. 0.03
4
[11] S.R. Dooley and A.K. Nandi, “Notes on the interpolation of discrete
periodic signals using sinc function related approaches,” IEEE Trans. 0.02
3

on Signal Processing, vol.48, pp.1201-1203, Apr. 2000. 2


0.01
1
Fractional delay filter
N −1 0 0
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
z − (I + d ) ≈ ¦ h (r ) z − r fractional number d fractional number d

s(n) r=0 y(n) ≈ s(n − I − d)


Fig.5 The NRMS error (solid line) of the Lagrange method. The dashed
Fig.1 The input/output relation of the fractional delay FIR filter. line is the error of the DFT method. (a) α = 0.8 (b) α = 0.95 .

1159

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy