design of sampling filter

Post on 11-Feb-2017

382 Views

Category:

Science

1 Downloads

Preview:

Click to see full reader

Transcript

Frequency Sampling Filter

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.

Introduction

• Basic filter classification• We put emphasis on the digital filter now.

Filter

Analog Filter

Digital Filter

IIR Filter

FIR Filter

Digital Filter

• 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

• 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

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

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

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

The impulse response will be

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

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

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

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

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

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.

• 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.

Low pass Filter

Design a 30th-order low pass filter with a normalized cutoff frequency of 0.6 PI rad/sample.

• 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);

• Design a 34th-order FIR high pass filter. Specify a cutoff frequency of 0.48. Visualize the frequency response of the filter.

• 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.

top related