0% found this document useful (0 votes)
423 views58 pages

Unit 3

This document discusses different structures for realizing finite impulse response (FIR) filters. It describes three main structures: 1. Direct form structure - This provides a direct mapping between the time domain difference equation and z-domain transfer function. It requires N multiplications and N-1 additions for an Nth order filter. 2. Cascade structure - This factorizes the transfer function into first and second order sections, which are then cascaded. This structure reduces computations compared to direct form. 3. Linear phase structure - This exploits symmetry in the impulse response to minimize the number of multiplications for linear phase filters. It requires only N/2 multiplications for even order filters and (N-1)/
Copyright
© © All Rights Reserved
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)
423 views58 pages

Unit 3

This document discusses different structures for realizing finite impulse response (FIR) filters. It describes three main structures: 1. Direct form structure - This provides a direct mapping between the time domain difference equation and z-domain transfer function. It requires N multiplications and N-1 additions for an Nth order filter. 2. Cascade structure - This factorizes the transfer function into first and second order sections, which are then cascaded. This structure reduces computations compared to direct form. 3. Linear phase structure - This exploits symmetry in the impulse response to minimize the number of multiplications for linear phase filters. It requires only N/2 multiplications for even order filters and (N-1)/
Copyright
© © All Rights Reserved
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/ 58

UNIT-3 FIR FILTER DESIGN

3.1. Structures for Realization of FIR systems


In the general, the time domain representation of an Nth order FIR system is,
𝑁−1

𝑦 𝑛 = 𝑏𝑚 𝑥 𝑛 − 𝑚 = 𝑏0 𝑥 𝑛 + 𝑏1 𝑥 𝑛 − 1 + 𝑏2 𝑥 𝑛 − 2 + ⋯ . 𝑏𝑛−1 𝑥 𝑛 − 𝑁 − 1
𝑚 −0
and the z-domain representation of a FIR system is,
𝑌 𝑧
𝐻 𝑧 = = 𝑏0 + 𝑏1 𝑧 −1 + 𝑏2 𝑧 −2 + ⋯ . +𝑏𝑧−1 𝑧 − 𝑁−1
𝑋 𝑧
The above two representation of FIR system can be viewed as a computational procedure
(or algorithm) to determine the output sequence 𝑦 𝑛 from the input sequence 𝑥 𝑛 . Also in the
above representations the value of N gives the numbers of zeros of the FIR system. The
computations in the above equation can be arranged into various equivalent sets of difference
equations, which lead to different types of structures for realizing FIR systems. Some of the
structures of the system give a direct relation between time domain equation and z –domain
equation. The different types of structures for realizing FIR systems are,
1. Direct form realization
2. Cascade realization
3. Linear phase realization
3.2 Direct Form Realization of FIR System
Consider the difference equation governing a FIR system,
𝑁−1

𝑦 𝑛 = 𝑏𝜔 𝑥 𝑛 − 𝑚
𝑚 −0
= 𝑏0 𝑥 𝑛 + 𝑏1 𝑥 𝑛 − 1 + 𝑏2 𝑥 𝑛 − 2 + ⋯ . 𝑏𝑁−1 𝑥 𝑛 − 𝑁 − 1
On taking 𝑧 transform of the above equation we get,
𝑌 𝑧 = 𝑏0 𝑋 𝑧 + 𝑏1 𝑧 −1 + 𝑏2 𝑧 −2 𝑋 𝑧 +𝑏3 𝑧 −3 𝑋 𝑧 + ⋯ . 𝑏𝑁−2 𝑧 − 𝑁−2 𝑋 𝑍 + 𝑏𝑁−1 𝑧 −𝑁−1 𝑋 𝑧
……….. (3.1)
The equation of 𝑌 𝑧 [equation 3.1)] can be directly represented by a block diagram as
shown in fig.3.1 and this structure is called direct form structure. The direct form structure
provides a direct relation between time domain and z-domain equations.

Fig3.1: Direct form structure of FIR system

67
From direct from structure it is observed that the realization an Nth order FIR discrete
time system involves N number of multiplications and N-1 number of additions. Also the
structure involves N-1 delays and so N-1 memory locations are required to store the delayed
signals.
3.3 Cascade Form Realization of FIR System

Consider the transfer function of a FIR system,


𝑌 𝑧
𝐻 𝑧 = = 𝑏0 + 𝑏1 𝑧 −1 + 𝑏2 𝑧 −2 + ⋯ + 𝑏𝑁−1 𝑧 − 𝑁−1
𝑋 𝑧
The transfer function of FIR system is 𝑁 − 1 𝑡𝑕 order polynominal in z. This
polynominal can be factorized into first and second –order factors and the transfer function can
be expressed as a product of first and second order factors or sections as shown in equation (3.2).
𝑌 𝑧 𝑚
𝐻 𝑧 =𝑋 = 𝐻1 𝑧 × 𝑧 × 𝐻3 𝑧 … 𝐻𝑚 𝑧 = 𝑖=1 𝐻𝑖 𝑧 … . (3.2)
𝑧

Where, 𝐻𝑖 𝑧 = 𝑐0𝑖 + 𝑐1𝑖 𝑧 −1 + 𝑐2𝑖 𝑧 −2


Second –order section
or, 𝐻𝑖 𝑧 = 𝑐0𝑖 + 𝑐1𝑖 𝑧 −1

First –order section

The individual second-order or first –order section can be realized either in direct form
structure or linear phase structure. The overall system is obtained by cascading the individual
section as shown in fig.3.2. The number of calculations and the memory requirement depends on
the realization of individual sections.

Fig.3.2: Cascade structure of FIR system.

68
3.4 Linear Phase Realization of FIR System
Consider the impulse response 𝑕 𝑛 of FIR system,
𝑏0
𝑕 𝑛 = , 𝑏 , 𝑏 , … … 𝑏𝑁−1
↑ 1 2
In FIR system, for linear phase response the impulse response should be symmetrical.
The condition for symmetry is,
𝑕 𝑛 =𝑕 𝑁−1−𝑛

Proof:
Let, N=7, ∴ 𝑕 𝑛 = 𝑕 6 − 𝑛 Let, N=8, ∴ 𝑕 𝑛 = 𝑕 7 − 𝑛
n=0,1,2,3,5,5,6, n=0,1,2,3,5,5,6,7
When 𝑛 = 0; 𝑕 0 = 𝑕 6 When 𝑛 = 0; 𝑕 0 = 𝑕 7
When 𝑛 = 1; 𝑕 1 = 𝑕 5 When 𝑛 = 1; 𝑕 1 = 𝑕 6
When 𝑛 = 2; 𝑕 2 = 𝑕 4 When 𝑛 = 2; 𝑕 2 = 𝑕 5
When 𝑛 = 3; 𝑕 3 = 𝑕 3 When 𝑛 = 3; 𝑕 3 = 𝑕 4

69
When the impulse response is symmetric, the samples of impulse response will satisfy the
condition,
𝒃𝒏 = 𝒃𝑵−𝟏−𝒏
By using the above symmetry condition it is possible to reduce the number of multipliers
required for the realization of FIR system. Hence, the linear phase realization is also called
realization with minimum number of multipliers.
Consider the transfer function of FIR system,
𝑌 𝑧
𝐻 𝑧 = = 𝑏0 + 𝑏1 𝑧 −1 + ⋯ + 𝑏𝑁−1 𝑧 − 𝑁−1
𝑋 𝑧
The linear phase realization of the FIR system using the above equation for even odd values of N
are discussed below.
Case i: When N is even
𝑌 𝑧
𝐻 𝑧 = = 𝑏0 = 𝑏1 𝑧 −1 + 𝑏2 𝑧 −2 + ⋯ + 𝑏𝑁−1 𝑧 − 𝑁−1
𝑋 𝑧

𝑁
−1 Dividing the summation of N
𝑁−1 2 𝑁−1

= 𝑏𝑚 𝑧 −𝑚
= 𝑏𝑚 𝑧 −𝑚
+ 𝑏𝑚 𝑧 −𝑚 terms into two summations with
N/2 terms.
𝑚 =0 𝑚 =0 𝑁
𝑚=
2

Let, P=N-1-m, m=N-1-p


𝑁 𝑁 𝑁
When, 𝑚 = ; 𝑝 = 𝑁 − 1 − = − 1
2 2 2
When, 𝑚 = 𝑁 − 1; 𝑝 = 𝑁 − 1 − 𝑁 − 1 = 0

𝑁 𝑁
−1 −1
2 2 Let,m=p in the second
𝑌 𝑧
∴ = 𝑏𝑚 𝑧 −𝑚 + 𝑏𝑁−1−𝑝 𝑧 −(𝑁−1−𝑝) summation
𝑋 𝑧
𝑚 =0 𝑝=0
𝑁 𝑁
−1 −1
2 2

= 𝑏𝑚 𝑧 −𝑚 + 𝑏𝑁−1−𝑚 𝑧 −(𝑁−1−𝑚)
𝑚 =0 𝑚 =0

𝑁 𝑁
−1 −1
2 2
− 𝑁 −1−𝑚 Let,p=m
= 𝑏𝑚 𝑧 −𝑚 + 𝑏𝑚 𝑧
𝑚 =0 𝑚 =0

When impulse response is


symmertric 𝑏𝑚 = 𝑏𝑁−1𝑚

70
𝑁
−1
2

= 𝑏𝑚 𝑧 −𝑚 + 𝑧 − 𝑛−1−𝑚
𝑚 =0

Fig 3.3: Direct form realization of a linear phase FIR system when N is even.
∴ 𝑌 𝑧 = 𝑏0 𝑋 𝑧 + 𝑧 − 𝑁−1 𝑋 𝑧 + 𝑏1 𝑧 −1 𝑋 𝑧 + 𝑧 − 𝑁−2 𝑋 𝑧
𝑁 𝑁 𝑁 𝑁
+ ⋯ . 𝑏𝑁 −2 𝑧 − −2
𝑋 𝑧 + 𝑧− +1
+ 𝑏𝑁 −1 𝑧 − −1
2 2 𝑋 𝑧 2 𝑋 𝑧 + 𝑧− 2 𝑋 𝑧
2 2

When N is even, the above equation can be used to construct the direct form structure of
linear phase FIR system with minimum number of multipliers, as shown in fig 3.3. From the
direct form linear phase structure it is observed and that the realization of an Nth order FIR
discrete time system for even values of N involves N/2 number of multiplications and N-1
number of additions. Also the structure involves N-1 delays and so N-1 memory locations are
required to store the delayed signals.
Case ii: When N is odd
𝑌 𝑧
𝐻 𝑧 = = 𝑏0 + 𝑏1 𝑧 −1 + 𝑏2 𝑧 −2 + ⋯ + 𝑏𝑁−1 𝑧 − 𝑁−1
𝑋 𝑧

𝑁 −3
𝑁−1 2 𝑁−1 Dividing the summation of N
𝑁 −1
−𝑚 −𝑚 − 𝑧−𝑚 terms into two summations with
= 𝑏𝑚 𝑧 = 𝑏𝑚 𝑧 + 𝑏𝑁 −1 2 + 𝑏𝑚 𝑁−1
2 terms.
𝑚 =0 𝑚 =0 𝑧+1
𝑚= 2
2

Let, P=N-1-m, m=N-1-p


𝑁+1 𝑁+1 𝑁−3
When, 𝑚 = 2 ; 𝑝 = 𝑁 − 1 − 2 = 2
When, 𝑚 = 𝑁 − 1; 𝑝 = 𝑁 − 1 − 𝑁 − 1 = 0
71
𝑁 −3 𝑁 −3
2 2
𝑌 𝑧 𝑁 −1
∴ = 𝑏𝑚 𝑧 −𝑚 + 𝑏𝑁 −1 𝑧 − 2 + 𝑏𝑁−1−𝑝 𝑧 −(𝑁−1−𝑝)
𝑋 𝑧 2
𝑚 =0 𝑝=0

𝑁 −3 𝑁 −3
2 2
𝑁 −1
= 𝑏𝑚 𝑧 −𝑚 + 𝑏𝑁 −1 𝑧 − 2 + 𝑏𝑁−1−𝑚 𝑧 −(𝑁−1−𝑝) Let, p=m
2
𝑚 =0 𝑚 =0
𝑁 −3 𝑁 −3
2 2
𝑁 −1 When impulse response is
= 𝑏𝑚 𝑧 −𝑚 +𝑏𝑁 −1 𝑧 − 2 + 𝑏𝑚 𝑧 −(𝑁−1−𝑚 ) symmetric 𝑏𝑚 = 𝑏𝑁−1𝑚
2
𝑚 =0 𝑚 =0
𝑁 −3
2
𝑁 −1
= 𝑏𝑁 −1 𝑧 − 2 + 𝑏𝑚 𝑧 −𝑚 + 𝑧 − 𝑁−1−𝑚
2
𝑚 =0
𝑁 −1
∴ 𝑌 𝑧 = 𝑏𝑁 −1 𝑧 − 2 𝑋 𝑍 + 𝑏0 𝑋 𝑧 + 𝑧 − 𝑛−1 𝑋 𝑧 + 𝑏1 𝑧 −1 𝑋 𝑧 + 𝑧 − 𝑁−2 𝑋 𝑧
2
𝑁 −5 𝑁 +3 𝑁 −3 𝑁 +1
+ ⋯ . 𝑏𝑁 −5 𝑧 − 2 𝑋 𝑧 + 𝑧− 2 𝑋 𝑧 + 𝑏𝑁 −3 𝑧 − 2 𝑋 𝑧 + 𝑧− 2 𝑋 𝑧
2 2

Fig 3.4: Direct form realization of a linear phase FIR system when N is odd.

From the direct form linear phase structure it is observed that the realization of and Nth
order FIR discrete time system for odd values of N involves (N+1)/2 number of multiplications

72
and N-1 number of additions. Also the structure involves N-1 memory locations are required to
store the delayed signals.

Example 1:
Draw the direct form structure of the FIR system described by the transfer function,
1 3 5 1 7
𝐻 𝑧 = 1 + 𝑧 −1 + 𝑧 −2 + 𝑧 −3 + 𝑧 −4 + 𝑧 −5
2 8 4 2 8
Solution:
𝑌 𝑧 1 3 5 1 7
Let, 𝐻 𝑧 = 𝑋 = 1 + 2 𝑧 −1 + 8 𝑧 −2 + 4 𝑧 −3 + 2 𝑧 −4 + 8 𝑧 −5
𝑧
1 3 5 1 7
∴ 𝑌 𝑧 = 𝑋 𝑧 + 2 𝑧 −1 𝑋 𝑧 + 8 𝑧 −2 𝑋 𝑧 + 4 𝑧 −3 𝑋 𝑧 + 2 𝑧 −4 𝑋 𝑧 + 8 𝑧 −5 𝑋 𝑧 …… (1)

The direct form structure of FIR system can be obtained directly from equation (1).

Fig 1: Direct form structure of H (z).


Example 2:
Realize the following system with minimum number of multiplers.
1 1 3 1 1
a) 𝐻 𝑧 = 4 + 2 𝑧 −1 + 4 𝑧 −2 + 2 𝑧 −3 + 4 𝑧 −4
1 1 3 3 1 1
b) 𝐻 𝑧 = 3 + 4 𝑧 −1 + 2 𝑧 −2 + 2 𝑧 −3 + 4 𝑧 −4 + 3 𝑧 −5
1 1 1 1 1 1
c) 𝐻 𝑧 = + 2 𝑧 −1 + 5 𝑧 −2 + 4 𝑧 −1 + 7 𝑧 −2
5 7

Solution:
𝟏 𝟏 𝟑 𝟏 𝟏
a) Given that 𝑯 𝒛 = 𝟒 + 𝟐 𝒛−𝟏 + 𝟒 𝒛−𝟐 + 𝟐 𝒛−𝟑 + 𝟒 𝒛−𝟒 …………………. (1)

By the definition of z – transform we get,


𝐻 𝑧 = 𝑕 𝑛 𝑧 −𝑛 = 𝑕 0 + 𝑕 1 𝑧 −1 + 𝑕 2 𝑧 −2 + 𝑕 3 𝑧 −3 + ⋯ … … … … … … … … . . . (2)
𝑛=0

On comparing equations (1) and (2) we get,


1 1 3 1 1
Impulse response, 𝑕 𝑛 = , , , ,
4 2 4 2 4

73
Here 𝑕 𝑛 statisfies the condition 𝑕 𝑛 = 𝑕 𝑁 − 1 − 𝑛 and so impulse response is symmetrical.
Hence the system has linear phase and can be realized with minimum number of multipliers.
Let,
𝑌 𝑧 1 1 3 1 1
𝐻 𝑧 = = + 𝑧 −1 + 𝑧 −2 + 𝑧 −3 + 𝑧 −4
𝑋 𝑧 4 2 4 2 4
1 1 3 1 1
∴ 𝑌 𝑧 = 𝑋 𝑧 + 𝑧 −1 𝑋 𝑧 + 𝑧 −2 𝑋 𝑧 + 𝑧 −3 𝑋 𝑧 + 𝑧 −4 𝑋 𝑧
4 2 4 2 4
1 1 3
= 𝑋 𝑧 + 𝑧 −4 𝑋 𝑧 + 𝑧1 𝑋 𝑧 + 𝑧 −3 𝑋 𝑧 + 𝑧 2 𝑋 𝑧 … … … … … … (3)
4 2 4
The direct form structure of linear phase FIR system is constructed using equation (3) as shown
in figure.

Fig 2: Linear phase realization of 𝑯 𝒛 .


b) Given that
𝟏 𝟏 −𝟏 𝟑 −𝟐 𝟑 −𝟑 𝟏 −𝟒 𝟏 −𝟓
𝑯 𝒛 = + 𝒛 + 𝒛 + 𝒛 + 𝒛 + 𝒛
𝟑 𝟒 𝟐 𝟐 𝟒 𝟑
Let,
𝑌 𝑧 1 1 3 3 1 1
𝐻 𝑧 = = + 𝑧 −1 + 𝑧 −2 + 𝑧 −3 + 𝑧 −4 + 𝑧 −5
𝑋 𝑧 3 4 2 2 4 3
1 1 3 3 1 1
∴ 𝑌 𝑧 = 𝑋 𝑧 + 𝑧 −1 𝑋 𝑧 + 𝑧 −2 𝑋 𝑧 + 𝑧 −3 𝑋 𝑧 + 𝑧 −4 𝑋 𝑧 + 𝑧 −5 𝑋 𝑧
3 4 2 2 4 3
1 1 3
= 𝑋 𝑧 + 𝑧 −5 𝑋 𝑧 + 𝑧 −1 𝑋 𝑧 + 𝑧 −4 𝑋 𝑧 + [𝑧 −2 𝑋 𝑧 + 𝑧 −3 𝑋 𝑧 ] … . (4)
3 4 2
The direct form realization 𝐻 𝑧 with minimum number of multipliers (i.e., linear phase
realization) is obtained using equation (4) as shown in fig.3.

