0% found this document useful (0 votes)
21 views18 pages

FIR Using Freq Sampling

This document describes designing a linear phase FIR filter using the frequency sampling method. It discusses taking samples of the desired frequency response at regular intervals to obtain filter coefficients via the inverse DFT. It provides an example to design a filter with a desired magnitude and phase response and calculates the filter coefficients.

Uploaded by

Ram Kumar Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
21 views18 pages

FIR Using Freq Sampling

This document describes designing a linear phase FIR filter using the frequency sampling method. It discusses taking samples of the desired frequency response at regular intervals to obtain filter coefficients via the inverse DFT. It provides an example to design a filter with a desired magnitude and phase response and calculates the filter coefficients.

Uploaded by

Ram Kumar Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 18

of Linear Phase FIR Filter using Frequency Sampling Method

6.10 Design
In this method, we determine a set of samples from the desired frequency response Ha(e?")
and they are considered as DFT coefficients. The IDFT of this set of samples then gives the
filter coetficients. The set of samples used in this method are obtained by sampling a desired
frequency response Ha(eiu) at M pointsw = wi k= 0,1,2,.. .M-1 which are equaly spaced
regular intervals.
There are two types of design techniques in this method. They are,

(i) Type I design : In this case, the set of samples includes the sample at frequency w = 0.

(ii) Type II design : In this case, the sample at w =0 is not included instead some other
samples are used.

We discus only Type I design technique in this section. Given the desired frequency response
Hae), we take the set of samples H (k) at the frequencies,

wk
wh= M1 k=0,1,...M 1 -

(6.111)
The samples of the desired frequency response at these frequencies are given by,

H() =

Ha(e)|a Ha (e**) k=0,1... M-1 (6.112)

These sets of samples can be considered as M-point DFT H(k). Then the impulse response
h(n) of the filter can be obtained by computing the M-point IDFT of H (k).
M-1

i.e. h(n) = MHk)e nk n = 0, 1,... M -1 (6.113)


k=0
Signal rocessin
D i g i t a l

6-65

Also we have,
H(k) =

|H(k)]") k= 0,1,... M -1 (6.114)


numbers obtained in
Eqn. (6.113) are real, then these numbers
response of linear phase FIR ilter. For this to can be considered as
happen, the following conditions
the impulse

must be satisfied.

is real
(a) H(0)
M = odd
(b) For

Hk) = H*(M - k) : k = 1,2...,


2 (6.115)
O(k)=- M
Tk k =0,1,2.., M
(6.116)
=
(M -

1)T -

(Mrk M
k= M..., M-1
For M even

H(k) =H°(M -k) k=1,2,...,-1 (6.117)

n(- (6.118)

o(k) = - ( M ) Tk ;k =0, 1,2,. . . , -1


=
(M -

1)T - ) Tk ; k=+1,, M -1 (6.119)


=0 k
2

If the above conditions are satisfied, then Eqn. (6.113) can be written as,

h()=H(0)+ 2 Re {H(\eink ;M =odd (6.120)


k=l

-1
and h(n)= H(0) +2 Re H(k)eFnk M =even (6.121)
k=l

where n = 0,1,2,.. . M - 1

hen the system function of the filter can be obtained by,


M-1
(6.122)
H) = h(n):n
ly 2014
Solution. The desired magnitude and phase responses are
Fig. E6.16. shown using dotted linco
We have,

H(k) Ha(e)-2sk
=

k =0,1,...6

By taking M =
'7 samples on the w axis from 0 to 2T,

H(k)| =1; k =0, 1,6


=
0 k= 2.3, 4.5
(E6.16.1

and from Eqn. (6.116),

e(k) =
-Tk ; k =0.1,2,3 (E6.16.2
6T
=
-(k -

7) ; k= 4,5,6

Eqn. (E6.16.1) and (E6.16.2) are shown in Fig. E6.16


We have, using thick lines.

H(6) = |H(E)]EiOK)

From Eqn. (E6.16.1) and (E6.16.2),

H(k) = e-i9mk k =0,1


= 0
k =2,3,4,5
=e-i(k-7) k= 6
Digital Signal Processing 6-67

H(k)

k 1 k 2 k =3 Tk = 4 k = 5 3r k = 6 2T
k 0 =

T =

2
187

O(k) 12T

6T

3T 2T
2
67T
7

18T

Fig. E6.16

The filter coefficients are given by Eqn. (6.120)

ie., hn)=H0)+2 Re H(k)ënk} ; M = odd


