0% found this document useful (0 votes)
224 views

Problem Filter Design 1

FIR filters have several advantages over IIR filters such as being always stable, having linear phase response, and being less susceptible to problems caused by finite-length arithmetic. The impulse response of an FIR filter is finite, meaning the output will eventually become zero when a single impulse is input. FIR filters are designed using techniques such as windowing functions and frequency sampling. Windows like rectangular, Hanning, and Hamming are commonly used but trade off factors like main lobe width and side lobe attenuation. Kaiser windows allow variable side lobe attenuation.

Uploaded by

ShivMeena
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
224 views

Problem Filter Design 1

FIR filters have several advantages over IIR filters such as being always stable, having linear phase response, and being less susceptible to problems caused by finite-length arithmetic. The impulse response of an FIR filter is finite, meaning the output will eventually become zero when a single impulse is input. FIR filters are designed using techniques such as windowing functions and frequency sampling. Windows like rectangular, Hanning, and Hamming are commonly used but trade off factors like main lobe width and side lobe attenuation. Kaiser windows allow variable side lobe attenuation.

Uploaded by

ShivMeena
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

UNIT II

PART A

1. What is the alternative to IIR filters?

DSP filters can also be “Finite Impulse Response”(FIR). FIR filters do not use
feedback, so for a FIR filter with N coefficients, the output always becomes zero after
putting in N samples of an impulse response.

2. What are "FIR filters"?

FIR filters are one of two primary types of digital filters used in Digital Signal Processing
(DSP) applications (the other type being IIR).

3. What does "FIR" mean?

"FIR" means "Finite Impulse Response".

4. What are the advantages of FIR filters?

(I) linear phase FIR filters can be easily designed.


(II) Efficient realizations of FIR filter exist.
(III) Both recursive and non-recursive structures.
(IV) FIR filters realized non recursively are always stable.
(V) Round off noise can be made small in non recursive realization of FIR filters.

5. What are the disadvantages in FIR filters.

(I) The duration of impulse response should be large to realize sharp cut off filters.
(II) The non-integral delay can be lead to problems in some signal processing
applications.

6. Write the steps involved in FIR filter design.

(I) Choose the desired(ideal) frequency response Hd(w).


(II) Take inverse Fourier transform of hd(w) to get hd(n).
(III) Convert the duration sequence h(n) using windowing technique.
(IV) Take z-transform of h(n) to get the transfer function H(z) of the FIR filters.

7. What is the necessary and sufficient condition for the linear phase
characteristic of a FIR filters?
The necessary and sufficient condition is that the phase function should be a linear
function of w, which in turn requires constant phase delay or constant phase and group
delay.

8. What are the conditions to be satisfied for constant phase delay in linear phase
FIR filters?

N 1
The conditions for constant phase delay zero phase delay,  = (i.e., phase delay is
2
constant) impulse
response h(n) =h(N-1-n) (i.e., phase delay constant) impulse response, h(n)=h(N-
1-n)(i.e., Impulse response is symmetric)

9. What are the possible types of impulse response for linear phase FIR filters?

There are four types of impulse response for linear phase FIR filters.

i. Symmetric impulse response when N is odd.


ii. Symmetric impulse response when N is even.
iii. Anti Symmetric impulse response when N is odd.
iv. Anti Symmetric impulse response when N is even.

10. List the well known design techniques for linear phase FIR filters.

i. Fourier series method and window method.


ii. Frequency sampling method.
iii. Optimal filter design methods

11. What are the desirable characteristic of a frequency response of window


function?

i. The width of the main lobe should be small and it should contain as much of the total
energy as possible.
ii. The side lobes should decrease in energy rapidly as w tends to increases.

12. What is the drawback in FIR filters design using windows and frequency
sampling method? How it is overcome?

The FIR filter design by window and frequency sampling method does not have
precise control over the critical frequencies such as wp and ws. This drawback can be
overcome by designing FIR filter using chybyshov approximation technique. In this
technique an error function is used to approximate the ideal frequency response, in
order to satisfy the desired specifications.
13. Write the characteristic features of rectangular window?