74
Fig.3: Linear phase realization of 𝑯 𝒛 .
c) Given that,
1 1 −1 1 −2 1 1 −1 1 −2
𝐻 𝑧 = + 𝑧 + 𝑧 + 𝑧 + 𝑧
5 2 5 7 4 7
The given system can be realized as cascade of two second-order systems. Each system can be
realized with minimum number of multipliers.
Let, 𝐻 𝑧 = 𝐻1 𝑧 𝐻2 𝑧
1 1 1 1 1 1
where, 𝐻1 𝑧 = 5 + 2 𝑧 −1 + 5 𝑧 −2 : 𝐻2 𝑧 = 7 + 4 𝑧 −1 + 7 𝑧 −2
𝑌1 𝑧 1 1 1
Let 𝐻1 𝑧 = = 5 + 2 𝑧 −1 + 5 𝑧 −2
𝑋 𝑧

1 1 1
∴ 𝑦1 𝑧 = 𝑥 𝑧 + 𝑧 −1 𝑥 𝑧 + 𝑧 −2 𝑥 𝑧
5 2 5
1 1
= 5 𝑥 𝑧 + 𝑧 −2 𝑥 𝑧 + 2 𝑧 −1 𝑥 𝑧 …. (5)

The linear phase realization structure of 𝐻1 𝑧 is obtained using equation (5) as shown in fig 4.
𝑌 𝑧 1 1 1
Let 𝐻1 𝑧 = 𝑌 = 7 + 4 𝑧 −1 + 7 𝑧 −2
1 𝑧

1 1 1
∴ 𝑌 𝑧 = 𝑦1 𝑧 + 𝑧 −1 𝑌1 𝑧 + 𝑧 −2 𝑌1 𝑧
7 4 7
1 1
= 7 𝑌1 𝑧 + 𝑧 −2 𝑌1 𝑧 + 4 𝑧 −1 𝑌1 𝑧 …. (6)

75
Fig: 4 linear phase realization of 𝑯𝟏 𝒛

Fig: 5 linear phase realization of 𝑯𝟐 𝒛


The linear phase realization structure of 𝐻2 𝑧 is obtained using equation (6) as shown in fig 5.
The linear phase structure of 𝐻 𝑧 is obtained by connecting he linear phase realization structure
of 𝐻1 𝑧 and 𝐻2 𝑧 in cascade as shown in fig.6.

Fig 6: Cascade realization of 𝑯 𝒛

76
3.5. Introduction to FIR filters:
The filters are frequency selective devices. An LTI system performs a type of
discrimination or filtering among the various frequency components at its input. The nature of
this filtering action is determined by the frequency response characteristic𝐻 𝑒 𝑗𝜔 , which in turn
depends on the choice of the system parameters [e.g. the coefficients ak and bk in the difference
equation governing the system]. Thus by proper selection of the coefficients, we can design
frequency selective filters that pass signals with frequency components in some bands while they
attenuate signals that contain frequency components in other frequency bands.
In general, the specification of a digital filter will be desired frequency response,
𝐻𝑑 𝑒 𝑗𝜔 ,. The desired impulse response, 𝑕𝑑 𝑛 , of the digital filter can be obtained by taking
inverse Fourier transform of 𝐻𝑑 𝑒 𝑗𝜔 ,. Now, the 𝑕𝑑 𝑛 ,.will be an infinite duration discrete time
signal defined for all values of n in the range −∞ 𝑡𝑜 + ∞ .
The transfer function, 𝐻 𝑧 of the digital filter is obtained by taking z –transform of
impulse response. Since 𝑕𝑑 𝑛 is an infinite duration signal, the transfer function obtained from
𝑕𝑑 𝑛 will have infinite terms, which cannot be realized or implemented in a digital system.
Therefore, finite number of samples of 𝑕𝑑 𝑛 are selected to form the impulse response, 𝑕 𝑛 of
the filter. The transfer function, 𝐻 𝑧 is obtained by taking z –transform of finite sample impulse
response, 𝑕 𝑛 . The filters designed by using finite samples of impulse response are called FIR
(Finite Impulse Response) filters.
Various Steps in Designing FIR filter
i) Choose an ideal (desired) frequency response, 𝐻𝑑 𝑒 𝑗𝜔
ii) Take inverse Fourier transform of 𝐻𝑑 𝑒 𝑗𝜔 to get 𝑕𝑑 𝑛 or sample 𝐻𝑑 𝑒 𝑗𝜔 at finite
number of points (N-point) to get 𝐻 𝑘
iii) If 𝑕𝑑 𝑛 is determined then convert the infinite duration 𝑕𝑑 𝑛 to a finite duration 𝑕 𝑛
[usually 𝑕 𝑛 𝑖𝑠 𝑎𝑛 𝑁 − 𝑝𝑜𝑖𝑛𝑡 𝑠𝑒𝑞𝑢𝑒𝑛𝑐𝑒] or if 𝐻 𝑘 is determined then take N –point
inverse DFT to get 𝑕 𝑛 .
iv) Take z-transform of 𝑕 𝑛 to get 𝐻 𝑧 where 𝐻 𝑧 is the transfer function of the digital
filter.
v) Choose a suitable structure and realize the filter.
vi) Verify the design. In order verify the design, determine the actual frequency response,
𝐻 𝑒 𝑗𝜔 of the filter, by letting 𝑧 = 𝑒 𝑗𝜔 in 𝐻 𝑧 and sketch the magnitude response, 𝐻 𝑒 𝑗𝜔 .

77
Advantage of FIR Filter
1. FIR filter with exactly linear phase can be easily designed.
2. Efficient realizations of FIR filter exist as both recursive and nonrecursive structures.
3. FIR filters realized nonrecursively, i.e., by direct convolution are always stable.
4. Round off noise, which is inherent in realizations with finite precision arithmetic can
easily be made small for nonrecursive realization of FIR filters.
Disadvantages of FIR Filters
1. The Duration of the impulse response should be large (i.e., N should be large) to
adequately approximate share cutoff filter. Hence a large amount of processing is
required to realize such filers when realized via slow convolution.
2. The delay of linear phase FIR filters need not always be an integer number of samples.
This non-integral delay can lead to problems in some signal processing applications.
3.6. Ideal Frequency Response of Linear Phase FIR Filters
The filters are classified according to their frequency response characteristics. The ideal
(desired) frequency response 𝐻𝑑 𝑒 𝑗𝜔 of four major types of filters are given below. The
𝐻𝑑 𝑒 𝑗𝜔 is periodic, with periodicity of 0 to 2𝜋 𝑜𝑟 − 𝜋 𝑡𝑜 + 𝜋 . Also any analog frequency Ω
will map (or can be converted) to frequency or digital system 𝜔 within the range 0 to 2𝜋 𝑜𝑟 −
𝜋 𝑡𝑜 + 𝜋 . Hence the frequency responses of digital filters are defined in the interval 0 to
2𝜋 𝑜𝑟 − 𝜋 𝑡𝑜 + 𝜋 .
Ideal frequency
Response of low pass filter, 𝐻𝑑 𝑒 𝑗𝜔 = 0 ; for 𝜔 = −𝜋 𝑡𝑜 𝜔𝑐
= 𝐶𝑒 −𝑗 ∝𝜔 ; for 𝜔𝑐 = − 𝜔𝑐 𝑡𝑜 + 𝜔𝑐
=0 ; for 𝜔 = + 𝜔𝑐 𝑡𝑜 + 𝜋 … … (3.2.1)
Ideal frequency
Response of high pass filter, 𝐻𝑑 𝑒 𝑗𝜔 = 𝐶𝑒 −𝑗 ∝𝜔 ; for 𝜔 = −𝜋 𝑡𝑜 𝜔𝑐
=0 ; for 𝜔𝑐 = − 𝜔𝑐 𝑡𝑜 + 𝜔𝑐
= 𝐶𝑒 −𝑗 ∝𝜔 ; for 𝜔 = + 𝜔𝑐 𝑡𝑜 + 𝜋 … … (3.2.2)
Ideal frequency
Response of band pass filter, 𝐻𝑑 𝑒 𝑗𝜔 = 0 ; for 𝜔 = −𝜋 𝑡𝑜 𝜔𝑐2
= 𝐶𝑒 −𝑗 ∝𝜔 ; for 𝜔 = 𝜔𝑐2 to 𝜔𝑐1
=0 ; for = − 𝜔𝑐1 𝑡𝑜 + 𝜔𝑐1
= 𝐶𝑒 −𝑗 ∝𝜔 ; for 𝜔 = 𝜔𝑐1 to𝜔𝑐2

78
=0 ; for 𝜔 = + 𝜔𝑐2 𝑡𝑜 + 𝜋 … … (3.2.3)
Ideal frequency
Response of band stop filter, 𝐻𝑑 𝑒 𝑗𝜔 = 𝐶𝑒 −𝑗 ∝𝜔 ; 𝑓𝑜𝑟 𝜔 = −𝜋 𝑡𝑜 − 𝜔𝑐2

=0 ; for 𝜔 = −𝜔𝑐 2 𝑡𝑜 − 𝜔𝑐 1
= 𝐶𝑒 −𝑗 ∝𝜔 ; for 𝜔 = −𝜔𝑐 1 𝑡𝑜 − 𝜔𝑐 1
=0 ; for 𝜔 = −𝜔𝑐 1 𝑡𝑜 − 𝜔𝑐 2 … … (3.2.4)
= 𝐶𝑒 −𝑗 ∝𝜔 ; for 𝜔 = −𝜔𝑐 2 𝑡𝑜 + 𝜋

Fig 3.5 Magnitude response of ideal lowpass & High pass filter

Fig 3.5 Magnitude response of ideal bandpass & band stop filter

The ideal filters are noncausal and hence physically unrealizable for the real time signal
processing applications. Causality implies that the frequency response characteristic 𝐻 𝑒 𝑗𝜔 of
the filter cannot be zero, except at a finite set of points in frequency. In addition 𝐻 𝑒 𝑗𝜔 cannot
have an infinitely sharp cutoff from passband to stopband, that is 𝐻 𝑒 𝑗𝜔 cannot drop from unity
to zero abruptly.
In practice it is not necessary to insist that the magnitude 𝐻 𝑒 𝑗𝜔 be constant in the
entire passband of the filter. A small amount of ripple in the passband is usually tolerable.

79
Similarly it is not necessary for the filter response 𝐻 𝑒 𝑗𝜔 be zero in the stopband. A small
amount of ripple in the stopband is also tolerable.
The transition of the frequency response from pass band to stop band defines the
transition band to transition region of the filter. The pass band edge frequency 𝜔𝑃 defines the
edge of the passband, while the stopband edge frequency 𝜔𝑃 defines the edge of the pass band,
while the stop band edge frequency 𝜔𝑠 denotes the beginning of the stopband.

Fig 3.6: Magnitude registration of a practical low pass filter.

3.7. Characteristics of FIR Filters with Linear phase

Let 𝑕 𝑛 be a casual finite duration sequence defined over the interval 0 ≤ 𝑛 ≤ 𝑁 − 1


and the samples of 𝑕 𝑛 be real.
The Fourier transform of 𝑕 𝑛 is,
𝑁−1
𝑗𝜔
𝐻 𝑒 = 𝑕 𝑛 𝑒 −𝑗𝜔𝑛 … . (3.4.1)
𝑛=0

Which is periodic in frequency with period 2π


∴ 𝐻 𝑒 𝑗𝜔 = 𝐻(𝑒 𝑗𝜔 +2𝜋𝑚 ) ; 𝑓𝑜𝑟 𝑚 = 0, ±1, ±2 … …. … . (3.4.2)
With the restriction that h(n) is real, additional constraints of 𝐻 𝑒 𝑗𝜔 are obtained as shown
below. Since 𝐻 𝑒 𝑗𝜔 is complex it can be expressed as amplitude function, magnitude function
and phase function as shown in equation (3.4.3).
80
𝑒 𝑗𝜔
𝑕 𝑒 𝑗𝜔 = ± 𝐻 𝑒 𝑗𝜔 𝑒 𝑗 ∠𝑕 = 𝐴 𝜔 𝑒 𝑗𝜃 𝜔
… … . . (3.4.3)
Where,
𝐴 𝜔 = ± 𝐻 𝑒 𝑗𝜔 = Amplitude function
𝜃 𝜔 = ∠𝐻 𝑒 𝑗𝜔 = phase function
𝐻 𝑒 𝑗𝜔 = Magnitude function

Note: The magnitude is strictly positive, but the amplitude can be positive or negative.

From the property of Fourier transform when 𝑕 𝑛 is real we can say that the magnitude function
is a symmetric function and the phase function is an antisymmetric function.
∴ 𝐻 𝑒 𝑗𝜔 = 𝐻 𝑒 𝑗𝜔
𝜃 𝜔 = − 𝜃 −𝜔

Linear Phase and Symmetric Impulse Response


Form many practical FIR filter, exact linearity of phase is a desired goal. Let us assume that the
phase of 𝐻 𝑒 𝑗𝜔 is a linear function 𝜔. Hence 𝜃 𝜔 is directly proportional to 𝜔.
∴ 𝜃 𝜔 ∝ 𝜔 or 𝜃 𝜔 = −∝ 𝜔; for −𝜋 ≤ 𝜔 ≤ +𝜋 … … . . (3.4.4)
Where, ∝ is a constant phase delay in samples

From equation (3.4.1) we get,


𝑁−1

𝐻 𝑒 𝑗𝜔 = 𝑕 𝑛 𝑒 −𝑗𝜔𝑛 … … . . (3.4.5)
𝑛=0

From equation (3.4.3) and (3.4.4) we get,

𝐻 𝑒 𝑗 𝜔 = ± 𝐻 𝑒 𝑗𝜔 𝑒 −𝑗𝜔𝑛 … … . . (3.4.6)

On equating equations (3.4.5) and (3.4.6) we get,


𝑁−1

𝑕 𝑛 𝑒 −𝑗𝜔𝑛 = 𝐻 𝑒 𝑗𝜔 𝑒 −𝑗𝜔𝑛
𝑛=0 𝑒 −𝑗𝜃 = 𝑐𝑜𝑠𝜃 − 𝑗𝑠𝑖𝑛𝜃

81
𝑁−1

𝑕 𝑛 𝑐𝑜𝑠𝜔𝑛 − 𝑗𝑠𝑖𝑛𝑔𝜔𝑛 = ± 𝐻 𝑒 𝑗𝜔 𝑐𝑜𝑠 ∝ 𝜔 − 𝑗𝑠𝑖𝑛 ∝ 𝜔


𝑛=0

On equating the real part and imaginary part of the above equation we get,
𝑁−1

± 𝐻 𝑒 𝑗𝜔 cos ∝ 𝜔 = 𝑕 𝑛 cos 𝜔𝑛 … … . . (3.4.7)


𝑛=0

𝑁−1
± 𝐻 𝑒 𝑗𝜔 sin ∝ 𝜔 = 𝑛=0 𝑕 𝑛 sin 𝜔𝑛 … … . . (3.4.8)
On dividing equation (3.4.7) by equation (3.4.6) we get,
𝑁−1
sin ∝ 𝜔 𝑛=0 𝑕 𝑛 sin 𝜔𝑛
= 𝑁−1
cos ∝ 𝜔 𝑛=0 𝑕 𝑛 cos 𝜔𝑛
On cross multiplying the above equation we get,
𝑁−1 𝑁−1

sin ∝ 𝜔 𝑕 𝑛 cos 𝜔𝑛 = cos ∝ 𝜔 𝑕 𝑛 sin 𝜔𝑛


𝑛=0 𝑛=0
𝑁−1 𝑁−1

𝑕 𝑛 sin 𝜔𝑛 cos 𝜔𝑛 = 𝑕 𝑛 cos 𝜔𝑛 sin 𝜔𝑛


𝑛=0 𝑛=0
𝑁−1

𝑕 𝑛 sin 𝜔𝑛 cos 𝜔𝑛 − cos 𝜔𝑛 sin 𝜔𝑛 = 0


𝑛=0
𝑁−1

𝑕 𝑛 𝑠𝑖𝑛 ∝ −𝑛 𝜔 = 0 … … . . (3.4.9)
𝑛=0

One solution of equation (3.4.9) exists when,


𝑁−1
∝= 𝑎𝑛𝑑 𝑕 𝑛 = 𝑕 𝑁 − 1 − 𝑛 ; for 0 ≤ 𝑛 ≤ 𝑁 − 1 … … . . (3.4.10)
2

Proof:
𝑁−1
𝑁−1 ∝=
𝑕 𝑛 sin ∝ −𝑛 𝜔 = 𝑕 𝑛 sin 2
2 𝜔
𝑁−1−2𝑛
= 𝑕 𝑛 sin 𝑛 =𝑁−1−𝑛
2 𝜔
𝑁−1−𝑛−𝑛
= 𝑕 𝑛 sin
2 𝜔
𝑛−𝑛
= 𝑕 𝑛 sin
2 𝜔
= 𝑕 𝑛 sin 0
=0

82
From the condition, ∝= 𝑁 − 1 /2 we can say that for every value of N there is only one value
of phase delay ∝ for which linear phase can be obtained easily.
From the condition 𝑕 𝑛 = 𝑕 𝑁 − 1 − 𝑛 we can say that for this value of ∝, 𝑖. 𝑒. , ∝=
𝑁 − 1 /2 the 𝑕 𝑛 has a special kind of symmetry. The impulse response 𝑕 𝑛 , when
∝= 𝑁 − 1 /2 and for odd and even values of N are shown in fig 6.6 and 6.7 respectively. It
can be observed that the impulse response is symmetric about the centre of the sequence.

Fig: 3.7: Example of symmetric impulse response of odd N

Fig: 3.7: Example of symmetric impulse response of even N

