You are on page 1of 5

JID:YDSPR AID:1381 /FLA [m5Gv1.5; v 1.88; Prn:7/02/2013; 13:55] P.

1(1-5)
Digital Signal Processing ()
Contents lists available at SciVerse ScienceDirect
Digital Signal Processing
www.elsevier.com/locate/dsp
Digital linear phase notch lter design based on IIR all-pass lter
application
Goran Stan ci c, Saa Nikoli c

University of Ni, Faculty of Electronic Engineering, Aleksandra Medvedeva 14, 18000 Ni, Serbia
a r t i c l e i n f o a b s t r a c t
Article history:
Available online xxxx
Keywords:
All-pass lters
Parallel connection
Notch lter
Linear phase
Phase approximation
A new procedure for design of linear phase IIR notch lters is presented in this paper. Resulted lter is
realized using parallel connection of two IIR all-pass lters with approximately linear phase. Adequate
amplitude characteristic is obtained by approximation of all-pass lter phase. Amplitude characteristic
satises all prescribed demands but it is not equiripple no matter both all-pass lters have equiripple
phase. Algorithm exhibits fast convergence and easy initial values determination.
2013 Elsevier Inc. All rights reserved.
1. Introduction
There is a need for notch lters in many signal processing ap-
plications including communications, image processing, biomedical
engineering, control, etc. These lters are characterized by a unit
gain at all frequencies except frequencies where their gain is zero.
Practically digital notch lters remove a single or multiple non-
desired frequency components from signal. Notch lters can be
designed as either FIR or IIR notch lters. Usually, the IIR notch
lter is preferred when notch bandwidth is very small because
it requires less computation comparing with FIR notch lter with
similar characteristics.
Digital FIR notch lter need long lter length to fulll mag-
nitude specications, but they are always stable and can provide
linear phase response. If signal delay, which is proportional to the
lter length, is not critical parameter in design FIR notch lter is
a good solution. Standard FIR lter design methods, such as win-
dowing, frequency sampling or optimization can be used for FIR
lter design. The recent design techniques are proposed in [13].
There are several methods for design of IIR notch lters. At the
beginning it is possible to design digital notch lters by trans-
forming analog notch lter into digital IIR lter [4,5]. The other
approach is pole-zero placements in the z plane [6,7] with effort
to control size of the pass-band width and at the same time to
solve problem of asymmetric pass-band according to notch fre-
quency position.
The third approach is implementing notch lter using all-pass
lters. Parallel connection of all-pass lters exhibits low sensitivity
*
Corresponding author.
E-mail addresses: goran.stancic@elfak.ni.ac.rs (G. Stan ci c),
sasa.nikolic@elfak.ni.ac.rs (S. Nikoli c).
to coecient quantization and allows standard low-pass, high-pass
and band-pass (band-stop) lters to be realized as well as with
arbitrary number of bands [8,9]. Such approach can be modied
and applied on design of IIR notch lters.
All existing algorithms explain how to realize notch lter using
parallel structure with all-pass lter in one branch [11,12]. Result-
ing notch lter has piecewise constant phase characteristic.
In this paper we propose a new method where we use in
both branches IIR all-pass lters and we realized a phase jump
of 2 rad in both branches at different frequencies realizing
two notch frequencies as it is prescribed. Phase characteristics of
both used all-pass lters are equiripple approximating ideal linear
phase. Amplitude characteristic of obtained notch lter depends on
all-pass lters phase difference. From this reason resulting ampli-
tude characteristic will not be equiripple, but it will satisfy pre-
scribed limitations. Using this method it is practically possible to
realize notch lter with arbitrary phase characteristic. This fact is
a novelty comparing with the other existing methods based on all-
pass lters application.
Comparing with similar existing procedure for realization of
standard lters [10] proposed method is more ecient demand-
ing less iterations. Procedure for calculation of initial solutions in
order to have stable convergence is also proposed.
2. The approximation
For lters realized through parallel connection of all-pass lters,
displayed in Fig. 1, transfer function is
H(z) =
1
2
_
A
N
1
(z) + A
N
2
(z)
_
=