i. The mainlobe width is equal to 4 N  1


ii. The maximum sidelobe magnitude is 13db.
iii. The side lobe magnitude does not decreases significantly with increasing w.

14. List the features of FIR filter designed using rectangular window.

(I) The width of the transition region is related to the width of the mainlobe of window
spectrum.
(II) Gibb's oscillations are noticed in the passband and stop band.
(III)The attenuation in the stopband is constant and cannot be varied.

15. Why Gibb's oscillations are developed in rectangular window and how it can
be eliminated or reduced?

The Gibb's oscillations in rectangular window are due to the sharp transitions
window are due to the sharp transitions from 1 to 0 at the edge of window sequence.

These oscillations can be eliminated or reduced by replacing the sharp transition by


gradual transition. This is the motivation for development of triangular and cosine
windows.

16. List the characteristics of FIR filters designed using windows.

(I) The width of the transition band depends on the type of window.
(II) The width of the transition band can be made narrow by increasing the value of N
where N is the length of the window sequence.
(III) The attenuation in the stopband is fixed for a given window, except in case of
kaiser window where it is variable.

17. Write the characteristics features of triangular window.

i. Thed mainlobe width is equal to 8


N
ii. The maximum side lobe magnitude is 25db.
iii. The sidelobe magnitude slightly decreases with increasing w.

18. Why trianglar window is not a good choice for designing FIR filters?

In FIR filters designed using triangular window the transition from passband to
stopband is not sharp and the attenuation in stop band is less when compared to filters
designed with rectangular window for the above two reasons the rectangular window is
not a good choice.
19. List the features of hanning window spectrum?
Answer:

i. The mainlobe width is equal to 8


M
ii. The maximum sidelobe magnitude is -31db.
iii. The sidelobe magnitude decreases with increasing w.

20. Compare the rectangular window and Hanning window.

Rectangular Hanning Window


1. The width of the mainlobe in window The width of mainlobe in window spectrum is
spectrum is 4/N 8 .
N
2.The maximum sidelobe magnitude in The maximum sidelobe magnitude in window
window spectrum is – 13dB spectrum is - 13dB.

3. In window spectrum the sidelobe In window spectrum the sidelobe magnitude


magnitude slightly decreases with increasing decreases with increasing w.
W
4. In FIR filter designed using rectangular In FIR filter designed using hanning window
window the the minimum stopband attenuation is 44dB.
minimum stopband attenuation is 22dB.

21. List the features of hamming window spectrum.

i. The mainlobe width is equal to 8/N


ii. The maximum sidelobe magnitude is - 41dB.
iii. The sidelobe magnitude remains constant for increasing w.

22. Compare the hanning and hamming window.

Hanning Window Hamming Window


i. The width of mainlobe in window The width of mainlobe in window spectrum is 8
spectrum is 8/N. /N

23. Compare the hamming window and Kaiser window.

Hamming window

i. The width of mainlobe in window spectrum is 8


N
ii. The maximum sidelobe magnitude in window spectrum is 41db.
iii. In window spectrum the sidelobe magnitude remains constant remains
constant with increasing w.
iv. In FIR filter designed using hamming window the minimum stopband
attenuation is 51db.

Kaiser Window:

1. The width of mainlobe in window spectrum depends on the values of w and N.


2. The maximum sidelobe magnitude with respect to peak of mainlobe is variable using
the parameter - .
3. In window spectrum the sidelobe magnitude decreases with increasing w.
4. iv. In FIR filter designed using kaiser window the minimum stopnband attenuation is
variable and depends on value of - .

24. Why is the impulse response "finite"?

The impulse response is "finite" because there is no feedback in the filter; if you
put in an impulse (that is, a single "1" sample followed by many "0" samples), zeroes will
eventually come out after the "1" sample has made its way in the delay line past all the
coefficients.

25. What is the alternative to FIR filters?

DSP filters can also be "Infinite Impulse Response" (IIR). IIR filters use feedback, so

when you input an impulse the output theoretically rings indefinitely.

26. How do FIR filters compare to IIR filters?

