Top Banner
Non-Recursive Filters FIR Filters All Zero Filters Moving Average Filters
31

Non-Recursive Filters

Nov 05, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Non-Recursive Filters

Non-Recursive FiltersFIR Filters

All Zero Filters

Moving Average Filters

Page 2: Non-Recursive Filters

Filter Design• Let us examine a low pass non-recursive filter with the following characteristics– N = 9 samples

– fs = 2000 Hz (sample freq)

– f0 = 200 Hz (cutoff freq)

0 ff s2

f s2

- f 0 f 0-

Magnitude Response

Note: assume time is continuous for the moment

Page 3: Non-Recursive Filters

Impulse Response

h kt h t tt

k

k

t k t

s

s

s s

( ) ( ) sin

sin

20 0

02

0

0

0

2

2

Page 4: Non-Recursive Filters

Impulse Response

h(kT) is of the form

0T

0

12f

0

12f

Page 5: Non-Recursive Filters

Truncation• To realise the frequency response we are required to use all of the infinite samples in the impulse response. But we are building a filter with a finite time response! We can do this by simply truncating the above series; we can set the coefficients past the fourth to zero by multiplying by a function which is 1.0 out to the fourth sample, and is zero elsewhere.

• Another word for truncation is windowing.

Page 6: Non-Recursive Filters

0

0

0

Multiply

Response

Impulse Response

Page 7: Non-Recursive Filters

Frequency Response

0 ffs2

fs2- f0 f0-

Convolve

Response

overshoot

ripple

Note: In this casewe are treating time as discrete andperforming a circularconvolution

Page 8: Non-Recursive Filters

Comments• The overshoot and ripple in the frequency domain is the price we pay for truncating the impulse response.

• It is the result of selecting the Fourier coefficients to minimise the mean squared error between the function and its Fourier series approximation.

• We, of course, recognise it as Gibb’s phenomenon.

• The poor behaviour in the neighbourhood of the discontinuity is the result of convolving with a “bumpy” function.

Page 9: Non-Recursive Filters

• Gibb's phenomena is not due to the fact that only a finite number of terms have been employed in the reconstruction!

• The magnitude of the peak ripple is invariant to the number of terms in the series.

• Adding more terms simply moves the ripple towards the discontinuity; it does not change its structure.

Page 10: Non-Recursive Filters

Gibb's Effect

overshoot

1.0

1.09

0.5

The effect of adding more terms (lengthening the filter)

Page 11: Non-Recursive Filters

Comments• Note that ripple in the neighbourhood of 10% overshoot in the passband represents only 0.7 dB, but that 10% ripple in the stop band represents 20 dB.

-60

-40

-20

0

20

20dB0.7dB

Page 12: Non-Recursive Filters

• We would probably find this filter inadequate to meet filtering requirements in the stop band.

• How do we improve performance?

• We have commented that the poor ripple characteristics are due to the bumpy function used in the convolution.

• To reduce the ripple, we need a truncation function whose Fourier Transform is not as bumpy (i.e., smoother)

• The bumpy behaviour of the transform is related to the discontinuity of the truncation function.

Page 13: Non-Recursive Filters

• The study of smooth truncation functions classically referred to as windows is a very important, but not well-understood segment of DSP.

• Misconceptions abound!

• What follows is an assortment of common window functions followed by a series of important observations.

Page 14: Non-Recursive Filters

5 10 15 20 25 300

0.02

0.04

0.06

0.08

0.1

Normalised Rectangular Window

-15 -10 -5 0 5 10 15-100

-80

-60

-40

-20

0

Spectrum of Rectangular Window

Narrowest main lobe

winplot

Sidelobe13 dB down

Page 15: Non-Recursive Filters

5 10 15 20 25 300

0.02

0.04

0.06

0.08

0.1

Normalised Barlett Window

-15 -10 -5 0 5 10 15-100

-80

-60

-40

-20

0

Spectrum of Barlett Window

Sidelobe-26 dB down

Page 16: Non-Recursive Filters

5 10 15 20 25 300

0.02

0.04

0.06

0.08

0.1

Normalised Hann Window