H
_
e
j
_

e
j()
. (1)
1051-2004/$ see front matter 2013 Elsevier Inc. All rights reserved.
http://dx.doi.org/10.1016/j.dsp.2013.01.006
JID:YDSPR AID:1381 /FLA [m5Gv1.5; v 1.88; Prn:7/02/2013; 13:55] P.2(1-5)
2 G. Stan cic, S. Nikolic / Digital Signal Processing ()
Fig. 1. Realization of IIR selective digital lter using parallel connection of two IIR
all-pass lters.
Selective amplitude characteristic is obtained by adequate
phase difference in two parallel branches. Resulting amplitude
characteristic is given by

H
_
e
j
_

cos

1
()
2
()
2

(2)
and the phase is
() =

1
() +
2
()
2
(3)
where
1
() and
2
() denote phase of all-pass lters. In regions
where phase difference is approximately equal to zero pass-bands
and in regions where phase difference is approximately equal to
rad stop-bands are obtained.
This solution is general in the sense that only mutual rela-
tion between phases of all-pass lters from parallel branches is
important and not the very values of the phases. It means that us-
ing parallel conguration it is possible to realize selective lters
with arbitrary phase characteristic shape according to Eq. (3). It is
enough that both lters approximate the same prescribed phase
function in whole pass-band.
In practical applications there is often request resulting lter to
have approximately linear phase characteristic and it is possible to
achieve using several methods.
One solution of this problem is to place delay line of order N
in the rst branch ( A
N
1
(z) = z
N
), while in the second branch is
all-pass lter with phase approximating linear phase of slope N
with existence of rad phase jumps at frequencies where bound-
aries between pass-bands and stop-bands are located. In order to
realize lter with M pass-bands and stop-bands in total, it is nec-
essary that order of all-pass lter A
N
2
(z) is N + M. So, for given
phase slope order of applied all-pass lters is unique.
In proposed solution in both parallel branches IIR all-pass lters
are applied. Now, for given phase slope N to realize M bands there
are more then one solution. Orders of all-pass lters N
1
and N
2
must fulll condition
N
1
+ N
2
= M +2N 1. (4)
It is also possible to realize single and multiple notch lter if
we use in both branches IIR all-pass lters.
3. Algorithm
There is a straightforward dependence between notch lter
magnitude and all-pass lters phase difference (2). Based on this
relationship it is possible to calculate maximal allowed phase error
for prescribed maximal attenuation. Taking into account the fact
that in proposed method we use two IIR all-pass lters in paral-
lel branches, in the worst case maximal error can be twice higher
comparing with well-known method where delay line in the rst
branch is used. We can conclude that in order to control the max-
imum loss in the desired range we have to choose next values for
maximal phase errors

21
nal
=
22
nal
= arccos
_
10
a
max dB
/20
_
(5)
where
21
and
22
represent allowed phase error in the second
pass-band of the rst and second all-pass lter respectively and
a
max dB
is maximal allowed attenuation in the pass-band.
Thus we choose to control maximal attenuation in the second
pass-band. Maximal attenuation in the rst pass-band would have
optimal (minimal) value for given parameters. If obtained attenu-
ation in the rst pass-band is higher than prescribed value a
max dB
one way to make it smaller is to relocate one pole from the sec-
ond pass-band to the rst pass-band. By this way higher number
of extremals m
1k
is guarantee of smaller phase error in that pass-
band on account of higher phase error in the second pass-band. In
the other approach we can keep the same numbers of extremals in
pass-bands m
1k
and m
2k
, but now using expression (5) we deter-
mine
11
nal
and
12
nal
instead of parameters
21
nal
=
22
nal
which
will be optimized.
For even order lter initial solutions are determined by this way