Each has advantages and disadvantages. Overall, though, the advantages of


FIR filters outweigh the disadvantages, so they are used much more than IIRs.

27. What are the advantages of IIR filters (compared to FIR filters)?

IIR filters can achieve a given filtering characteristic using less memory and
calculations than a similar FIR filter.

28. What are the disadvantages of IIR filters (compared to FIR filters)?

1. They are more suspectable to problems of finite-length arithmetic, such as noise


generated by calculations, and limit cycles. (This is a direct consequence of feedback:
when the output isn't computed perfectly and is fed back, the imperfection can
compound.)
2. They are harder (slower) to implement using fixed-point arithmetic.

3. They don't offer the computational advantages of FIR filters for Multirate (decimation
and interpolation) applications.

29. What are the disadvantages of FIR Filters (compared to IIR filters)?

Compared to IIR filters, FIR filters sometimes have the disadvantage that they
require more memory and/or calculation to achieve a given filter response
characteristic. Also, certain responses are not practical to implement with FIR filters.

30. What is the association between FIR filters and "linear-phase"?

Most FIRs are linear-phase filters; when a linear-phase filter is desired, a FIR is usually
used.

31.What is a linear phase filter?

"Linear Phase" refers to the condition where the phase response of the filter is a
linear (straight-line) function of frequency (excluding phase wraps at +/- 180 degrees).
This results in the delay through the filter being the same at all frequencies. Therefore,
the filter does not cause "phase distortion" or "delay distortion". The lack of phase/delay
distortion can be a critical advantage of FIR filters over IIR and analog filters in certain
systems, for example, in digital data modems.

32. What is the condition for linear phase?

FIR filters are usually designed to be linear-phase (but they don't have to be.) A
FIR filter is linear-phase if (and only if) its coefficients are symmetrical around the center
coefficient, that is, the first coefficient is the same as the last; the second is the same as
the next-to-last, etc. (A linear-phase FIR filter having an odd number of coefficients will
have a single coefficient in the center which has no mate.)

33. What is the delay of a linear-phase FIR?

The formula is simple: given a FIR filter which has N taps, the delay is: (N - 1) / (2
* Fs), where Fs is the sampling frequency. So, for example, a 21 tap linear-phase FIR
filter operating at a 1 kHz rate has delay: (21 - 1) / (2 * 1 kHz) = 10 milliseconds.

34. What is the alternative to linear phase?

Non-linear phase, of course. ;-) Actually, the most popular alternative is


"minimum phase". Minimum-phase filters (which might better be called "minimum delay"
filters) have less delay than linear-phase filters with the same amplitude response, at
the cost of a non-linear phase characteristic, a.k.a. "phase distortion".
35. Describe an all-pass filter.

An all-pass filter is defined as a system that has a constant unity magnitude


response for all frequencies, that is
H ()  1,....................0    

The simplest example of an all-pass filter is a pure delay system with system
function
H ( z)  z k
Therefore, the magnitude is
H ( )  H ( z  e j )  e  j.k  cos(.k )  j sin(.k )  1

36.What is leakage in window method?

In the design of FIR filter using window method, the power of the original
sequence {x(n)} that was concentrated at a single frequency has been spread by the
window into the entire frequency range. We say that the power has leaked out into the
entire frequency range. This phenomenon, which is the characteristic of windowing the
signal, is called leakage.

37.What are the major factors that influence the choice of a specific realization?

Computational complexity, memory requirement, and the finite-word-length


effects are the major factors that influence the choice.

Computational complexity refers to the number of arithmetic operations (i.e.


multiplications, additions and divisions) required to compute an output value y(n) for the
system.

Memory requirement refers to the number of memory locations required to store


the system parameters, past inputs, past outputs and any intermediate computed
values.
Finite-word-length effects or finite-precision effects refers to the quantization
effects that are inherent in any digital implementation of the system, either in hardware
or software.

38.Explain the advantages of frequency sampling structure over direct-form


realization.

The main advantage of frequency sampling structure over a direct-form