k=1

h(n) =

k=1
Re
{maye*-"}
=1+2Re (e-i .e*")
#1+2 Re (*n-9)]
-

2T
h(r)=1+2cos(3 (E6.16.3)
From Eqn. (E6.16.3),

h(0) = h(6) = -0.1146


h(1) = h(5) = 0.0793

.h(2) = h(4) = 0.321


h(3) = 0.4286
6-68
6.
Design of FIR Fil-
The system function is
given by,
M-1 6
H() =
h(n):" =h(n)a-".
n=0 n=0

H(2) =

-0.1146 +0.07932+0.3212+0.42862-3
+0.3212-4 +0.07932-5-0.11462-

Example 6.17. Design a linear phase FIR


0.37 rad using the frequeney sampling method.flter with tabs and cut-off frequeney of
7

Solution. Given: M =7 &&T=*M-.=3.


Thus the desired
frequency response is,
Hale) e3w
0w<0.3T
= 0
;0.3T<wT.
The samples taken from the
below.
magnitude of the desired frequency response is shown in Fig, E6.1

H()

=1 03r k=2 3 k 4 k = 5 1.77 k =6

187

o(k) 127
6T

0.37 1.77 21

121**-..
187

Fig. E6.17
nal Processing
6-69
Digital

= 7 samples on
the w axis from 0 to 2T,
taking
By
H(k)| = 1 ; k = 0,1,6
(E6.17.1)
= 0 k =2,3,4,5
(6.116).
from
Eqn.
and

0(k) =-Tk ; k =0,1,2,3 (E6.17.2)


6T (k-7)
;k= 4,5,6
.17.1) and (E6.17.2) are shown in Fig. E6.17 using thick lines.
qn.
We have,
H(k) |H(A)J®04)
FromEqn. (E6.17.1)
and (E6.17.2),
.

H(k) = e-i}rk
k=0,1
=0
k =2,3,4,5
-i(k-7) k= 6
The filter coefficients are given by Eqn. (6.120)

i.e., h(n) = |H(0) +2 Re H(k)Jeiaënk | M = odd


k=1

htn)=|1+2 Re {mne**
k=l

1+2 Re (*.*)
-

1+2 Re (eF(n-3))|
hn)=1+2con-3) (E6.17.3)
From Eqn. (E6.17.3),

h(0) =
h(6) = -0.1146

h(1) =
h(5) = 0.0793

h(2) =
h(4) = 0.321
h(3) = 0.4286
Solution. The samples taken from the magnitude of the desired frequency response is shown
in Fig. E6.18.

H(k)| |

k = 1
k= 3 k 5 10k=12 k=14 27
k =0 k =
2 k =
4 k =
6 k =
7 k =
9 k = 11 k = 13

Fig. E6.18

The phase spectrum is not shown.

H(k) = 1 ; 0<k<3 and 12 < k < 14 (E6.18.1)


= 0 4<k<11
From Eqn. (6.116),

14
O(k) = =ETk k = 0, 1,2,...7
15

= 147-ETk
14
15 (E6.18.2)
14T k = 8,9...14
15 (k 15)
Digilal
S3gnal Process

6-71

6.18.1)
From Eqn. (E6.. and (E6.18.2),

H(k) = e-itrk
k =
0, 1,2,3
= 0
4 k 11
= e-i1a -T(k-15)
;12Sk14
We h a v e ,

M-1
h(m)=
h(n) M|H(0) +2 ReH(k)ein* M = odd
k=1

hn)=51+2 Re{ei*.#n
k=l

15 1+2 Re ft-
4T 6T
1+2 cos(n-7)+2
15 cosn7) +2 cosE(7 -

h(0) = h(14)= -0.05

h(1) = h(13) = 0.041

h(2) = h(12) = 0.0666

h(3) = h(11) = -0.0365

h(4) = h(10) =-0.1078

h(5) = h(9) = 0.034

h(6) = h(8) = 0.3188


h(7) = 0.466

EXample 6.19. Design a linear phase FiR lter of length 15 whch hais syumetric unit
ise respouse and the frequency response that satisfies theconditionsk
k0 12,3

04 4
kb. 7
6-72 6.
Design of PIR
Filtery
Solution.

H()

0.4

8 k 10k=12 k=14 27
k = 4k=5
k = 0 k = 6 k =7 k==9 k = 11 k = 13

Fig. E6.19

We have,

H(k) =1 0k 3 & 12 <k< 14


= 0.4 k = 4 & 11
E6.19.1)
= 0
5k10
14,
O(k) =-k
15
k = 0, 1,.. . 7