k
(i) = (2i 1)

N
k
i = 1 : (m
1k
1)/2

k
_
m
1k
+1
2
_
= (m
1k
+1)

N
k

k
_
m
1k
+1
2
+ i
_
= (m
1k
+2 +2i)

N
k
i = 1 : (m
2k
2)/2

k
(i) =0.95 i = 1 : N
k
/2 1
(6)
where subscript k is equal to k = 1 for the rst IIR all-pass lter
or k = 2 for the second IIR all-pass lter. The pole
k
(
m
1k
+1
2
) with
phase angle equal to (m
1k
+1)

N
k
is double, i.e. with expression (6)
only all different poles are given.
For notch frequency initial value we choose

notch2
start
=
2
_
m
12
+1
2
_
= (m
12
+1)

N
2
. (7)
Practically notch frequency initial value is located on the unit
circle at the same phase angle as double pole phase angle which
will contribute to phase jump of 2 rad. This value will be ad-
justed in every iteration step and at the very end notch frequency
will have prescribed value.
If the lter order is odd with real pole with zero phase angle
than initial values can be obtained from the next formula

k
(i) =2(i 1)

N
k
i = 1 : (m
1k
)/2

k
_
m
1k
2
+1
_
= (m
1k
+1)

N
k

k
_
m
1k
2
+1 + i
_
= (m
1k
+2 +2i)

N
k
i = 1 : (m
2k
1)/2

k
(i) =0.95 i = 1 : (N
k
1)/2
(8)
or for real pole with phase angle equal to

k
(i) = (2i 1)

N
k
i = 1 : (m
1k
1)/2

k
_
m
1k
+1
2
_
= (m
1k
+1)

N
k

k
_
m
1k
+1
2
+ i
_
= (m
1k
+2 +2i)

N
k
i = 1 : m
2k
/2

k
(i) =0.95 i = 1 : (N
k
1)/2.
(9)
Initial values for phase deviations can be estimated and we
choose phase error to be the same at rst iteration step
1start
=

2start
, which correspond to phase error of allpass lter with
equidistant simple poles located at same circle of radius .
The rst step is design of IIR all-pass lter which will pro-
vide 2 rad phase jump at frequency
notch2
. The aim is to design
JID:YDSPR AID:1381 /FLA [m5Gv1.5; v 1.88; Prn:7/02/2013; 13:55] P.3(1-5)
G. Stan cic, S. Nikolic / Digital Signal Processing () 3
IIR all-pass lter with phase which will approximate linear phase
characteristic in minimax sense.
Starting from N
2
we reduce the phase slope in step 0.2 until
slope N
2
2 is reached. Current slope is marked with l and current
value for phase error and notch frequency are

22
=
22start

N
2
l
2
(
22start

22nal
) (10)

notch
2
=
notch2
start

N
2
l
2
(
notch2
start

notch2
nal
). (11)
Reducing the slope phase jump rises and for slope l currently
realized phase jump is
J = (N
2
l). (12)
While the maximum increment satises condition to be greater
than arbitrary chosen value (in our case we used condition
max(|
i
|) >10
10
) we are solving next system of linear equations

2
,

2
,
j
_
+

i
_

2i

2i
+

2i

2i
_
(l
j
)
= (1)
j+1
(
12
+
12
), j = 1 : m
12

2
,

2
,
j
_
+

i
_

2i

2i
+

2i

2i
_
(l
j
J )
= (1)
j+1

22
, j =m
12
+1 : m
12
+m
22

2
,

2
,
notch2
_
+

i
_

2i

2i
+

2i

2i
_
(l
notch2
)
=
J
2
(13)
where with

and

are noticed initial values and with and


are noticed their corresponding corrections.
We get corrections for the module and phase angles of the
all-pass lter poles as well as correction for the maximal phase
error
1
. With
j
are marked frequencies where function of the
phase error has maximums and minimums. These frequencies are
determined equating the rst derivative of the phase error function
with zero. System of equations can be given in the matrix form
A =B (14)
where elements of matrix A can be obtained from the next expres-
sion
A(i, j) =

