-
1997
IEEE
International Symposium
on
Circuits and System,r,
June
9-12, 1997,
Hong
Kong
A
COMB
FILTER
DESIGN
USING
FRACTIONAL-SAMPLE DELAY
Soo-Chang Pei Chien- Cheng Tseng
Department of Electrical Engineering,
National Taiwan University.
Taipei, Taiwan,
R.
0.
C.
China
:Email address: pei@cc.ee.ntu.edu.tw
ABSTRACT
In this paper, a new comb filter design method using
fractional sample delay is presented. First
,
the specifica-
tion of the comb filter design is transformed into that of
fractional delay filter design. Then, conventional
FIR
and
allpass filter design techniques are directly applied to design
fractional delay filter with transformed specification. Nex-
t, we develop a constrained fractional delay filter design
approach
to
improve the performance of the direct design
method. Finally, several design examples are demonstrated
to illustrate the effectiveness
of
this new design approach.
1.
INTRODUCTION
In
many applications of signal processing it is desired to
remove harmonic interferences while leaving the broadband
signal unchanged. Examples are in the areas of biomedi-
cal engineering, communication and control[l]-[5].
A
typ-
ical one
is
to cancel power line interference in the record-
ing of electrocardiogram (ECG). Usually, this task can be
achieved by the comb filter whose desired frequency re-
sponse is periodic with small stop-band notches at
0
He
to remove base-line wander as well
as
at
50
He
and at its
higher harmonics to remove power line disturbance [l].
So
far, several methods have been developed to design
IIR
and
FIR
comb filters. When the fundamental frequency of har-
monic interference is known in advance [1][5], fixed comb
filter can be used. However, when fundamental frequency
is unknown
or
time varying, adaptive comb filters are ap-
plicable [2]-[4]. In this paper, we will focus on fixed comb
filter design problem.
Recently, fractional sample delay has become an impor-
tant device in numerous field
of
signal processing, includ-
ing communication, array processing, speech processing and
music technology.
An
excellent survey of the fractional de-
la,y filter design is presented in tutorial paper [6]. Based
on
this useful and well-documented device, we will estab-
lish the relation between the comb filter design problem and
the fractional delay filter design problem.
As
a result, the
comprehensive design tools of the fractional delay filter in
the literature can be applied to design comb filter directly.
2.
COMB FILTER DESIGN USING
FRACTIONAL SAMPLE IDELAY
Generally, the input signal of comb filter has the fol-
lowing form:
M
z(n)
=
s(n)
+
Ak
sin(kwon
+
$k)
k=O
where
s(n)
is the desired signal and
I(n)
is harmonic inter-
ference with fundamental frequency
WO.
In order to extract
s(n)
from the corrupted signal
z(n)
undistortedly, the spec-
ification of ideal comb filter is given by
The purpose of this paper is to design
a
filter such that its
frequency response approximates
&(U)
as well as possible.
To
achieve this purpose, we first show that the harmonic
interference
I(n)
satisfies the following property. Define
the fractional sample delay
D
=
$
which is the period of
the harmonic interference
I(n),
then we have
I(n)
=
I(n
-
D)
(3)
This expression tells us that
I(n)
is equal to its delayed
version
I(n
-
D).
Thus, if the signal
z(n)
passes through
the filter
H(z)
=
1
-
z-~,
then its output
y(n)
is given by
y(n)
=
z(n)-z(n-D)
=
s(n)
-
s(n
-
D)
(4)
Obviously, the harmonic interference has been eliminated
in
the output
y(n).
However,
y(n)
is
not
equal to
s(n),
i.e., some distortion is included in the signal
y(n).
In order
to explain this phenomenon, Fig.1 shows the frequency re-
sponse of the filter
H(z)
=
1
-
z-~
and desired frequency
response
Hd(W)
defined in
(2)
with
WO
=
0.22~
and
M
=
4.
Note that we usually choose
M
=
151
which denotes the
largest ihteger smaller than or equal to
$.
It is clear that
both responses have the same positions of stop-band notch-
es, but they have a large difference in the passband. In
order to remove this distortion, a compensation procedure
is performed as follows: It is easy to show that the zeros of
the filter
H(z)
=
1
-
z-~
are given by
(5)
’
27r
k
Zk
=
e3r
k
=
any integer
For all zeros
Zk,
we introduce the poles
to eliminate the distortion in
response of
H(z)
=
1
-
z-~.
satisfy the inequality
0
<
p
poles to be within the unit
k
=
any integer (6)
the passband of the frequency
The radius of the pole
p
must
<
1
in order to constrain the
circle. After performing this
compensation, the new transfer function
of
the comb filter
is given by
The Fig.2 shows the frequency response of
H,(z)
with pa-
rameters
w~
=
0.22~
and
p
=
0.99.
It is clear that the
frequency response of filter
H,(z)
approximates
fld(W)
very
well. In fact,
H,(z)
becomes an ideal comb filter when pole
radius
p
approaches unity. Moreover, the direct form im-
plementation of IIR comb filter
H,(z)
in eq(7) only requires
a fractional sample delay
zPD.
When
D
is an integer, the
delay
zPD
is implementable without requiring any design.
However, when
D
is not an integer, we need to design frac-
tional sample delay
zPD.
In
[6],
a comprehensive review of
FIR
and allpass filter design techniques for approximation
of fractional delay has been presented. Thus, we can di-
rectly use these well-documented techniques to design
z-~.
Now, two examples are provided to illustrate the perfor-
mance of the method. One concerns FIR design case, the
other is
IIR
allpass filter case.
Example
1:
FIR fractional delay case
In this example, we use Lagrange interpolation method
to design an FIR filter for approximating a given fractional
delay
zPD
[6].
In this method, the delay
z-~
is approxi-
mated by
N
n=O
where filter coefficients
h(n)
have the explicit
form
as:
n
=
0,
l,.'.
,
N
(9)
n-k
k=O,k+n
When the parameters are chosen
as
w
=
0.227r,p
=
0.99
and
N
=
16,
the frequency response of
H,(z)
is shown
in Fig.3. It
is
clear that the comb filter has an excellent
approximation at low frequency because the Lagrange in-
terpolation design is a maximally flat design at frequency
w
=
0.
Example
2:
Allpass fractional delay case
In this example, we use the maximally flat group delay
allpass filter to approximate a given fractional delay
z-~
[6].
In this case, the
z-~
is approximated by
If the positive real number
D
is splitted an integer
N
plus
a fractional number
d,
i.e,
D
=
N
+
d,
the filter coefficients
Uk
is given by
n=O
where
Cf
=
is
a binomial coefficient.
The Fig.4
shows the frequency response of the comb filter in this de-
sign if the parameters are chosen as
WO
=
0.22a,p
=
0.99.
It is clear that the specification is well satisfied at low fre-
quency.
3.
COMB
FILTER DESIGN BASED ON
CONSTRAINED FRACTIONAL DELAY
FILTER DESIGN
Although the design methods in the example
1
amd
example
2
provide two excellent approximations to the ideal
comb filter, the frequency responses at harmonic frequencies
kwo
are not exactly zero valued. This result makes the
harmonic interference
I(n)
can not be eliminated clearly by
the designed comb filter. In order to remove this drawback,
some suitable constraints need to be incorporated in the
design of fractional sample delay
zWD.
In the following,
the cases of FIR filter and allpass filter will be described in
details.
3.1:
FIR Fractional Delay Filter Design:
In this subsection, we will design an
FIR
filter to ap-
proximate the fractional smaple delay
z-~.
The transfer
function of a causal Nth order
FIR
filter can be represent-
ed as
N
H(z)
=
h(n)ZYn
n=
0
The frequency response of the FIR filter is given by
H(w)
=
hte(w)
=
et(w)h
(12)
where vectors
h
and
e(w)
are
h
=
[h(O)
h(l)...h(N)]*
=
e-jw
. . .
e--jNw]t
(13)
For fractional delay filter desi n, the desired frequency re-
sponse
Fd(W)
is chosen as e-j In this paper, the filter
coefficients
h
are obtained by minimizing the following least
squares error:
B
IH(w)
-
Fd(w)12dw
(14)
J
J(h)
=
wE(R+
UR-
)
where frequency bands
RS
=
[O,aa]
and
R-
=
[-a?r,O].
Using the conjugate symmetric property of
H(w)
and
Fd(w),
the error
J(h)
can be rewritten
as
the quadratic
form:
J(h)
=
htQh
-
2htp
+
c
(15)
where matrix
Q,
vector
p,
and scalar c are real and given
by
Re(
e( ")eH
(w
))dw
=
2LER+
Re(
Fd(w)e*
(w))dw
c
=
2
LE,+
IFd(w)12dw
=
2aa
(16)
The
H
denotes the Hermitian conjugate transpose opera-
tor, and Re(.) stands for the real part of
a
complex number.
In order
to
make comb filter be exactly
zero
valued at the
harmonic frequencies
kwo,
the following constraints are con-
sidered in the design procedure:
~(kw~)
=
e--jDkwo
IC
==
0,1,...,M
(17)
2229
where
M
=
1x1.
After some maniputation, these con-
straints can be written in vector matrix form
Ch
=
f,
where
real valued matrix
C
and vector
f
are given by
c
=
[e(o),
Re(e(wo)), Im(e(wo)),
. . .
,
Im(e(Mwo))lt
f
=
[l,cos(Dwo), -sin(Dwo),..., -sin(DMwo)lt
WO
where
In(.)
stands for the imaginary part of a complex
number. Using tne Lagrange multiplier method, the opti-
mal solution of this constrained problem is given by
h
=
Q-lp
-
Q-lCt(CQ-'Ct)-l[CQ-'~
-
f]
(18)
Now, we use an example to examine the performance of this
design method.
Example
3:
Constrained
FIR
Filter Case
In this example, the design parameters are chosen as
a!
=
0.!3,
WO
=
0.22a,p
=
0.999 and
N
=
16. The frequency
response of the designed comb filter
H,(z)
is shown in Fig.5.
It
is clear that the frequency response of the comb filter is
exactly zero valued at harmonic frequencies
kq,
and almost
has unity gain at the remaining frequencies.
3.2:
Allpass Fractional Delay Filter Design:
It is easy to show that the phase response
OA(c4.J)
of the
allpas filter in eq(l0) can be written
as
The purpose of this subsection is to design an allpass fil-
ter such that the
Oa(w)
approximates the prescribed phase
response
-Dw,
that is, we want to achieve the following
specification:
eA(W)
=
-DW
w
E
[O,a!a]
(20)
atb(w)
=
-sin
@(TU))
(21)
Substitute eq(19) into eq(20), we obtain the expression [7]:
where
p(w)
=
+(-Ow
+
Nw),
and two vectors
a
=
[a1
a2 ...aivIt
b(w)
=
[sin(P(w)
+
w)
.
.
.sin(P(w)
+
Nw)It
In
this paper, we will minimize the following least squares
error to obtain optimal filter coefficients a:
J(a)
=
lUT
latb(w)
+
sin(fl(w))12dw
=
atQa
-
2pta
+
c
(22)
where matrix
Q,
vector
p
and scalar
c
are given by
Q
=
b(w)b(w)tdw
P=
-
1
b(w)
sin(P(w)')dw
a7r
a7r
c
=
Lar
sin(p(
w))~
dw
(23)
In
order to make
comb
filter
be
exactly
zero
valued
at
har-
monic frequencies
kwo,
the following constraints are incor-
porated in the design:
where
M
=
I$].
After some maniputation, these con-
straints can be written in vector matrix form
Ca
=
f,
where
real valued matrix
C
and vector
f
are given by
C
=
[b(wo),
b(2wo),
. .
.
b(Nwo)lt
f
=
[-
sin(@(wo)),
-
sin(P(2wo)),
. . .
,
-
sin(P(Nwo))It
Using tne Lagrange multiplier method, the optimal solu-
tion of this constrained problem can be obtained
as
FIR
design case. Finally, we use an example to investigate the
performance of this design method.
Example
4:
Constrarned Allpass Fzlter Case
In this example, the design parameters are chosen as
a!
=
0.9,
WO
=
0.22alp
=
0.999 and
N
=
LE]
=
9, The
frequency response of
H,(z)
is
shown in Fig.6. It is clear
that the frequency response of the designed comb filter is
exactly zero valued at harmonic frequencies
kq,
and almost
has unity gain ab the remaining frequencies.
4.
CONCLUSION
In this paper, a new comb filter design method using
fractional sample delay has been presented. First, the spec-
ification of the comb filter design is transformed into that
of fractional delay filter design. Then, the FIR and allpass
filter design techniques are directly used to design fractional
delay filter with transformed specification. Next, we devel-
op a constrained fractional delay filter design approach to
improve the performance of the direct design method. Fi-
nally, several design examples are demonstrated to illustrate
the effectiveness of this new design approach.
REFERENCES
[l]
J.A. VAN ALSTE and T.S. Schilder, "Removal
of
Based-Line Wander and Power-Line Interference from
the ECG by an Efficient FIR Filter with Reduced Num-
ber of Taps",
IEEE
Trans. Biomedical Engineering,
Vol.BME-32, pp.1052-1060, Dec. 1985.
[2]
J.D.
Wang and
H.J.
Trussell, "Adaptive Harmonic Noise
Cancellation with an Application to Distribution Power
Linea Communication",
IEEE
Trans. Communications,
Vol. 36, pp.875-884, July
19
88.
[3] A. Nehorai and
B.
Porat, "Adaptive Comb Filtering for
Harmonic Signal Enhancement" IEEE Trans. Acoust.
Speech and Signal Processing, Vol.ASSP-24, pp.1124-
1138,
Nov. 1986.
[4]
Y.K.
Jang anf
J.F.
Chicharo, "Adaptive IIR Comb
Fil-
ter ffor Harmonic Signal Cancellation", Int.
J.
Electron-
ics, vo1.75, pp.241-250, 1993.
[5] S.C Pei and C.C. Tseng, "Elimination of AC Interfer-
ence in Electrocardiogram Using IIR Notch Filter with
Transdient Suppression",
IEEE
Trans. Biomedical En-
gineering, vo1.42, pp.1128-1132, Nov. 1995.
[6] T.I. Laakso, V. Valimaki,
M.
Karjalamen and U.K.
Laine, "Splitting the Unit Delay: Tools for Fraction-
al Delay Filter Design",
IEEE
Signal Processing Maga-
zine", pp.30-60, Jan. 1996.
[7]
M.
Lang and
T.I.
Laakso, "Simple and Robust Method
for the Design of Allpass Filters Using Least Squares
Phase Error Criterion", IEEE Trans. Circuits Syst. 11:
Analog
and
Digital
Signal
Processing,
Vn1
41,
pp
40-48,
Jan. 1994.
atb(kwo)
=
-sin
(P(kwo))
k
=
1,2,...,M (24)
25130
Figure
1:
The frequency responses
of
the filter
H(z)
=
1
-
.z-~
(dashed
line) and the ideal comb filter (solid
line).
Figure
2:
The magnitude response
of
the comb filter
H,(z).
Figure
3:
The magnitude response
of
the
designed comb filter in example
1.
Figure
4:
The magnitude response
of
the designed
comb
filter in example
2.
Figure
5:
The magnitude response
of
the designed comb filter in example
3.
"I
Figure
6:
The magnitude response
of
the designed comb filter in example
4.
2231