You are on page 1of 8

International Journal of Advanced Research in Computer Science and Software Engineering

Research Paper Available online at: www.ijarcsse.com

Volume 2, Issue 11, November 2012

ISSN: 2277 128X

Design Analysis of High Pass FIR Filters Using Hanning, Bartlett and Kaiser Windows
Suhaib Ahmed
School of Electronics and Communication Engineering, Shri Mata Vaishno Devi University, J&K, India
Abstract: Digital filters are pervasive in the present era of communication systems. As a result good digital filter performance is important and hence to design a digital finite impulse response (FIR) filter satisfying all the required conditions is a demanding one. In this paper, design techniques of high pass FIR filters using Hanning, Bartlett and Kaiser Windows are presented. The magnitude and phase responses are demonstrated for different design techniques at particular cut off frequency and filter order. It is shown that degree of flatness varies with the length of the filter. Keywords: High pass FIR filter, Hanning window, Bartlett Window, Kaiser Window

I. INTRODUCTION A digital filter is a mathematical algorithm implemented in hardware/software that operates on a digital input to produce a digital output [1],[2]. Digital filters differ from conventional analog filters by their use of finite precision to represent signals and coefficients and finite precision arithmetic to compute the filter response. The most straightforward way to implement a digital filter is by convolving the input signal with the digital filters impulse response. All linear filters can be design ed in this manner. Another way to design digital filters is recursion. When a filter is implemented by convolution, each sample in the output is calculated by weighting the samples in the input, and adding them together. A discrete-time filter produces a discrete-time output sequence y(n) for the discrete-time input sequence x(n). A filter may be required to have a given frequency response, or a specific response to an impulse, step, or ramp, or simulate an analog system [2]. Digital filters are classified either as finite duration unit pulse response (FIR) filters or infinite duration unit pulse response (IIR) filters, depending on the form of the unit pulse response of the system. In the FIR system, the impulse response is of finite duration, i.e. it has a finite number of non-zero terms. In other words, FIR filters are filters having a transfer function of a polynomial in z- and are an all-zero filter in the sense that the zeroes in the z-plane determine the frequency response magnitude characteristic [1][2]. The z transform of N-point FIR filter is given by

------- (1)
Where M = N 1. Thus, the transfer function of every length N = M + 1 FIR filter is an M th order polynomial in z-1. FIR filters are employed in filtering problems where linear phase characteristics within the pass band of the filter are required. There are three basic techniques to design FIR filters. In this paper, the spectral responses of Hanning, Bartlett and Kaiser windows are analyzed for odd filter order N. The general equation of frequency response H( ) for odd number of N [4] is given by

------- (2)
Now comparing H( ) with the polar representation of H( ), the magnitude is H() = |H1()| Where H1() is a real quantity given by

------- (3)

2012, IJARCSSE All Rights Reserved

Page | 153

Suhaib et al., International Journal of Advanced Research in Computer Science and Software Engineering 2 (11), November- 2012, pp. 1-6 In this paper, the magnitude of H() has been analyzed for different design techniques. The unit sample response hd(n) of the linear ideal high pass filter is determined from the inverse fourier transform of the frequency response of the ideal high pass filter digital filter [4] and is given by

------- (4)
Where = (N 1) / 2. In order to develop stable and realizable transfer function, the infinite duration impulse response is converted to a finite duration impulse response by truncating the impulse response to a finite number of terms. This can be achieved using various window design techniques as presented in the paper. II. ANALYTICAL DESIGN OF HIGH PASS FIR FILTER USING HANNING WINDOW The Hanning Window [1][2][5] is defined by

------- (5)
for 0 n M The values of filter impulse response coefficients, h(n) for Bartlett window at S = 0.5 rad/s and filter order 51, are following:
Table 1 - FILTER COEFFICIENTS OF HIGH PASS FIR FILTER USING HANNING WINDOW