1415 (k 15);k =8,9...14 (E6.19.2


From Eqn. (E6.19.1) and Eqn. (E6.19.2),
H(k) = e-ik k = 0,1,2,3

= 0.4e i
k =4
= 0
5 k 10
0.4e i (k-15) k= 11
=ei1(k-15)
k= 12,13, 14
We have,

M
h(n)=
M HC0)+2 k=l
Re
{H0Me#"
H)-5+2 Re {m(eet"}
+2R3 e { - * s E ) + 2 Ref o 4 e j

k=1
D i g i t a l 5 1 g n a lP r o c e s s i n g
6-73

F + 2 Re {eekt-7}+2Re fo4etin-7
k=1
2T 4T 6T
1+2cos
h)15 | ) + 2cos E-7)+2 cosn
15
- 7) +0.8 cos -7

-0.0143
h(0)=h(14)
=

h(13) = -0.002
h(1) =

h(12) = 0.04
h(2) =

h(11) = 0.0122
h(3) =

h(10) -0.0913
h(4) =
=

-0.01817
h5)=h(9) =

h(6) =
h(8) = 0.3132

h(7) = 0.520

The system function is given by,


14
H) = 2h(n)a""
n=0

6.11 Comparison of lIR and FIR filters

IIR Ailters FIR filters


) It is recursive filter. It may be recursive or non-recursive filter.
() It may be stable or All non-recursive filters are stable.
unstable.
(11) Firstly, an analog filter must be designed The design procedure is direct to achieve
and later it is to be transformed to digital the desired frequency specifications.
filter.
ynly the desired characteristics of mag The desired characteristics of both magni-
nitude response are considered in the de tude and phase response are considered in
Sign. the design procedure.
(v) Linear hase Linear
characteristics cannot be phase characteristics can be
achieved. achieved with symmetric or anti
symmetric impulse response h(n).
vi) More sensitivity noise. Les sensitivity to quantization noise.
to quantization
Des1gn procedures are relatively com- Design procedures are highly flexible.
plex
Jouo
)Dasign pas
dindol. bn dn be wedwed n
AD H(2) -DA &udiure thod vill haua-3dB
gto
ot
at 30 TOd|s and an alunuotno s0 de at45m
TLad s . 1iltin as Tualuurud to hau a Jinuon
phase and âystm u s Sampling TLOd o 100
Samhl n atond

Yaft)

tauival Ac t r Hecy()
and
In the prutem, shaciicatn Hea() ane
giuen
thy au as olous ':
Kp-3d8, 2p 30Tnad/s
Ks--5ode, ns-45Tnads and T Se

O Conuwt band dge analog n into din


ungncis wing the amilo
T T 100

Wp QPT =
O-3 Kp-3 dB
sT O . 4 6 T Ks= -30d8
Ws=

PretsasP
Jansitn uidth (A0) min stdp-band at
aldB
Reatanglon 4TN
as dB
Bordlat 8mN
44 dB
Hannin 8TN
s3 dB
Hamming STN
74 dB
Blackman 12/N
Jo meat a stop band dinuatn oSod8, hau
chois un the almofhamring ound &otkma,
uindoo Since blackman ha highur Urann widh

Compare hamming incow, u cheose hammina


uindo

Sigo the uindous s ukded uunathe


ulotn

N K

ls1 hamming indouo

hence O-4STT - 0.3T7> 87


N
N 3
O.LS

N 53-33

&ang N to &e net higher odd integer


N 55 Ld= N aa muat e an întBe ges

D) theuny Tsonse d o pas idind


Be

Ha)
wc<<T

ha) HaL)

hd() S
27
- Wo

hd( Suinen-d)n+d
Tn- ue t
Judling n d in an.

haC) dw
rmru Tu

h() hd () ham (n)0s ner

h) un
T
bcn-,o
-)
4-46 2T2)ad

hcce
inst duol, imulse rustone, us

We Op= 0:3T and d N- -8


Sina N a3 odd, uognu Tusporsef loo pa
FIR u ús om hutnd ing he expfin un uo
-3/

Using sogn and . Jout dnial a t


