0% found this document useful (0 votes)
384 views43 pages

Notch Filter Digital

1. The document introduces several methods for designing IIR and FIR notch filters in both 1-D and 2-D. It discusses decomposing 2-D filters into simpler 1-D problems and using techniques like singular value decomposition. 2. Notch filters are described as band-stop filters with a high quality factor that are used to reject a specific unwanted frequency like noise while passing other frequencies. Characteristics of filters like transfer functions, amplitude response, phase response, and quality factor are defined. 3. Examples of designing 1-D and 2-D IIR and FIR notch filters are provided along with applications like removing power line interference from ECG signals. Adaptive notch filters and reducing computation are also

Uploaded by

anand248
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
384 views43 pages

Notch Filter Digital

1. The document introduces several methods for designing IIR and FIR notch filters in both 1-D and 2-D. It discusses decomposing 2-D filters into simpler 1-D problems and using techniques like singular value decomposition. 2. Notch filters are described as band-stop filters with a high quality factor that are used to reject a specific unwanted frequency like noise while passing other frequencies. Characteristics of filters like transfer functions, amplitude response, phase response, and quality factor are defined. 3. Examples of designing 1-D and 2-D IIR and FIR notch filters are provided along with applications like removing power line interference from ECG signals. Adaptive notch filters and reducing computation are also

Uploaded by

anand248
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

1

National Taiwan University





Advanced Digital Signal Processing


Term Paper

Notch Filter



Student Name
Feng-Ju,Chang
Student ID R98942063
Class GICE 1
st
grade
Instructor Jian-Jiun Ding





2

Abstract In this tutorial, I introduce several kinds of methods to design IIR and FIR notch filters both in 1-D
and 2-D. First, general characteristics of a filter are illustrated. Then, the 1-D IIR notch filter designed by all
pass filter and optimal pole-zero placements are presented. 2-D IIR notch filter can be designed by a simple
algebraic method which decompose original filter into a 2-D parallel line filter as well as a 2-D straight line
filter. Besides, outer product expansion also can be utilized to reduce the 2-D IIR notch filter design problem
into two pairs of 1-D filter design problem. Adaptive IIR notch filter is needed when the notch frequencies are
unknown in advance or time-varying. Adaptive notch filter by direct frequency estimation is robust than filter
coefficient estimation. Special IIR bi notch filter is shown whose design can reduce the multiplication numbers.
The digital Q-varying notch frequency is very useful for transient suppression. From section 6, I start to
introduce the design of FIR notch filter. Windowed Fourier series method, frequency sampling method and
optimal technique are roughly sketched. FIR notch filter is able to be designed by using Bernstein polynomial.
For 2-D FIR notch filter, we can use singular value decomposition to reduce original 2-D problem into 1-D
filter design problems. In the last section, I enumerate some applications of the notch filter such as remove
periodic noise in an image, reduce the blocking artifacts in the DCT coded image, and get rid of the power line
interference in the ECG signals, etc.

1. Introduction
1.1 What is a Filter and What Does a Filter Do?
A filter is an electrical network which alters the amplitude and/or phase characteristics of a signal with
respect to frequency. They are often used in electronic systems to emphasize signals in certain frequency ranges
and reject signals in other frequency ranges in order to eliminate the undesired signal. Therefore, any operation
which can be used to reduce or remove noise is called a filter. Such a filter has a gain that is dependent on the
signal frequency. There is an example in Fig. 1 for a filter to attenuate the unwanted signal (e.g. noise) at
frequency f
2
but keep the desired signal at frequency f
1
intact. The gain of the filter is 1 at frequency f
1
and 0.1
at frequency f
2.