Linear phase and Antisymmetric Impulse Response


The definition of linear phase filter 𝜃 𝜔 = −∝ 𝜔 requires the filter to have both
constant group delay and constant phase delay. If only constant group delay is required an
another type of linear phase filter is defined in which the phase of 𝐻 𝑒 𝑗𝜔 is a piece –wise linear
function of 𝜔. For this case 𝐻 𝑒 𝑗𝜔 can be expressed in the Euler form as shown in equation
(3.4.11).

83
𝐻 𝑒 𝑗𝜔 = ± 𝐻 𝑒 𝑗𝜔 𝑒 𝑗 𝛽 −∝𝜔
… . . (3.4.11)
When 𝐻 𝑒 𝑗𝜔 is expressed in the form of equation (3.4.11), we can prove that the only possible
solution of 𝑕 𝑛 exists if,
𝑁−1 𝜋
∝= ; 𝛽 = ± 2 and 𝑕 𝑛 = − 𝑁 − 1 − 𝑛 ; for 0 ≤ 𝑛 ≤ 𝑁 − 1 … . (3.4.12)
2

The filters that satisfy the three conditions of equation (3.4.12) have a delay of 𝑁 − 1 /2

samples but their impulse response are antisymmetric around the centre of the sequence, as
opposed to the true linear phase sequences that are symmetric around the centre of the sequence.

Fig.3.8 Example of antisymmetric impulse response of odd N

Fig.3.8 Example of antisymmetric impulse response of even N

84
3.8 Frequency Response of Linear Phase FIR Filters:
Depending on the value of N (odd or even) and the type of symmetry of the filter impulse
response sequence (symmetric or antisymmetric) there are six possible types of linear phase FIR
filters.
The following are the six cases of impulse response for linear phase FIR filters.
Case (i): Symmetric impulse response and N is odd with centre of symmetry at 𝑁 − 1 /2
Case (ii): Symmetric impulse response and N is even with centre of symmetry at 𝑁 − 1 /2
Case (iii): Antisymmetric impulse response and N is odd with centre of antisymmetric at 𝑁 − 1 /2
Case (iv): Antisymmetric impulse response and N is even with centre of antisymmetric at 𝑁 − 1 /2
Case (v): symmetric impulse response and N is odd with centre of symmetry at n=0.
Case (vi): Antisymmetric impulse response and N is odd with centre of symmetry at n=0.

The frequency response of the filter is the Fourier transform of the impulse response. If
𝑕 𝑛 is impulse response of FIR filter then fourier transform of 𝑕 𝑛 is denoted as 𝐻 𝑒 𝑗𝜔 ,
which is the frequency response of FIR filter. The 𝐻 𝑒 𝑗𝜔 is a complex function of 𝜔 and so it
can be expressed as, magnitude function 𝐻 𝑒 𝑗𝜔 𝑎𝑛𝑑 𝑝𝑕𝑎𝑠𝑒 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 ∠𝐻 𝑒 𝑗𝜔

Case (i): Frequency response of linear phase FIR filer when impulse response is symmetric
and N is odd with centre symmetry (N-1)/2.
The frequency response of linear phase FIR filter when impulse response is symmetric
and N is odd with centre of symmetry (N-1)/2 is given by,
𝑁 −1 𝑁 −1
𝑁−1 𝑁−1
𝐻 𝑒 𝑗𝜔
= 𝑕 + 2
𝑛=1 2𝑕 − 𝑛 cos 𝜔𝑛 𝑒 −𝑗𝜔 2 … (3.5.1)
2 2

Let, 𝐻 𝑒 𝑗𝜔 = 𝐴 𝜔 𝑒 𝑗𝜃 (𝜔 ) … (3.5.2)
Where, 𝐴 𝜔 = Amplitude function
𝜃 𝜔 = Phase function
On comparing equations (3.5.1) and (3.5.2) we get,
𝑁 −1
𝑁−1 𝑁−1
Amplitude function, 𝐴 𝜔 = 𝑕( )+ 2
𝑛=1 2𝑕 − 𝑛 cos 𝜔𝑛 …. (3.5.3)
2 2
𝑁−1 𝑁−1
Phase function, 𝜃 𝜔 = −𝜔 = −𝜔𝛼; 𝑤𝑕𝑒𝑟𝑒, ∝= …. (3.5.4)
2 2

85
𝑁 −1
𝑗𝜔 𝑁−1 𝑁−1
Magnitude function, 𝐻 𝑒 = 𝐴 𝜔 = 𝑕 + 2
𝑛=1 2𝑕 − 𝑛 cos 𝜔𝑛 …. (3.5.6)
2 2

A typical sketch of symmetric impulse response when N=9 and its corresponding
amplitude function of frequency response are shown fig. 3.9 and fig.3.10 respectively. From
these sketches it can be observed that the amplitude function of 𝐻 𝑒 𝑗𝜔 is symmetric𝜔 = 𝜋,
when the impulse response is symmetric and N is odd number. When impulse response is
symmetric and N is odd, the frequency response is non-zero at 𝜔 = 0 and 𝜔 = 𝜋, and so this
frequency response can be used to design lowpass, highpass, band pass and band stop filters.

Fir 3.9 Symmetric impulse response and Amplitude function


Proof:
The Fourier transform of 𝑕 𝑛 is, 𝑕 𝑛 is defined for
𝐻 𝑒 𝑗𝜔
= +∞
𝑕 𝑛 𝑒 −𝑗𝜔𝑛
= 𝑁−1 −𝑗𝜔𝑛 n=0 to N-1
𝑛=−∞ 𝑛=0 𝑕 𝑛 𝑒
When N is odd number the symmetric impulse response will have the centre of symmetry at
𝑛 = 𝑁 − 1 /2. Hence H(ejω) is expressed as,
𝑁 −3 𝑁 −1
𝑁−1
𝐻 𝑒 𝑗𝜔 = 2
𝑛=0 𝑕 𝑛 𝑒 −𝑗𝜔𝑛 + 𝑕 𝑒 −𝑗𝜔 2 + 𝑁−1
𝑁 +1 𝑕 𝑛 𝑒 −𝑗𝜔𝑛
2 𝑛=
2
Let, m=N-1-n; n=N-1-m
𝑁+1 𝑁+1 𝑁+3
When, 𝑛 = 2 ; 𝑚 = 𝑁 − 1 − 2 = 2
When, n=N-1; m=N-1-(N-1) =0

𝑁 −3 𝑁 −3
2 2
𝑁 − 1 −𝑗𝜔 𝑁 −1
= 𝑕 𝑛 𝑒 −𝑗𝜔𝑛 + 𝑕 𝑒 2 + 𝑕 𝑁 − 1 − 𝑚 𝑒 −𝑗𝜔 𝑁−1−𝑚
2
𝑛 =0 𝑛=0
𝑁 −3 𝑁 −1 𝑁 −3 Put, m=n
𝑁−1
= 2
𝑛 =0 𝑕 𝑛 𝑒
−𝑗𝜔𝑛
+𝑕 𝑒 −𝑗𝜔 2 + 2
𝑛=0 𝑕 𝑁 − 1 − 𝑛 𝑒 −𝑗𝜔 𝑁−1−𝑛
2

86
𝑁 −3 𝑁 −1 𝑁 −3
−𝑗𝜔𝑛 𝑁−1 −𝑗𝜔
= 2
𝑛 =0 𝑕 𝑛 𝑒 +𝑕 𝑒 2 + 2
𝑛=0 𝑕 𝑛 𝑒 −𝑗𝜔 𝑁−1−𝑛
2
For symmetric
𝑁 −3
2
impulse response,
𝑁−1 𝑁 −1 𝑗𝜔 𝑁 −1 𝑁 −1 n(N-1-n)=h(n)
= 𝑕 + 𝑕 𝑛 𝑒 −𝑗𝜔𝑛 𝑒 𝑗𝜔 2 + 𝑒 −𝑗𝜔 𝑁−1−𝑛
𝑒 2 𝑒 𝑗𝜔 2
2
𝑛=0

𝑁 −3 𝑁 −1 𝑁 −1
𝑁−1 𝑗𝜔 −𝑛 𝑁−1
= 𝑕 + 2
𝑛=0 𝑕 𝑛 𝑒
2 + 𝑒 −𝑗𝜔 𝑁−1
− −𝑛 𝑒 𝑗𝜔 2
2 2
𝑒 𝑗𝜃 + 𝑒 𝑗𝜃
𝑁 −3 cos 𝜃 =
𝑁−1 𝑁−1 𝑁 −1 2
= 𝑕 + 2
𝑛=0 𝑕 𝑛 2𝑐𝑜𝑠 −𝑛 𝜔 𝑒 𝑗𝜔 2
2 2
𝑁−1 𝑁−1
Let,𝐾 = 2 2
− 𝑛; 𝑛 =
−𝑘
𝑁 −1
𝑁−1
2 When, 𝑛 = 0; 𝑘 = 2
𝑁−1 𝑁−1 𝑁 −1
= 𝑕 + 2𝑕 − 𝑘 𝑐𝑜𝑠𝜔𝑘 𝑒 𝑗𝜔 2 𝑁−3 𝑁−1
When, 𝑛 = 2 ; 𝑘 = 2 − 2
𝑁−3
=1
2 2
𝑘=1

𝑁 −1 𝑁 −1
𝑁−1 𝑁−1
= 𝑕 + 2
𝑛=1 2𝑕 − 𝑛 𝑐𝑜𝑠𝜔𝑛 𝑒 −𝑗𝜔 2
2 2
Put, k=n

Case (ii): Frequency response of linear phase FIR filer when impulse response is symmetric
and N is even with centre of symmetry (N-1)/2.
The frequency response of linear phase FIR filter when impulse response is symmetric
and N is even with centre of symmetry (N-1)/2 is given by,
𝑁
2
𝑁 1 −𝑗𝜔
𝑁 −1
𝐻 𝑒 𝑗𝜔 = 2𝑕 − 𝑛 cos 𝜔 𝑛 − 𝑒 2 … . . (3.5.7)
2 2
𝑛 =1

Let,
𝐻 𝑒 𝑗𝜔 = 𝐴 𝜔 𝑒 𝑗𝜃 (𝜔 ) … . . (3.5.8)
Where, 𝐴 𝜔 = Amplitude function
𝜃 𝜔 = Phase function
On comparing equations (3.5.7) and (3.5.8) we get,
Amplitude function,
𝑁
2 𝑁 1
𝐴 𝜔 = 𝑛=1 2𝑕 2 − 𝑛 cos 𝜔 𝑛 − 2 … . . (3.5.9)

87
Phase function,
𝑁−1 𝑁−1
𝜃 𝜔 = −𝜔 = −𝜔𝛼 ; 𝑤𝑕𝑒𝑟𝑒, ∝= … . . (3.5.10)
2 2
𝑁
𝑁 1
Magnitude function, 𝐻 𝑒 𝑗𝜔 = 𝐴 𝜔 = 2
𝑛=1 2𝑕 2
− 𝑛 cos 𝜔 𝑛 − 2 ……(3.5.11)

The sketch of symmetric impulse response when N=8 and its corresponding amplitude
function of frequency response. From these sketches it can be observed that the amplitude
function of 𝐻 𝑒 𝑗𝜔 is symmetric 𝜔 = 𝜋, when the impulse response is symmetric and N is even
number.
When impulse response is symmetric and N is even, the frequency response is non-zero
at 𝜔 = 0 and 𝜔 = 𝜋, and so this frequency response can be used to design lowpass, lowpass,
band pass and band stop filters but cannot be used to design highpass and band stop filters.
Proof:
The Fourier transform of 𝑕 𝑛 is, 𝑕 𝑛 is defined for
𝐻 𝑒 𝑗𝜔 = +∞
𝑕 𝑛 𝑒 −𝑗𝜔𝑛 = 𝑁−1
𝑛 𝑒 −𝑗𝜔𝑛 n=0 to N-1
𝑛=−∞ 𝑛=0 𝑕

For symmetric impulse response with even number of samples (i.e., when N is even), the centre
of symmetry lies between=(N-1)/2 and n=N/2. Hence 𝐻 𝑒 𝑗𝜔 is expressed as,
𝑁
−1
2 𝑁−1

𝐻 𝑒 𝑗𝜔 = 𝑕 𝑛 𝑒 −𝑗𝜔𝑛 + 𝑕 𝑛 𝑒 −𝑗𝜔𝑛
𝑛=0 𝑛 =𝑁/2

Let, m=N-1-n; n=N-1-m


𝑁 𝑁 𝑁
When, 𝑛 = 2 ; 𝑚 = 𝑁 − 1 − 2 = 2 − 1
When, n=N-1; m=N-1-(N-1) =0

𝑁 𝑁
−1 −1
2 2

= 𝑕 𝑛 𝑒 −𝑗𝜔𝑛 + 𝑕 𝑁 − 1 − 𝑚 𝑒 −𝑗𝜔 𝑁−1−𝑚

𝑛 =0 𝑚 =0
𝑁 𝑁 Put, m=n
−1 −1
2 −𝑗𝜔𝑛 2 −𝑗𝜔 𝑁−1−𝑛
= 𝑛 =0 𝑕 𝑛 𝑒 + 𝑛=0 𝑕 𝑁 − 1 − 𝑛 𝑒
𝑁 𝑁
−1 −1
−𝑗𝜔𝑛
= 2
𝑛 =0 𝑕 𝑛 𝑒 + 2
𝑛=0 𝑕 𝑛 𝑒 −𝑗𝜔 𝑁−1−𝑛

𝑁
For symmetric
−1 impulse response,
2
𝑁 −1 𝑁 −1 𝑁 −1
𝑗𝜔 𝑗𝜔 n(N-1-n)=h(n)
= 𝑕 𝑛 𝑒 −𝑗𝜔𝑛
𝑒 2 +𝑒 −𝑗𝜔 𝑁−1−𝑛 𝑒 2
𝑒 −𝑗𝜔 2

𝑛 =0

𝑁 𝑁 −1 𝑁 −1 𝑁 −1
−1 𝑗𝜔 −𝑛 −𝑗𝜔 𝑁−1 − −𝑛
= 2
𝑛 =0 𝑕 𝑛 𝑒
2 +𝑒 2 𝑒 −𝑗𝜔 2

𝑒 𝑗𝜃 + 𝑒 𝑗𝜃
cos 𝜃 =
2
88
𝑁 −1 𝑁 −1 𝑁 −1 𝑁 −1
𝑒 𝑗𝜔 −𝑛
+ 𝑒 𝑗𝜔 −𝑛
= 2
𝑛=0 𝑕 𝑛
2 2 𝑒 −𝑗𝜔 2

𝑁 −1 𝑁 𝑁
2 Let,𝐾 = 2
− 𝑛; ∴ 𝑛 = 2
−𝑘
𝑁−1 −𝑗𝜔
𝑁 −1
𝑁
= 𝑕 𝑛 2 cos 𝜔 −𝑛 𝑒 2 When, 𝑛 = 0; 𝑘 =2
2 𝑁 𝑁 𝑁
𝑛 =0 When, 𝑛 = ;𝑘 =2− 2 −1 =1
2
𝑁 −1 𝑁 −1
𝑁 1
= 2
𝑛=0 2𝑕 𝑛 cos 𝜔 −𝑛−2 𝑒 −𝑗𝜔 2
2

Put, k=n
𝑁
2
N 1 −𝑗𝜔
𝑁 −1
= 2𝑕 − k cos 𝜔 𝑘 − 𝑒 2
2 2
𝑘=1

𝑁 𝑁 −1
N 1
= 2
𝑛=1 2𝑕 − n cos 𝜔 𝑛 − 𝑒 −𝑗𝜔 2 Let,𝐾 =
𝑁−1 𝑁−1
− 𝑛; 𝑛 =
−𝑘
2 2 2 2
𝑁−1
When, 𝑛 = 0; 𝑘 = 2
𝑁−3 𝑁−1 𝑁−3
When, 𝑛 = 2 ; 𝑘 = 2 − 2 =1

89
Table 3.1: Summary of A (𝝎) for Linear phase FIR Filters:
Case h(n) N Symmetry Magnitude function
[Impulse condition 𝐻 𝑒 𝑗𝜔 = A(𝜔)
Response]

𝑁 −1
i Symmetric Odd h(N-1-n)=h(n) 2
𝑁−1 𝑁−1
𝑕 + 2𝑕 − 𝑛 cos 𝜔𝑛
2 2
𝑛=1

𝑁
ii Symmetric Even h(N-1-n)=h(n) 2
N 1
2𝑕 − n cos 𝜔 𝑛 −
2 2
𝑛=1
𝑁 −1
iii Antisymmetric Odd h(N-1-n)=-h(n) 2
N−1
2𝑕 − n sin 𝜔
2
𝑛=1
𝑁
iv Antisymmetric Even h(N-1-n)=-h(n) 2
N 1
2𝑕 − n sin 𝜔 𝑛 −
2 2
𝑛=1
𝑁 −1
v Symmetric Odd h(-n)=h(n) 2

𝑕 0 + 2𝑕 𝑛 𝑐𝑜𝑠 𝜔𝑛
𝑛 =1

𝑁 −1
vi Antisymmetric Odd h(-n)=-h(n) 2

2𝑕 𝑛 𝑠𝑖𝑛 𝜔𝑛
𝑛=1