2
,

2
,
i
)

2 j
for i = 1 : N
2
2, j = 1 : N
2
/2 1
(

2
,

2
,
i
)

2 j
for i = 1 : N
2
2
j = N
2
/2 : N
2
2
(

2
,

2
,
notch2
)

2 j
for i = N
2
1, j = 1 : N
2
/2 1
(

2
,

2
,
notch2
)

2 j
for i = N
2
1, j = N
2
/2 : N
2
2
(1)
i
for i = 1 : m
12
, j = N
2
1
0 elsewhere
(15)
where increment vector is
= [
21
,
22
, . . . ,
2(N
2
/21)
,
21
,
22
, . . . ,

2(N
2
/21)
,
12
]
T
and column vector B is
B =

12
l
1
(

2
,

2
,
1
)
.
.
.

12
l
m
12
(

2
,

2
,
m
12
)

22
l
m
12
+1
(

2
,

2
,
m
12
+1
)
.
.
.

22
l
m
12
+m
22
(

2
,

2
,
m
12
+m
22
)

J
2
l
notch2
(

2
,

2
,
notch2
)

. (16)
Now we start with design of the second IIR all-pass lter with
aim to realize adequate phase difference.
For notch lter with two notch frequencies both IIR all-pass l-
ters are of the same order N
1
= N
2
. Now instead of earlier used
parameters m
12
and m
22
we shall use new parameters m
11
and
m
21
in system of Eqs. (13).
During the design of the rst lter we approximated ideal lin-
ear phase. However, in general case at frequency
notch1
there is
deviation from ideal value and based on this fact we can calculate
correction parameter
C = (
2i
,
2i
,
notch1
) (2 N
2
)
notch1
. (17)
Now during the design of the second lter it is necessary to
correct phase jump for this value in order to get phase difference
precisely equal to rad at frequency
notch1
. System of Eqs. (14)
must be modied. Phase jump correction C will be also gradu-
ally increased through iterations as slope decreases and at the end
when nal phase slope will be N
1
2 than parameter C will get
right value. For iteration where current slope is equal to l column
vector B will be
B =

12
l
1
(

1
,

1
,
1
)
.
.
.

12
l
m
12
(

1
,

1
,
m
12
)

22
l
m
12
+1
(

1
,

1
,
m
12
+1
)
.
.
.

22
l
m
12
+m
22
(

1
,

1
,
m
12
+m
22
)
N
1
l
2
C
J
2
l
notch1
(

1
,

1
,
notch1
)

. (18)
When the second IIR all-pass lter design is nished their
phase difference is exactly equal to rad at frequency
notch1
.
Phase difference at frequency
notch2
will be exactly equal to rad
only if phase of the rst IIR all-pass lter has value (2N
1
)
notch2
at the same frequency. It is not case in general. The consequence is
that the second notch frequency will not be at prescribed location.
In subsequent calculations, already obtained lters are used as
initial solution. System of Eqs. (13) will be modied and instead
of parameter l we shall use for the rst IIR all-pass lter N
1
2
and for the second IIR all-pass lter N
2
2. Modied system can
be solved after only a few iterations and nal value for lter coef-
cients will be obtained.
Before we start to solve modied system of equations it is nec-
essary to calculate exact phase difference at frequency
notch2
from
expression
D =
1
(
1i
,
1i
,
notch2
)
2
(
2i
,
2i
,
notch2
) (19)
from where we can determine parameter p from the next relation
p =
_
1 for D >
2 for D < .
(20)
JID:YDSPR AID:1381 /FLA [m5Gv1.5; v 1.88; Prn:7/02/2013; 13:55] P.4(1-5)
4 G. Stan cic, S. Nikolic / Digital Signal Processing ()
Table 1
Poles of the all-pass lters.
i N
1
=14 N
2
= 14
m
11
= 3, m
21
=9 m
12
=7, m
22
= 5