h(0) h(1) h(2) h(3) h(4) h(5) h(6) h(7) h(8) h(9) h(10) h(11) h(12) h(13) h(14) h(15) h(16) h(17) h(18) h(19) h(20) h(21) h(22) h(23) h(24) h(25)

0 -0.00003 -0.00014 0.00034 0.00062 -0.00101 -0.00151 0.00212 0.00288 -0.00378 -0.00485 0.00610 0.00757 -0.00928 -0.01128 0.01365 0.01646 -0.01986 -0.02405 0.02936 0.03640 -0.04627 -0.06137 0.08791 0.14878 -0.44974

-h(50) -h(49) -h(48) -h(47) -h(46) -h(45) -h(44) -h(43) -h(42) -h(41) -h(40) -h(39) -h(38) -h(37) -h(36) -h(35) -h(34) -h(33) -h(32) -h(31) -h(30) -h(29) -h(28) -h(27) -h(26) -h(25)

The corresponding frequency response and phase response of the high pass filter are shown in Fig. 1 and Fig. 2.

2012, IJARCSSE All Rights Reserved

Page | 154

Suhaib et al., International Journal of Advanced Research in Computer Science and Software Engineering 2 (11), November- 2012, pp. 1-6
0

-10

-20

Magnitude (dB)

-30

-40

-50

-60

-70

-80

-90

-100 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Normalized Frequency ( rad/sample)

Fig. 1: FREQUENCY RESPONSE (IN DB) OF HIGH PASS FIR FILTER USING HANNING WINDOW

-5

-10

Phase (radians)

-15

-20

-25

-30

-35

-40

-45 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Normalized Frequency ( rad/sample)

Fig. 2: PHASE RESPONSE OF HIGH PASS FIR FILTER USING HANNING WINDOW

III. ANALYTICAL DESIGN OF HIGH PASS FIR FILTER USING BARTLETT WINDOW
The Bartlett Window [1][2][5] is defined by

------- (6)
for 0 n M The values of filter impulse response coefficients, h(n) for Bartlett window at S = 0.5 rad/s and filter order 51, are following:
Table 2 - FILTER COEFFICIENTS OF HIGH PASS FIR FILTER USING BARTLETT WINDOW

h(0) h(1) h(2) h(3) h(4) h(5) h(6) h(7) h(8) h(9) h(10) h(11) h(12) h(13) h(14) h(15) 2012, IJARCSSE All Rights Reserved

0 -0.00036 -0.00076 0.00119 0.00107 -0.00219 -0.00276 0.00340 0.00411 -0.00490 -0.00579 0.00682 0.00798 -0.00935 -0.01094 0.01284

-h(50) -h(49) -h(48) -h(47) -h(46) -h(45) -h(44) -h(43) -h(42) -h(41) -h(40) -h(39) -h(38) -h(37) -h(36) -h(35)

Page | 155

Suhaib et al., International Journal of Advanced Research in Computer Science and Software Engineering 2 (11), November- 2012, pp. 1-6 0.01514 h(16) -h(34) -0.01797 h(17) -h(33) -0.02157 h(18) -h(32) 0.02627 h(19) -h(31) 0.03268 h(20) -h(30) -0.04195 h(21) -h(29) -0.05649 h(22) -h(28) 0.08269 h(23) -h(27) 0.14382 h(24) -h(26) -0.44942 h(25) -h(25) The corresponding frequency response and phase response of the high pass filter are shown in Fig. 3 and Fig. 4.
0

-10

-20

Magnitude (dB)

-30

-40

-50

-60

-70 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Normalized Frequency ( rad/sample) Fig. 3: FREQUENCY RESPONSE (IN DB) OF HIGH PASS FIR FILTER USING BARTLETT WINDOW
0

-10

-20

Phase (radians)

-30

-40

-50

-60

-70

-80

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Normalized Frequency ( rad/sample) Fig. 4: PHASE RESPONSE OF HIGH PASS FIR FILTER USING BARTLETT WINDOW