realization is fewer computational requirements (i.e. multiplications and additions). It is
achieved because most of the gain parameters of frequency sampling, i.e. {H(k+α)} are
zero.
39. Define Gibbs phenomenon.

As the desired filter characteristic, Hd(ω), is a Fourier series representation, the


introduction of window truncates the series at band edges. Due to the nonuniform
convergence of the Fourier series at a discontinuity (i.e. at band edges), truncation of
the Fourier series introduces the ripples in the frequency response characteristic [i.e.
H(ω)]. This oscillatory behavior near the band edges of the filter is called the Gibbs
phenomenon.

40.What are the advantages of frequency sampling realization?

a. Computational cycle can be reduced [Multiplication and addition.].


b. Symmetry property can be exploited.

41. What are the advantages of the realization structures?

a. Just by inspection, the computation algorithm can be easily written.


b. Hardware requirement can be easily determined.
c. A variety of equivalent block diagram can be easily developed from the transfer
function.
d. The relationship between the output and the input can be determined.

42. Define limit cycle oscillations in digital filters.

In recursive systems, the nonlinearities due to the finite-precision arithmetic


operations often cause periodic oscillations to occur in the output, even when the input
sequence is zero or some nonzero constant value. Such oscillations in recursive
systems are called Limit Cycles Oscillation and are directly attributable to round-off
errors in multiplication and overflow errors in addition.

43.Define linear phase response.

A filter response is said to be linear phase or symmetry, if it satisfies the


conditions
h(n) = h(N-1 – n) ……………. n = 0,1,2,3,……….,N-1, and

N 1
 T
2

FIR filter has a linear phase response property, whereas IIR system having no
this property. Therefore, by exploiting the property of symmetry, the number of
multiplication can be reduced by two fold, thereby can reduce the computational cycle
or hardware requirement.
44. What is the Z transform of a FIR filter?

For an N-tap FIR filter with coefficients h(k), whose output is described by:

y(n) = h(0)x(n) + h(1)x(n-1) + h(2)x(n-2) + ... h(N-1)x(n-N-1),

the filter's Z transform is:

h(z) = h(0)+ h(1)z-1 + h(2)z-2 + ... h(N-1)z-(N-1) ,

45. What is the DC gain of a FIR filter?

Consider a DC (zero Hz) input signal consisting of samples which each have
value 1.0. After the FIR's delay line had filled with the 1.0 samples, the output would be
the sum of the coefficients. Therefore, the gain of a FIR filter at DC is simply the sum of
the coefficients.

This intuitive result can be checked against the formula above. If we set  to
zero, the cosine term is always 1, and the sine term is always zero, so the frequency
response becomes:

46. List the various forms of realization of FIR systems?

1. Direct form or transversal structure


2. Cascade structure
3. Linear phase structure
4. Polyphase structure
5. Lattice structure
6. Frequency sampling structure

47. Define phase delay

The phase delay is defined as


  w 
p 
w
Where (w) is the phase response
48. Define group delay

The group delay is defined as

d  w 
g 
d w 
where (w) is the phase response

49. What is the condition for linear phase characteristics of an FIR filter [All, April
2004]

A filter has linear phase characteristics it the impulse response satisfies the symmetry
condition

h(n) = h(M-1-n)

where M is the length of the filter

50. What is the need for windows?

The truncation of infinite impulse response to a finite value produces undesirable


oscillations. These oscillations can be reduced by multiplying infinite impulse response
with finite weighting functions referred to as windows.

22. Design a low pass FIR filter using frequency sampling technique having cut
off frequency of /2 rad/sample. The filter should have linear phase and length of
17.

Solution:

we desired freq. response is Hd(w) for the linear phase FIR low pass filter.

M 1
 jw
H d (w)  e 2
for w  wc

Here we will write +ve range other wire of frequencies in above equation.

M 1
 jw
H d (w)  e 2
for w  wc

the length of filter is 17 and cut of freq is we =/2 rad /sam filtering these values in
above equation.
Hd(w)=e-jw for 0  wc ≤ 
2

To sample Hd(w)