1i

1i

2i

2i
1 0.950116104614323 0.784806848107493 0.935722637813620 1.741581812276764
2 0.885228608945960 0.257161080465823 0.798490016072218 0.252105202332079
3 0.887339163921810 1.316680826439614 0.800690471417992 0.753805354101659
4 0.886248693130047 1.836222345100820 0.809960400359928 1.244514231160030
5 0.886038668785510 2.358004642991389 0.881547038958791 2.329294007666212
6 0.885978568810652 2.880352583153159 0.882246721332122 2.871438525386001
7 0.950116104614323 0.784806848107493 0.935722637813620 1.741581812276764
Fig. 2. Phase of the rst (a) and the second (b) IIR all-pass lter, and phase of the
notch lter (c).
In order to get prescribed value for the second notch frequency

notch2
it is necessary to make correction of the both lters co-
ecients. During the calculation of the second IIR all-pass lter
coecients we shall use instead of prescribed
notch2
value cor-
rected value
notch2
=

notch2
+ (1)
p
step. The starting value for
parameter step can be arbitrary chosen and we used in our calcu-
lations step =0.001.
After every iteration step we calculate again parameter D from
Eq. (19) and parameter p from Eq. (20). If value of parameter p
is different comparing with previous iteration than we halve pa-
rameter step (step = step/2) until value of parameter step becomes
less than arbitrary chosen value. In our case we used 10
10
. Now
phase difference at frequency
notch2
will be equal to rad.
4. Examples
The procedure for design of notch lter with two notch fre-
quencies realized through parallel connection of two IIR all-pass
lters is illustrated. In this case both IIR all-pass lters are of the
same order N
1
= N
2
= 14. Prescribed values for notch frequencies
are
notch1
= 0.25 and
notch2
=0.55. Given parameters for the
rst IIR all-pass lter are m
11
= 3 and m
21
= 9 and for the sec-
ond are m
12
= 7 and m
22
= 5. Maximal attenuation for the both
IIR all-pass lter in parallel branches is a
max
= 0.5 dB.
Locations of the poles for both IIR all-pass lters are presented
in Table 1.
Phase characteristics of both IIR all-pass lters and resulting
phase of the notch lter are displayed in Fig. 2. Phase deviation
of the realized notch lter is displayed in Fig. 3. Attenuation char-
acteristic of obtained notch lter is displayed in Fig. 4 and group
delay of the realized notch lter is displayed in Fig. 5.
Fig. 3. Phase deviation of the notch lter.
Fig. 4. Attenuation of the notch lter.
We can see that amplitude characteristic is not equiripple and
obtained maximal attenuations in three pass-bands are 0.122 dB,
0.209 dB and 0.0457 dB, respectively. In proposed algorithm for
realization lter with two notch frequencies based on fact that ap-
plied IIR all-pass lters are of the same order phase angles of poles
of all-pass lters differ slightly especially in the second pass-band
because the same maximal allowed phase error is prescribed. It is
the reason that realized attenuation in the third band is signi-
cantly less than prescribed value.
Comparing with method described in [5] if both lters have the
same stop-band width our solution will have signicantly better
stability margins.
JID:YDSPR AID:1381 /FLA [m5Gv1.5; v 1.88; Prn:7/02/2013; 13:55] P.5(1-5)
G. Stan cic, S. Nikolic / Digital Signal Processing () 5
Fig. 5. Group delay of the notch lter.
5. Conclusion
A new method for design of approximately linear phase notch
lter is presented in this paper. Resulting notch lter is obtained
using parallel connection of two IIR all-pass lters. Obtained am-
plitude characteristics is not equiripple no matter that used IIR
all-pass lters have equiripple phase characteristics. The procedure
for determining of initial solution is also proposed.
Explained method can be used to realize lter with single or
multiple notch frequencies if in one branch is all-pass lter with
phase approximating ideal linear phase at all frequencies from zero
to Nyquist frequency. In that case in the other branch is all-pass l-
ter with piecewise linear phase with phase jump of 2 rad in the
vicinity of each notch frequency. After design of the rst lter cor-
rection parameters C for all notch frequencies can be determined
and take into account during design of the second all-pass lter.
Proposed method is illustrated on an example for design of l-
ter with two notch frequencies.
Compared with FIR lters IIR notch lters require lower orders
for ecient approximation of desired magnitude characteristic, but
do not provide linear phase in general. It is possible to reduce
phase distortion by all-pass phase equalizers. In practice equalizer
is usually more complex than lter itself. Method proposed in this
paper overcome this problem and provide notch lter with approx-
imately linear phase.
References
[1] S.C. Dutta Roy, B. Kumar, S.B. Jain, FIR notch lter design a review, Facta
Univ. 14 (3) (2001) 295327.
[2] M.B. Joaquim, C.A. Lucietto, A nearly optimum linear-phase digital FIR lters
design, Digit. Signal Process. 21 (2011) 690693.
[3] Y. Tian-Hu, S.K. Mitra, H. Babic, Design of linear phase FIR notch lters, Sad-
hana 15 (1990) 133155.
[4] J.G. Proakis, D.G. Manolakis, Digital Signal Processing Principle, Algorithms, and
Applications, PrenticeHall, 1996.
[5] S.K. Mitra, Digital Signal Processing: A Computer Based Approach, third edition,
McGrawHill, 2006.
[6] T. Chien-Cheng, P. Soo-Chang, Stable IIR notch lter design with optimal pole
placement, IEEE Trans. Signal Process. 49 (2001) 26732681.
[7] A. Thamrongmas, C. Charoenlarpnopparut, Modied pole re-position technique
for optimal IIR multiple notch lter design, ECTI Trans. Electr. Eng. Electron.
Commun. 9 (1) (2011) 715.
[8] T. Saramaki, On the design of digital lters as a sum of two all-pass lters, IEEE
Trans. Circuits Syst. 32 (1985) 11911193.
[9] P.P. Vaidyanathan, S.K. Mitra, Y. Neuvo, A new approach to the realization of
low sensitivity IIR digital lters, IEEE Trans. Acoust. Speech Signal Process. 34
(1986) 350361.
[10] M. Djuri c, G. Stan ci c, Selective digital lters with linear phase, AE, Int. J. Elec-
tron. Commun. 56 (2002) 131134.
[11] A. Fernandez-Vazquez, G. Jovanovic-Dolecek, Design of IIR notch lters with
maximally at or equiripple magnitude characteristics, EUSIPCO 2006.
[12] S.C. Dutta Roy, Y.V. Joshi, Design of IIR notch lters based on all-pass lters,
IEEE Trans. Circuits Syst., 2 Analog Digit. Signal Process. 46 (2) (1999) 134
138.
Goran Z. Stan ci c was born in Dimitrovgrad, Ser-
bia, on May 13, 1966. He received the B.S. and M.S.
degrees in Electrical Engineering from the Faculty of
Electronic Engineering, Nis, in 1991 and 1999, respec-
tively. From September 1992, he is with University of
Nis, Faculty of Electronic Engineering, Serbia. His main
research interests are in digital signal processing, lter
design, adaptive signal processing and multirate sys-
tems.
Saa V. Nikoli c was born in Nis, Serbia, on March
29, 1967. He received the B.S., M.S., and Ph.D. degrees
in Electrical Engineering from the Faculty of Electronic
Engineering, Nis, in 1991, 1996, and 2004, respec-
tively. From June 1992, he is with University of Nis,
Faculty of Electronic Engineering, Serbia. His main re-
search interests are in digital signal processing, lter
design, image processing and multimedia systems.

You might also like