IV. ANALYTICAL DESIGN OF HIGH PASS FIR FILTER USING KAISER WINDOW A desirable property of the window function is that the function is of finite duration in the time domain and that the Fourier transform has maximum energy in the main lobe or a given peak side lobe amplitude [2]. In a Kaiser window, the side lobe level can be controlled with respect to the main lobe peak by varying a parameter, [2]. The width of main lobe can be varied by adjusting the length of the filter. The Kaiser window function is given by

2012, IJARCSSE All Rights Reserved

Page | 156

Suhaib et al., International Journal of Advanced Research in Computer Science and Software Engineering 2 (11), November- 2012, pp. 1-6

------- (7)

Where the parameter is given by

------- (8)
Here, A is the pass band attenuation The modified Bessel function of the first kind, Io(x), can be computed from its power series expansion given by

------- (9)

Table 3 - FILTER COEFFICIENTS OF HIGH PASS FIR FILTER USING KAISER WINDOW FOR = 2

h(0) h(1) h(2) h(3) h(4) h(5) h(6) h(7) h(8) h(9) h(10) h(11) h(12) h(13) h(14) h(15) h(16) h(17) h(18) h(19) h(20) h(21) h(22) h(23) h(24) h(25)

0.00816 -0.00854 -0.00895 0.00938 0.00986 -0.01038 -0.01096 0.01159 0.01229 -0.01308 -0.01397 0.01497 0.01612 -0.01746 -0.01902 0.02087 0.02312 -0.02588 -0.02937 0.03394 0.04015 -0.04912 -0.0632 0.08854 0.14763 -0.44296

-h(50) -h(49) -h(48) -h(47) -h(46) -h(45) -h(44) -h(43) -h(42) -h(41) -h(40) -h(39) -h(38) -h(37) -h(36) -h(35) -h(34) -h(33) -h(32) -h(31) -h(30) -h(29) -h(28) -h(27) -h(26) -h(25)

The frequency response and phase response of the high pass filter using Kaiser window are shown in Fig. 5 and Fig. 6 respectively for filter order 61 and normalised cut-off frequency S = 0.5 rad/s.

2012, IJARCSSE All Rights Reserved

Page | 157

Suhaib et al., International Journal of Advanced Research in Computer Science and Software Engineering 2 (11), November- 2012, pp. 1-6
0

-10

-20

Magnitude (dB)

-30

-40

-50

-60

-70 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Normalized Frequency ( rad/sample) Fig. 5: FREQUENCY RESPONSE (IN DB) OF HIGH PASS FIR FILTER USING KAISER WINDOW
0

-5

-10

-15

Phase (radians)

-20

-25

-30

-35

-40

-45 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Normalized Frequency ( rad/sample) Fig. 6: PHASE RESPONSE OF HIGH PASS FIR FILTER USING KAISER WINDOW

V. SIMULATION AND PERFORMANCE EVALUATION The magnitude responses and phase responses of different design techniques for high pass FIR filter with normalised cut-off frequency S = 0.4 rad/s and filter order = 61, are illustrated in Fig. 7, Fig. 8 and Fig. 9.
1

0.8

Magnitude

0.6

Hanning
0.4

Bartlett Kaiser

0.2

0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Normalized Frequency ( rad/sample)

Fig. 7: COMPARISION OF FREQUENCY RESPONSE OF HIGH PASS FIR FILTERS

2012, IJARCSSE All Rights Reserved

Page | 158

Suhaib et al., International Journal of Advanced Research in Computer Science and Software Engineering 2 (11), November- 2012, pp. 1-6
0

-10

-20

-30

Magnitude (dB)

-40

-50

Hanning Bartlett Kaiser

-60

-70

-80

-90

-100 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Normalized Frequency ( rad/sample) Fig. 8: COMPARSISION OF FREQUENCY RESPONSE (IN DB) OF HIGH PASS FIR FILTERS

-10

-20

Phase (radians)

-30

-40

-50

Hanning
-60

Bartlett Kaiser