90
3.9 Design Techniques for Linear Phase FIR Filters
There are three well known methods of design techniques for linear phase FIR filters.
1. Fourier series method and Window method.
2. Frequency sampling method.
3. Optimal filter design methods.
Design of Liner Phase FIR Filters by Fourier Series Method
The following two concepts lead to the design of FIR filters by Fourier series method.
1. The frequency response of a digital filter is period with period equal to 2π.
2. Any periodic function can be expressed as a linear combination of complex exponentials.
In this method the desired frequency response, 𝐻𝑑 𝑒 𝑗𝜔 can be converted to a Fourier
series representation. Then using this expression the Fourier coefficients are evaluated which is
the desired impulse response of the filter, 𝐻𝑑 𝑛 . On taking z –transform of 𝐻𝑑 𝑛 we get
𝐻𝑑 𝑧 which is the transfer function of digital filter.
The 𝐻𝑑 𝑧 obtained from 𝐻𝑑 𝑛 will be a transfer function of unrealizable noncausal
digital filter of infinite duration. A filter duration impulse response 𝐻𝑑 𝑛 can be obtained by
truncating the infinite duration impulse response 𝐻𝑑 𝑛 to get 𝐻𝑑 𝑧 and then multiply 𝐻𝑑 𝑧 by
𝑧 − 𝑁−1 /2
to get the transfer function of realizable causal digital filter in finite duration.
The abrupt truncation of the Fourier series results in oscillations‟ in the pass band and
stop band. These oscillations are due to slow convergence of the Fourier series, particularly near
the points of discontinuity. This effect is known as the Gibbs phenomenon. It can be shown that
the undesirable oscillations can be reduced by multiplying the desired impulse response
coefficients by an appropriate window function. This leads to the method of FIR filter design
using windows.
Design of Linear Phase FIR filling Using Windows
In this method we begin with the desired frequency response specification 𝐻𝑑 𝑒 𝑗𝑤 and
determine the corresponding unit sample response 𝐻𝑑 𝑛 . The 𝐻𝑑 𝑛 is given by inverse Fourier
transfer of 𝐻𝑑 𝑒 𝑗𝑤 . The unit sample response 𝐻𝑑 𝑛 will be an infinite sequence and must be
truncated at some point say at n=N-1 to yield an FIR filter of length N. The truncation is
obtained by multiplying 𝐻𝑑 𝑛 by a window sequence 𝑤 𝑛 . [𝑤 𝑛 is also called window
function]. The resultant sequence will be of length N and can be denoted by 𝑕 𝑛 .

91
The Fourier transform of 𝑕 𝑛 is the frequency response of the filter to be implemented in
software or in hardware. The frequency response of the filter is denoted by 𝐻 𝑒 𝑒𝑗𝜔 . The z –
transform of 𝑕 𝑛 will give the filter transfer function 𝐻 𝑧 . The frequency response of the filter
𝐻 𝑒 𝑗𝜔 depends on the frequency response of the window, function.
The desirable characteristics of the frequency response of window function are the
following.
1. The width of the main-lobe should be small and it should contain as much of the total
energy as possible.
2. The side –lobes should decrease in energy rapidly as 𝜔 tends to 𝜋.

There have been many windows proposed, that approximates the desired characteristics.
In the following sections, the Rectangular window, Hanning window, Blackman window
and Kaiser Window are discussed.
Design of Linear Phase FIR filters by Frequency Sampling Method
In frequency sampling method of filter design, we begin with the desired frequency
response specification 𝐻𝑑 𝑒 𝑗𝜔 and it is sampled at N-points to generate a sequence 𝐻 𝑘 gives
the impulse response of the filter 𝐻 𝑛 . The Fourier transform of 𝐻 𝑛 gives the frequency
response, 𝐻 𝑒 𝑒𝑗𝜔 and Z – transform of 𝑕 𝑛 gives the transfer function 𝐻 𝑧 of the filter.
3.10 Fourier Series Method of FIR Design
The frequency response of a digital filter is periodic, with period equal to 2π. From
Fourier series analysis, we know that any periodic function can be expressed as a linear
combination of complex exponentials. Therefore, the desired frequency response. 𝐻𝑑 𝑒 𝑒𝑗𝜔 of
an FIR digital filter can be represented by the Fourier series as shown in equation (6.52).
+∞
𝑗𝜔
𝐻𝑑 𝑒 = 𝑕𝑑 𝑛 𝑒 −𝑗𝜔𝑛 … . . (3.7.1)
𝑛=−∞

Where, the Fourier coefficients 𝐻𝑑 𝑛 are the desired impulse response of the filter. The
samples of 𝐻𝑑 𝑛 can be determined using equation (6.53), which is inverse Fourier transform
𝐻𝑑 𝑒 𝑒𝑗𝜔 .
1 𝜋
𝐻𝑑 𝑛 = 2𝜋 ∫−𝜋 𝐻𝑑 𝑒 𝑗𝜔 𝑒 𝑗𝜔𝑛 𝑑𝜔 … … . (3.7.2)

92
The impulse response obtained from equation (3.7.2) is an infinite duration sequence. For
FIR filters we truncate this infinite impulse response to a finite duration sequence of length N,
where N is odd.
𝑁−1 𝑁−1
∴ 𝑕 𝑛 = 𝑕𝑑 𝑛 ; for 𝑛 = − 𝑡𝑜 +
2 2

Let, 𝐻𝑁 𝑧 = 𝑧 𝑕 𝑛
By definition of 𝑧 - transform,
𝑁 −1
2

𝐻𝑁 𝑧 = 𝑕 𝑛 𝑧 −𝑛 … … . . (3.7.3)
𝑁 −1
𝑛=−
2

The transfer function of equation (3.7.3) represents non causal filter (due to the presence
of positive powers of z). Hence the transfer function of equation (3.7.3) is multiplied by
𝑁−1 /2
𝑧 .
𝑁 −1 𝑁 −1 𝑁 −1
− 𝑁−1 2 −1
∴𝐻 𝑧 =𝑧 𝐻𝑁 𝑧 = 𝑧 2 2
𝑁 −1 𝑕 𝑛 𝑧 −𝑛 = 𝑧 2 𝑁 −1 𝑕 𝑛 𝑧 −𝑛 + 𝑕 0 +
𝑛=− 𝑛=−
2 2

𝑁 −1
2
𝑛=1 𝑕 𝑛 𝑧 −𝑛

𝑁 −1 𝑁 −1
2 2
𝑁 −1
= 𝑧− 2 𝑕 −𝑛 𝑧 𝑛 + 𝑕 0 + 𝑕 𝑛 𝑧 −𝑛
𝑛 =1 𝑛=1

𝑁 −1
2
𝑁 −1
= 𝑧− 2 𝑕 0 + 𝑕 𝑛 𝑧 𝑛 + 𝑧 −𝑛 … . . (3.7.4)
𝑛=1

Hence we see that causality is brought about by multiplying the transfer function by
the delay factor ∝= 𝑁 − 1 /2. This modification does not affect the amplitude response of the
filter, however the abrupt truncation of the Fourier series results in oscillations in the passband
and stopband. These oscillations are due to the slow convergence of the Fourier series,
particularly near the points of discontinuity. This effect is known as Gibbs phenomenon. The
undesirable oscillations‟ can be reduced by multiplying the desired impulse response coefficients
by an appropriate window function.

93
Table 3.2: Specification and Desired Impulse Response for FIR Filter Design by Fourier Service Method:
Type of filter Specifications Impulse response
𝜋
1 ; 𝑓𝑜𝑟 −𝜔𝑐 ≤ ω ≤ +𝜔𝑐 1 1 𝜔 𝑐 𝑗𝜔𝑛
𝑕𝑑 𝑛 = 𝐻𝑑 𝑒 𝑗𝜔 𝑒 𝑗𝜔𝑛 𝑑𝜔 = 𝑒 𝑑𝜔
Lowpass filter 𝐻𝑑 𝑒 𝑗𝜔 = 0 ; 𝑓𝑜𝑟 − 𝜋 ≤ ω < −𝜔𝑐 2𝜋 −𝜋 2𝜋 −𝜔 𝑐
0 ; 𝑓𝑜𝑟 𝜔𝑐 < ω ≤ 𝜋
∵ 𝐻𝑑 𝑒 𝑗𝜔 = 0 𝑖𝑛 𝑡𝑕𝑒 𝑟𝑎𝑛𝑔𝑒 − 𝜋 ≤ −𝜔𝑐 𝑎𝑛𝑑 + 𝜔𝑐 < 𝜔 ≤ +𝜋
𝜋 −𝜔 𝑐 𝜋
1 ; 𝑓𝑜𝑟 −𝜋 ≤ ω ≤ −𝜔𝑐 1 1 1
𝑕𝑑 𝑛 = 𝐻𝑑 𝑒 𝑗𝜔 𝑒 𝑗𝜔𝑛 𝑑𝜔 = 𝑒 𝑗𝜔𝑛 𝑑𝜔 + 𝑒 𝑗𝜔𝑛 𝑑𝜔
𝐻𝑑 𝑒 𝑗𝜔 = 1 ; 𝑓𝑜𝑟 𝜔𝑐 ≤ ω ≤ 𝜋 2𝜋 −𝜋 2𝜋 −𝜋 2𝜋 𝜔𝑐
Highpass filter
0 ; 𝑓𝑜𝑟 −𝜔𝑐 < ω < +𝜔𝑐
∵ 𝐻𝑑 𝑒 𝑗𝜔 = 0 𝑖𝑛 𝑡𝑕𝑒 𝑟𝑎𝑛𝑔𝑒 − 𝜔𝑐 < 𝜔 < 𝜔𝑐

1 ; 𝑓𝑜𝑟 −𝜔𝑐2 ≤ 𝜔 ≤ −𝜔𝑐1 𝜋 −𝜔 𝑐1 𝜔 𝑐2


1 1 1
1 ; 𝑓𝑜𝑟 𝜔𝑐1 ≤ 𝜔 ≤ 𝜔𝑐2 𝑕𝑑 𝑛 = 𝐻𝑑 𝑒 𝑗𝜔 𝑒 𝑗𝜔𝑛 𝑑𝜔 = 𝑒 𝑗𝜔𝑛 𝑑𝜔 + 𝑒 𝑗𝜔𝑛 𝑑𝜔
2𝜋 −𝜋 2𝜋 −𝜔 𝑐2 2𝜋 𝜔 𝑐1
Bandpass filter 𝐻𝑑 𝑒 𝑗𝜔 = 0 ; 𝑓𝑜𝑟 −𝜋 ≤ 𝜔 < 𝜔𝑐2
0 ; 𝑓𝑜𝑟 −𝜔𝑐1 < 𝜔𝑐1 < +𝜔𝑐1 ∵ 𝐻𝑑 𝑒 𝑗𝜔 = 0 𝑖𝑛 𝑡𝑕𝑒 𝑟𝑎𝑛𝑔𝑒 − 𝜋 ≤ −𝜔𝑐2 ; −𝜔𝑐1 < 𝜔 < +𝜔𝑐1 𝑎𝑛𝑑 + 𝜔𝑐2
0 ; 𝑓𝑜𝑟 𝜔𝑐2 < 𝜔 ≤ 𝜋
<𝜔≤𝜋
1 ; 𝑓𝑜𝑟 −𝜋 ≤ 𝜔 ≤ 𝜔𝑐2 𝜋 −𝜔 𝑐2 𝜔 𝑐1
1 1 1
1 ; 𝑓𝑜𝑟 −𝜔𝑐1 ≤ 𝜔 ≤ 𝜔𝑐1 𝑕𝑑 𝑛 = 𝐻𝑑 𝑒 𝑗𝜔 𝑒 𝑗𝜔𝑛 𝑑𝜔 = 𝑒 𝑗𝜔𝑛 𝑑𝜔 + 𝑒 𝑗𝜔𝑛 𝑑𝜔
2𝜋 −𝜋 2𝜋 −𝜋 2𝜋 −𝜔 𝑐1
𝐻𝑑 𝑒 𝑗𝜔 = 1 ; 𝑓𝑜𝑟 𝜔𝑐2 ≤ 𝜔 ≤ 𝜋
+𝜋
Bandpass filter 0 ; 𝑓𝑜𝑟 −𝜔𝑐2 < 𝜔 < −𝜔𝑐1 1
+ 𝑒 𝑗𝜔𝑛 𝑑𝜔
0 ; 𝑓𝑜𝑟 𝜔𝑐1 < 𝜔 < 𝜔𝑐2 2𝜋 𝜔 𝑐2

∵ 𝐻𝑑 𝑒 𝑗𝜔 = 0 𝑖𝑛 𝑡𝑕𝑒 𝑟𝑎𝑛𝑔𝑒−𝜔𝑐2 < 𝜔 < −𝜔𝑐1 𝑎𝑛𝑑 + 𝜔𝑐1 < 𝜔 + 𝜔𝑐2

94
The specifications of lowpass, highpass, bandpass and bandstop filters and their desired
impulse response for FIR filter design by Fourier series method are listed in table 6.3.
Procedure for digital FIR filter design by Fourier series method
1. The specifications of digital FIR filter are
i) The desired frequency response, 𝐻𝑑 𝑒 𝑗𝜔
ii) The cutoff frequency 𝜔𝑐 for lowpass and highpass, and 𝜔𝑐1 & 𝜔𝑐2 for
band pass and band stop filters.

Note: If analog filter cutoff frequency Fc, and sampling frequency Fs, are
specified, then calculate the cutoff frequency of digital filter 𝜔𝑐 using the
equation,
2𝜋𝐹𝑐
𝜔𝑐 =
𝐹𝑠
iii) The number of samples of impulse response, N.
2. Determine the desired impulse response, 𝑕𝑑 𝑛 by taking inverse Fourier transform of
the desired frequency response, 𝐻𝑑 𝑒 𝑗𝜔
1 𝜋
𝑕𝑑 𝑛 = 2𝜋 ∫−𝜋 𝐻𝑑 𝑒 𝑗𝜔 𝑒 𝑗𝜔𝑛 𝑑𝜔