-100

-80

-60

-40

-20

0

Spectrum of Hann Window

50 10 15-15 -10 -5

Sidelobe-31.5 dB down

Page 17: Non-Recursive Filters

5 10 15 20 25 300

0.02

0.04

0.06

0.08

0.1

Normalised Hamming Window

-15 -10 -5 0 5 10 15-100

-80

-60

-40

-20

0

Spectrum of Hamming Window

Sidelobe-41.6 dB down

Page 18: Non-Recursive Filters

5 10 15 20 25 300

0.02

0.04

0.06

0.08

0.1

Normalised Blackman Window

-15 -10 -5 0 5 10 15-100

-80

-60

-40

-20

0

Spectrum of Blackman Window

Sidelobe-58 dB down

Page 19: Non-Recursive Filters

5 10 15 20 25 300

0.02

0.04

0.06

0.08

0.1

Normalised 3-Term Blackman-harris Window

-15 -10 -5 0 5 10 15-100

-80

-60

-40

-20

0

Spectrum of 3-Term Blackman-harris Window

Sidelobe-66 dB down

Page 20: Non-Recursive Filters

5 10 15 20 25 300

0.02

0.04

0.06

0.08

0.1

Normalised Kaiser Window (Beta=5.65)

-100

-80

-60

-40

-20

0

Spectrum of Kaiser Window (Beta=5.65)

-15 -10 -5 0 5 10 15

Sidelobe-42 dB down

Page 21: Non-Recursive Filters

5 10 15 20 25 300

0.02

0.04

0.06

0.08

0.1

Normalised 4-Term Blackman harris Window

-15 -10 -5 0 5 10 15-100

-80

-60

-40

-20

0

Spectrum of 4-Term Blackman harris Window

Sidelobe-92 dB down

Page 22: Non-Recursive Filters

Windows• Windows with “smoother” behaviour in the time-domain are “smoother” in the frequency domain.

boxcar

Bartlett

Hann

bkharris

smoother

Page 23: Non-Recursive Filters

Windows• Windows that are “smoother” in the time-domain tend to have narrower time duration (e.g., smaller rms time-widths).

boxcar

Bartlett

Hann

bkharris

Page 24: Non-Recursive Filters

Windows• Windows that are “smoother” in the time domain tend to have wider bandwidths (e.g., greater rms bandwidths)

boxcar

bkharrismuch wider

Page 25: Non-Recursive Filters

Windows• When convolving with a wider function, the resultant function will have wider transitions (smaller slope).

width

Page 26: Non-Recursive Filters

Smoother Windows

• One mathematical interpretation of “smoother” is continuous derivatives.

differentiate

discontinuities delta functions

FTintegrate

divide by j2f sidelobes don’t fall offsidelobes fall off as 1/f

Page 27: Non-Recursive Filters

Smoother Windows

• So a delta functions in the nth derivative implies that sidelobes fall off as 1/f .

n

boxcar

Bartlett

sidelobes fall off as

1f1f

1f

2

3

windows get narrower

Need continuous derivatives

Page 28: Non-Recursive Filters

Sidelobes• Don’t want constant sidelobes.

• Why?

• When we downsample all the noise adds up.

• Always use windows which have some sidelobe fall-off . ( About 3dB per octave is sufficient)

Page 29: Non-Recursive Filters

Transition Width• The boxcar window gives the fastest rolloff in the transition band but has large sidelobes in the stop band.

• We trade rolloff for sidelobesuppression by using more sophisticated window functions.

transition band

f > 1/(NT)

Page 30: Non-Recursive Filters

f > 1/(NT)

Another View• If we use a boxcar function, the rolloff in the transition zone is determined by the final sinc function and this is the fastest possible rolloff that can be achieved.

Page 31: Non-Recursive Filters

Optimal Windows• Dolph-Chebyshev

– Minimum main lobe width for lowest sidelobe level

• Kaiser-Bessel– Window is a good approximation to finite prolate spheroidal functions; minimum time bandwidth product

– Family of windows with different sidelobe levels

• Blackman-harris– Minimum sidelobe for a fixed number of spectral lines