Using and it
D
houun 'Hus
Twone lstsd ap pecs as

-SodB

thod wp= 0-37. the


tis found om
aboue tig 3dB.
qTeattn,
than -

afinuatn as and
pass band
Coc and then eogn
tene, 8ightty
unureau
chack a band
posbanc
h k s i pa»s
Tusonse dl t
.

mag dil
t t
R ais
s
ouduue
p r o u d u
Cntunu uthan
TUauiment.
d ottinuain
ban
WpWp . t h e po we0.33T)
an
3 dB (modtlals
8 ealua
Tmy a a eduiln un N diiobn
uuthoud du.liin bng þo
band and stop band cqluiroment [N-2-)

Sub the value Twp and ohlimise d un eognand


omhuta FIR b to-elticiant h[n) tal n:o1.-.N-
D0

digital loL pass n to m the


Design a

o lu
o shcdiatn
037T
O Pass band cdge gncy
&top band edg qgntyo5T
Sep band atnuatn SodB

Jinaon. phase un pos band

Wp 0-3T Ws= 0STi Ks-So dB

Tsansln width Min stop band allin


a1dB
Redangula 4TN
Baoct ttt 8TN as dB

Hanning 87/N 4H dB

Hamming 8T N 53 dB
Rladkmann 1aTN 71 dB

sal
s l aa Stwp band attnuatn D 5 0de, uu tan choo
cheo
edtha Hamming 1 Blakmannwindoo. ule

Gecause it has lou tanin


Hamming uindouw
udth ompared to. &todkmann
un theq
window Us aund
NLo Somhlo3 un the
ausnGdow
apuen
Ws-Wpz K27
N
k=h
Jor hamng wdw
-5 O-2i2 8
N
N 20
heuIncy
let the
usonse i d a l dow p a {illin.be

Hdo) AIL 200

wc<<|<n

hd) Hd(5) e n deo

e
uofn-),
do0O
- Wc

8inhen-) ntd
TT ( n -
in eagn O. get
Jating h d
Wc
c
hd( - d
Wa
is
rusonse o law bas FIRin
Hen, imhulse
OEnNH

h(n)- hd(n) Oham()


n+d
hn) ainwe (n-4)0.5A -0.46Ce3 (2Tin
N
T (n-)
n dd
Wcx
L
In aboue = 20
chooe We as-the
kp i s not uuun
&uric
ws,thodt m e a r
authmdii ot p and
We = Op+ s =o 8 i O.HT
2 2

hd (
-0 O0136
2 - O 001o6
- O0 [Y

20
38 - 0 O0lO6

39 - O Oo13

HO
ug 6elou ghou mannlisdo, ond n r
a n ideal Jouo a b ind hd (on)
b &uhose hd (n) ús dunkolud o hormror
tindow ohat is h(n)?

Roughly sketch +he r Jo


asu FR {U dusigned pet B.Ern
and
indicot ttu valux cul-ouapnuy
6to band laruat
toain tn and

Hd ()

-+/4 /4
(w)
sl-4
4
-4
mi+C
W-H LO
and is guun &y
In general, H{w) is Complx
()
Ha(): Hd (

LOKT

hd(n) HA)e do
hd(n)
4
26jwn-4) dw 0
20
-Ti4
hd () a Suin n - 4 ) ; nt4
A
Tn-4)
tng n- in eogn O

DATE 200

OKT

R(n)
Imube Tsonse loo pass FIR s
hn)= hd(n) Whamm () o en4 N-I :8
NOTE dH
N = =N= 9

Lohue, Ham (n) )0.5 -0-46


ce2Ti
N-I
OsnN4
8
O othuauie

n hd o)
ham h(n)
O 08 O

IS O a4+ o 03a22

2 O 318 O-17172
3 O-45 O- 86S3 O 3993

O8653 o 3&93
6 O 318 O Sy
O17172
O-1S 2144
O 0322
O-08

Sin N is odd an d hn) hos euen


um
20 logH ( )

Wc
A
wp
P

albou pruebum rudlan gular


8Rhaod the
wed instead hammng ödo7
Oindou us
în uuis prottem
8:
8ame as

8
Onn) 1 , 0kn N
O, 0

n hd () Onn h()-hd()
O
O
O-15
o-15
O 318
2 O 318

O- 45 O-45

A O-S

O-45 O-45

.318 O318

O-15
O-15

You might also like