(For limits of integration in the above equations, refer table (3.2)


3. Calculate N samples of 𝑕𝑑 𝑛 for n=-(N-1)/2 to + (N-1)/2 and form the impulse response,
𝑕 𝑛 of FIR filter.
𝑁−1 𝑁−1
∴Impulse response, 𝑕 𝑛 = 𝑕𝑑 𝑛 𝑛 = − 𝑡𝑜 +
2 2

The impulse response is symmetric with n=0, and so h (-n) = h (n). Hence it is sufficient
if we calculate h (n) for n=0 to + (N-1)/2.
4. Take Z – transform of the impulse response to get the noncausal transfer function FIR
filter, 𝐻𝑁 𝑧 .
𝑁 −1
+
2

∴ 𝐻𝑁 𝑧 = 𝑧 𝑕 𝑛 = 𝑕 𝑛 𝑧 −𝑛
𝑁 −1
𝑛=−
2

5. Convert the noncausal transfer function, 𝐻𝑁 𝑧 to causal transfer function, 𝐻 𝑧 by


multiplying 𝐻𝑁 𝑧 𝑏𝑦 𝑧 − 𝑁−1 /2

Transfer function,

95
𝑁 −1
+
2
𝑁 −1
𝐻𝑁 𝑧 = 𝑧 − 2 𝑕 𝑛 𝑧 −𝑛
𝑁 −1
𝑛 =−
2

Alternatively,
Transfer function,
𝑁 −1
2 Applying symmetry
𝑁 −1
− 𝑛 −𝑛 condition, h(-n)=h(n).
𝐻𝑁 𝑧 = 𝑧 2 𝑕 0 + 𝑕 𝑛 [𝑧 + 𝑧 ]
Refer equation (3.7.4)
𝑛 =1

6. Draw a suitable structure for realization of FIR filter.


Design verification
1. Determine the frequency response, 𝐻 𝑒 𝑗𝜔 .
Method-1: Choose a linear phase magnitude function 𝐻 𝑒 𝑗𝜔 from table 3.2 Using
𝑕 𝑛 , obtain an equation for 𝐻 𝑒 𝑗𝜔 .
Method-2: The frequency response 𝐻 𝑒 𝑗𝜔 can be obtained by replacing z by 𝑒 𝑗𝜔 in
the transfer function, 𝐻 𝑧 .
∴Frequency response, 𝐻 𝑒 𝑗𝜔 = 𝐻 𝑧 𝑧 = 𝑒 𝑗𝜔
2. Calculate frequency response for various values of 𝜔 in the range 0 to 𝜋.
3. Calculate the magnitude response, 𝐻 𝑒 𝑗𝜔 and sketch the magnitude response to verify
the design.
Example 3
Design a FIR lowpass filter with cutoff frequency of 1 kHz and sampling frequency of 4
kHz with 11 samples using Fourier method. Determine the frequency response and verify the
design by sketching the magnitude response.
Solution
Given that, 𝐹𝑐 = 1𝑘𝐻𝑧 ; 𝐹𝑠 = 4𝑘𝐻𝑧

Ωc 2πFc 2πx1x103
∴ 𝜔𝑐 = Ωc T = = = = 0.5π rad /sample
Fs Fs 4x103
The desired frequency response 𝐻𝑑 𝑒 𝑗𝜔 of lowpass filter is,
𝐻𝑑 𝑒 𝑗𝜔 = 1; for – 𝜔𝑐 ≤ 𝜔 ≤ +𝜔𝑐
= 0; for – 𝜋 ≤ 𝜔 ≤ −𝜔𝑐 and 𝜔𝑐 ≤ 𝜔 ≤ 𝜋
The desired impulse response 𝑕𝑑 𝑛 of the lowpass filter is,

96
1 +𝜋 1 +𝜔
𝑕𝑑 𝑛 = 2𝜋 ∫−𝜋 𝐻𝑑 𝑒 𝑗𝜔 𝑒 𝑗𝜔 𝑑𝜔 = 2𝜋 ∫−𝜔 𝑐 1 × 𝑒 𝑗𝜔 𝑑𝜔
𝑐 𝑒 𝑗𝜃 − 𝑒 𝑗𝜃
+𝜔 𝑐 sin 𝜃 =
1 𝑒 𝑗𝜔𝑛 1 𝑒
𝑗𝜔 𝑛
𝑐 𝑒
−𝑗 𝜔 𝑛
𝑐 2𝑗
= 2𝜋 = 2𝜋 −
𝑗𝑛 −𝜔 𝑐 𝑗𝑛 𝑗𝑛

When n=0, the factor


1 𝑒 𝑗 𝜔 𝑐 𝑛 − 𝑒 −𝑗 𝜔 𝑐 𝑛 1 sin 𝜔 𝑐 𝑛
becomes 0/0,
= = sin 𝜔𝑐 𝑛 ; 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑛, 𝑒𝑥𝑐𝑒𝑝𝑡 𝑛 = 0. 𝜋𝑛
𝜋𝑛 2𝑛 𝜋𝑛 which is indeterminate
When, n=0,
𝐿𝑡 sin 𝜔𝑐 𝑛 1 𝐿𝑡 sin 𝜔𝑐 𝑛 𝜔𝑐 Using L‟ Hospital rule,
𝑕𝑑 𝑛 = 𝑕𝑑 0 = = = 𝐿𝑡 sin 𝐴𝜃
𝑛 → 0 𝜋𝑛 𝜋𝑛 → 0 𝑛 𝜋 =𝐴
𝜃−0 𝜃
The impulse response h(n) of FIR filter is obtained by truncating hd(n) to 11 samples.
sin 𝜔 𝑐 𝑛 𝑁−1 𝑁−1
∴ 𝑕 𝑛 = 𝑕𝑑 𝑛 = ; for 𝑛 = − to + , except n=0
𝑛𝜋 2 2
𝝎𝒄
= ; 𝐟𝐨𝐫 𝐧 = 𝟎
𝝅
𝑵−𝟏 𝟏𝟏−𝟏
Here, N=11, ∴ = =5
𝟐 𝟐

Hence, calculate h (n) for n=-5 to +5


Since, the impulse response h(n) satisfies the symmetry condition, h(-n) = h(n), calculate
h(n) for n=0 to 5.
𝜔𝑐
When n=0; 𝑕 0 = = 0.5
𝜋 Note: Calculator sin  by keeping the
sin 0.5𝜋 ×1 calculation in radian mode.
When n=1; 𝑕 1 = = 0.3183
𝜋𝑥 1
sin 0.5𝜋 ×2
When n=2; 𝑕 2 = =0
𝜋𝑥 2
sin 0.5𝜋 ×3
When n=3; 𝑕 3 = = −0.1061
𝜋𝑥 3
sin 0.5𝜋 ×4
When n=4; 𝑕 4 = =0
𝜋𝑥 4
sin 0.5𝜋 ×5
When n=5; 𝑕 5 = = 0.0637
𝜋𝑥 5

When n=-1; 𝑕 −1 = 𝑕 1 = 0.3183


When n=-2; 𝑕 −2 = 𝑕 2 = 0
When n=-3; 𝑕 −3 = 𝑕 3 = −0.1061
When n=-4; 𝑕 −4 = 𝑕 4 = 0
Using symmetry condition,
When n=-5; 𝑕 −5 = 𝑕 5 = 0.0637 h (-n) =h (n)

97
The transfer function H (z) of the digital lowpass filter is given by,
𝑁 −1
+ 5
2
𝑁 −1
𝐻 𝑧 =𝑧 2 𝑕 𝑛 𝑧 −𝑛 = 𝑧 −5 𝑕 𝑛 𝑧 −𝑛
𝑁−1 𝑛=−5
𝑛=−
2

= 𝑧 −5 𝑕 −5 𝑧 5 + 𝑕 −4 𝑧 4 + 𝑕 −3 𝑧 3 + 𝑕 −2 𝑧 2 + 𝑕 1 𝑧 + 𝑕 0 𝑧 0 + 𝑕 1 𝑧 −1
+ 𝑕 2 𝑧 −2 + 𝑕 3 𝑧 −3 + 𝑕 4 𝑧 −4 + 𝑕 5 𝑧 −5
= 𝑧 −5 𝑕 5 𝑧 5 + 𝑕 4 𝑧 4 + 𝑕 3 𝑧 3 + 𝑕 2 𝑧 2 + 𝑕 1 𝑧 + 𝑕 0 + 𝑕 1 𝑧 −1 + 𝑕 2 𝑧 −2
+ 𝑕 3 𝑧 −3 + 𝑕 4 𝑧 −4 + 𝑕 5 𝑧 −5
= 𝑧 −5 𝑕 0 + 𝑕 1 𝑧 + 𝑧 −1 + 𝑕 2 𝑧 + 𝑧 −2 + 𝑕 3 𝑧 + 𝑧 −3 + 𝑕 4 𝑧 + 𝑧 −4

+ 𝑕 5 𝑧 + 𝑧 −5
= 𝑕 0 𝑧 5 + 𝑕 1 𝑧 −4 + 𝑧 −6 + 𝑕 2 𝑧 −3 + 𝑧 −7 + 𝑕 3 𝑧 −2 + 𝑧 −8 + 𝑕 4 𝑧 −1 +
h(2)=0
𝑧 −9 + 𝑕 5 𝑧 0 + 𝑧 −10 H(4)=0
= 05𝑧 −5 + 0.3183 𝑧 −4 + 𝑧 −6 − 0.1061 𝑧 −2 + 𝑧 −8 + 0.0637 1 + 𝑧 −10
Structure
Let,
𝑌 𝑧
𝐻 𝑧 = = 0.5𝑧 −5 + 0.3183 𝑧 −4 + 𝑧 −6 − 0.1061 𝑧 −2 + 𝑧 −8 + 0.0637 1 + 𝑧 −10
𝑋 𝑧
∴ 𝑌 𝑧 = 0.5𝑧 −5 𝑋 𝑧 + 0.3183 𝑧 −4 𝑋 𝑧 + 𝑧 −6 𝑋 𝑧 − 0.1061 𝑧 −2 𝑋 𝑧 + 𝑧 −8 𝑋 𝑧
+ 0.0637 𝑋 𝑧 + 𝑧 −10 𝑋 𝑧
The above equation can be used to draw the FIR filter structure as shown in fig.1.

98
Fig 1: Linear phase structure of FIR lowpass filter
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at n=0, the
magnitude response, 𝐻 𝑒 𝑗𝜔 is given by 𝐴 𝜔 ,
Where,
𝑁 −1
2

𝐴 𝜔 = 𝑕 0 + 2𝑕 𝑛 cos 𝜔𝑛
𝑛=1
5

=𝑕 0 + 2𝑕 𝑛 cos 𝜔𝑛
𝑛=1

= 𝑕 0 + 2𝑕 1 cos 𝜔 + 2𝑕 2 cos 2𝜔 + 2𝑕 3 cos 3𝜔 + 2𝑕 4 cos 4𝜔 + 2𝑕 5 cos 5𝜔


= 0.5 + 2 × 0.3183 cos 𝜔 + 2 × 0 cos 2𝜔 + 2 × −0.1061 cos 3𝜔 + 2 × 0 cos 4𝜔 + 2
× 0.0637 cos 5𝜔
= 𝟎. 𝟓 + 𝟎. 𝟔𝟑𝟔𝟔 𝐜𝐨𝐬 𝝎 − 𝟎. 𝟐𝟏𝟐𝟐𝟎 𝐜𝐨𝐬 𝟑𝝎 + 𝟎. 𝟏𝟐𝟕𝟒 𝐜𝐨𝐬 𝟓𝝎

Example 4
Design an FIR band pass filter to pass frequencies in the range 1.5 KHz to 3 KHz and
sampling frequency of 8 KHz with 7 samples using Fourier series method. Determine the
frequency response.
Given that, 𝐹𝑐1 = 1.5𝑘𝐻𝑧 ; 𝐹𝑐2 = 3𝑘𝐻𝑧 ; 𝐹𝑠 = 8𝑘𝐻𝑧

99
Ωc1 2πFc1 2π × 1.5 × 103
∴ 𝜔𝑐1 = Ωc1 T = = = = 0.375𝜋
Fs Fs 8 × 103
Ωc2 2πFc2 2π × 3 × 103
𝜔𝑐2 = Ωc2 T = = = = 0.75𝜋
Fs Fs 8 × 103
The desired frequency response 𝐻𝑑 𝑒 𝑗𝜔 of bandpass filter is,
𝐻𝑑 𝑒 𝑗𝜔 = 1; 𝑓𝑜𝑟 − 𝜔𝑐2 ≤ 𝜔 ≤ −𝜔𝑐1 𝑎𝑛𝑑 𝜔𝑐1 ≤ 𝜔 ≤ 𝜔𝑐2
= 0 ; otherwise
The desired impulse response 𝑕𝑑 𝑛 of the bandpass filter is,
𝜋 −𝜔 𝜔 𝑐2
1 1 1
𝑕𝑑 𝑛 = 𝐻𝑑 𝑒 𝑗𝜔 𝑒 𝑗𝜔𝑛 𝑑𝜔 = 1 × 𝑒 𝑗𝜔𝑛 𝑑𝜔 + 1 × 𝑒 𝑗𝜔𝑛 𝑑𝜔
2𝜋 −𝜋 2𝜋 −𝜔 𝑐2 2𝜋 𝜔 𝑐1
𝜔 𝑐1 𝜔 𝑐2
1 𝑒 𝑗𝜔𝑛 1 𝑒 𝑗𝜔𝑛 1 𝑒 −𝑗𝜔𝑐 1𝑛 𝑒 −𝑗𝜔𝑐 2𝑛 𝑒 −𝑗𝜔𝑐 1𝑛 𝑒 −𝑗𝜔𝑐 1𝑛
= + = − + −
2𝜋 𝑗𝑛 𝜔 𝑐2
2𝜋 𝑗𝑛 𝜔 𝑐1
2𝜋 𝑗𝑛 𝑗𝑛 𝑗𝑛 𝑗𝑛

1 𝑒 −𝑗𝜔𝑐 2𝑛 − 𝑒 −𝑗𝜔𝑐 2𝑛 𝑒 −𝑗𝜔𝑐 1𝑛 − 𝑒 −𝑗𝜔𝑐 1𝑛


= −
𝜋𝑛 2𝑗 2𝑗
sin 𝜔𝑐2 𝑛 − sin 𝜔𝑐1 𝑛
= ; for all n, except n = 0
𝜋𝑛
When n=0;
𝐿𝑡 sin 𝜔𝑐2 𝑛 − sin 𝜔𝑐1 𝑛
𝑕𝑑 𝑛 = 𝑕𝑑 0 =
𝑛→0 𝜋𝑛
1 𝐿𝑡 sin 𝜔𝑐2 𝑛 𝐿𝑡 sin 𝜔𝑐1 𝑛
= −
𝜋 𝑛→0 𝑛 𝑛→0 𝑛
1
= 𝜔𝑐2 − 𝜔𝑐1
𝜋
The impulse response h (n) of FIR filter is obtained by truncating hd(n) to 7 samples.
sin 𝜔𝑐2 𝑛 − sin 𝜔𝑐1 𝑛 𝑁−1 𝑁−1
∴ 𝑕 𝑛 = 𝑕𝑑 𝑛 = ; 𝑓𝑜𝑟 𝑛 = − 𝑡𝑜 + ; except n = 0,
𝜋𝑛 2 2
𝜔𝑐2 − 𝜔𝑐2
= ; 𝑓𝑜𝑟 𝑛 = 0
𝜋
Here, N=7,
𝑁−1 7−1
∴ = =3
2 2
Hence, calculate h (n) for n=-3 to3.

100
Since the impulse response h (n) satisfies the symmetry condition, h(-n) = h(n), calculate
h(n) for n=0 to 3.
𝜔 𝑐2 −𝜔 𝑐1 0.75𝜋−0.375𝜋 0.375𝜋
When 𝑛 = 0; 𝑕 0 = = = = 0.375
𝜋 𝜋 𝜋
sin 0.75𝜋 ×1 −sin 0.375𝜋 × 1
When 𝑛 = 1; 𝑕 1 = = −0.069
𝜋 ×1
sin 0.75𝜋 × 2 −sin 0.375𝜋 × 2
When 𝑛 = 2; 𝑕 2 = = −0.2716
𝜋 ×2
sin 0.75𝜋 × 3 −sin 0.375𝜋 × 3
When 𝑛 = 3; 𝑕 3 = = 0.1156
𝜋 ×3

When n=1 ; h(-1); h(-1) = -0.069


When n=2 ; h(-2); h(-2) = -0.2716
When n=3 ; h(-3); h(-3) = 0.1156
The transfer function H(z) of the digital FIR band pass filter is given by
𝑁 −1
+
2 +3
𝑁 −1 𝑁 −1
− −
𝐻 𝑧 =𝑧 2 𝑧 𝑕 𝑛 =𝑧 2 𝑕 𝑛 𝑧 −𝑛 = 𝑧 −3 𝑕 𝑛 𝑧 −𝑛
𝑁−1 𝑛=−3
𝑛=−
2

= 𝑧 −3 𝑕 −3 𝑧 3 + 𝑕 −2 𝑧 2 + 𝑕 −1 𝑧 + 𝑕 0 𝑧 0 + 𝑕 1 𝑧 −1 + 𝑕 2 𝑧 −2 + 𝑕 3 𝑧 −3
∴ 𝐻 𝑧 = 𝑧 3 𝑕 3 𝑧 3 + 𝑕 2 𝑧 2 + 𝑕 1 𝑧 + 𝑕 0 + 𝑕 1 𝑧 −1 + 𝑕 2 𝑧 −2 + 𝑕 3 𝑧 −3
= 𝑧 −3 𝑕 0 + 𝑕 1 𝑧 + 𝑧 −1 + 𝑕 2 𝑧 2 + 𝑧 −2 + 𝑕 3 𝑧 3 + 𝑧 −3
= 𝑕 0 𝑧 −3 + 𝑕 1 𝑧 −2 + 𝑧 −4 + 𝑕 2 𝑧 −1 + 𝑧 −5 + 𝑕 3 𝑧 0 + 𝑧 −6
= 𝟎. 𝟑𝟕𝟓𝒛−𝟑 − 𝟎. 𝟎𝟔𝟗 𝒛−𝟐 + 𝒛−𝟒 − 𝟎. 𝟐𝟕𝟏𝟔 𝒛−𝟏 + 𝒛−𝟓 + 𝟎. 𝟏𝟏𝟓𝟔 𝟏 + 𝒛−𝟔

Structure
Let,
𝑌 𝑧
𝐻 𝑧 = = 0.375𝑧 −3 − 0.069 𝑧 −2 + 𝑧 −4 − 0.2716 𝑧 −1 + 𝑧 −5 + 0.1156 1 + 𝑧 −6
𝑋 𝑧

𝑌 𝑧 = 0.375𝑧 −3 𝑋 𝑧 − 0.069 𝑧 −2 𝑋 𝑧 + 𝑧 −4 𝑋 𝑧 − 0.2716 𝑧 −1 𝑋(𝑧) + 𝑧 −5 𝑋 𝑧


+ 0.1156 𝑋 𝑧 + 𝑧 −6 𝑋 𝑧
The above equation can be used to draw the FIR filter structure as shown in fig 1.

101
Fig1: Linear phase structure of Fir band pass filter.
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at n=0, the
magnitude response 𝐻 𝑒 𝑗𝜔 is given by 𝐴 𝜔 ,
Where,
𝑁 −1
2

𝐴 𝜔 =𝑕 0 + 2𝑕 𝑛 cos 𝜔𝑛
𝑛=1
3

=𝑕 0 + 2𝑕 𝑛 cos 𝜔𝑛
𝑛=1

= 𝑕 0 + 2𝑕 1 cos 𝜔 + 2𝑕 2 cos 2𝜔 + 2𝑕 3 cos 3𝜔


= 0.375 + 2 × −0.069 cos 𝜔 + 2 × −0.2716 cos 2𝜔 + 2 × 0.1156 cos 3𝜔
= 𝟎. 𝟑𝟕𝟓 − 𝟎. 𝟏𝟑𝟖 𝐜𝐨𝐬 𝝎 − 𝟎. 𝟓𝟒𝟑𝟐 𝐜𝐨𝐬 𝟐𝝎 + 𝟎. 𝟐𝟑𝟏𝟐 𝐜𝐨𝐬 𝟑𝝎

102
3.11 WINDOWS:
The windows are finite duration sequences used to modify the impulse response of the
FIR filters in order to reduce the ripples in the pass band and stop band, and also to achieve the
desired transition from pass band to stop band.
The FIR filter design starts with desired frequency response, 𝐻𝑑 𝑒 𝑗𝜔 . The desired
impluse response 𝑕𝑑 𝑛 is obtained by taking inverse Fourier transform of 𝐻𝑑 𝑒𝑗𝜔 . The desired
impulse response will be infinite duration sequence. On multiplying finite duration window
sequence with infinite duration impulse response, we get a finite duration impulse response with
modified samples, which is used to design FIR filter.
The different types of window sequence discussed in this book are,
1. Rectangular window, wR(n)

2. Bartlett or Triangular window, wT(n)

3. Hanning window, wc(n)

4. Hamming window, wH(n)

5. Blackman window, wB(n)

6. Kaiser window, wk(n)

Rectangular Window
The N-point rectangular window, wR(n) is defined as
𝑁−1 𝑁−1
Rectangular window, wR(n)= 1; 𝑛 = − 2
to + 2

= 0 ; other n ….(3.8.1)
Alternatively,
Rectangular window, wR(n) = 1 ; n=0 to N-1
= 0; other n ……(3.8.2)
The rectangular window sequence defined by equation (3.8.1) can be used only for odd values of
N, but the window sequence defined by equation (3.8.2) can be used for both add and even
values of N. It is observed that whatever be the number of elements of hd(n) included in the
hd(n), the magnitudes of the overshoot and leakage will not change significantly, when he
rectangular window is used. This result is known as the Gibbs phenomenon, after the American
Mathematician Josiak Willard Gibbs of Yale, who first noted this effect.

103
To reduce these side-lobe effects, we must consider alternate window sequences having
spectrum exhibiting smaller side-lobes. We can observe that the side –lobes of the window
spectrum 𝑊 𝑒𝑗𝜔 represent the contribution of the high frequency components in the window
sequence. For the rectangular window, these high frequency components are due to the sharp
transitions from 0 to 1 at the edges of window sequence. Hence the amplitudes of these high
frequency components, (i.e.,) the side –lobe level) can be reduce by replacing these sharp
transitions by more gradual ones. This I the motivation for development of the triangular
window, cosine window, etc.

Hanning Window:
The Hanning window is on type of raised cosine window. The equation for Hanning
window sequence wc(n).
2𝜋 𝑁−1 𝑁−1
0.5 + 0.5 cos 𝑁−1 ; 𝑓𝑜𝑟 − 𝑡𝑜
Hanning window, 𝑤𝑐 𝑛 = 2 2 …….(3.8.3)
0 ; other n
Alternatively,
2𝜋𝑛
0.5 − 0.5 cos 𝑁−1 ; 𝑓𝑜𝑟 𝑛 = 0 𝑡𝑜 𝑁 − 1
Hanning window, 𝑤𝐶 𝑛 = …….(3.8.4)
= 0 ; other n