-70

-80

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Normalized Frequency ( rad/sample) Fig. 9: COMPARISION OF PHASE RESPONSE OF HIGH PASS FIR FILTERS

High pass FIR filter using Kaiser window shows superior transition from stop band to pass band at the cut-off frequency S = 0.6 rad/s but as can be seen from the frequency response in Fig. 7, pass band has ripples or oscillations due to side lobes of the window function and there are relatively large oscillations or ripples near the cut-off frequency.. The simulation was done for =0.5. When =0, Kaiser window will act as a Rectangular window and when =5.4414, Kaiser window acts as a Hanning window.
1

0.9

0.8

0.7

Magnitude

0.6

0.5

0.4

0.3

0.2

0.1

0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Normalized Frequency ( rad/sample)


Fig. 10: FREQUENCY RESPONSE OF HIGH PASS FIR FILTER USING KAISER WINDOW FOR

=10

2012, IJARCSSE All Rights Reserved

Page | 159

Suhaib et al., International Journal of Advanced Research in Computer Science and Software Engineering 2 (11), November- 2012, pp. 1-6 As can be seen from Fig. 10, as is taken as =10, the performance of the High pass filter using Kaiser window is improved as it gives further reduced pass-band ripples but with a reduced cut-off sharpness. Hence ripple reduction is at the expense of the poor transition from pass band to pass band at the cut-off frequency. The Hanning window achieves much better pass band attenuation but as can be seen from Fig. 7, the Bartlett window frequency response shows poor performance in the transition band as compared to other windows. The normalized cut-off frequency S was changed from 0.6 rad/s to 0.4 rad/s and the simulation was repeated again. As can be seen from Fig. 11, there is no change in the pass band attenuation, stop band and pass band ripples for all windows.
0

-10

-20

Magnitude (dB)

-30

-40

-50

hanning bartlett

-60

kaiser

-70

-80

-90 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

0.4 rad/s Next, the order of the filter N is increased from 51 to 151 and simulation is done. As can be seen from Fig. 12, as the filter order is increased the performance of all windows increases in the transition band and their frequency response approximates the ideal high pass filter response except for Bartlett window.
0

Normalized Frequency ( rad/sample) Fig. 11: COMPARSISION OF FREQUENCY RESPONSE (IN DB) OF HIGH PASS FIR FILTERS AT S =

-20

-40

Magnitude (dB)

-60

-80

-100

Hanning Bartlett Kaiser

-120

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Normalized Frequency ( rad/sample) Fig. 12: COMPARSISION OF FREQUENCY RESPONSE (IN DB) OF HIGH PASS FIR FILTERS WITH FILTER ORDER N = 201

VI. CONCLUSION The design of high pass FIR filter using Kaiser Window is suitable if the transition band is of utmost importance but if we consider other parameters then, Hanning window provides better pass band attenuation. In general, Hanning window can be considered as a stable window as it provides with good attenuation and a better transition from stop band to pass band at cut-off frequency than Bartlett and Kaiser Windows. REFERENCES
[1] John G. Proakis, Dmitris. G. Mnaolakis,Digital Signal Processing Principles, Algorithm, and Application, 3rd ed., Prentice-Hall of India Private Limited, 1997, pp. 620-662 [2] S Salivahanan, A Vallavaraj, C Gnanapriya, Digital Signal Processing, 2nd ed., Tata McGraw Hill Education Private Limited, 2011, pp. 430-469 [3] Steven W. Smith, The Scientists and Engineers Guide to Digital Signal Processing, 2nd ed., California Technical Publication, 1999, pp. 261-296 [4] V. Udayashankara, Modern Digital Signal Processing, 2nd ed., PHI Learning Private Limited, 2009, pp. 472-532. [5] J. R. Johnson, Introduction to Digital Signal Processing, 4th ed., Prentice-Hall of India Private Limited, 1997, pp. 85-95

2012, IJARCSSE All Rights Reserved

Page | 160

You might also like