Fig. 1 Using a filter to reduce the effect of an undesired signal at frequency f
2
, while retaining desired signal
at frequency f
1.
(This figure is extracted from [19] : http://www.national.com/an/AN/AN-779.pdf)
It is worth to mention that some other operations that are represented with FT + multiplication + IFT
(convolution) are also perceived as the filters even though their primary function is not noise removal.

1.2 Classification for Filters
There are many methods to classify the filters. Generally, we can categorize the filters into digital and
analog. If we group the digital filters based on the length of the impulse response, then we have IIR (infinite
impulse response) as well as FIR (finite impulse response). According to the distribution of the pass band and
the stop band, the digital filters are able to divided into below parts:
3

1. Pass-stop filter :
(1) High pass filter
(2) Low pass filter
(3) Band pass filter
(4) Ban stop filter
(5) All pass filter
2. Wiener filter
3. Match filter
4. Equalizer filter
5. Others :
(1) differentiation
(2) integration
(3) Hilbert transform
(4) Smoother
(5) Edge detection

1.3 The Characteristics of a Filter
We have several traits to describe a filter:
1. Transfer function (or network function): This is the ratio of the Laplace/ Z transforms of its output
and input signals. If we delineate a filter with Z transform, then the transfer function ) (z H can
therefore be written as:
) (
) (
) (
z X
z Y
z H = (1)
where ) (z X and ) (z Y are the Z transform of the input and output signal and z is the complex frequency
variable.
2. Amplitude response (filter gain) : The transfer function magnitude versus frequency, i.e. the absolute
value of (1),
) (
) (
) (
z X
z Y
z H = (2)
Knowing the transfer function magnitude (or gain) at each frequency allows us determine how well the
filter can distinguish between signals at different frequencies.
3. Phase response : The phase shift of the transfer function versus frequency.
) (
) (
arg ) ( arg
z X
z Y
z H = (3)
A change in the phase of a signal also represents a change in time.
4. Filter order (or filter length) : It can be defined as the number of previous inputs (stored in the
processor's memory) used to calculate the current output. In circuit theory, it means the total number of
capacitors and inductors in the circuit. If we see the transfer function, then the order of the filter is the
highest power of the variable z in its transfer function. Higher order filters will be more expensive than
lower order filters since they use more components (capacitors and inductors) and definitely hard to be
designed. However, high order filters are able to discriminate signals with different frequencies more
effectively.
5. The attenuation slope (or roll-off slope) : The rate of change of attenuation between the pass band
4

and the stop band. It is usually expressed in dB/octave (an octave is a factor of 2 in frequency) or
dB/decade (a decade is a factor of 10 in frequency).
6. -3 dB frequencies ( or cutoff frequencies) : The standard reference points for the roll-offs on each side
of the pass band where the amplitude (gain) has decreased by 3 dB (to
2
2
or 0.707 of its maximum
amplitude)
7. Center frequency : the frequency corresponding to the peak value of the amplitude response of a filter.
For the band pass or band stop filter, it is equal to the geometric mean of the -3 dB frequencies:
h l C
f f f = (4)
where
C
f is the center frequency,
l
f is the lower -3 dB frequency,
h
f is the higher -3 dB frequency.
8. -3dB Bandwidth : It is a frequency band which is calculated by the higher -3 dB frequency (roll-off
point) minus the lower -3 dB frequency (roll-off point).
9. Quality factor (Q factor) : This quantity is widely used in different application. In physics and
engineering, the Q factor is a dimensionless parameter that describes how underdamped an oscillator or
resonator is. For a filter, this is a measure of the sharpness of the amplitude response. The Q of a band
pass or band stop filter is the ratio of the center frequency (
C
f ) to the -3 dB bandwidth (
h
f -
l
f ):
l h
C
f f
f
Q

= (5)
For the low pass, high pass and all pass filter. They also have the Q factor and it can describe the
relative shape of the amplitude response. The higher the Q, the shaper the peak is. Fig. 2 shows
amplitude response curves for second order band pass, band stop, low pass, high pass, and all pass
filters with various Q factors.

Fig. 2 : Responses of various 2
nd
order filters as a function of Q. Gains and center frequency are normalized to
unity. (This figure is extracted from [19] : http://www.national.com/an/AN/AN-779.pdf)
5

It is worth thinking about what the ultimate limit of the value of the Q. Are all Q values possible and
acceptable? The answer is no. At very high Q values, the response of the filter will begin to have overshoot and
undershoot that will destroy the integrity of the notch [19]. Under this circumstance, the frequency that is
supposed to be rejected may actually be amplified, i.e. the notch filter attenuate now is the frequency band not
just a particular frequency.
10. Ripple : it is a amplitude (gain) variation in the pass band or stop band for a filter. For an ideal filter, it
has absolutely constant gain within the pass band, zero gain in the stop band, and an abrupt boundary
between the two. Unfortunately, this response characteristic is impossible to implement in practice but it
can be approximated to varying degrees of accuracy by real filter. Therefore, some ripples may occur.

1.4 The Notch Filter
A band reject (band stop) filter is a filter passes the most part of frequencies unchanged but attenuates
other frequencies to very low levels in a certain range. A notch filter actually can also be perceived as a band
stop filter with a high Q factor, i.e. it often wants to filter out the undesired signal in the specific
frequency (e.g. noise) only. However, the conventional band stop filter usually has a relatively wide stop
band.

Example
If we have been given a transfer function of a notch filter below:
) (
) (
1
) 1 ( 2 ) 1 (
2
1
) (
2
2
1
1
2
2
1
1 2
z X
z Y
z a z a
z a z a a
z H =
+
+ + +
=



where 93906244 . 0 , 3711242 . 1
2 1
= = a a
Then, we can plot the magnitude response ) (u A and the phase response ) (u | of ) (z H with respect to the
normalized frequencyu using the instruction freqz in MATLAB.
) ( ) (
)] 2 sin( ) sin( [ )] 2 cos( ) cos( 1 [
)] 2 sin( ) 5 . 0 5 . 0 ( ) sin( [ ))] cos( ) 2 cos( 1 )( 5 . 0 5 . 0 [(
1
) 1 ( 2 ) 1 (
2
1
, ) ( ) ( ) (
2 1
2 1
2 1 2 1
2 1 1 2
2
2 1
2
2 1 2
u | u
t t t t
t t t t
tu tu
tu tu
tu e tu e
Z =
+
+
=
+ +
+ + + +
=
+
+ + +
=
= = = =


A
jB B
jA A
a a j a a
a a j a a
e a e a
e a e a a
e e z e H e H z H
j j
j j
j T j j T j

where ) ( tan ) ( tan ) ( ) (
1
2 1
1
2 1
2
2
2
1
2
2
2
1
B
B
A
A
B B
A A
A

=
+
+
= u | u
Sometimes, it is difficult to observe the amplitude response over a wide frequency range, so I show the
magnitude response in dB as well, i.e. )) ( log( 20 A abs . The results are shown in Fig. 3.
6









Fig. 3 : The amplitude and the phase response for above specified notch filter

From Fig. 3, we can see that the phase response has the greatest rate of change at the center frequency.
The rate of change will become more rapid as the Q of the filter increases. Because the group delay is the
derivative of the phase, a notch filter has greatest group delay at the center frequency. In addition, it becomes
longer as the Q of the filter increases.
Now, we filter two sinusoidal signals and their combination with above specified notch filter to see what
happens,
) 4 sin( ] 2 sin[ ] [ ] [ ] [ ), 4 sin( ) 2 sin( ) ( ) ( ) (
] 4 sin[ ] [ ), 4 sin( ) (
] 2 sin[ ] [ ), 2 sin( ) (
0 0 2 1 3 0 0 2 1 3
0 2 0 2
0 1 0 1
t f n f n x n x n x t f t f t x t x t x
n f n x t f t x
n f n x t f t x
t t t t
t t
t t
+ = + = + = + =
= =
= =


It is known that the center frequency of the Notch filter is Hz f 1250
0
= , the sampling interval sec 0001 . 0 = T ,
t = 0 : T : 199 (in continuous time), n = 1: 200 (in discrete time),
We can use the instruction filter to pass the inputs into the Notch filter and get the outputs. I show the
results in both continuous time and discrete time. I use the instruction plot to show the continuous-time
results, and the instruction stem to represent the discrete-time results. See Fig. 4.









) (z H
] [n x

] [n y

7

In continuous time domain In discrete time domain
up: input ) 2 sin( ) (
0 1
t f t x t = down: output ) (
1
t y up: input ] 2 sin[ ] [
0 1
n f n x t = down: output ] [
1
n y

up: input ) 4 sin( ) (
0 2
t f t x t = down: output ) (
2
t y up: input ] 4 sin[ ] [
0 2
n f n x t = down: output ] [
2
n y

up: input ) ( ) ( ) (
2 1 3
t x t x t x + = down: output ) (
3
t y up: input ] [ ] [ ] [
2 1 3
n x n x n x + = down: output ] [
3
n y

Fig. 4 : The results after filtering the two sinusoidal signals and their combination with above specified notch
filter.
Because the notch filter rejects the band centered on the normalized frequency u = 0.25 ( Hz 1250 ), we
are able to see in Fig. 4 that ) 2 sin( ) (
0 1
t f t x t = / ] 2 sin[ ] [
0 1
n f n x t = is attenuated gradually through the Notch
filter, but ) 4 sin( ) (
0 2
t f t x t = / ] 4 sin[ ] [
0 2
n f n x t = is remained instead. This phenomenon is also obviously be
8

seen when we combine ) (
1
t x / ] [
1
n x and ) (
2
t x / ] [
2
n x . Only ) (
2
t x / ] [
2
n x is kept in the
steady state, ) (
1
t x / ] [
1
n x disappears.

1.5 The Classification of a Notch Filter
The notch filters were constructed in analog form traditionally. However, analog notch filters have
several problems such as frequency response accuracy, difficult realization and unadjustable notch frequencies.
For these disadvantages, the digital notch filter is developed.
If we classify the digital notch filter by the length of impulse response, then it can be put into two
sections: (1) finite impulse response (FIR) (2) infinite impulse response (IIR). The digital FIR notch filter is
always stable and it provides linear phase response. On the other hand, the digital IIR notch filter is potentially
unstable and do not provide linear phase response. In general, IIR filter structures can be designed with a much
lower order then their FIR counterparts for meeting equivalent magnitude specifications [8]. So, a digital FIR
notch filter need long filter length to reach the same requirement of the magnitude response. Because the signal
delay is proportional to the filter length, it is often intolerable for many applications.
The digital notch filter can also be classified according to the number of frequencies the filter can reject :
(1) Fixed notch filters (2) Tunable notch filters (3) Adaptive notch filters (ANFs). Like above mentioned in
1.4, the digital notch filter can reject a specific annoying frequency and keep other broadband signals intact.
This kind of notch filter is called the single notch filter which only diminishes a prescribed frequency. At times,
more than one interfering frequency exists, so the multiple notch filter is required to get rid of more than one
prescribed frequency. The simplest way to construct a multiple notch filter is to cascade single notch filters.
Tunable notch filters are similar to fixed notch filters that have a range of frequencies that they can be set to and
then fixed at that frequency. If we encounter with signals which are variable frequency and depend on events
over time, i.e. we dont know the notch frequencies in advance, then adaptive notch filters (ANFs) are utilized
in this kind of situation. They can automatically adjust their frequency response depending upon circumstances
[5][8].
To design a digital notch filter, there are many methods for IIR and FIR filter design. The major measures
to design an IIR digital notch filter are (1) analog filter transformation (2) all pass filter implementation (3)
pole-zero placement technique. For analog filter transformation, we can simply transform an analog notch
filter into digital notch filter by bilinear transform, impulse invariance, or step invariance. For example, the IIR
notch filter designed through bilinear transform in [14] can be uniquely characterized by two parameters
1
a
and
2
a which are related to the notch frequency and the 3-dB rejection band. Such transfer functions can be
realized using only two multipliers of coefficients
1
a and
2
a which leads to realizations using the minimum
number of multipliers. In addition to the analog transformation, the IIR notch filter is able to be implemented
by equivalent realization of an all pass filter. Due to the mirror-image symmetry relation between the numerator
and denominator polynomials of all pass filter, the notch filter can be realized by a computationally efficient
lattice structure with very low sensitivity [1]. Pole-zero placement technique is the simplest and most effective
technique for IIR notch filter design. However, it has constrains on the asymmetric and uncontrollable gain
[15].
If we want to design a FIR notch filter, some ways can be used : (1) optimal FIR filter design (2)
frequency sampling (3) sparse FIR notch filter design (4) windowed Fourier series approach (5) Using
Bernstein polynomial. Optimal filter design includes minimize the mean square error (MSE) and minimize the
maximal error (Minimax). Frequency sampling method is simply sampling the ideal frequency response.
However, above methods (MSE, Minimax and frequency sampling) have bad performance in that the stop band
9

of the digital notch filter is very narrow which results in the narrow transition band. For this reason, we cannot
expand the transition band to reduce the errors in the pass and stop bands. The only solution is to increase the
filter length. Unfortunately longer filter length make the design cost very expensive in hardware. In fact, an
ideal notch filter has sparse property whose notch frequency has the form( )t p q 2 / , where p and q are co-prime
integers. Then the Lagrange multiplier method is used to obtain the coefficients of the sparse notch filter which
is optimal in the least square sense [10]. As the frequency response of a linear phase FIR filter, ) (e H , is a
periodic function of e with a period t 2 , the corresponding impulse response is given by the Fourier series
coefficients of ) (e H , which is of infinite length. The basic idea of windowed Fourier series approach is to
arrive at an approximation version of ) (e H by truncating and modifying the infinite impulse response to a
finite one with a window function [9]. The most frequently used window function for the FIR filter design is the
Kaiser window. Bernstein polynomial has been used to design maximally flat FIR notch filter. This design
procedure gives us an explicit formula for the weights of frequency response. However, the designed magnitude
response is not exactly zero valued at notch frequency.
Another popular technique to design IIR and FIR notch filter is adaptive notch filtering (ANF). Such
filters have time-variant coefficients that are continuously updated by an optimization criterion [8]. The least
mean square (LMS) ANF is one of the famous approaches in performing sinusoidal interference removal.
Nevertheless, it has the drawback for the tradeoff between the initial convergence and the notch bandwidth. The
recursive least square algorithm (RLS), on the other hand, can achieve both rapid initial convergence and
narrow bandwidth. Generally, ANFs remove interference using a reference signal. This filtering method leaves
source signal undistorted, but it cannot follow fast changes in the interference amplitude, producing an
undesired ringing effect [8]. Other methods to do adaptive filtering are autoregressive-based algorithm and
direct frequency estimation.
All methods mentioned above are used in one dimension. Actually, they can be extended to 2D case. For
2D IIR notch filter, Soo-Chang Pei et al. proposed a simple algebraic method to decompose original filter into
parallel line filter and straight line filter. This approach not only has closed form transfer function but also
satisfy bounded-input/ bounded-output (BIBO) stability condition [1]. The outer product expansion reduce the
2D IIR notch filter design problem to two pairs of 1D filter design problem. After reduction, we can only any of
methods mentioned above to design 1D IIR notch filter. For 2D FIR notch filter, the singular value
decomposition (SVD) is able to be used to reduce the 2D FIR notch filter design problem to two pairs of 1D
filter design.
Now I conclude a variety of notch filters through a Table 1.
Table 1 : Varieties of Notch Filters
Analog Notch filters Problems:
(1) The accuracy of frequency response
(2) Difficult realization.
(3) Unadjustable notch frequencies
Digital Notch filters According to
the impulse response
(1) FIR (finite impulse response)
Advantages :
- Always stable
- Provide linear phase response
Disadvantages
- Need higher filter length to meet
10

the same magnitude response specification
compared with its IIR counterpart.
(2) IIR (infinite impulse response)
Advantages :
- Need much lower filter length to meet
the same magnitude response specification
compared with its FIR counterpart.
Disadvantages
- Usually unstable
- The phase response is nonlinear
According to number of
frequencies the filter can
reject
(1) Fixed notch filter:
a. Single notch filter
b. Multiple notch filter
(2) Tunable notch filter
(3) Adaptive notch filter (ANF)
According to design
methods
For IIR notch filter design :
(1) Analog filter transformation
- Bilinear transform
- Impulse invariance
- Step invariance
(2) All pass filter implementation
(3) Pole-zero placement technique
(4) Adaptive notch filtering
- LMS
- RLS
- Autoregressive algorithm
- Direct frequency estimation
For FIR notch filter design :
(1) Optimal FIR filter design :
- MSE
- Minimax
(2) Frequency sampling
(3) Sparse filter design
(4) Windowed Fourier series (from
IIR)
(5) Using Bernstein polynomial
(5) Adaptive notch filtering
- LMS
- RLS
- Autoregressive algorithm

According to dimension (1) 1D
11

(2) 2D
- Simple algebraic method
a. 2D parallel line filter
b. 2D straight line filter
Decomposition methods to 1D case
- Outer product expansion (IIR)
- Singular value decomposition (FIR)

In the following sections, I will focus on several kinds of notch filters to deeply describe and explain how
to implement them. Furthermore, some applications of digital notch filter will also be illustrated in the end of
the tutorial.

2. The Design of 1-D IIR Single and Multiple Notch Filters
In this section, I will introduce two techniques to design 1-D IIR multiple notch filter, first is all pass
filter implementation and second is pole-zero placement.

2.1 All Pass Filter Implementation
Suppose the input of the notch filter has the following form:
) ( ) ( ) sin( ) ( ) (
1
n d n s n A n s n x
M
k
k Nk k
+ = + + =

=
| e (6)
where s(n) is the desired signal, d(n) is the sinusoidal interference, M is the number of sinusoidal interference,
M k for
Nk
,..., 2 , 1 ) , 0 ( = e t e . If we now want to use an IIR notch filter to extract s(n) from corrupted x(n),
then we hope the specification of the notch filter to be

= =
=
otherwise
M k
e H
Nk j
1
,..., 1 , 0
) (
e e
e
(7)

The transfer function of an second order analog notch filter is given as
2 2
2 2
) (

+ +
+
=
bs s
s
s H (8)
where is the notch frequency and b is the 3-dB rejection bandwidth. Traditionally, we apply the bilinear
transform to develop a suitable transfer function for the digital notch filter.
1
1
+

=
z
z
s (9)
to ) (s H . This yields
2 2 1 2 2
2 2 1 2 2
) 1 /( ) 1 (
) 1 ( ) 1 ( 2 ) 1 (
) 1 ( ) 1 ( 2 ) 1 (
| ) ( ) (


+ =
+ + + +
+ + +
= =
z b z b
z z
s H z H
z z s


(10)
To minimize the number of coefficients characterizing the digital notch filter transfer function ) (z H , the right
hand side of (10) can be expressed in a different form as [14]
2
2
1
1
2
2
1
1 2
1
) 1 ( 2 ) 1 (
2
1
) (


+
+ + +
=
z a z a
z a z a a
z H (11)
where
12

b
a
+ +

=
2
2
1
1
) 1 ( 2


(12)
b
b
a
+ +
+
=
2
2
2
1
1

(13)
After some manipulations, we can get more desired forms of equation (11)
( ) ) ( 1
2
1
1
1
2
1
1
) 1 ( 2 ) 1 (
2
1
) (
2
2
1
1
2
1
1
2
2
2
1
1
2
2
1
1
2
z A
z a z a
a z a z
z a z a
z a z a z
z H + =
|
|
.
|

\
|
+
+
+ =
+
+ + +
=




(14)
We can see that the second term on the right hand side of equation (14), ) (z A is recognized as a second
order all pass filter whose design procedures and a catalog of minimum multiplier structures are detailed in [1].
As a result, the notch filter design problem becomes an all pass filter design problem.
Let s consider the transfer function of a 2M-order all pass filter which is defined by
M
M
M M
M
z a z a
z z a a
z A
2
2
1
1
2 1 2
1 2
... 1
...
) (

+
+ + +
+ + +
= (15)
Since the magnitude response of ) (z A is equal to unity for all frequency, the frequency response can be written
as
) (
) (
e u e
A
j j
e e A = (16)
where ) (e u
A
is the phase response. So now we have the frequency response of the IIR notch filter ) (z H from
equation (14) as follows
( )
) (
1
2
1
) (
e u e
A
j j
e e H + = (17)
The ) (e u
A
of a stable all pass filter has the characteristics:

=
=
=
t e t
e
e u
when M
when
A
2
0 0
) ( (18)
and
) ( )... 3 ( ) 2 ( ) 1 ( ) 0 ( t u u u u u
A A A A A
> > > >


Based on this property, we have the following observations:
(1) There exists M frequency points
M
e e e < < < ...
2 1
such that t e u ) 1 2 ( ) ( = n
n A
, that is,
. ,..., 1 0 ) ( M n for e H
n
j
= =
e

(2) There exists M frequency points M e e e < < < ... 2 1 such that
2
) 1 2 ( ) (
t
t e u + = n n
A
, that is,
. ,..., 1
2
1
) 1 (
2
1
) ( M n for j e H
n j
= = =
e

(3) There exists M frequency points
M
e e e ...
2 1
< < < such that
2
) 1 2 ( ) (
t
t e u = n
n A
, that is,
. ,..., 1
2
1
) 1 (
2
1
) (

M n for j e H
n
j
= = + =
e

(4) There exists M+1 frequency points
M
e e e
~
...
~ ~
2 1
< < < such that t e u ) 1 2 ( )
~
( = n
n A
, that is,
. ,..., 0 1 ) (
~
M n for e H
n
j
= =
e

When H(z) is a 4-order notch filter, i.e. M=2, a graphic interpretation of above four observations is shown in
Fig. 5(a). Besides, the maximum gain of magnitude response of notch filter is unity which is shown in Fig. 5(b).
13

)
2
) (
cos( ) (
e u
e A j
e H = (19)

Fig. 5 Graphic interpretation of above four observations. (a) Phase response of all pass filter (b) Magnitude
response of notch filter. (This figure is extracted from [1] :
http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=554450)
Therefore, if we want to design a notch filter H(z) which satisfies the specification shown in Fig. 6, we
only need to make the following assignments of the phase ) (e u
A
of all pass filter A(z):
(1) t e u ) 1 2 ( ) ( = n
N A

(2)
2
) 1 2 ( )
2
(
t
t e u + = n
BW
n
N A

(3)
2
) 1 2 ( )
2
(
t
t e u = + n
BW
n
N A

where M n ,..., 1 = and the notch frequency points
Nn
e satisfy
NM N
e e < < ...
1
.
14


Fig. 6 The prescribed specification of real coefficient notch filter. (This figure is extracted from [1] :
http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=554450)

When the frequency point
2
) ) 1 ( 1 (
2
1
2
1
) 2 , mod(
2
1
(

+
(

+
=
i
i
i
N
i
BW
e e (20)
the desired phase response is specified by
2
) ) 1 ( 1 (
2
1
) 1
2
1
2 ( ) (
) 2 , mod(
t
t e u
i
i A
i
+
(


+
= (21)
where i = 1,,2M.

x denotes the largest integer which is smaller than or equal to x, and mod(x,2) denotes
the remainder when x is divided by 2.
To obtain the final result H(z), we have to design all pass filter A(z) such that the phase response ) (e u
A

satisfies the 2M requirements in equation (21) exactly. It is easy to show that the phase response ) (e u
A
of A(z)
can be written as
|
|
.
|

\
|
+
+ =

=
=
M
k
k
M
k
k
A
k a
k a
M
2
1
2
1 1
) cos( 1
) sin(
tan 2 2 ) (
e
e
e e u (22)
From equation (21), we can obtain a set of equations
M i
k a
k a
i
M
k
k
M
k
k
2 ,..., 2 , 1 ) tan(
) cos( 1
) sin(
2
1
2
1
= =
+

=
=
|
e
e
(23)
where ] 2 ) ( [
2
1
i i A i
Me e u | + = .

Then after some manipulations, above expression can be written as
M i a k k
i
M
k
k i i i
2 ,..., 2 , 1 ) tan( )] cos( ) tan( ) [sin(
2
1
= =

=
| e | e (24)
which is a linear equation of filter coefficients
k
a . Thus it can be expressed in matrix form
p Qa = (25)
where
T
M
a a a ] ... [
2 2 1
= a ,
T
M
)] tan( )... tan( ) [tan(
2 2 1
| | | = p (26)
15

and the elements of the matrix Q are given by
M k M i k k q
i i i ik
2 ,..., 1 2 ,..., 1 ) cos( ) tan( ) sin( = = = e | e (27)
Finally, the filter coefficients
k
a can be solved by
p Q a
1
= (28)
Now let us summarize the entire design procedure of IIR multiple notch filter by all pass filter as follows:











The equation (29) can be implemented by the structure shown in Fig. 7(a). Moreover, the all pass filter is
able to be realized by computationally efficient lattice structure in Fig. 7(b) due to the mirror image symmetry
relation between the numerator and denominator polynomials. In this way, the number of multipliers and the
signal delays can reach minimum.

Fig. 7 (a) The realization of IIR notch filter. (b) The lattice form realization of real coefficient all pass filter.
(This figure is extracted from [1] : http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=554450)

2.2 Pole-Zero Placement
This technique is recognized as the easiest one to design an IIR notch filter. It is general to divide this
way into two groups. First, the zeros are constrained to lie on the unit circle whose angles are equal to notch
frequencies and poles are placed at the same radial line as zeros. The pole-zero diagram and the frequency
response are shown in Fig. 8.
(1) Prescribe notch frequencies
NM N N
e e e < < < ...
2 1
and 3-dB rejection band
width BW
1
,BW
2
,,BW
1.

(2) Use equations (20) and (21) to compute
i
e and ) (
i A
e u , i = 1,2,,2M.
(3) Use equations (26), (27) calculate Q and p, and then use equation (28) to
find the solution a .
(4) Finally, the desired notch filter is obtained as
( )
|
|
.
|

\
|
+ + +
+ + +
+ = + =

+
M
M
M M
M
z a z a
z z a a
z A z H
2
2
1
1
2 1 2
1 2
... 1
...
1
2
1
) ( 1
2
1
) ( (29)
16


(a) (b)
Fig.8 Type I Notch filter : (a) Pole zero diagram (: zeros, : poles) (b) Frequency response.
The second type of IIR notch filter is synthesized by all pass filter which has been introduced in 2.1.
Observe equation (6), we can know that the zeros also lie on the unit circle with angles equal to notch
frequencies but the poles are just near zeros and line on different radial line as zeros. Its pole-zero diagram is
illustrated in Fig. 9.

(a) (b)
Fig.9 Type II Notch filter : (a) Pole zero diagram (: zeros, : poles) (b) Frequency response.

(Figure. 8 and 9 are extracted from [2] : http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=960414)
The transfer function of Type I IIR notch filter is
) (
) (
) cos( 2 1
) cos( 2 1
) (
1
1
2 2 1
1
2 1
1
z r B
z B
z r z r
z z
z H
M
k
Nk
M
k
Nk

=

=

=
+
+
=
[
[
e
e
(30)

17

where

=

=
M
k
k
k
z b z B
2
0
) ( is a symmetrical polynomial, that is
. 1 ,..., 1 , 1 b
2 2 0
= = = =

M k b b b
k k M M

and
Nk
e are notch frequencies, r are the radius of poles.
Beside, 2M poles and zeros of this filter are given by
Nk
j
e zeros
e
: are constrained to lie on the unit circle
M k re poles
Nk
j
,..., 1 : =
e
are at the same radial lines as zeros just like Fig. 8.
If we want the filter to be stable, then the pole radius r must be smaller than one. When r approaches unity,
) (
1
z H becomes an ideal notch filter.
The transfer function of Type II IIR notch filter is
( ) ) ( 1
2
1
) (
2
z F z H + = (31)
which has been mentioned in 2.1. ) (z F is a 2M-order all pass filter given by
2 2 1 2
2 1 2 2
2
2
1
1
2 1 2
1 2
) cos( ) 1 ( 1
) cos( ) 1 (
... 1
...
) (



+
+ +
+ +
=
+ + +
+ + +
=
z r z r
z z r r
z f z f
z z f f
z F
Nk
Nk
M
M
M M
M
e
e
(32)
The 2M zeros of ) (
2
z H are also at
Nk
e
e
to make the filter a zero gain at notch frequencies. The 2M poles of
) (
2
z H are all adjacent to the zeros to compensate for the frequency response to be the unit gain in the pass
bands.
Based on the above descriptions, we know the IIR notch filter design with zero-pole placement can be
concluded in the following,
Step 1 Make 2M zeros lie on the unit circle (r = 1) with angles equal to notch frequencies
Nk
e (k = 1,,M)
In order to make the gain (magnitude response) of notch frequencies to be zero
The numerator of the transfer function is equal to ( )
[
=

+
M
k
Nk
z z
1
2 1
) cos( 2 1 e
Step 2 Place 2M poles inside the unit circle and near 2M zeros.
In order to make the gain of pass bands to be unity
When 2M poles approach 2M zeros, the notch filter becomes the ideal one.
The zeros are easy to be placed on the unit circle. All we have to do is make the zero radius be unity and
the angle equal to notch frequencies. However, the poles position is a problem. The pole placement in the type I
and II notch filters are just two subjective choices. So, what is the optimal pole placement? C.C. Tseng et al.
use the weighted least squares method to find the optimal pole locations. This weighted least squares method
can be used in the single notch filter and the multiple notch filter.

2.2.1 Single Notch Filter Design
The general transfer function of the single notch filter is expressed as
) (
) (
) (
z A
z B
z H = (33)

where
2 1
1
) cos( 2 1 ) (

+ = z z z B
N
e and
2 2 1
2 1 ) (

+ = z r raz z A which ) cos(
p
a e = . So the poles of
this filter are
p
j
re
e
and the parameter a satisfy
1 1 s s a (34)
To find the optimal pole replacement, we assume the pole radius r is specified in advance. Thus, the
18

problem reduces to find the angle ) ( cos
1
a
p

= e such that the cost function
}
=
R
j
d e H W a J e e
e
2
) ( 1 ) ( ) ( (35)
is minimized, where integral region | | | | t c e c e , , 0
1 1
+ =
N N
R and ) (e W is a weighting function. c is a
prescribed small positive number. Substituting equation (6) into (8), we have
}
}
=
=
R
j j
j
R
j
j
d e B e A
e A
W
d
e A
e B
W a J
e
e
e e
e e
e
e
e
2
2
2
) ( ) (
) (
) (
) (
) (
1 ) ( ) (


}
+ =
R
j
d a q p
e A
W
e e e
e
e
2
2
) ( ) (
) (
) (
(36)
where ) (e p and ) (e q are given by
e
e e
e
e e
j
j
N
j
re q
e e r p


=
+ =
2 ) (
) cos( 2 ) 1 ( ) (
1
2 2
(37)
Using the technique of described in [2], the optimization problem in (36) can be solved by the following
iterative scheme:
}

+ + = + =
R
k k k k k k
j
k
k k
a a d a q p
e A
W
a J
1 1
2
1
2
2
1
2 ) ( ) (
) (
) (
) ( o | e e e
e
e
(38)
where
}

=
R
j
k
k
d q
e A
W
e e
e

e
2
2
1
1
) (
) (
) (

}

=
R
j
k
k
d q p
e A
W
e e e
e
|
e
)) ( ) ( Re(
) (
) (
*
2
1
1

}

=
R
j
k
k
d p
e A
W
e e
e
o
e
2
2
1
1
) (
) (
) (
(39)
The notation Re(.) denotes the real part of complex number.
Because ) (
1
e j
k
e A

is known at the kth iteration, the parameter
k
a can be determined by solving the
standard quadratic programming problem




and the unique closed-form optimal solution is obtained as follows:
Minimize
1 1
2
1
2

+ +
k k k k k
a a o | subject to 1 1 s s
k
a (40)
19

<

>

1 1 ,
1 , 1
1 , 1
1
1
1
1
1
1
1
1
k
k
k
k
k
k
k
k
k
if
if
if
a

|

|

|
(41)
Noe let us conclude the iterative quadratic programming algorithm for obtaining the notch filter coefficient
) cos(
p
a e = as follows.











The designed single notch filter is definitely stable since the poles radius are set by the designer in
advance and it is always smaller than 1. It can be shown that the proposed algorithm has the fast convergence
speed. In addition, it is insensitive to the choice of initial parameter
0
a . In fact, equation (40) is a convex
quadratic programming problem that always has a unique minimize. This is why the algorithm always
converges to the same minimizer, regardless of the initial point used.
Unfortunately, this weighted least square method takes a lot of time to produce the optimal notch filter.
On the other hand, the type I and II notch filters can be obtained immediately by simple computation. If we care
about the design time, then it is better to choose the type I or type II filter to approximate the optimal filter with
the weighted least square method. Because their pole radiuses are the same, we need only need to compare the
pole angles to find the better approximation. The pole angles of the type I, type II, and the filter with the
weighted least square are given by







Tables 2-4 list three pole angles for various notch frequencies
1 N
e , pole radius r and 1 ) ( = e W . It is
clear that type II filter based on all pass filter implementation is closer to the optimal one than the type I notch
filter. Hence, the type II is a better choice than the type I to replace the optimal filter which calculation is very
time-consuming.

(1) Specify the pole radius r , notch frequencies
1 N
e , c in the integral region R, and the
weighting function ) (e W .
(2) Given initial parameter
0
a , set k=1.
(3) Compute the values
1 k
,
1 k
| , and
1 k
o using equation (39).
(4) Calculate the quadratic programming solution in (41) to obtain the new coefficient
k
a .
(5) Terminate the iterative procedure if
c s
1 k k
a a (42)
where c is a preset small positive number. Otherwise, set k = k+1 and go to step 3.
Type I : Pole angle =
1 N
e
Type II : Pole angle =
|
|
.
|

\
| +

) cos(
2
1
cos
1
2
1
N
r
r
e
Optimal : Pole angle = ( ) a
1
cos


20

Table 2 : Pole angle of the Type I notch filter for various notch frequencies
1 N
e and pole radius r
r = 0.6 r = 0.7 r = 0.8 r = 0.9
t e 2 . 0
1
=
N

0.6283 0.6283 0.6283 0.6283
t e 4 . 0
1
=
N

1.2566 1.2566 1.2566 1.2566
t e 7 . 0
1
=
N

2.1991 2.1991 2.1991 2.1991

Table 3 : Pole angle of the Type II notch filter for various notch frequencies
1 N
e and pole radius r
r = 0.6 r = 0.7 r = 0.8 r = 0.9
t e 2 . 0
1
=
N

0.4106 0.5335 0.5930 0.6206
t e 4 . 0
1
=
N

1.2130 1.2357 1.2485 1.2548
t e 7 . 0
1
=
N

2.2998 2.2467 2.2174 2.2032

Table 4 : Pole angle of the optimal notch filter for various notch frequencies
1 N
e and pole radius r
r = 0.6 r = 0.7 r = 0.8 r = 0.9
t e 2 . 0
1
=
N

0.4104 0.5320 0.5915 0.6194
t e 4 . 0
1
=
N

1.2129 1.2354 1.2482 1.2545
t e 7 . 0
1
=
N

2.3000 2.2474 2.12182 2.2038

2.2.2 Multiple Notch Filter Design
The general form of the transfer function of IIR multiple notch filter is expressed just like equation (33)
but with the denominator ) (z A denoted by
( )
[
=

+ =
M
k
pk
z r z r z A
1
2 2 1
) cos( 2 1 ) ( e (43)
and the numerator is defined in equation (30). r is pole radius and
pk
e are pole angles. If we select
pk
e as
Nk
e , then the transfer function becomes the type I notch filter. However, this choice is not optimal. The best
choice can be obtained by finding the pole angles { }
pM p
e e ,...,
1
to minimize the cost function
}
=
R
j
pM p
d e H W J e e e e
e
2
1
) ( 1 ) ( ) ,..., ( (44)
Because J is not a quadratic function of angles
pk
e , we cant apply the quadratic programming approach to
solve the nonlinear optimization problem. Let we rewrite ) (z A in (43) as follows:

=
M
k
k k
k
z r a z A
2
0
) ( (45)
k
a has the symmetric property : 1
2 0
= =
M
a a and ( ) 1 ,..., 1
2
= =

M k a a
k k M
.






21

Define two vectors
| |
t
M
a a ,...,
1
= a and
(
(
(
(
(
(
(
(
(

+
+
+
=

+ +


M M
M M M M
M M
M M
z r
z r z r
z r z r
z r rz
z
) 1 ( 1 ) 1 ( 1
) 2 2 ( 2 2 2 2
) 1 2 ( 1 2 1
.
.
.
) ( e (46)
Then, the polynomial ) (z A can be rewritten as
) ( 1 ) (
2 2
z z r z A
t M M
e a + + =

(47)
Instead of finding pole angles
pk
e to minimize function J, we will find coefficient vector a to minimize J.
Hence, equation (44) can be rewritten as
e e e
e
e e
e e
e
e
e
e
d u
e A
W
d
e A
e B
W
d e H W J
R
t
j
j
j
R
j
R
2
2
2
2
) ( ) (
) (
) (
) (
) (
1 ) (
) ( 1 ) ( ) (
}
}
}
+ =
=
=
a v
a
(48)
where ) (e u and ) (e v are given by

=

+ =
M
k
jk
k
M j M
e b e r u
2
0
2 2
1 ) (
e e
e (49)
) (
e j
e e v = (50)
The optimization problem in (48) can be solved by the following iterative scheme:

1 1 1
2
2
2
) ( ) (
) (
) (
) (

+ + =
+ =
}
k k
t
k k k
t
k
R
t
j
k
c
d u
e A
W
J
a p a Q a
a v a e e e
e
e
(51)
where scalar
1 k
c , vector
1 k
p , and matrix
1 k
Q are
e e
e
e
d u
e A
W
c
R j
k
k
2
2
1
1
) (
) (
) (
}

=
e e e
e
e
d u
e A
W
R j
k
k
)) ( ) ( Re(
) (
) (
*
2
1
1
v p
}

=
e e e
e
e
d v
e A
W
H
R j
k
k
)) ( ) ( Re(
) (
) (
2
1
1
v Q
}

= (52)


22

Now the parameter
k
a can be determined by solving the following optimization problem:
Minimize
1 1 1
2

+ +
k k
t
k k k
t
k
c a p a Q a subject to the zeros of ) (z A
k
are all inside the unit circle. (53)

Because the symmetry of the coefficients
k
a is only necessary but not sufficient for all poles to lie on a
circle with radius r, the condition 1 0 < s r does not guarantee that the filter is stable as in the single notch
filter case. Therefore, we must impose a set of linear constraints on the coefficient
k
a of ) (z A
k
such that all
zeros of ) (z A
k
are inside the unit circle. To reach this goal, Lang has proposed an interesting method which
based on Rouches theorem to solve this theorem. If you want to see this method in detail, please refer to [].

3. The Design of 2-D IIR Notch Filters
In this section, I will introduce two ways to design 2-D IIR Notch filters. One is the simple algebraic
method and the other is using outer product expansion. Both methods have closed form transfer function and
satisfy bounded input / bounded output (BIBO) stability condition.

3.1 The Simple Algebraic Method
The frequency response for a 2-D ideal notch filter is given by

=
=
otherwise
e e H
N N j j
d
1
) , ( ) , ( 0
) , (
2 1 2 1
2 1
e e e e
e e
(54)
where ) , (
2 1 N N
e e is the notch frequency. In fact, a 2D IIR filter can be divided into two simple filter designs
also in 2-D form.
(1) 2-D parallel line filter ) , (
2 1
z z H
p

(2) 2-D straight line filter ) , (
2 1
z z H
s

Then, the desired notch filter transfer function is able to be rewritten by
) , ( ) , ( 1 ) , (
2 1 2 1 2 1
z z H z z H z z H
S P N
= (55)
The block diagram for 2-D IIR notch filter design and its frequency domain interpretation are shown in Fig. 10.

Fig. 10 (a) The block diagram for 2-D IIR notch filter design. (b) The frequency domain interpretation.
(Fig. 10 is extracted from [3] : http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=279208)
23

3.1.1 2-D Parallel Line Filter
He frequency response of the 2-D parallel line filter is

=
=
otherwise
e e H
N j j
p
0
1
) , (
2 2
2 1
e e
e e
(56)
We can design this kind filter by easily choose ) , (
2 1
z z H
p
as
2
) ( ) , (
2 1 z z BP p
z H z z H
=
= (57)
where ) (z H
BP
is a 1-D band pass filter whose transfer function is given by
|
|
.
|

\
|
+
+
=


2
2
1
1
2 1
1 2
1
1
2
1
) (
z a z a
z z a a
z H
BP
(58)
After performing some manipulations, we can get two important relations of ) (z H
BP
as follows.
)
2
tan( 1
) cos( 2
0
1
BW
a
+
=
e
(59)

)
2
tan( 1
)
2
tan( 1
2
BW
BW
a
+
+
= (60)
where
0
e is the center frequency of the notch filter and BW is the 3-dN bandwidth of ) (z H
BP
.
So, if we choose
0
e as
N 2
e and BW is set as small as possible, then the desired 2-D parallel line filter is
accomplished.

3.1.2 2-D Straight Line Filter
For this filter design, we use the analog filter transformation. It is worth to mention that the same
technique has been used to 3-D IIR beam filter by Bruton and Bartley. Consider the simple first order 2-D
Laplace transform transfer function
2 2 1 1
2 1
) , (
s L s L R
R
s s T
+ +
= (61)
Then the frequency response is given by
) (
) , (
2 2 1 1
2 1
O + O +
= O O
L L j R
R
j j T (62)
The magnitude response
| |
2
1
2 2 1 1
2
2 1
) (
) , (
O + O +
= O O
L L R
R
G (63)
A maximum value of unity occurs in 1 ) , (
2 1
= O O G is at a straight line where
0
2 2 1 1
= O + O L L (resonant line) (64)
And two - 3-dB lines with
2
1
) , (
2 1
= O O G are
R L L = O + O
2 2 1 1
(-3 dB lines) (65)

24

If we apply the double bilinear transform to ) , (
2 1
s s T
2 , 1
1
1
=
+

= i
z
z
s
i
i
i
(66)
Then we get the desired straight line filter as
1
2
1
1
2 1 1
2
2 1 1
1
2 1 2 1
1
2
1
1
1
2
1
1
2 1
1
) , (



+
+
+
+
+
+ +
+ + +
=
z z
R
L L R
z
R
L L R
z
R
L L R
R
L L R
z z z z
z z H
s
(67)
After performing some calculations, a maximum value of unity occurs in ) , (
2 1
e e j j
s
e e H where
0
2
tan
2
tan
2
2
1
1
= |
.
|

\
|
+ |
.
|

\
| e e
L L (resonant line) (68)
and
2
1
) , (
2 1
=
e e j j
s
e e H where
R L L = |
.
|

\
|
+ |
.
|

\
|
2
tan
2
tan
2
2
1
1
e e
(-3 dB lines) (69)
Hence, if we properly choose the parameters as
|
.
|

\
|
=
2
tan
1
1
1
N
L
e
(70)
|
.
|

\
|
=
2
tan
1
2
2
N
L
e
(71)
0 R (72)
Then ) , (
2 1
z z H
s
will be a straight line filter whose resonant line passes the notch frequency point
) , (
2 1 N N
e e exactly even though it exists bending effect due to the bilinear transform. In order to ensure bounded
input/ bounded output (BIBO) stability of this filter, we must constrain
1
L and
2
L to be nonnegative. The
designed amplitude responses of the 2-D parallel line filter, the straight line filter and the final desired notch
filter are illustrated in Fig. 11.

Fig. 11 Amplitude response of each filter in 2-D IIR notch filter design. (a) Parallel line filter ) , (
2 1
z z H
p
(2)
Straight line filter ) , (
2 1
z z H
s
(c) Notch filter ) , (
2 1
z z H
N
.
(Fig. 11 is extracted from [3] : http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=279208)

25

3.2 Using Outer Product Expansion
The frequency response of an ideal 2-D notch filter is given by

=
=
otherwise
and
e e H
j j
d
1
) , ( ) , ( ) , ( 0
) , (
*
2
*
1
*
2
*
1 2 1
2 1
e e e e e e
e e
(73)
where ) , (
*
2
*
1
e e is the notch frequency. We sample ) , (
2 1
e e j j
d
e e H and denote the sampled frequency response
matrix
N M
R D

e . If the notch frequencies ) , (
*
2
*
1
e e and ) , (
*
2
*
1
e e are among the sampling grids, then the
entries of matrix D are given by

s s s s
=
=
N n M m otherwise
q p and l k n m
n m
1 , 1 1
) , ( ) , ( ) , ( 0
) , ( D (74)
The (k,l)th and (p,q)th entries with p = M-k+1 and q = N-l+1 correspond to the notch frequencies ) , (
*
2
*
1
e e and
) , (
*
2
*
1
e e respectively. Because matrix D contains three linearly independent columns, the rank of it is three.
After doing singular value decomposition (SVD), matrix D can be rewritten as the following outer product
expansion
t
2
2
1
2
1
v v u u w w D
1
t
2 1
t
2 1
+ = (75)
where the elements of the vectors involved are given by
N n
otherwise
q n j
l n j
m
M m
otherwise
p m j
k m j
m
N n
otherwise
q and l n
n
M m
otherwise
p and k m
m
N n n
M m m
s s

=
=
=
s s

=
=
=
s s

=
=
s s

=
=
s s =
s s =
1
0
) (
1
0
) (
1
0
1
) (
1
0
1
) (
1 1 ) (
1 1 ) (
2
1
2
1
2
1
v
v
u
u
w
w
(76)
From this expansion, we know that the sampling frequency response D can be approximated by that of 1-D
filters whose frequency responses approximate
i
w ,
i
u and
i
v (i = 1,2). In other words, given that two 1-D
filters ) (
i ci
z H and ) (
i si
z H have the following frequency responses (i = 1,2) :

=
=
otherwise
and
e H
i i i j
ci
i
0
1
) (
* *
e e e
e
(77)

=
=
=
otherwise
j
j
e H
i i
i i
j
si
i
0
) (
*
*
e e
e e
e
(78)
then ) ( ) (
2
1
) ( ) (
2
1
1 ) , (
2 1 2 1 2 1
2 1 2 1
e e e e e e j
s
j
s
j
c
j
c
j j
d
e H e H e H e H e e H + = (79)
26

Therefore, designing a 2-D IIR notch filter can be decomposed into two types of 1-D filter design. One is the
design of filter ) (
i
j
ci
e H
e
defined in (77), the other is the design of filter ) (
i
j
si
e H
e
defined in (78) (i = 1,2).
3.2.1 Design of Filter ) (
i ci
z H
The frequency response of ) (
i
j
ci
e H
e
can be approximated by the second-order IIR all pass filter whose
transfer function is given by
|
|
.
|

\
|
+
+
=


2
2
1
1
2 1
1 2
1
1
2
1
) (
i i i i
i i i i
i bi
z a z a
z z a a
z H i = 1,2 (80)
From the results in [4], the coefficients
1 i
a and
2 i
a are given by
)
2
tan( 1
) cos( 2
*
1
BW
a
i
i
+
=
e
(81)

)
2
tan( 1
)
2
tan( 1
2
BW
BW
a
i
+
+
= (82)
with
*
i
e is the center frequency of ) (
i bi
z H and BW is the 3-dB bandwidth of ) (
i bi
z H . Because ) (
i bi
z H has
unit gain and zero phase at
*
i i
e e = . Thus, ) (
i
j
bi
e H
e
will be an excellent approximation of ) (
i
j
ci
e H
e

provided that BW is sufficiently small.

3.2.2 Design of Filter ) (
i si
z H
Let the frequency response of ) (
i ai
z H is given by

=
=
=
care t don
j
j
e H
i i
i i
j
ai
i
'
) (
*
*
e e
e e
e
(83)
Then, it can be verified that ) ( ) ( ) (
i ai i ci i si
z H z H z H = . For simplicity, we choose ) (
i ai
z H to be the following
first-order all pass filter
1
1
1
) (

+
+
=
i i
i i
i ai
z b
z b
z H i = 1,2 (84)
Since ) (
i
j
ai
e H
e
is equal to unity for all frequencies, i.e., ) (
i
j
ai
e H
e
can be written as
) (
) (
i i i
j j
ai
e e H
e u e
= (85)
where the phase response ) (
i i
e u is given by
|
|
.
|

\
|
+
+ =

) cos( 1
) sin(
tan 2 ) (
1
i i
i i
i i i
b
b
e
e
e e u (86)

27

There are three properties for a stable all pass filter ) (
i ai
z H :
(1) 0 ) 0 ( =
i
u
(2) t t u = ) (
i

(3) ) (
i i
e u decreases monotonically with frequency
i
e .
When
i
e goes from 0 to t radians, the phase ) (
i i
e u goes from 0 to t . It indicates that
2
) (
*
t
e u =
i i
(87)
Substituting (87) into (86), we obtain
|
|
.
|

\
|
+
|
|
.
|

\
|

=
4 2
sin
4 2
sin
*
*
t e
t e
i
i
i
b (88)
Hence, the transfer function ) (
i si
z H is given by
1
1
2
2
1
1
2 1
1 2
1 1
1
2
1
) ( ) ( ) (



+
+
|
|
.
|

\
|
+
+
= =
i i
i i
i i i i
i i i i
i ai i ci i si
z b
z b
z a z a
z z a a
z H z H z H i = 1,2 (89)
where the coefficients
1 i
a ,
2 i
a and
i
b are determined by equations (81), (82) and (88).

Let us summarize a complete procedure for the design of 2-D IIR notch filter as follows:
















4. The Design of Adaptive IIR Notch Filters
In communications, control and instrumentation areas, digital notch filters are widely used. They
eliminate the sinusoidal interference while leaving the broad-band signal unchanged. If the sinusoidal
frequencies are known and fixed, then a fixed notch filter can be used. However, if these frequencies are
unknown or time-varying, then adaptive notch filters are needed.
The generalized adaptive filter process consists of a noisy input signal ) (n x and an output signal ) (n y
which may be different from the desired signal ) (n d . See Fig. 12.
(1) Specify notch frequency ) , (
*
2
*
1
e e and bandwidth BW.
(2) Use (81), (82) to compute filter coefficients
1 i
a ,
2 i
a (i = 1,2). Construct
transfer function
|
|
.
|

\
|
+
+
=


2
2
1
1
2 1
1 2
1
1
2
1
) (
i i i i
i i i i
i bi
z a z a
z z a a
z H i = 1,2
(3) Use (88) to calculate coefficients
i
b (i = 1,2). Construct the transfer
function
1
1
1
) (

+
+
=
i i
i i
i ai
z b
z b
z H i = 1,2
(4) Form the transfer function of the 2-D IIR notch filter as
)) ( ) ( 1 )( ( ) (
2
1
1 ) , (
2 2 1 1 2 2 1 1 2 1
z H z H z H z H z z H
a a b b
=
28


Fig. 12 General digital filter

= =
=
M
j
j
N
i
i
j n y b i n x a n y
1 0
) ( ) ( ) ( (90)
) ( ) ( ) ( n y n d n e = (91)
The recursive LMS algorithm updates the coefficients
i
a and
j
b as follows
) ( ) ( ) ( ) 1 ( i n x n e n a n a
i i
+ = + (92)
) ( ) ( ) ( ) 1 ( j n y n e n b n b
j j
+ = + q (93)
Because the gradient of the instantaneous error contains s j n y
'
) ( which also depend on the
coefficients of the filter, the recursive LMS algorithm does not converge in general. The zeros converge to the
location of the unit circle, but the poles go far away from the optimum locations. This behavior was observed
when the recursive maximum likelihood (RML) was applied to IIR adaptive notch filters (ANF). To conquer
this problem, a penalty function on the predicted error has been adopted to force the poles to converge toward
their optimum locations.
The transfer function of an IIR notch filter designed by pole-zero placement on the unit circle can be
expressed as
n
n
n
n
N
i
i
N
i
i
z b z b
z a z a a
p z
z z
z H


=
=
+ + +
+ + +
=

=
[
[
... 1
...
) (
) (
) (
1
1
1
1 0
0
0
(94)
The backward coefficients,
j
b can be related to the forward coefficients,
j
a through a scaling parameter as
follows
1 1 0 ,..., 1
0
= < < = = b with N j a b
j j j j
(95)
Substituting (95) into (92), the recursive LMS algorithm can be written for the backward coefficients as
) ( ) ( ) ( ) 1 ( i n x n e n a n a
j i j i j
+ = + (96)
) ( ) ( ) ( ) 1 ( j n x n e n b n b
j j
+ = + q (97)
By comparing (97) with (93), the following new equation can be developed
)) ( ) ( )( ( ) ( ) ( ) ( ) 1 ( j n y j n x n e j n y n e n b n b
j j
+ + = + q q (98)
)) ( ) ( ( n y n x represents the noise in the input signal and hence the term )) ( ) ( )( ( j n y j n x n e q in (98) is
upper bounded. Thus, (98) suggest applying the penalty function on the estimated instaneous error for the
backward coefficients.
29

)) ( ) ( ( ) ( ) (
'
j n b j n a n e n e
j j
+ = c (99)
The new error ) (
'
n e is obtained from the error ) (n e by adding the correction term )) ( ) ( ( j n b j n a
j j
c .
The gradient with respect to backward coefficients can be written as
) 1
1
(
) ( ) (
'
+
c
c
=
c
c
j j j
b
n e
b
n e

c (100)
When the poles converge toward the zeros on the unit circle, i.e. 1
j
, then the term ) 1
1
(
j


approaches zero. The new error ) (
'
n e asymptotically approaches the error ) (n e . Therefore, the updating
equation for the backward coefficients can be written as
) ( ) ( ) ( ) 1 (
'
j n y n e n b n b
j j
+ = + q (101)
Equations (92), (99) and (101) constitute the constrained least mean squared (CLMS) algorithm. The adaption
coefficients and q are chosen small enough to ensure the convergence of the CLMS algorithm.
Since the desired signal d(n) is often not available, an adaptive noise canceling (ANC) system may be
used. See Fig. 13. The primary input consists of the noisy signal x(n). The desired signal is denoted as s(n). The
reference input v2(n) is estimated by z(n) to match the noise v1(n) in the primary input.

Fig. 13 Adaptive noise canceling system
The input signal x(n) and error signal e(n) are given by
) ( ) ( ) ( n z n x n e = (102)
) ( ) ( ) (
1
n v n s n x + = (103)
) ( ) (
2 0 1
n v g n v = (104)
The filter estimation ) (z G is derived in the following section.
4.1 Design of the Fixed-Zero Adaptive IIR Digital Notch Filter
We use the pole-zero placement method to make the zeros lie on the unit circle and the poles are located
inside the unit circle at a radial distance from the zeros. In this case, the zeros and the poles of a second-order
IIR filter are determined as follows
) sin( ) cos(
0 0 2 , 1
| | j z = (105)
)) sin( ) (cos(
0 0 2 , 1
| | o j p = (106)
where 1 s o for filter stability and o 1 is the distance between the poles and zeros.

30

The transfer function of a second-order IIR filter is written as
) )( (
) )( (
) (
2 1
2 1
p z p z
z z z z
z H


= (107)
Substituting (105) and (106) into (107) and dividing by
2
z , (107) an be reduces to
2 2 1
0
2 1
0
) cos( 2 1
) cos( 2 1
) (


+
+
=
z z
z z
z H
o | o
|
(108)
By comparison to the canonical form for a second order IIR filter, the different coefficients of the filter can be
identified as follow
2
2 0 1
2 0 1 0
, ) cos( 2
1 , ) cos( 2 , 1
o | o
|
= =
= = =
b b
a a a
(109)
The recursive formula of the output in the time domain can be readily deduced as follows
) 2 ( ) 1 ( ) 2 ( ) 1 ( ) ( ) (
2 1 2 1 0
+ + = n y b n y b n x a n x a n x a n y (110)
By examining (109), we can see that
2 1 1 1
b a a b = = o (111)
These relationships indicate that only
1
a and
1
b need to be adapted by varying | and o .
As the frequency e approaches the rejected frequency
0
e , the transfer function magnitude of the filter
can be approximated by
) sin( ) cos(
) sin( ) cos(
) 1 (
2
) (
0 0
0 0
| | o
| |
o
e
e
e
j e
j e
H
T j
T j
+

+
=
A
A
(112)
The bandwidth and the quality factor of the filter are calculated analytically and given by
| |
rad BW
2 / 1
2
2
) 1 ( 2 16
) 1 ( 2 2
o o
o
+

= (113)
| |
) 1 ( 2 2
) 1 ( 2 16
2
2 / 1
2
0
0
o
o o
e
e

+
= =
BW
Q (114)
From (113), we can observe that the bandwidth is a function of the distance of the poles and zeros. It
narrows when o approaches unity. Accordingly, if the noise frequency is stable, an adaptive second order IIR
filter can e designed where only the bandwidth is changing to accommodate the bandwidth of the noise []. See
Fig. 14. The poles are adapted to tract the bandwidth of the noise.

Fig. 14 Block diagram of an adaptive second order IIR (fixed zeros) digital notch filter
31

4.2 Design of the Non-Fixed Pole-Zero Adaptive IIR Digital Notch Filter
If the noise is varying around the nominal frequency noise, the coefficients of the filter become
2
2 0 1
2 0 1 0
, ) cos( 2
1 , ) cos( 2 , 1
o | | o
| |
= A =
= A = =
b b
a a a
(115)
The frequency drift affects the coefficients of the filter and the bandwidth, so the second adaptive second order
IIR digital notch filter is designed to track the frequency variation within an optimum bandwidth. Both the
zeros and poles are adapted. See Fig. 15. The transfer function of the filter estimator can be written as
2
2
1
1
2
2
1
1 1
0
1
) 1 ( ) (
g G(z)


+ +

=
z b z b
z b z b a
(116)
A check for stability before each iteration is required throughout the process. The IIR filter is unstable
when the poles are located outside the unit circle. The denominator of a second order IIR filter
2
2
1
1
1 ) (

+ + = z b z b z D (117)
has two roots
) 4 (
2
1
,
2
2
1 1 2 1
b b b p p = (118)
The stability condition requires that the magnitude of
2 1
, p p less than 1. Therefore the filter coefficients need
to satisfy
4 , 1
2
1
2
2
< < = b b o (119)
We use the reflection method to prevent the instability problem for and poles found outside the unit circle. If the
pole was located exactly on the unit circle, then we multiply it by a number less than 1 to eliminate the
possibility of the memory lock-up.

Fig. 15 Block diagram of an adaptive second order IID digital notch filter
(Fig. 12~15 are extracted from [5] : http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=00293240)

4.3 Adaptive Notch Filter by Direct Frequency Estimation
For above adaptive IIR notch filter with CLMS algorithm, the frequencies are sensitive to the coefficients
of the numerator of the notch fitter and small perturbations in the coefficients can case the frequencies to shift
significantly [6]. A most robust approach is to estimate the frequencies directly and then an adaptive notch filter
is designed in terms of the estimated frequencies. In this way, the frequency variation caused by the
perturbation in the estimated coefficients can be reduced. Furthermore, the stability of the filter can always be
ensured without any monitoring of the stability condition during adaptive process. Besides, this method
32

achieves the Cramer-Rao bound (CRB) for a sufficient large number of time series where the model is used
with the minimal number of parameters.

5. The Design of Other Special IIR Notch Filters
In this section, I will introduce two special kinds of notch filter, one is in the case which two notch
frequencies
1
e and
2
e are such that
2 / 1 ) cos( ) cos(
2 1
= e e (120)
The IIR bi notch filter design for this special case results in the reduction of the multiplier without affecting the
desired frequency response of the notch filter [7]. Another special IIR notch filter whose quality factor changes
with time in order to suppress the transient response.

5.1 Special IIR Bi Notch Filters
We aim at realizing a notch at
1
e e = , so the IIR prototype of such a filer is
2 2 1
1
2 1
1
1
cos 2 1
cos 2 1
) (


+
+
=
z r z r
z z
z N
e
e
(121)
Choose another notch at
2
e such that 2 / 1 ) cos( ) cos(
2 1
= e e . If
3
0
1
t
e s s , then
2
e lies in the
t e
t
s s
2
3
2
. The IIR notch filter for the notch at
2
e e = is
2 2 1
2
2 1
2
2
cos 2 1
cos 2 1
) (


+
+
=
z r z r
z z
z N
e
e
(122)
The pole radius r is selected to be less than 1 in order to simplify the design. Now cascading ) (
1
z N and
) (
2
z N , we have ) ( ) ( ) (
2 1 3
z N z N z N = , i.e.
2 2 1
2
2 1
2
2 2 1
1
2 1
1
3
cos 2 1
cos 2 1
cos 2 1
cos 2 1
) (




+
+

+
+
=
z r z r
z z
z r z r
z z
z N
e
e
e
e
(123)
Substituting (120) for (123) and simplifying, we obtain
4 4 3 3 1
4 3 1
3
) 2 ( ) 2 ( 1
) 2 ( ) 2 ( 1
) (


+
+
=
z r z Cr Crz
z Cz Cz
z N (124)
where
C = + ) cos( ) cos(
2 1
e e (125)
Let
4
1
t
e = , using the condition (120), we have
4
3
2
t
e = . On this case, we have C = 0. Hence, equation
(124) reduces to
4 / 3
4 4
4
0 3
1
| ) (
1
1
| ) (
t e =

=
=
+
+
= z N
z r
z
z N
C
(with notches at 4 / 3 , 4 / t t ) (126)
If we put
4
1
t
e = into (121), we have
2 1
2 1
4 / 1
2 1
2 1
| ) (
1

=
+
+
=
z rz
z z
z N
t e
(with notch at 4 / t ) (127)
From equations (126) and (127), we can see that
4 / 3
1
| ) (
t e =
z N has only one multiplier (viz.
4
r ) and
gives two notches at 4 / 3 , 4 / t t e = . On the other hand,
4 / 1
1
| ) (
t e =
z N need two multipliers (viz.
33

r and 2 2 ) and gives only one notch at
4
t
e = . Thus, we obtain two notches at
1
e and
2
e that
requires less multipliers for IIR notch filter for the condition 2 / 1 ) cos( ) cos(
2 1
= e e . In addition, the two
notches of ) (
3
z N have the same rejection band width as that of ) (
1
z N . The frequency responses of
4 / 1
1
| ) (
t e =
z N and
4 / 3
1
| ) (
t e =
z N are shown in Fig. 16.

Fig. 16 (a) The frequency response of IIR notch filter
4 / 1
1
| ) (
t e =
z N for r = 0.91. This IIR filter requires two
multipliers and give only one notch at
4
t
. (b) Frequency response of special IIR bi notch filter
4 / 3
1
| ) (
t e =
z N
designed with the condition 2 / 1 ) cos( ) cos(
2 1
= e e for r = 0.91. This condition reduces the number of
multipliers to one while maintaining the response sharpness. It gives two notches at 4 / 3 , 4 / t t e = .
(Fig. 16 is extracted from [7] : http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=5329045)

5.2 Digital Q-varying Notch IIR Filter with Transient Suppression
The transient response at the beginning of the signal is a problem of signal processing by traditional
digital filtering techniques. Its duration depends on the filter order. The larger the filter order, the longer the
transient response is. This causes problems when particularly short signals are filtered or when the initial part of
a processed signal is of great importance [8]. Under this circumstance, the useful signal will be distorted or
even lost entirely due to the transient response. To solve this problem, we can use the lower order filter. As it
has been mentioned before, IIR filter structures can be designed with a much lower order then their FIR
counterparts for meeting the same magnitude specifications. So, the IIR filter type will be considered instead of
FIR type filters.
To design a notch filter, we always want the rejection bandwidth as narrow as possible. It means the
notch filter needs to have high quality factor. However, high Q notch filter results in the transient response of
long duration. It is possible to attain a significant reduction of the transient response duration of a notch filter to
a given input signal by varying its quality factor with time [8].

34

It was assumed that the quality factor is varied in time to improve the time-domain response of the notch
filter. The second order Q-varying digital IIR notch filter can be represented mathematically by the following
time-varying difference equation :
| | | | ) 2 ( ) 1 ( 2 ) ( ) 2 ( ) ( 1 ) 1 ( 2 ) ( ) ( 1 + + = + n x n x n x n y n C n y n y n C | | (128)
where
)) ( 5 . 0 tan( ) (
1
0
n Q n C

O = (129)
where x(n) and y(n) are the input and output of the filter respectively.
0
O is the notch frequency which is not
time varying. It is well known that for smaller values of the quality factor, the duration of the transient
behavior of the notch filter is diminished. Therefore, when the filter is expected to display transient
behavior in output, a temporary decrease of the quality factor has to take place. Q(n) defines the variation
of the quality factor Q that is able to be formulated in terms of variation rang
Q
d and variation rate r :
0 ) exp( ) 1 ( 1 ) ( >
(

+ = n
r
nt
d Q n Q
s
Q
(130)
where ) ( lim n Q Q
n
= , the coefficient
Q
d defines the variation range of the function Q(n). This parameter is
given by
Q
Q
d
Q
) 0 (
= (131)
It is always smaller than 1 since Q(0) is smaller than Q. The variation rate r describes how long the quality
factor is being varied. According to a set of simulations before, the variation time should be ten times greater
than the transient duration of the Q-constant filter. Fig. 17 presents the comparison of responses to the notch
frequency for Q-constant and Q-varying IIR filter. It is obviously to observe that the Q-varying filter is able to
suppress the notch frequency considerably faster than the traditional Q-constant filter.

Fig. 17 Responses to the notch frequency for Q-constant and Q-varying filter
(Fig. 17 is extracted from [8] : http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=5280273)

35

6. The Design of FIR Notch Filters
To design the FIR filter, it is useful to make it linear phase in that the filter coefficients are even or odd
symmetric and make the number of multipliers be reduced. Based on the amplitude response characteristics of
linear phase FIR filters and the amplitude response requirement of digital notch filters, the length N of a digital
notch filter must be odd, i.e. N = 2M+1.
The frequency response of a linear phase FIR filter can be written as
) (
) ( ) (
e u
e e
j
e A H = (132)
where ) (e A is a real, even amplitude function and ) (e u is the phase function which is a linear of
) ( e u e M = . The impulse response of ) (e A is a noncausal sequence a(n) symmetric around the origin. The
causal sequence h(n) for e u M = is simply given by
) ( ) ( M n a n h = (133)
There are two types of linear phase FIR notch filters (LPFN) can be defined. The ideal Type I LPFN filter
has a

180 phase shift at the notch frequency


n
e , i.e. ) (e A has opposite signs in the two pass bands as
shown in Fig. 18. The ideal Type II LPFN filter is an exact linear phase filter. There is no difference between
) (e H its magnitude function and amplitude function ) (e A shown in Fig. 19 (a). In practice, we can only
obtain an approximation to the ideal LPFN response as illustrated in Fig. 19(b).

Fig. 18 The amplitude response of an ideal Type I LPFN filter

(a) (b)
Fig. 19 (a) The magnitude response of an ideal notch filter (the amplitude response of ideal Type II
LPFN filter) (b) The amplitude response of a practical Type II LPFN filter.
(Fig. 19 is extracted from [9] : http://www.springerlink.com/content/x06722038471n626/fulltext.pdf)
36

Observe Fig. 19 (b), the pass band ripple o is defined as the maximum deviation of the amplitude
function in pass band from the normalized level of unity. The pass band edges
1
e and
2
e are the angular
frequencies where the amplitude function decreases from 1 - o .
1 2
e e e = A is the notch bandwidth.
The popular approaches for linear phase band selective FIR filter design are
(1) The windowed Fourier series method
(2) The frequency sampling method
(3) The equi-ripple optimization technique
In the following, we will only consider about the Type II LPFN filter. To extend above three methods to
the design of LPFN filters, it is necessary to develop the relationship between the very narrow band band-pass
filter, i.e. tone filter and the Type II LPFN filter with a very narrow stop band. This relationship is based on the
concept of the complementary filter. Golden defines the complementary filter transfer function G(z) of a linear
phase FIR filter transfer function H(z),
) ( ) (
2 / ) 1 (
z G z z H
N
=

(134)
where N is the order (filter length) of H(z) and it is an odd number. The zero phase response ) (e B of G(z) is
complementary with respect to unity with the amplitude function ) (e A of H(z),
) ( 1 ) ( e e B A = (135)
The design of a notch filter can be executed as the design of tone filter and then converted using the above
equation.

6.1 The windowed Fourier series method
The basic idea of this method is to approximate ) (e H by truncating and modifying the infinite impulse
response to a finite one with a window function. The most frequently used window function is the Kaiser
window. To design the Type II LPFN filter, we can consider it as a complement of an FIR tone filter. We can
take a very narrow rectangular frequency response ) (e
i
B centered at
n
e and having a width e
i
A which
approaches zero. The convolution integral of ) (e
i
B and the window function is
} }
A +
A
A +
A
+ =
) 2 / (
) 2 / (
) 2 / (
) 2 / (
) ( ) (
2
1
) ( ) (
2
1
) (
e e
e e
e e
e e
u u e u
t
u u e u
t
e
i n
i n
i n
i n
d W B d W B B
i i
(136)
When e
i
A is small enough, the integrands can be taken as constants and
( )| | ) ( ) ( ) ( ) ( 2 / ) (
n n i n n i i
W B W B B e e e e e e t e e + + A = (137)
Using ) ( ) (
n i n i
B B e e = and the value ) (
n
B e , we normalize the tone filter response as
| | | | ) 2 ( ) 0 ( / ) ( ) ( ) ( / ) (
n n n n
W W W W B B e e e e e e e + + + = (138)
Then the notch filter can be designed by (135)
| | | | ) 2 ( ) 0 ( / ) ( ) ( 1 ) (
n n n
W W W W A e e e e e e + + + = (139)
The impulse response of the notch filter is
) cos( ) ( 2 ) ( ) ( n n bw n n a
n n
e o = (140)
where | | ) 2 ( ) 0 ( / 1
n
W W b e + = .
Since the filter frequency response is a shifted window spectrum, the pass band ripple o and notch
width e A should be equal to the window ripple and window width. Therefore, the design of a Type II LPFN
filter can be reduced to the determination of the window with the main lobe width equal to e A and the
window ripple equal to o .



37

6.2 The frequency sampling method
It is the most straightforward approach to the linear phase FIR notch filter design. After a design is
completed, the amplitude response ) (e A is specified at N typically equidistant points or frequency samples. A
small number of transition samples ensures efficient realization and a low order optimization problem, but
introduces some design inflexibility and does not yield as good results as that obtained when all N samples are
optimized [9] .

6.3 The equi-ripple optimization technique
The optimal LPFN filter should have an infinite attenuation at the notch frequency and the smallest pass
band ripple with a prescribed notch width. The criterion minimizing the maximum error over a set of frequency
bands is called a Chebyshev approximation. Filters that have the minimum value of the maximum error exhibit
equi-ripple behavior over the set of frequency bands in their frequency response.

7. The Idea of Sparse FIR Notch Filters Design
In the recording of electrocardiograms (ECGs), a major problem is that the measurement signals are
degraded by the additive 60 Hz power line interference. If the sampling rate of the analog to digital converter is
s
f Hz, the specification of the notch filter to remove the 60 Hz interference is given by

=
=
otherwise
e H
N j
d
1
0
) (
e e
e
(141)
where ) / 60 ( 2
s N
f t e = . Because the sampling rate
s
f is an even integer in engineering applications, the
notch frequency can be rewritten in the form of t ) 2 / ( p q , where p and q are co-prime integers. After some
manipulations, the inverse Fourier transform of ) (
e j
d
e H is expressed by
) cos( 2 ) ( ) ( n n n h
N d
e o = (142)
Because the notch frequency t e ) 2 / ( p q
n
= , it can be shown that
0 ) ( = kp h
d
where k is any odd integer (143)
This fact results in the sparse design of an FIR notch filter because there are many zeroed tap weights in the
impulse response of the ideal notch filter [10]. Due to the sparseness, the multiplication can be avoided for
zeroed tap weights. Finally, the Lagrange multiplier method is used to obtain the coefficients of the sparse notch
filter.

8. The Design of FIR Notch Filters by Using Bernstein Polynomial and Its Improvement

8.1 Design FIR Notch Filter by Using Bernstein Polynomial
Bernstein polynomial has been used to design maximally flat FIR notch filters. The rough process is in
the following: Given the notch frequency
d
e and 3-dB rejection bandwidth BW,
Step 1 : Choose the order n as integer | |
)
`

+ 3 ) / ( ) / (
2
1
2
BW BW t t .
Step 2: Compute ) 1 (
1
+ = n L - integer part of | | )) cos( 5 . 0 55 . 0 (
d
n e + and choose 1
1 2
+ = L L .



38

Step 3: Compute the filter weights
) (
1
L
i
a and
) (
2
L
i
a by the formula
n i
i
k
L
k
k
n
i
a
n
L k
k n L i k n n L
i
,..., 1 , 0 ,
1
2 ) 1 (
0
2 2
1
1 ) (
=
(

|
|
.
|

\
|
|
|
.
|

\
|
|
|
.
|

\
|
+
|
|
.
|

\
|
=

+ =
+ +
(144)
Step 4: Calculate the magnitude responses of two designed filter by the expression

=
= =
n
i
i L
i L
L L L a H
0
2 1
) (
, , )) (cos( ) ( e e (145)
And find the corresponding notch frequencies
1
L
e and
2
L
e from these two responses.
Step 5: The filter weights of the desired notch filter are obtained by linear combination :

) ( ) (
2 1
) 1 (
L
i
L
i i
a a a o o + = (146)
where
1
2
2
e e
e e
o

=
L
d L
(147)
Step 6: The magnitude response of the designed notch filter is given by

=
=
n
i
i
i
a H
0
)) (cos( ) ( e e (148)
Although the above design procedure gives us an explicit formula for the weights, the gain at notch
frequency is not exactly valued. In order to make the designed filter has zero gain at notch frequency, [11]
proposed a fine tuning procedure to modify the weight
0
a into c
0
a , i.e. change response ) (e H into
c e ) ( H . Although zero gain at
d
e can be achieved, ) 0 ( H becomes c 1 and ) (t H becomes c 1 .
Thus, the unity gain at 0 = e and t cannot be ensured.

8.2 Improvement
Observe (146) and (148), we see that
) ( ) 1 ( ) ( ) (
2 1
e o e o e
L L
H H H + = (149)
To ensure 0 ) ( =
d
H e , we therefore need
) ( ) (
) (
1 2
2
d L d L
d L
H H
H
e e
e
o

= (150)
Since 1 ) 0 ( ) 0 (
2 1
= =
L L
H H and 1 ) ( ) (
2 1
= = t t
L L
H H . This choice of o also gives unit gain at t e , 0 = .
9. The Rough Introduction an FIR Notch Filter for Adaptive Filtering
The adaptive filter is based on an offline optimization procedure which, for a given notch frequency,
computes the filter coefficients such that the frequency response is unity at that frequency and a weighted noise
gain is minimized. An adaption algorithm first estimates the frequency of the sinusoid and then updates the
filter coefficients using this estimate. The proposed filter [12] is considerably more flexible in shaping the
frequency response, and thereby rejecting noise in selected frequency ranges. Unlike the IIR filter, the adaptive
filter is always stable for suitable choice of step sizes. The algorithm can effectively be applied to beamforming
39

problems with AOA estimation whereas the IIR counterpart is inapplicable.

10. The Design of 2-D FIR Notch Filter Using Singular Decomposition
Although the IIR digital filter can have less filter length to reach the magnitude response specification
compared to the FIR digital filter, it has nonlinear phase. Sometimes, it is meaningful to design a linear phase
FIR notch filter due to the reduction of the multiplication number.
Because all deduction processes is complicated, so I only enumerate the main steps for this method [13]:
Step 1 : The singular value decomposition (SVD) is used to reduce the 2-D notch filter design problem into two
pairs of 1-D filter design problems.
Step 2 : An analytical least squares solution for the design of two pairs of 1-D linear phase filters is derived.
The designed filter coefficients have closed form formulas and the filter gain at the notch frequencies is exactly
zero.

11. The Applications of the Notch Filter
The notch filter can be applied many areas.
(1) Remove the periodic noises in the image
(2) Reducing Blocking Artifact from DCT coded image
(3) Removing Powerline or other interference in the ECG recording system
(4) Filtering of humming global system for mobile communications
(5) Estimation of the power system frequency.
In the following section, only part (1), (2), (3) will be introduced.

10.1 Remove the periodic noises in the image

Fig. 20 Example of single sinusoidal interference removal. (a) Corrupted image. (b) Image stored by using
2-D IIR notch filter with transient suppression.
(Fig. 20 is extracted from [4] : http://www.engr.uvic.ca/~wslu/Publications/Lu-Journal/J22.pdf)

The image shown in Fig. 20(a) is the Lena image corrupted by a sinusoidal pattern of the form
) 2 . 0 1 . 0 sin( 30 n m t t + (151)
A 2-D IIR notch filter with ) 2 . 0 , 1 . 0 ( ) , (
*
2
*
1
t t e e = is designed and BW = t 01 . 0 to remove the interference in
spatial domain. The filtered image, shown in Fig. 20(b) is clearly free from interference.


40

10.2 Reducing Blocking Artifact from DCT coded image
The reconstructed image from highly compressed JPEG data has noticeable degradation due to blocking
artifacts.LTI filtering cannot solve this problem. So, space-variant or adaptive filtering is required. It is based on
the edge information from the blocky image. The false edges due to blocking artifacts have periodic structure in
the frequency domain. These periodic textures become more obvious after gradient operation since
discontinuities due to block coding are highlighted in gradient image [16]. These peaks can be killed by a 2-D
multiple notch filter which design can be decomposed to the 1-D notch filter design as before mentioned.
Discontinuities due to blocking artifacts are more in monotone area so the 2-D multiple notch filter can be
applied directly. In the edge area, the signal adaptive filter is used. The advantage of this scheme is that it has
low computational complexity because filtering is done in DCT domain [16].

10.3 Removing Power Line or other interference in the ECG recording system
Te measurement signals are degraded by the power line interference is the major problem in the recording
of ECG. One source of interference is electrical field characterized by noise concentrated at the fundamental
frequency 60 Hz. We can use IIR multiple notch filter based on all-pass filter to remove the power line
interference. The samples used here 8 b and the sampling rate is 800 Hz. Fig. 21(a) shows the input waveform
which is ECG signal corrupted by harmonic interference with frequencies 60, 180, and 300 Hz. The
specification of notch filter is chosen as
t t e
t t e
t t e
005 . 0 75 . 0
005 . 0 45 . 0
005 . 0 15 . 0
3 3
2 2
1 1
= =
= =
= =
BW
BW
BW
N
N
N

Fig. 21(b) shows the waveform of notch filter output with zero initial. From Fig. 21(b), it is obvious that the
interference has been removed but some transient states appear at the beginning. To solve this problem, we can
use the Q-varying IIR notch filter.

Fig. 21 Power line interference canceling in ECG signal. (a) The waveform of notch filter input. (b) The
waveform of notch filter output.
(Fig. 21 is extracted from [1] : http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=608814)

41

12. Conclusion
I have introduced so many kinds of methods to design IIR and FIR notch filter both in 1-D and 2-D. The
IIR filter has the outstanding advantage of requiring considerably fewer coefficients compared with its FIR
counterpart. For this reason, the IIR notch filter is more widely use than the FIR notch filter. IIR single/multiple
notch filter can be implemented by the all pass filter simply. Due to the mirror-image symmetry relation
between the numerator and the denominator polynomials of the all pass filter, the notch filter can be realized by
a computationally efficient lattice structure with low sensitivity. Another simple technique to design the IIR
single/multiple notch filter is Optimal Pole placement. First, the numerator of the frequency response of the
notch filter is realized by placing zeros on the unit circle with angles equal to the prescribed notch frequencies.
Second, the pole placements are determined by solving quadratic programming problem. For stability, the pole
radius in the single notch filter is ensured in that it is designed by the designer. In the multiple notch design, the
pole radius is constrained sing the implications of Rouches theorem.
To design 2-D IIR digital notch filter, we can use a simple algebraic method to decompose original filter
into 2-D parallel line filter as well as 2-D straight line filter. In addition, we are able to use outer product
expansion to reduce the 2-D notch filter design problem to two pairs of 1-D notch filter design problems. Both
methods have closed form transfer function and satisfy bounded input / output (BIBO) stability condition.
Above cases are only suitable for the notch frequencies which are given in advance and are fixed. If the notch
frequencies dont be prescribed or they are time-varying, then adaptive notch filters are needed to track the
frequencies. It is worth to mention that both adaptive FIR and fixed-zero adaptive IIR filters are recommended
when the frequency variation of the noise is very large. The non-fixed pole-zero adaptive second order IIR
notch is the most versatile of the three adaptive filters. This filter tracks the frequency variation by changing the
coefficients of the filter that are affected by such a variation. The width of the filter is therefore minimized. The
conventional adaptive IIR notch filters have to estimate the filter coefficients iteratively. However, the
frequencies are sensitive to the coefficients of the numerator of the notch filter. It can therefore lead to a
substantial loss in quality if the broad-band signal power is not small enough. A more robust approach is to
estimate the sinusoidal frequencies directly from data samples, and then an adaptive notch filer is designed in
light of the estimated frequencies. This scheme can reduce the frequency variation caused by the perturbation in
the estimated coefficients. Furthermore, the stability of the filter can always be ensured without any monitoring
of the stability condition in the adaptive process.
We also talked about when the notch frequencies
1
e and
1
e meet
2
1
) cos( ) cos(
2 1
= e e , the IIR bi
notch filter design for this special case results reduction in the number of multipliers without affecting the
response of the desired notch filter. The transient response at the beginning of the signal is a problem for
traditional digital filtering techniques. Besides, we always want the notch width is as narrower as possible, i.e.
high quality factor in the notch filter design. Unfortunately, selective magnitude response (high value of the
quality factor) and the transient response of short duration are design specifications that are contradictory to
each other and therefore are difficult to simultaneously tune. To solve this problem, the digital Q-varying IIR
notch filter is applied. This new class of filter achieve a considerably reduction of the duration of the transient
response compared with the traditional Q-constant IIR notch filter.
Although the IIR notch filter can use less filter coefficients to reach the magnitude response specification
compared with the FIR notch filter it has nonlinear phase and not necessarily stable. Hence, it is meaningful to
design the FIR notch filter with linear phase which can reduce the number of multiplication due to the
symmetry of the filter coefficients. Moreover, the FIR notch filter is always stable.
42

For the FIR notch filter design, I have discussed about the general idea of the windowed Fourier series
design approach, frequency sampling approach, and the Optimal LPFN filter design. Besides, when the
sampling rate is an even integer, the notch frequency can be written in the form of t ) 2 / ( p q . In this way, there
are many zeroed tap weights in the impulse response of the ideal notch filter. Therefore, the multiplication
number can be reduced for this kind of sparse FIR notch filter. FIR notch filter can also e designed by using
Bernstein polynomial. However, the designed magnitude response is not exactly zero at notch filter frequency,
so a novel method is presented to improve this drawback. The 2-D FIR notch filter is able to be designed by
using singular value decomposition (SVD) which decompose original 2-D notch filter design problem to two
pairs of 1-D filter design problems. Then, an analytic least-squares solution is used to design these two 1-D
filter. The coefficients of the filter designed are given by closed form formulas and the filter gain in notch
frequencies are exactly zeros.

13. References
[1] S. C. Pei and C. C. Tseng, IIR multiple notch filter design based on allpass filter, IEEE Trans. on
circuits and systems, vol. 44, No.2, Feb., 1997.
[2] C. C. Tseng and S. C. Pei, Stable IIR notch filter design with optimal pole placement, IEEE Trans. on
signal processing, vol. 49, No.11, Nov., 2001.
[3] S. C. Pei and C. C. Tseng, Two dimensional notch filter design, IEEE Trans. on circuits and systems, vol.
41, No.3, Mar., 1994.
[4] S. C. Pei, W. S. Lu and C. C. Tseng, Analytical two-dimensional IIR notch filter design using outer
product expansion, IEEE Trans. on circuits and systems, vol. 44, No.9, Sep., 1997.
[5] M. Ferdjallah and R. E. Barr, Adaptive Digital notch filter design on the unit circle for the removal of
powerline noise from biomedical signals, IEEE Trans. on biomedical engineering, vol. 41, No.6, June,
1994.
[6] B. S. Chen, T. Y. Yang and B. H. Lin, Adaptive notch filter by direct frequency estimation, Signal
Processing, 1992.
[7] R. Deshpande, B. Kumar and S. B. Jain, Special FIR and IIR bi notch filter filters, International
conference on advances in recent technologies in communication and computing, 2009.
[8] J. Piskorowski, Digital Q-varying notch IIR filter with transient suppression, IEEE Trans. on
instrumentation and measurement, vol. 59, No.4, Apr., 2010.
[9] T. H. Yu, S. K. Mitra and H. Babic, Design of linear phase FIR notch filters, Sadhana, vol. 15, part 3,
Nov., 1990.
[10] C. C. Tseng and S. C. Pei, Spare FIR notch filter design and its application, IEEE on electronics letters,
vol. 33, No. 13, Tune, 1997.
[11] C. C. Tseng, Improved design of FIR notch filter by using Bernstein polynomial, Int. J. Circ. Theor.
Appl., 2001.
[12] O. Kukrer and A. Hocanin, An FIR filter for adaptive filtering of a sinusoid in correlated noise,
Hindawi Publishing Corporation EURASIP Journal on applied signal processing, 2006.
[13] S. C. Pei, W. S. Lu and C. C. Tseng, Two-dimensional FIR notch filter design using singular value
decomposition, IEEE Trans. on circuits and systems, vol. 45, No.3, Mar., 1998.
[14] K. Hirano, S. Nishimura and S. K. Mitra, Design of digital notch filters, IEEE Trans. on circuits and
systems, vol. CAS-21, No.4, July, 1974.
[15] S. Yimman, S. Praesomboon, P. Soonthuk and K. Dejhan, IIR multiple notch filter design with optimum
43

pole position, IEEE, 2006.
[16] V. K. Srivastava and G. C. Ray, Design of 2D-multiple notch filter and its application in reducing
blocking artifact from DCT coded image, Proceedings of the 22nd annual EMBS international
conference, July, 2000.
[17] C. Charoenlarpnopparut, P. Charoen, A. Thamrongmas, S. Samurpark and P. Boonyanant, High-Quality
factor, double notch, IIR digital filter design using optimal pole re-position technique with controllable
passband gains, IEEE, 2009.
[18] R. C. Gonzalez and R. E. Woods, Digital Image Processing, Prentice Hall, second edition, 2002.
[19] K. Lacanette, A basic introduction to filters- Active, Passive, and Switched-Capacitor, National
Semiconductor Application Note 779, Apr., 1991.

You might also like