2 k
W ; k  0,1, 2  N  1
N
2 k
W ; k  0,1, 2....16
1f
2 k
H (k )  H 4 ( w) | w 
17
2 k 8
j 2 k 
e 17
for 0  
17 2
 2 k
for  
2 17
16 k
j
e 17
for 0  K  17
4

observe the range of „K‟ in above equation

0  K  17 i.e.0  K  4.25
4

since K 18 always integer.

OK 4

Similarly 17  K  17 i.e.4.25CK  8.5


4 2

Since K is an unpaged, we should consider range as

5 K 8
2 k
j .8
H (k )  e 17
; for 0  K  4
; for 5  K  8

For add value of N.


1 
N1
2
h(n)   H (o)  2  Re H (k )e j 2 kn / N 
N 
 K 1

1  8

h(n)  1  2 Re H (k )e j 2 kn /17 
17  K 1 

substituting H(k).

1  4

h(n)  1  2 Re e j 2 kn / N  
17  K 1 
1  4
j 2 k 8  n /17 
 
17 
1  2 
K 1
Re e    

Now real past of ejo=cos

Applying this result to above equation

1  4
 j 2 kn / N  
h( n)  1  2  cos  17  
17  K 1  
n  0,1, 2,......6

Unit sample response of the FIR filter using freq. sampling technique.

23. Derive an expression for system function if the unit sample response h(n) is
obtained using freq sampling technique.

Solution:

The system functions H(z) is given as z-transform of h(n)

N 1
H ( z )   h( n) z  n
n 0
N 1
 W 1
j 2 k n   n
H ( x )    1  H ( k )e N
z
n 0 
N K 0 

interchanged the order of striation in above equation,

N 1
W 1 
N
H (k )  
j 2 k n
H ( z)  1 H (k )e N
z n 
n 0  K 0 
 Let us use the result 
 w2 N 2 1 
  an  a  a
N1

 n=N1 1 a 

 N 1
 

N 1 n

N 
j 2 k n
H ( z)  1 H ( k ) e N
z n 
n 0  K 0 

then applying above result in subordination.

1 N 1
1  e j 2 k z  m
H ( z) 
N
 H (k ) 1  e j 2 k / n z 1
K 0

Heree j 2 k

1 N 1
1 z  N
H ( z) 
N
 H (k ) 1  e
K 0
 j 2 k / n 1
z

1 z  N N 1
H  (K )
H ( z) 
N

K 0 1  e  j 2 k / n z 1

24. Design a Band reject filter the desired freq response.

Hd (ejw)  e jw 0  w wc1, wc 2  w  

where N=7. Wc1= 1 rad/s &

Wc2 = 2 rad /s.

Use, a) rectangular window


a) Hawn window.

Solution:


1
2 
hd ( w)  H d ( w)e jwn , dw

 wc 2 wc1 
1 j  n   w
  e
j ( n  ) w j ( n  ) w
= e dw  e dw  dw
2   wc1 wc 2

2 1 
1 j  n   w
 e dw   e e
j ( n  ) w j ( n  ) w
= dw  dw
2  1 wc 2
1
  Sin(n   )  Sin2(n   )  Sin(n   )  n  Z
 (n  c)
1
   1 : n  

N-1 7  1
 Here  =   3.
2 2

hd(0)=hd(6)=0.04462

hd(1)=hd(5)=0.26517-
hd(2)=hd(4)=-0.02159

Using rectangular window

W(n) = 1 : 0  n N-1

hd(0)=hd(6)=0.04462

hd(1)=hd(5)=0.26517-

hd(2)=hd(4)=-0.02159

hd(3)= 0.68169

Using here window

W(n)=1/2(1-cos n/3) 0  n  6

W(0)=W(6)=0

W(1)=W(5)=1/2 (1-cos /3)=1/4

W(2)=W(4)=1/2 (1-cos 2/3)=3/4

W(3)=1/2(1=cos )=1

There FIR Filter co efficient

h(0)=h(6)=0

h(1)=h(5)=1/4 x 0.26517=0.0662

h(2)=h(4)=3/4 x -0.02157=0.01619
h(3)= 1 x 0.31831=0.31831=0.31831