The Hanning window sequence defined by equation (3.8.3) can be used only for odd
values of N, but the window sequence defined by (3.8.4)can be used for both odd and even
values of N.
The frequency response or frequency spectrum of Hanning window 𝑤𝑐 𝑒 𝑗𝜔 is obtained
by taking Fourier transform of Hanning window sequene 𝑤𝑐 𝑛 , `

Hamming window:
Hamming noted that a reduction in the first side-lobe level can be achieved by adding a small
constant value to the raised cosine window. The equation for Hamming window sequence w H(n)
is obtained by putting a=0.54 in equations (6.62) and (6.63).
Hamming window,

104
2𝜋𝑛 𝑁−1 𝑁−1
𝑤𝐻 𝑛 = 0.54 + 0.46 cos ; 𝑓𝑜𝑟𝑛 = − 𝑡𝑜 + . . (3.8.5)
𝑁−1 2 2
0 = ; other n
Alternatively,
2𝜋𝑛
0.54 − 0.46 cos 𝑁−1 ; 𝑓𝑜𝑟 𝑛 = 0 𝑡𝑜 𝑁 − 1
Hamming window, 𝑤𝐻 𝑛 = ..(3.8.4)
=0 ; other n
The Hamming window sequence defined by equation (6.68) can be used only for odd
values of N, but the window sequence defined by equation (6.69) can be used for both odd and
even value of N.
Summary of Various Features of Windows
The main advantage of windowing is that it is reasonably straightforward to obtain the
filter impulse response with minimal computational effort. The major reasons for the relative
success of windows is their simplicity and ease of use and the fact that closed form expression
are often available for the window coefficients. The main disadvantage of this technique is that
the resulting FIR filters satisfy no known optimality criterion (such as specified attenuation at 𝜔𝑠
and 𝜔𝑝 ) hence their performance have to be considerably improved in most cases.
Table 3.3: Frequency-Domain Characteristics of Some Window Functions
Approximate width of main-
Type of window Magnitude of first side -lobe
lobe
Rectangular 4π/N -13dB
Barlett 8π/N -25dB
Hanning 8π/N -31dB
Hamming 8π/N -41dB
Blackman 12π/N -58dB

Note: In filter specifications gain and magnitude are same and will be in negative dB.
The attenuation is inverse of gain and so it is negative of magnitude or gain in dB.
Hence attenuation will be in positive dB.

105
3.12 FIR Filter Design Using Windows
Method-1: Symmetry condition h (N-1-n) = h (n)
1. The specifications of digital FIR filter are,
i) The desired frequency response, 𝐻𝑑 𝑒 𝑗𝜔 = 𝐶 𝑒 −𝑗𝛼𝜔
Where, C=Constant (usually, C=1 Normalized magnitude)
𝑁−1
∝=
2
ii) The cutoff frequency 𝜔𝑐 for lowpass and highpass, and 𝜔𝑐1 and 𝜔𝑐2 for
bandpass and bandstop filter

Note: If analog filter cutoff frequency Fc and sampling frequency Fs are specified, then
2πF c
calculate the cutoff frequency digital filter 𝜔𝑐 using the equation, 𝜔𝑐1 =
Fs
iii) The number of samples of impulse response, N.
2. Determine the desired impulse response, 𝑕𝑑 𝑛 by taking inverse Fourier
transform of the desired frequency response, 𝐻𝑑 𝑒 𝑗𝜔 .
+𝝅
𝟏
𝒉𝒅 𝒏 = 𝑯𝒅 𝒆𝒋𝝎 𝒆𝒋𝝎𝒏 𝒅𝝎
𝟐𝝅 −𝝅

(For limits of integration in the above equation refer table 3.4).


3. Choose the desired window sequence w(n) defined for n=0 to N-1 from table 3.2.
Multiply hd(n) with w(n) to get the impulse response h(n) of the filter. Calculate
N-sample of the impulse response, for n=0 to N-1.
Impulse response, h (n) =hd (n) × w (n); for n=0 to N-1
The impulse response is symmetric with centre of symmetry at (N-1) /2 and so
h(N-1-n) =h(n). Hence it is sufficient if we calculate h(n) for n=0 to (N-1)/2.
4. Take Z –transform of the impulse h(n) to get the transfer function H(z) of the
filter.
Transfer function,
𝑵−𝟏

𝐇 (𝐳) = 𝐙 𝒉 𝒏 = 𝒉 𝒏 𝒛−𝒏
𝒏=𝟎

5. Draw a suitable structure for realization of FIR filter.

106
Table 3.4: The Normalized Ideal (Desired) Frequency Response and Impulse Response for FIR Filter Design Using
Windows
Type of filter Ideal (desired) frequency response Ideal (desired) impulse response
𝜋 𝜔𝑐
𝑒 −𝑗𝜔 ∝ ; −𝜔𝑐 ≤ ω ≤ +𝜔𝑐 1 1
𝑕𝑑 𝑛 = 𝐻𝑑 𝑒 𝑗𝜔 𝑒 𝑗𝜔𝑛 𝑑𝜔 = 𝑒 −𝑗𝜔 ∝ 𝑒 𝑗𝜔𝑛 𝑑𝜔
𝐻𝑑 𝑒 𝑗𝜔 = 0 ; −𝜋 ≤ ω < −𝜔𝑐 2𝜋 −𝜋 2𝜋 −𝜔 𝑐
Lowpass filter
0 ; 𝜔𝑐 < ω ≤ 𝜋 ∵ 𝐻𝑑 𝑒 𝑗𝜔
= 0 𝑖𝑛 𝑡𝑕𝑒 𝑟𝑎𝑛𝑔𝑒 − 𝜋 ≤ 𝜔 ≤ −𝜔𝑐 𝑎𝑛𝑑 + 𝜔𝑐 < 𝜔 ≤ +𝜋

+𝜋 −𝜔 𝑐 𝜋
𝑒 −𝑗𝜔 ∝ ; 𝜋 ≤ ω ≤ −𝜔𝑐 𝑕𝑑 𝑛 =
1
𝐻𝑑 𝑒 𝑗𝜔 𝑒 𝑗𝜔𝑛 𝑑𝜔 =
1
𝑒 𝑗𝜔 ∝ 𝑒 𝑗𝜔𝑛 𝑑𝜔 +
1
𝑒 −𝑗𝜔 ∝ 𝑒 𝑗𝜔𝑛 𝑑𝜔
𝐻𝑑 𝑒 𝑗𝜔
= 𝑒 −𝑗𝜔 ∝ ; 𝜔𝑐 ≤ ω ≤ 𝜋 2𝜋 −𝜋 2𝜋 −𝜋 2𝜋 𝜔𝑐
Highpass filter
0 ; −𝜔𝑐 ≤ ω < +𝜔𝑐 ∵ 𝐻𝑑 𝑒 𝑗𝜔
= 0 𝑖𝑛 𝑡𝑕𝑒 𝑟𝑎𝑛𝑔𝑒 − 𝜔𝑐 < 𝜔 ≤ 𝜔𝑐

+𝜋 −𝜔 𝑐
𝑒 −𝑗𝜔 ∝ ; −𝜔𝑐2 ≤ 𝜔−𝜔𝑐1 𝑕𝑑 𝑛 =
1
𝐻𝑑 𝑒 𝑗𝜔 𝑒 𝑗𝜔𝑛 𝑑𝜔 =
1
𝑒 −𝑗𝜔 ∝ 𝑒 𝑗𝜔𝑛 𝑑𝜔
𝑒 −𝑗𝜔 ∝ ; 𝜔𝑐1 ≤ 𝜔 ≤ 𝜔𝑐2 2𝜋 −𝜋 2𝜋 −𝜋
𝑗𝜔 𝜔𝑐2
𝐻𝑑 𝑒 = 0 ; −𝜋 ≤ 𝜔−𝜔𝑐2 1
+ 𝑒 −𝑗𝜔 ∝ 𝑒 𝑗𝜔𝑛 𝑑𝜔
Bandpass filter 0 ; −𝜔𝑐1 < 𝜔𝑐1 < +𝜔𝑐1 2𝜋 𝜔𝑐1
0 ; 𝜔𝑐2 < 𝜔 ≤ 𝜋
∵ 𝐻𝑑 𝑒 𝑗𝜔 = 0 𝑖𝑛 𝑡𝑕𝑒 𝑟𝑎𝑛𝑔𝑒 − 𝜋 ≤ 𝜔 ≤ −𝜔𝑐2 ; −𝜔𝑐1 < 𝜔 < +𝜔𝑐1 𝑎𝑛𝑑
+𝜔𝑐2 < 𝜔 ≤ +𝜋

+𝜋 −𝜔 𝑐2
𝑒 −𝑗𝜔 ∝ ; −𝜋 ≤ 𝜔−𝜔𝑐2 𝑕𝑑 𝑛 =
1
𝐻𝑑 𝑒 𝑗𝜔
𝑒 𝑗𝜔𝑛
𝑑𝜔 =
1
𝑒 −𝑗𝜔 ∝ 𝑒 𝑗𝜔𝑛 𝑑𝜔
𝑒 −𝑗𝜔 ∝
; −𝜔𝑐1 ≤ 𝜔 ≤ +𝜔𝑐1 2𝜋 −𝜋 2𝜋 −𝜋

𝐻𝑑 𝑒 𝑗𝜔 = 𝑒 −𝑗𝜔 ∝ ; 𝜔𝑐2 ≤ 𝜔 ≤ 𝜋 1 +𝜔𝑐2 −𝑗𝜔 ∝ 𝑗𝜔𝑛 1 𝜋 −𝑗𝜔 ∝ 𝑗𝜔𝑛


Bandpass filter + 𝑒 𝑒 𝑑𝜔 + 𝑒 𝑒 𝑑𝜔
0 ; −𝜔𝑐2 < 𝜔𝑐1 < −𝜔𝑐1 2𝜋 −𝜔𝑐1 2𝜋 𝜔𝑐2
0 ; 𝜔𝑐1 < 𝜔 ≤ 𝜔𝑐2 ∵ 𝐻𝑑 𝑒 𝑗𝜔 = 0 𝑖𝑛 𝑡𝑕𝑒 𝑟𝑎𝑛𝑔𝑒−𝜔𝑐2 < 𝜔 < −𝜔𝑐1 𝑎𝑛𝑑 + 𝜔𝑐1 < 𝜔 + 𝜔𝑐2

107
Example 5:
Design a linear phase FIR lowpass filter using rectangular window by taking 7samples of
window sequence and with a cutoff frequency, 𝜔𝑐 = 0.2𝜋 rad/sample.
Solution
Let us choose symmetric impulse response with symmetry condition h(N-1-
n)=h(n). Therefore, the desired ideal frequency response 𝐻𝑑 𝑒 𝑗𝜔 for FIR lowpass filter is,
𝒆−𝒋𝝎∝ ; −𝝎𝒄 ≤ 𝝎 ≤ +𝝎𝒄
𝑯𝒅 𝒆𝒋𝝎 =
𝟎 ; 𝒐𝒕𝒉𝒆𝒓 𝒘𝒊𝒔𝒆
The desired impulse response 𝑕𝑑 𝑛 is obtained by taking inverse Fourier transform of
𝐻𝑑 𝑒 𝑗𝜔 . By definition of inverse Fourier transform,
+𝜋 +𝜔 𝑐
1 𝑗𝜔 𝑗𝜔𝑛
1
𝑕𝑑 𝑛 = 𝐻𝑑 𝑒 𝑒 𝑑𝜔 = 𝑒 −𝑗𝜔 ∝ 𝑒 𝑗𝜔𝑛 𝑑𝜔
2𝜋 −𝜋 2𝜋 −𝜔 𝑐

+𝜔 𝑐 +𝜔 𝑐
1 𝑗𝜔 𝑛−∝
1 𝑒 𝑗𝜔 𝑛−𝛼 1 𝑒 𝑗 𝜔 𝑐 𝑛−𝛼 𝑒 𝑗 𝜔 𝑐 𝑛−𝛼
= 𝑒 𝑑𝜔 = = −
2𝜋 −𝜔 𝑐 2𝜋 𝑗 𝑛 − 𝛼 −𝜔 𝑐
2𝜋 𝑗 𝑛 − 𝛼 𝑗 𝑛−𝛼

1 𝑒 𝑗 𝜔 𝑐 𝑛 −𝛼 −𝑒 −𝑗 𝜔 𝑐 𝑛 −𝛼
∴ 𝑕𝑑 𝑛 =
𝜋 𝑛−𝛼 2𝑗
sin 𝜔 𝑐 𝑛−𝛼
= ; 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑛 𝑒𝑥𝑐𝑒𝑝𝑡 𝑛 =∝
𝜋 𝑛−∝ 𝑒 𝑗𝜃 − 𝑒 −𝑗𝜃
sin 𝜃 =
𝐿𝑡 sin 𝜔 𝑐 𝑛 −∝ 2𝑗
When 𝑛 =∝; 𝑕𝑑 𝑛 =
𝑛−∝ → 0 𝜋 𝑛 −∝
1 𝐿𝑡 sin 𝜔 𝑐 𝑛−∝ 1 𝜔𝑐
= = × 𝜔𝑐 =
𝜋 𝑛−∝ → 0 𝑛−∝ 𝜋 𝜋

𝑈𝑠𝑖𝑛𝑔 𝐿′ 𝐻𝑜𝑠𝑡𝑝𝑖𝑡𝑎𝑙 𝑟𝑢𝑙𝑒,


𝐿𝑡 sin 𝐴𝜃
𝜃→0 𝜃
The impulse response h (n) of FIR filer is obtained by multiplying 𝑕𝑑 𝑛 by window sequence.
1 ; for 𝑛 = 0 𝑡𝑜 𝑁 − 1
Rectangular window sequence, 𝑤𝑅 𝑛 =
0 ; 𝑜𝑡𝑕𝑒𝑟𝑤𝑖𝑠𝑒
impulse response, 𝑕 𝑛 = 𝑕𝑑 (𝑛) × 𝑤𝑅 𝑛
= 𝑕𝑑 𝑛 ; 𝑓𝑜𝑟 𝑛 = 0 𝑡𝑜 𝑁 − 1
𝑁−1 7−1
Here, N=7; 𝜔𝑐 = 0.2𝜋 rad/sample; ∝= = = 3; 𝑁 − 1 = 6
2 2

Hence, calculate h (n) for n=0 to 6.

108
Since, the impulse response h (n) satisfies the symmetry condition h (N-1-n) =h (n), calculate h
(n) for n=0 to 3.
When n=0;
sin 0.2𝜋 × 0 − 3
𝑕 0 = = 0.1009
𝜋× 0−3
When n=1;
Note: Calculate sin  by keeping the
sin 0.2𝜋 × 1 − 3 calculator in radian mode
𝑕 1 = = 0.1514
𝜋× 1−3
When n=2;
sin 0.2𝜋 × 2 − 3
𝑕 2 = = 0.1871
𝜋× 2−3
When n=3;
0.2𝜋
𝑕 3 = = 0.2
𝜋
When n=4;𝑕 4 = 𝑕 4 = 𝑕 6 − 4 = 𝑕 2 = 0.1871 Using symmetry condition,
When n=5;𝑕 5 = 𝑕 4 = 𝑕 6 − 5 = 𝑕 1 = 0.1514 h (N-1-n) h(6-n)=h(n)

When n=6;𝑕 6 = 𝑕 5 = 𝑕 6 − 6 = 𝑕 0 = 0.1009

The transfer function H (z) of FIR lowpass filter is given by,


𝑁−1 6

𝐻 𝑧 =𝑧 𝑕 𝑕 = 𝑕 𝑛 𝑧 −𝑛 = 𝑕 𝑛 𝑧 −𝑛
𝑛=0 𝑛 =0

= 𝑕 0 + 𝑕 1 𝑧 −1 + 𝑕 2 𝑧 −2 + 𝑕 3 𝑧 −3 + 𝑕 4 𝑧 −4 + 𝑕 5 𝑧 −5 + 𝑕 6 𝑧 −6
= 𝑕 0 + 𝑕 1 𝑧 −1 + 𝑕 2 𝑧 −2 + 𝑕 3 𝑧 −3 + 𝑕 2 𝑧 −4 + 𝑕 1 𝑧 −5 + 𝑕 0 𝑧 −6
= 𝑕 0 1 + 𝑧 −6 + 𝑕 1 𝑧 −1 + 𝑧 −5 + 𝑕 2 𝑧 −2 + 𝑧 −4 + 𝑕 3 𝑧 −3
= 0.1009 1 + 𝑧 −6 + 0.1514 𝑧 −1 + 𝑧 −5 + 0.1871 𝑧 −2 + 𝑧 −4 + 0.2𝑧 −3
Structure
𝑌 𝑧
Let, 𝐻 𝑧 = 𝑋 = 0.1009 1 + 𝑧 −6 + 0.1514 𝑧 −1 + 𝑧 −5 + 0.1871 𝑧 −2 + 𝑧 −4 + 0.2𝑧 −3
𝑧

 𝑌 𝑧 = 0.1009 𝑋 𝑧 + 𝑧 −6 𝑋 𝑧 + 0.1514 𝑧 −1 𝑋 𝑧 + 𝑧 −5 𝑋 𝑧 + 0.1871 𝑧 −2 𝑋 𝑧 +


𝑧 −4 + 0.2𝑧 −3 𝑋 𝑧 .
The above equation can be used to draw the FIR filter structure as shown in fig 1.

109
Fig1: Linear phase structure of FIR lowpass filter

Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at
(N-1)/2, the magnitude response 𝐻 𝑒 𝑗𝜔 is given by 𝐴 𝜔
Where,
𝑁 −1
2
𝑁−1 𝑁−1 Refer Table 3.1 case (i)
𝐴 𝜔 =𝑕 + 2𝑕 − 𝑛 cos 𝜔𝑛
2 2
𝑛 =1
3

∴𝐴 𝜔 =𝑕 3 + 2𝑕 3 − 𝑛 cos 𝜔𝑛
𝑛=1

= 𝑕 3 + 2𝑕 2 cos 𝜔 + 2𝑕 1 cos2 𝜔 + 2𝑕 0 cos 3𝜔


= 0.2 + 2 × 0.1871 cos 𝜔 +2×0.1514cos2 𝜔 + 2 × 0.1009 cos3 𝜔
= 𝟎. 𝟐 + 𝟎. 𝟑𝟕𝟒 𝐜𝐨𝐬 𝝎 +0.3028𝐜𝐨𝐬𝟐 𝝎 + 𝟎. 𝟐𝟏𝟖 𝐜𝐨𝐬𝟑 𝝎

110
Example 6:
Design a linear phase FIR bandpass filter to pass frequencies in the range 0.4π to 0.65 π
rad/sample by taking 7 samples of Hanning window sequence.
Solution:
Let choose symmetric impulse response with symmetry condition h(N-1-n)=h(n).
Therefore, the desired ideal frequency response 𝐻𝑑 𝑒 𝑗𝜔 for bandpass filter is,
𝒆−𝒋𝝎𝜶 ; −𝝎𝒄𝟐 ≤ 𝝎 ≤ −𝝎𝒄𝟏 𝑎𝑛𝑑 + 𝝎𝒄𝟏 ≤ 𝝎 ≤ +𝝎𝒄𝟐
𝑯𝒅 𝒆𝒋𝝎 =
𝟎 ; 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
The desired impulse response hd(n) is obtained by taking inverse Fourier transform of 𝐻𝑑 𝑒 𝑗𝜔 .
By definition of inverse Fourier transform,
+𝜋
1
𝑕𝑑 𝑛 = 𝐻𝑑 𝑒 𝑗𝜔 𝑒 𝑗𝜔𝑛 𝑑𝜔
2𝜋 −𝜋
−𝜔 𝑐1 𝜔 𝑐2
1 −𝑗𝜔 ∝ 𝑗𝜔𝑛
1
= 𝑒 𝑒 𝑑𝜔 + 𝑒 −𝑗𝜔 ∝ 𝑒 𝑗𝜔𝑛 𝑑𝜔
2𝜋 −𝜔 𝑐2 2𝜋 𝜔 𝑐1
−𝜔 𝑐1 𝜔 𝑐2
1 −𝑗𝜔 𝑛 −∝
1
= 𝑒 𝑑𝜔 + 𝑒 𝑗𝜔 𝑛−∝
𝑑𝜔
2𝜋 −𝜔 𝑐2 2𝜋 𝜔 𝑐1
−𝜔 𝑐1 𝜔 𝑐2
1 𝑒 𝑗𝜔 𝑛−𝛼 1 𝑒 𝑗𝜔 𝑛−𝛼
= +
2𝜋 𝑗 𝑛−∝ −𝜔 𝑐2
2𝜋 𝑗 𝑛−∝ 𝜔 𝑐1

1 𝑒 𝑗 𝜔 𝑐1 𝑛−𝛼 𝑒 𝑗 𝜔 𝑐2 𝑛−𝛼 1 𝑒 𝑗 𝜔 𝑐2 𝑛−𝛼 𝑒 𝑗 𝜔 𝑐1 𝑛−𝛼


= − + −
2𝜋 𝑗 𝑛−∝ 𝑗 𝑛−∝ 2𝜋 𝑗 𝑛−∝ 𝑗 𝑛−∝
1 𝑒 𝑗 𝜔 𝑐2 𝑛−𝛼
− 𝑒 𝑗 𝜔 𝑐2 𝑛−𝛼
𝑒 −𝑗 𝜔 𝑐1 𝑛−𝛼
− 𝑒 −𝑗 𝜔 𝑐1 𝑛−𝛼
= −
𝜋 𝑛−∝ 2𝑗 2𝑗
sin 𝜔𝑐2 𝑛 − 𝛼 − sin 𝜔𝑐1 𝑛 − 𝛼
= ; for all n except n = .
𝜋 𝑛−𝛼
𝐿𝑡 sin 𝜔𝑐2 𝑛 − 𝛼 − sin 𝜔𝑐1 𝑛 − 𝛼
When 𝑛 =∝; 𝑕𝑑 𝑛 =
𝑛−∝ → 0 𝜋 𝑛−𝛼
1 𝐿𝑡 sin 𝜔𝑐2 𝑛 − 𝛼 𝐿𝑡 sin 𝜔𝑐1 𝑛 − 𝛼
= −
𝜋 𝑛−∝ → 0 𝑛−𝛼 𝑛−∝ → 0 𝑛−𝛼
𝜔𝑐2 − 𝜔𝑐1
=
𝜋

111
The impulse response h (n) of FIR filter is obtained by multiplying hd (n) by window
sequence. The Hanning window sequence wc (n) is given by,
2𝜋𝑛
𝑤𝑐 𝑛 = 0.5 − 0.5 cos ; 𝑓𝑜𝑟 𝑛 = 0 𝑡𝑜 𝑁 − 1
𝑁−1
0 ; otherwise
sin 𝜔𝑐2 𝑛 − 𝛼 − sin 𝜔𝑐1 𝑛 − 𝛼 2𝜋𝑛
∴ 𝑕 𝑛 = 𝑕𝑑 𝑛 𝑤𝑐 𝑛 = 0.5 −0.5 cos( ) ; 𝑓𝑜𝑟 𝑛 ≠∝
𝜋 𝑛−𝛼 𝑁−1
𝜔𝑐2 − 𝜔𝑐1 2𝜋𝑛
= 0.5 −0.5 cos( ) ; 𝑓𝑜𝑟 𝑛 = 𝛼
𝜋 𝑁−1
Given that N=7; 𝜔𝑐1 = 0.4𝜋 rad /sample and 𝜔𝑐2 = 0.65𝜋 rad /sample
𝑁−1 7−1
Here, ∝= = = 3; 𝑁 − 1 = 6
2 2

Hence calculate h (n) for n=0 to 6.


Since, h(n) satisfies the symmetry condition, h(N-1-n)=h(n), calculate h(n) for n=0 to 3.
𝑛𝜋
sin 𝜔𝑐2 𝑛 − 3 − sin 𝜔𝑐1 𝑛 − 3 0.5 −0.5 cos 3
∴𝑕 𝑛 = ; 𝑓𝑜𝑟 𝑛 ≠ 3
𝜋 𝑛−3
𝜔𝑐2 − 𝜔𝑐1 𝑛𝜋
= [0.5 −0.5 cos ] ; for n = 3
𝜋 3

When n=0;
0×𝜋
sin 0.65𝜋 0 − 3 − sin 0.4𝜋 0 − 3 0.5 −0.5 cos 3
𝑕 0 = =0
𝜋 0−3
When n=1;
1×𝜋
sin 0.65𝜋 1 − 3 − sin 0.4𝜋 1 − 3 0.5 −0.5 cos 3
𝑕 1 = = −0.0556
𝜋 1−3
When n=2;
2×𝜋
sin 0.65𝜋 2 − 3 − sin 0.4𝜋 2 − 3 0.5 −0.5 cos 3
𝑕 2 = = −0.143
𝜋 2−3
When n=3;
0.65𝜋 − 0.4𝜋 3𝜋
𝑕 3 = 0.5 −0.5 cos = 0.25
𝜋 3
When n=4;𝑕 4 = 𝑕 6 − 4 = 𝑕 2 = −0.0143
Using symmetry condition
When n=5;𝑕 5 = 𝑕 6 − 5 = 𝑕 1 = −0.0556 h (N-1-n) =h (n) h (6-n) =h (n)

112
When n=6;𝑕 6 = 𝑕 6 − 6 = 𝑕 0 = 0
The transfer function H(z) of FIR bandpass filter is given by,
𝑁−1 6
−1
𝐻 𝑧 =𝑧 𝑕 𝑛 = 𝑕 𝑛 𝑧 = 𝑕 𝑛 𝑧𝑛
𝑛=0 𝑛=0

= 𝑕 0 + 𝑕 1 𝑧 −1 + 𝑕 2 𝑧 −2 + 𝑕 3 𝑧 −3 + 𝑕 4 𝑧 −4 + 𝑕 5 𝑧 −5 + 𝑕 6 𝑧 −6
= 𝑕 0 + 𝑕 1 𝑧 −1 + 𝑕 2 𝑧 −2 + 𝑕 3 𝑧 −3 + 𝑕 2 𝑧 −4 + 𝑕 1 𝑧 −5 + 𝑕 0 𝑧 −6
= 𝑕 0 1 + 𝑧 −6 + 𝑕 1 𝑧 −1 + 𝑧 −5 + 𝑕 2 𝑧 −2 + 𝑧 −4 + 𝑕 3 𝑧 −3
= 0 × 1 + 𝑧 −6 − 0.5556 𝑧 −1 + 𝑧 −5 − 0.0143 𝑧 −2 + 𝑧 −4 + 0.25𝑧 −3
= −𝟎. 𝟎𝟓𝟓𝟔 𝒛−𝟏 + 𝒛−𝟓 − 𝟎. 𝟎𝟏𝟒𝟑 𝒛−𝟐 + 𝒛−𝟒 + 𝟎. 𝟐𝟓𝒛−𝟑
Structure
Let,
𝑌 𝑧
𝐻 𝑧 = = −0.556 𝑧 −1 + 𝑧 −5 − 0.0143 𝑧 −2 + 𝑧 −4 + 0.25𝑧 −3
𝑋 𝑧
∴ 𝑌 𝑧 = −0.0556 𝑧 −1 𝑋 𝑧 + 𝑧 −5 𝑋 𝑧 − 0.0143 𝑧 −2 𝑋 𝑧 + 𝑧 −4 𝑋 𝑧 + 0.25𝑧 −3 𝑋 𝑧
The above equation can be used to draw the FIR filter structure as shown in fig1.

Fig: 1 Linear Phase structure for FIR band pass filter.

113
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at (N-1)/2 the
magnitude response 𝐻 𝑒 𝑗𝜔 is given by 𝐴 𝜔
Where,
𝑁 −1
Refer Table 3.1 case (i)
2
𝑁−1 𝑁−1
𝐴 𝜔 =𝑕 + 2𝑕 − 𝑛 cos 𝜔𝑛
2 2
𝑛 =1
3

∴𝐴 𝜔 =𝑕 3 + 2𝑕 3 − 𝑛 cos 𝜔𝑛
𝑛=1

= 𝑕 3 + 2𝑕 2 cos 𝜔 + 2𝑕 1 cos2 𝜔 + 2𝑕 0 cos 3𝜔


= 0.25 + 2 × −0.0143 cos 𝜔 + 2 × −0.0556 cos2 𝜔 + 2 × 0 cos3 𝜔
= 𝟎. 𝟐𝟓 − 𝟎. 𝟎𝟐𝟖𝟔 𝐜𝐨𝐬 𝝎-0.1112𝐜𝐨𝐬𝟐 𝝎

3.13Design of FIR Filters by Frequency Sampling Technique

In this method of ideal (desired) frequency response is sampled at sufficient number of


points (i.e. N-points). These samples are the DFT coefficients of the impulse response of the
filter. Hence the impulse response of the filter is determined by the inverse DFT.

Let, 𝐻𝑑 𝑒 𝑗𝜔 = Ideal desired frequency response


H (k) = DFT sequence obtained by sampling 𝐻𝑑 𝑒 𝑗𝜔
h (n) = Impulse response of FIR filter.

The impulse response h(n) is obtained by taking inverse DFT of H(k). For practical
realizability the samples of impulse response should be real. This can happen if all the complex
terms appear in complex conjugate pairs.
It can be observed that the complex DFT coefficient exists only as conjugate pairs. This
suggest that the terms of H(k) can be matched by comparing the exponentials. The terms H
(k) 𝑒 +𝑗 2𝜋𝑘𝑛 /𝑁 should be matched by the term that has the exponential 𝑒 +𝑗 2𝜋𝑘𝑛 /𝑁 as
a factor.

114
Procedure for Type-1 Design
1. Choose the ideal (desired) frequency response𝐻𝑑 𝑒 𝑗𝜔 .
2. Sample 𝐻𝑑 𝑒 𝑗𝜔 at N-points by taking 𝜔= 𝜔𝑘 = 2𝜋𝑘/𝑁 where K=0,1,2,3,…(N-1), to
generate the sequence H(k).

∴ 𝐻 𝑘 = 𝐻𝑑 𝑒 𝑗𝜔 𝜔=
2𝜋𝑘 ; for k = 0,1, … . (N − 1)
𝑁

3. Compute the N samples of impulse response h (n) using the following equation.
When N is odd, Impulse response,
𝑁 −1
2
1
𝑕 𝑛 = 𝐻 0 +2 𝑅𝑒 𝐻 𝑘 𝑒 𝑗 2𝜋𝑛𝑘 /𝑁
𝑁
𝐾=1

When N is even,
𝑁
1 −1
Impulse response, 𝑕 𝑛 = 𝑁 𝐻 0 + 2 2
𝐾=1 𝑅𝑒 𝐻 𝑘 𝑒 𝑗 2𝜋𝑛𝑘 /𝑁 Here,𝐻
𝑁
=0
2

4. Take Z – transform of the impulse response h(n) to get the filter transfer function, H(z).
𝑁−1

∴𝐻 𝑧 =𝑍 𝑕 𝑛 = 𝑕 𝑛 𝑧 −𝑛
𝑛=0
Procedure for Type-2 Design
1. Choose the ideal (desired) frequency response 𝐻𝑑 𝑒 𝑗𝜔 .
2. Sample 𝐻𝑑 𝑒 𝑗𝜔 at N-points by taking 𝜔 = 𝜔𝑘 = 2𝑘 2𝑘 + 1 /2𝑁, Where
k=0,1,2,3,…(N-1), to generate the sequence H(k).
∴ 𝐻 𝑘 = 𝐻𝑑 𝑒 𝑗𝜔 𝜔=
2𝜋 2𝑘+1 ; for k=0,1,….(N-1)
2𝑁

3. Compute the N samples of impulse response h(n) using the following equation.
When N is odd, 𝑁−1
Here, 𝐻 2
=0
Impulse response,
𝑁 −3
2
2 𝑗 2𝜋𝑛𝑘
𝑕 𝑛 = 𝑅𝑒 𝐻 𝑘 𝑒 𝑁
𝑁
𝐾=0
When N is even,
𝑁
−1
2
2 𝑗𝜋𝑛 2𝑘+1
𝑕 𝑛 = ×2 𝑅𝑒 𝐻 𝑘 𝑒 𝑁
𝑁
𝐾=0

115
4. Take Z – transform of the impulse response h(n) to get the filter transfer function, H(z).
𝑁−1

∴𝐻 𝑧 =𝑍 𝑕 𝑛 = 𝑕 𝑛 𝑧 −𝑛
𝑛=0

Example 7:
Determine the coefficients of a linear –phase FIR filter of length N=15 which has a
symmetric unit sample response and a frequency response that satisfies the conditions.

2𝜋𝑘 1 ; for k = 0,1,2,3


𝑕 = 0.4 ; 𝑓𝑜𝑟 𝑘 = 4
15 0 ; 𝑓𝑜𝑟 𝑘 = 5,6,7
Solution
𝑁−1
For linear phase FIR filter the phase function, 𝜃 𝜔 −∝ 𝜔 where ∝= .
2
15−1
Here, N=15, ∝= =7
2
2𝜋𝑘 2𝜋𝑘
Also, here 𝜔 = 𝜔𝑘 = = . Hence we can go for type-1 design.
𝑁 15

In this problem the samples of the magnitude response of the ideal (desired) filter are directly
given for various values of k.
2𝜋𝑘
∴ 𝐻 𝑘 = 𝐻𝑑 𝑒 𝑗𝜔 𝜔=𝜔 𝑘
= 1 𝑒 −𝑗 ∝𝜔 𝑘 = 𝑒 −𝑗 7× 15 ; k = 0,1,2,3
2𝜋𝑘
= 0.4𝑒 −𝑗 ∝𝜔 𝑘 = 0.4𝑒 −𝑗 7× 15 ; k=4
=0 ; k = 5,6,7

The samples of impulse response h (n) are given by,


𝑁 −1
2
1 𝑗 2𝜋𝑛𝑘
h(n) = 𝐻 0 +2 𝑅𝑒 𝐻 𝑘 𝑒 𝑁
𝑁
𝐾=1

7
1 𝑗 2𝜋𝑛𝑘
= 𝐻 0 +2 𝑅𝑒 𝐻 𝑘 𝑒 15
15
𝐾=1

3
1 𝑗 2𝜋𝑛𝑘 𝑗 2𝜋𝑛 ×4
= 𝐻 0 +2 𝑅𝑒 𝐻 𝑘 𝑒 15 + 2𝑅𝑒 𝐻 4 𝑒 15
15
𝐾=1

116
3
1 2𝜋𝑘 2𝜋𝑛𝑘 𝑗 2𝜋 ×4 𝑗 8𝜋𝑛
H (0) =1
∴ 𝑕(𝑛) = 1+2 𝑅𝑒 𝑒 −𝑗 7× 15 ×𝑒 15 + 2𝑅𝑒 0.4𝑒 −𝑗 7× 15
×
𝑒 15
15
𝐾=1

3
1 𝑗 2𝜋𝑘
(𝑛−7)
𝑗 8𝜋
𝑛 −7
= 1+2 𝑅𝑒 𝑒 15 + 2𝑅𝑒 0.4𝑒 15
15
𝐾=1

3
1 2𝜋𝑘 8𝜋
= 1+2 cos (𝑛 − 7) + 0.8 cos 𝑛−7
15 15 15
𝐾=1

1 2𝜋(𝑛 − 7) 4𝜋(𝑛 − 7) 6𝜋(𝑛 − 7)


= 1 + 2 cos + 2 cos + 2 cos
15 15 15 15
8𝜋(𝑛 − 7)
+ 0.8 cos
15
𝑁−1
Here N=15, N-1=14 , = 7.
2

Hence, calculate h (n) for n=0 to 14


Since h (n) satisfies the symmetry condition h (N-1-n) =h (n) with centre of symmetry at (N-1)/2,

When 𝑛 = 0;
1 2𝜋 0 − 7 4𝜋 0 − 7 6𝜋 0 − 7 8𝜋 0 − 7
𝑕 0 = 1 + 2 cos + 2 cos + 2 cos + 0.8 cos
15 15 15 15 15
= −0.0141
When 𝑛 = 1;
1 2𝜋 1 − 7 4𝜋 1 − 7 6𝜋 1 − 7 8𝜋 1 − 7
𝑕 1 = 1 + 2 cos + 2 cos + 2 cos + 0.8 cos
15 15 15 15 15
= −0.0019
When 𝑛 = 2;
1 2𝜋 2 − 7 4𝜋 2 − 7 6𝜋 2 − 7 8𝜋 2 − 7
𝑕 2 = 1 + 2 cos + 2 cos + 2 cos + 0.8 cos
15 15 15 15 15
= 0.04
When 𝑛 = 3;
1 2𝜋 3 − 7 4𝜋 3 − 7 6𝜋 3 − 7 8𝜋 3 − 7
𝑕 3 = 1 + 2 cos + 2 cos + 2 cos + 0.8 cos
15 15 15 15 15
= 0.0122
When 𝑛 = 4;
1 2𝜋 4 − 7 4𝜋 4 − 7 6𝜋 4 − 7 8𝜋 4 − 7
𝑕 4 = 1 + 2 cos + 2 cos + 2 cos + 0.8 cos
15 15 15 15 15
= −0.0914

117
When 𝑛 = 5;
1 2𝜋 5 − 7 4𝜋 5−7 6𝜋 5 − 7 8𝜋 5 − 7
𝑕 5 = 1 + 2 cos + 2 cos + 2 cos + 0.8 cos
15 15 15 15 15
= −0.0181
When 𝑛 = 6;
1 2𝜋 6 − 7 4𝜋 6−7 6𝜋 6 − 7 8𝜋 6 − 7
𝑕 6 = 1 + 2 cos + 2 cos + 2 cos + 0.8 cos
15 15 15 15 15
= 0.3130

When 𝑛 = 7;
1 2𝜋 7 − 7 4𝜋 7 − 7 6𝜋 7 − 7 8𝜋 7 − 7
𝑕 7 = 1 + 2 cos + 2 cos + 2 cos + 0.8 cos
15 15 15 15 15
= 0.52
When n=8, h (8) =h (15-1-8) =h (6) =0.3130
When n=9, h (9) =h (15-1-9) =h (5) =-0.0181
When n=10, h (10) =h (15-1-10) =h (4) =-0.0914 Using symmetry condition
When n=11, h (11) =h (15-1-11) =h (3) =0.0122 h(N-1-n)=h(n)

When n=12, h (12) =h (15-1-12) =h (2) =0.04


When n=13, h (13) =h (15-1-13) =h (1) =-0.0019
When n=14, h (14) =h (15-1-14) =h (0) =-0.0141
The transfer function H(z) of the filter is given by Z – transform of h(n)
𝑁−1 14

∴𝐻 𝑥 =𝑧 𝑕 𝑛 = 𝑕 𝑛 𝑧 −𝑛 = 𝑕 𝑛 𝑧 −𝑛
𝑛 =0 𝑛 =0
−1 −2
=𝑕 0 +𝑕 1 𝑧 +𝑕 2 𝑧 + 𝑕 3 𝑧 −3 + 𝑕 4 𝑧 −4 + 𝑕 5 𝑧 −5 + 𝑕 6 𝑧 −6 + 𝑕 7 𝑧 −7
+ 𝑕 8 𝑧 −8 + 𝑕 9 𝑧 −9 + 𝑕 10 𝑧 −10 + 𝑕 11 𝑧 −11 + 𝑕 12 𝑧 −12 + 𝑕 13 𝑧 −13
+ 𝑕 14 𝑧 −14
= 𝑕 0 + 𝑕 1 𝑧 −1 + 𝑕 2 𝑧 −2 + 𝑕 3 𝑧 −3 + 𝑕 4 𝑧 −4 + 𝑕 5 𝑧 −5 + 𝑕 6 𝑧 −6 + 𝑕 7 𝑧 −7
+ 𝑕 6 𝑧 −8 + 𝑕 5 𝑧 −9 + 𝑕 4 𝑧 −10 + 𝑕 3 𝑧 −11 + 𝑕 2 𝑧 −12 + 𝑕 1 𝑧 −13
+ 𝑕 0 𝑧 −14
= 𝑕 0 1 + 𝑧 −14 + 𝑕 1 𝑧 −1 + 𝑧 −13 + 𝑕 2 𝑧 −2 + 𝑧 −12 + +𝑕 3 𝑧 −3 + 𝑧 −11
+ 𝑕 4 𝑧 −4 + 𝑧 −10 + 𝑕 5 𝑧 −5 + 𝑧 −9 + 𝑕 6 𝑧 −6 + 𝑧 −8 + 𝑕 7 𝑧 −7
= −0.0141 1 + 𝑧 −14 − 0.0019 𝑧 −1 + 𝑧 −13 + 0.04 𝑧 −2 + 𝑧 −12 + 0.0122 𝑧 −3 + 𝑧 −11
− 0.0914 𝑧 −4 + 𝑧 −10 − 0.0181 𝑧 −5 + 𝑧 −9 + 0.3130 𝑧 −6 + 𝑧 −8 + 0.52𝑧 −7

118
Structure
Let,
𝑌 𝑧
𝐻 𝑧 = = −0.0141 1 + 𝑧 −14 − 0.0019 𝑧 −1 + 𝑧 −13 + 0.04 𝑧 −2 + 𝑧 −12
𝑋 𝑧
+ 0.0122 𝑧 −3 + 𝑧 −11 − 0.0914 𝑧 −4 + 𝑧 −10 − 0.0181 𝑧 −5 + 𝑧 −9
+ 0.3130 𝑧 −6 + 𝑧 −8 + 0.52𝑧 −7
∴ 𝑌 𝑧 = −0.0141 𝑋 𝑧 + 𝑧 −14 𝑋 𝑧 − 0.0019 𝑧 −1 𝑋 𝑧 + 𝑧 −13 𝑋 𝑧
+ 0.04 𝑧 −2 𝑋 𝑧 + 𝑧 −12 𝑋 𝑧 + 0.0122 𝑋(𝑍)𝑧 −3 + 𝑋(𝑍)𝑧 −11
− 0.0914 𝑋 𝑧 𝑧 −4 + 𝑋 𝑧 𝑧 −10 − 0.0181 𝑧 −5 𝑋 𝑧 + 𝑧 −9 𝑋 𝑧
− 0.3130 𝑧 −6 𝑋 𝑧 + 𝑧 −8 𝑋 𝑧 + 0.52𝑧 −7 𝑋 𝑧
The above equation can be used to draw the FIR filter structure as shown in fig 1.

Fig.1: FIR filter structure


Response
When impulse response is symmetric and N is odd with centre of symmetry at (N-1) /2 the
magnitude response 𝐻 𝑒 𝑗𝜔 is given by 𝐴 𝜔 ,
Where,
𝑁 −1
2
𝑁−1 𝑁−1
𝐴 𝜔 =𝑕 + 2𝑕 − 𝑛 cos 𝜔𝑛
2 2
𝑛 =1
7

∴𝐴 𝜔 =𝑕 7 + 2𝑕 7 − 𝑛 cos 𝜔𝑛
𝑛=1

119
= 𝑕 7 + 2𝑕 6 cos 𝜔 + 2𝑕 5 cos 2 𝜔 + 2𝑕 4 cos3 𝜔 + 2𝑕 3 cos4 𝜔 + 2𝑕 2 cos 5𝜔
+ 2𝑕 1 cos 6𝜔 + 2𝑕 0 cos7 𝜔
= 0.52 + 2 × 0.3130 cos 𝜔 + 2 × −0.0181 cos 2 𝜔 + 2 × −0.0914 cos3 𝜔
+ 2 × 0.0122 cos4 𝜔 + 2 × 0.04 cos 5𝜔
+2 × −0.0019 cos 6𝜔 + 2 × −0.0141 cos7 𝜔
= 0.52 + 0.626 cos 𝜔 − 0.0362 cos 2 𝜔 − 0.1828 cos3 𝜔 + 0.0244 cos4 𝜔 + 0.08 cos 5𝜔
− 0.0038 cos 6𝜔 − 0.0282 cos7 𝜔
Example: 8 Design a linear phase FIR lowpass filter with a cutoff frequency of 0.5π
rad/sample by taking 11 samples of ideal frequency response.
Solution
The magnitude response of ideal lowpass filter is shown in fig.1. The desired frequency
response 𝐻𝑑 𝑒 𝑗𝜔 of linear phase FIR lowpass filter with cutoff frequency of 0.5π rad/sample is
given by,

Fig: 1. Ideal magnitude response of FIR low pass filter


𝐻𝑑 𝑒 𝑗𝜔 = 𝑒 −𝑗 ∝𝜔 ; 0 ≤ 𝜔 ≤ 0.5𝜋 and 1.5π ≤ 𝜔 ≤ 2𝜋
= 0 ; 0.5π < 𝜔 < 1.5𝜋
𝑁−1 11−1
Where, ∝= = =5
2 2

The DFT sequence H (k) is obtained by sampling 𝐻𝑑 𝑒 𝑗𝜔 at 11 equidistant frequency points in


a period of 2π. The 11 frequencies for type-1 design are given by,
2𝜋𝑘 2𝜋𝑘
𝜔𝑘 = = ; for K = 0 to 10
𝑁 11
2𝜋 × 0
When k=0; 𝜔𝑘 = =0
11
2𝜋 × 1
When k=1; 𝜔𝑘 = = 0.18𝜋
11

120
2𝜋 × 2
When k=2; 𝜔𝑘 = = 0.36𝜋
11
2𝜋 × 3
When k=3; 𝜔𝑘 = = 0.55𝜋
11
2𝜋 × 4
When k=4; 𝜔𝑘 = = 0.73𝜋
11
2𝜋 × 5
When k=5; 𝜔𝑘 = = 0.91𝜋
11
2𝜋 × 6
When k=6; 𝜔𝑘 = = 1.09𝜋
11
2𝜋 × 7
When k=7; 𝜔𝑘 = = 1.27𝜋
11
2𝜋 × 8
When k=8; 𝜔𝑘 = = 1.45𝜋
11
2𝜋 × 9
When k=9; 𝜔𝑘 = = 1.64𝜋
11
2𝜋 × 10
When k=10; 𝜔𝑘 = = 1.82𝜋
11

From the above calculations the following observations can be made.


For =0 to 2, the samples lie in the range 0 ≤ 𝜔 < 0.5𝜋
For =3 to 8, the samples lie in the range 0.5 < 𝜔 < 1.5𝜋
For =9 to 10, the samples lie in the range 1.5𝜋 ≤ 𝜔 < 2𝜋
The sampling points on the ideal frequency response are shown in fig 2. The magnitudes of
sample of H (k) (Magnitude spectrum) are shown in fig 3.

Fig: 2. Sampling points of 𝑯𝒅 𝒆𝒋𝝎

121
Fig:3. Magnitude spectrum of H (k)
Based on the above discussion, the equation for DFT coefficients H (k) can be written as shown
below.
2𝜋𝑘
∴ 𝐻 𝑘 = 𝐻𝑑 𝑒 𝑗𝜔 𝜔=𝜔 𝑘
= 𝑒 −𝑗 ∝𝜔𝑘 = 𝑒 −𝑗 5× 11 ; for k=0, 1,2

= 0 ; for k=3 to 8
2𝜋𝑘
= 𝑒 −𝑗 ∝𝜔 𝑘 = 𝑒 −𝑗 5× 11 ; for k=9,10
The samples of impulse response h (n) are given by,

𝑁 −1
2
1 𝑗 2𝜋𝑛𝑘
h(n) = 𝐻 0 +2 𝑅𝑒 𝐻 𝑘 𝑒 𝑁
𝑁
𝐾=1

𝑗 2𝜋𝑛𝑘
1 5
= 𝐻 0 +2 𝐾=1 𝑅𝑒 𝐻 𝑘 𝑒 11
11

1 2𝜋𝑘 𝑗 2𝜋𝑛𝑘 H(0)=1


= 1+2 2
𝐾=1 𝑅𝑒 𝑒 −𝑗 5× 11 𝑒 11
11

2
1 𝑗 2𝜋𝑘
𝑛 −5
= 1+2 𝑅𝑒 𝑒 11 𝑒 𝑗𝜃 = cos 𝜃 + 𝑗 sin 𝜃
11 ∴ 𝑅𝑒 𝑒 𝑗𝜃 = cos 𝜃
𝐾=1

1 𝑗 2𝜋
𝑛−5
𝑗 4𝜋
𝑛−5
= 1 × 2𝑅𝑒 𝑒 11 + 2𝑅𝑒 𝑒 11
11
1 2𝜋 𝑛 −5 4𝜋 𝑛−5
= 11 1 + 2𝑐𝑜𝑠 + 2𝑐𝑜𝑠
11 11

122
𝑁−1
Here N=11, N-1=10, = 5.
2

Hence, calculate h (n) for n=0 to 10


Since h (n) satisfies the symmetry condition h(N-1-n)=h(n) with centre of symmetry at (N-1) / 2,
calculate h(n) for n=0 to 5.
1 2𝜋 0−5 4𝜋 0−5
When n=0; 𝑕 0 = 11 1 + 2 cos + 2 cos = 0.0694
11 11
1 2𝜋 1−5 4𝜋 1−5
When n=1; 𝑕 1 = 11 1 + 2 cos + 2 cos = −0.054
11 11
1 2𝜋 2−5 4𝜋 2−5
When n=2; 𝑕 2 = 11 1 + 2 cos + 2 cos = −0.1094
11 11
1 2𝜋 3−5 4𝜋 3−5
When n=3; 𝑕 3 = 11 1 + 2 cos + 2 cos = 0.0474
11 11
1 2𝜋 4−5 4𝜋 4−5
When n=4; 𝑕 4 = 11 1 + 2 cos + 2 cos = 0.3194
11 11
1 2𝜋 5−5 4𝜋 5−5
When n=5; 𝑕 5 = 11 1 + 2 cos + 2 cos = 0.4545
11 11

When n=6; 𝑕 6 = 𝑕 6 = 𝑕 11 − 1 − 6 = 𝑕 4 = 0.3194


When n=7; 𝑕 7 = 𝑕 7 = 𝑕 11 − 1 − 7 = 𝑕 3 = 0.0474 Using symmetry
When n=8; 𝑕 8 = 𝑕 8 = 𝑕 11 − 1 − 8 = 𝑕 2 = −0.1094 condition h (N-1-n) =h (n)

When n=9; 𝑕 9 = 𝑕 9 = 𝑕 11 − 1 − 9 = 𝑕 1 = −0.054


When n=10; 𝑕 10 = 𝑕 6 = 𝑕 11 − 1 − 10 = 𝑕 0 = 0.0694
The transfer function H (z) of the filter is given by Z – transform of h (n)

𝑁−1 10

∴𝐻 𝑧 =𝑧 𝑕 𝑛 = 𝑕 𝑛 𝑧 −𝑛 = 𝑕 𝑛 𝑧 −𝑛
𝑛=0 𝑛=0
−1 −2
=𝑕 0 +𝑕 1 𝑧 +𝑕 2 𝑧 + 𝑕 3 𝑧 −3 + 𝑕 4 𝑧 −4 + 𝑕 5 𝑧 −5 + 𝑕 6 𝑧 −6 + 𝑕 7 𝑧 −7
+ 𝑕 8 𝑧 −8 + 𝑕 9 𝑧 −9 + 𝑕 10 𝑧 −10
= 𝑕 0 + 𝑕 1 𝑧 −1 + 𝑕 2 𝑧 −2 + 𝑕 3 𝑧 −3 + 𝑕 4 𝑧 −4 + 𝑕 5 𝑧 −5 + 𝑕 4 𝑧 −6 + 𝑕 3 𝑧 −7
+ 𝑕 2 𝑧 −8 + 𝑕 1 𝑧 −9 + 𝑕 0 𝑧 −10
= 𝑕 0 1 + 𝑧 −10 + 𝑕 1 𝑧 −1 + 𝑧 −9 + 𝑕 2 𝑧 −2 + 𝑧 −8 + 𝑕 3 𝑧 −3 + 𝑧 −7
+ 𝑕 4 𝑧 −4 + 𝑧 −6 + 𝑕 5 𝑧 −5
= −0.0694 1 + 𝑧 −10 − 0.054 𝑧 −1 + 𝑧 −9 + 0.1094 𝑧 −2 + 𝑧 −8 + 0.0474 𝑧 −3 + 𝑧 −7
+ 0.3194 𝑧 −4 + 𝑧 −6 + 0.4545𝑧 −5

123
Structure
𝑌 𝑧
Let, 𝐻 𝑧 =𝑋 = 0.0694 1 + 𝑧 −10 − 0.054 𝑧 −1 + 𝑧 −9 − 0.1094 𝑧 −2 + 𝑧 −8 +
𝑧

0.0474 𝑧 −3 + 𝑧 −7 + 0.3194 𝑧 −4 + 𝑧 −6 + 0.4545𝑧 −5


∴ 𝑌 𝑧 = −0.0694 𝑋 𝑧 + 𝑧 −10 𝑋 𝑧 − 0.054 𝑧 −1 𝑋 𝑧 + 𝑧 −9 𝑋 𝑧
− 0.1094 𝑧 −2 𝑋 𝑧 + 𝑧 −8 𝑋 𝑧 + 0.0474 𝑧 −3 𝑋 𝑧 + 𝑧 −7 𝑋 𝑧
+ 0.3194 𝑧 −4 𝑋 𝑧 + 𝑧 −6 𝑋 𝑧 + 0.454𝑧 −5 𝑋 𝑧
The above equation can be used to draw the FIR filter structure as shown in fig 4.

Fig: 4. the FIR filter structure


Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at (N-1)/2
the magnitude response 𝐻 𝑒 𝑗𝜔 is given by 𝐴 𝜔 ,
Where,
𝑁 −1
2
𝑁−1 𝑁−1
𝐴 𝜔 =𝑕 + 2𝑕 − 𝑛 cos 𝜔𝑛
2 2
𝑛 =1
5

∴𝐴 𝜔 =𝑕 5 + 2𝑕 5 − 𝑛 cos 𝜔𝑛
𝑛=1

= 𝑕 5 + 2𝑕 4 cos 2 𝜔 + 2𝑕 3 cos2 𝜔 + 2𝑕 2 cos3 𝜔 + 2𝑕 1 cos 4𝜔 + 2𝑕 0 cos 5𝜔


= 𝟎. 𝟒𝟓𝟒𝟓 + 𝟎. 𝟔𝟑𝟖𝟖 𝐜𝐨𝐬 𝝎 + 𝟎. 𝟎𝟗𝟒𝟖 𝐜𝐨𝐬 𝟐 𝝎 + 𝟎. 𝟐𝟏𝟖𝟖 𝐜𝐨𝐬𝟑 𝝎 − 𝟎. 𝟏𝟎𝟖 𝐜𝐨𝐬𝟒 𝝎
+ 𝟎. 𝟏𝟑𝟖𝟖 𝐜𝐨𝐬 𝟓𝝎

124

You might also like