design of sampling filter
-
Upload
anuj-arora -
Category
Science
-
view
382 -
download
1
Transcript of design of sampling filter
![Page 1: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/1.jpg)
Frequency Sampling Filter
![Page 2: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/2.jpg)
Filter
• Electronic filters are circuits which perform signal processing functions, specifically to remove unwanted frequency components from the signal, to enhance wanted ones, or both.
![Page 3: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/3.jpg)
Introduction
• Basic filter classification• We put emphasis on the digital filter now.
Filter
Analog Filter
Digital Filter
IIR Filter
FIR Filter
![Page 4: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/4.jpg)
Digital Filter
![Page 5: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/5.jpg)
• Digital Filter: numerical procedure or algorithm that transforms a given sequence of numbers into a second sequence that has some more desirable properties.
DIGITAL FILTERInput sequence Output Sequence
![Page 6: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/6.jpg)
• A finite impulse response (FIR) filter is a filter whose impulse response is of finite duration.
• Its design construction has not returned to the part which gives.
• Its construction generally uses Direct form and Cascade form.
Finite Impulse Response Filter
![Page 7: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/7.jpg)
Introduction
• FIR filter design methods include the window function, frequency sampling, minimize the maximal error, and MSE.
• We emphasized at window function.
Window function technique
Frequency sampling technique
Minimize the maximal error
FIR filter
Mean square error
![Page 8: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/8.jpg)
The basic idea behind the window design is to choose a proper ideal frequency-selective filter (which always has a noncausal, infinite-duration impulse response) and then to truncate (or window) its impulse response to obtain a linear-phase and causal FIR filter.
Therefore the emphasis in this method is on selecting an appropriate windowing function and an appropriate ideal filter. We will denote an ideal frequency-selective filter by ,which has a unity magnitude gain and linear-phase characteristics over its passband, and zero response over its stopband.
FIR Filter Design by Window function technique
![Page 9: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/9.jpg)
FIR Filter Design by Window function technique
• Simplest FIR the filter design is window function technique
• A supposition ideal frequency response may express
where
( ) [ ]j j nd d
n
H e h n e
1[ ] ( )2
j j nd dh n H e e d
![Page 10: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/10.jpg)
The impulse response will be
![Page 11: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/11.jpg)
FIR Filter Design by Window function technique
• To get this kind of systematic causal FIR to be approximate, the most direct method intercepts its ideal impulse response!
[ ] [ ] [ ]dh n w n h n
( ) ( ) ( )dH W H
![Page 12: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/12.jpg)
![Page 13: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/13.jpg)
![Page 14: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/14.jpg)
FIR Filter Design by Window function technique
• 1.Rectangular window
• 2.Triangular window (Bartett window)
1, 0[ ]
0, n M
w notherwise
2 , 0 22[ ] 2 , 2
0,
n MnMn Mw n n MM
otherwise
![Page 15: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/15.jpg)
FIR Filter Design by Window function technique
• 1.Rectangular window • 2.Triangular window (Bartett window)
0 10 20 30 40 50 600
0.5
1
sequence (n)
T(n)
Rectangular window
0 10 20 30 40 50 600
0.5
1
sequence (n)
T(n)
Bartlett window
![Page 16: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/16.jpg)
FIR Filter Design by Window function technique
• 3.HANN window
• 4.Hamming window
1 21 cos , 0[ ] 2
0,
n n Mw n M
otherwise
20.54 0.46cos , 0[ ]
0,
n n Mw n M
otherwise
![Page 17: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/17.jpg)
0 10 20 30 40 50 600
0.5
1
sequence (n)
T(n)
Hanning window
0 10 20 30 40 50 600
0.5
1
sequence (n)
T(n)
Hamming window
FIR Filter Design by Window function technique
• 3.HANN window• 4.Hamming window
![Page 18: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/18.jpg)
![Page 19: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/19.jpg)
Frequency sampling-based FIR filter design
• In this project we implemented FIR low and high pass filters in matlab.
• For that we use matlab fir2 function that’s uses frequency sampling to design filters.
• To obtain the filter coefficients, the function applies an inverse fast Fourier transform to the grid and multiplies by window.
![Page 20: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/20.jpg)
• fir2(n,f,m) returns an nth-order FIR filter with frequency-magnitude characteristics specified in the vectors f and m. The function linearly interpolates the desired frequency response onto a dense grid and then uses the inverse Fourier transform and a Hamming window to obtain the filter coefficients.
![Page 21: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/21.jpg)
Low pass Filter
![Page 22: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/22.jpg)
![Page 23: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/23.jpg)
Design a 30th-order low pass filter with a normalized cutoff frequency of 0.6 PI rad/sample.
![Page 24: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/24.jpg)
![Page 25: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/25.jpg)
• Load the MAT-file chirp. The file contains a signal, y, sampled at a frequency . y has most of its power above , or half the Nyquist frequency. Add random noise to the signal.
load chirp y = y + 0.25*(rand(size(y))-0.5);
![Page 26: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/26.jpg)
• Design a 34th-order FIR high pass filter. Specify a cutoff frequency of 0.48. Visualize the frequency response of the filter.
![Page 27: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/27.jpg)
![Page 28: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/28.jpg)
• It can be possible to implement this Hamming window function for FIR filters to implement low ,high,passband and stopband filters on hardware (DSP Processor) for noise reduction in any type of electonic circuits.
![Page 29: design of sampling filter](https://reader036.fdocuments.in/reader036/viewer/2022070509/589e9c381a28ab9f728b677d/html5/thumbnails/29.jpg)