7
H ( z )   h( n) Z  n
n0

25. The desired response of a low pass filter is

H d (e jw )  e  jw ; -3  w  -3


4 4
0 ; 0-3   w 
4

Determine H (ejw) for M=7 use Hamm window.

Solution:

The filter co efficient are given by


hd (n)  1  e
jwn
dw
2

3
4

2 3
=1 e j 3we jwn dw
4

3
4
=1  e j  n 3 w dw
2 3
4

Sin 3
4
n  3
hd(n)= , n  3and
  n  3
hd (n)  3
4

the fuller co efficient are

hd(0) = 0.0750,hd(1)=-0.1592,=hd(5)

hd(2)=0.2251=hd(4),hd(6)=0.0750
the hamming window function

w(n)  0.54  0.46cos,0  n  N  1 other wise

there fore, with N=7.

W(0)=0.08=w(6)

W(1)=0.31=w(5)

W(2)=0.77=w(4)

W(3)=1.

The filter co-efficient of the resultant filter are

H(n)=hd(n)w(n):n=0,1,2,3,4,5.6.

Therefore

H(0) = 0.006=h(6)

H(1)=-0.0494=h(5)

H(2)=0.1733=h(4)

H(3)=0.75

The freq response is given by

H(ejw)=


n 0
h(n)e jwn

 e jwn  h(3)  zh(0) cos 3w  2n(1) cos 2w  2h(2) cos w


 e j 3w  0.75  0.3466cos w  0.0988cos 2w  0.012cos w

26. A filter is to be designed with the following desired freq response

H d (e jw )  e  j 2 w ; -   w
4 4
0 ;   w 
4
Determine the filter co-efficient hd(n) if the window function Referred as

w(n)  1 ; 0  n  N-1
otherwise
otherwise ;0

Also determine the freq response H(e-jw)

Solution:

Data given

H d (e jw )  e  j 2 w -  w
4 4
  w 
4

There fore


hd (n)  1
2

 H d (e jw )  e jwn dw

 
4 4
=1  dw  1  e  j 2 we jwn dw
j 2w jwn
e e
2 2 

4


4 
jw n  2 
 e e jw n  2 dw
2 
=1 dw  1
2

4
 
1  e j  n  2  e j  n  2   e j  n  2 4  e j  n  2 4 
   
  n  2  2j   2j 
1
  Sin (n  2)  Sin (n  2) 4 n  2
  n  2

hd(2) = 3/4 , using L hos P= lal & rule

h(n) the taller coefficients are given by

hd(0)=1/2 =hd(4)&hd(1)=1/2 =hd(3)

After applying the window function the new co-efficient are.

H(2)=3/4,h(0)=1/2=h(4)&

H(1)= 1/2 =H(3)


The freq response obtained as

4
H (e jw )   h(n)e jwn
n 0

 2 1 
H (e jw )  e j 2 w 0.75  cos w  cos 2w
   

27. A low pass – filter is to be designed both the following desired freq response
H d (e jw )  e j 2 w ;   w  
4 4
0 ;   w 
4

Determine the filter co-efficient hd(n) e frequency response H(ejw) of designed


filter, use rectangular window.

Solution:

Given

e j 2 w -  w
H d (e jw )   4
  w 
4
0
4

therefore

hd (n)  1
2

 H d (e jw )  e jwn dw


4
=1
2 

e j 2 we jwn dw

4


4
=1  e jw n  2  dw
2 

4

1  e j  n  2 4  e j  n  2 4 
  
  n  2  2j 

Sin  (n  2)n  2
1

  n  2 4

for n=2 the filter co-efficient can be obtained by applying L hospital and rule.
hd(2)=1/4

The after co-efficient are given by

Hd(0)=1/2 = hd(4)
Hd(1)=1/2 =hd(3)

The filter co-efficient of the filter would be then

h(n)= hd(n) w(n)

Therefore
H(0)=1/2=h(4),h(1)=1/2=h(3)and h(2)=1/4.

The freq response H(ejw)is given by

4
H (e jw )   h(n)e  jwn
n0

=h(0)+h(1)e-jw  h(2)e-jw  h(3)e-jw  h(4)e-jw


 2 1 
H (e jw )  e j 2 w  1  cos w  cos 2 w
 4   

28. Design a band pass filter to pass freq range 1 to 2 rad/sec. using hanning
window, with N=5.

Solution:

The desired freq response for band pass filter‟s ie

H d ( w)  e jwl :-wc2  w  -wc1 &


0 :-wc1  w  -wc 2


=1  Hd (w)e
jwn
dw
2

 wc1 wc2

 e
 jwr  jwe
=1 e e jwn
dw  1 e jwn dw
2 2
 wc2 wc1
wc1 wc1
 e jw( n  )  1 e
jw ( n  )

1   
2 j (n   ) 2 j (n   ) 

  wc2   wc2
1
 sin wc2 (n   )  sin wc1 (n   ) n  
 (n   )

Sin wc2 (n  2)  Sin wc1 (n   )


hd (n)  n 
 (n   )
when n=
wc2  wc1
hd(w)= : n 

the hanning window sequence is given by

2 n
w(n)  0.5  0.5cos ; for n=0.1-N-1.
N 1
Let us assume wc1 1rad/sec and rw wc2 = 2 rad/sec.

Given N=5.

N 1 5 1
 2
2 2

h(n)=hd(n)w(n)

 Sin(2  (0.2))  Sin(1 (10  2)) 


n  0  n (o ) 
 (1  2)   0.5  0.5cos 0 
 

n  0 : h(1)  
 Sin(2  (1  2))  Sin(1 (1  2)) 
  (1  2) 

 0.5  0.5cos 4
2 
 0.0108  h(3)

2 1
n  2 : h(2)   0.3183

n  4 : H (4)  H (o).

N 1
( N  1) 2  N 1 
H ( w)  h   2h  n  cos wn.
2 n 1  2 

=h(2)+2h(1)cosw+2h(0)cos2w

=0.3183+2x0.0108cosw+0
H(w)=0.3183+0.0216cosw.

29. Design a Band slop filter to reject frequencies in the range 1 to 2 rad/sec
using rectangular window with w=7.

Solution:

The desired freq response

H d ( w)  e jw ; -  w  -wc2 &wc1  w  -wc2


0 ; &-wc2  w  

otherwise

then the hd(n) is obtained by


hd(n)= 1  Hd (w)e
jwn
dw
2

 wc2 wc1

 e jwr e jwn dw  1 e
 jwe
=1 e jwn dw
2 2
 wc1


1
 e
 jw
 e jwn dw
2 
 wc2  wc2 
1 1 1

2n  
 e jw( n  ) dw 
2 
 wc1
e jw( n  ) dw 
2 
 wc1
e jw( n  ) dw

1
hd (n)  sin wc1 (n   )  sin  (n   )  sin wc2 (n   ) n  
 (n   )
when n=
wc  wc1
hd(n)=1- 2 : for n=

consider the rectangular window sequence

wR (n)  1 ; for n=0+0N-1


0 ; otherwise
h(n)  hd (n)WR ( w)  hd (n)
N-1 7-1
( given n=7 : =  3
2 2
 sin wc1 (n   )  sin wc2 (n   ) 
Here h(n)   ;n 
   n   
Because sin  n=    0 always bec

h(n)=1-
 wc2  wc1  : for n=

Given wc1 = 1 rad/sec and wc2=2 rad/sec.&  =3.

 sin(1 (3))  sin(2  (3)) 


h(0)    0.0446  h(6)
   3  

h(1)=h(s)=0.2652

h(2)=h(4)=-0.0216

h(3)  1 
 2  1  0.6817

for N=7.(add)

N 1
( N  1) 2  N 1 
H ( w)  h   2h  n  cos wn.
2 n 1  2 
=h(3)+2h(2)cosw+2h(1)cos2w+2w(0)cos3w

=0.6817+2x(-0.0216)cosw+2x0.2652cos2w+2x0.0446cos3w

H(w) =0.6817-0.0432cosw+0.5304cos2w+0.0892cos3w

You might also like