noise reduction in fir filter

i want to design a bandpass fir filter with Bartlett or hamming window,and want to reduce the pass and stop band ripple.is there any math function to describe it. plz suggest.

답변 (3개)

Wayne King
Wayne King 2012년 1월 6일

0 개 추천

Hi Debalina, If you want to use the window method for a bandpass filter, you can do the following (of course you need to modify the specifications to match your needs)
% I'll assume a 10-kHz sampling frequency and pass 1000-1500 Hz
d = fdesign.bandpass('N,Fc1,Fc2',10,1000,1500,10000);
% Use a Hamming window
Hd = window(d,'window',@hamming);
fvtool(Hd);
However, if you really want to control the passband and stopband ripple, then I think a different FIR design is warranted, like a constrained equiripple design. See firceqrip() for example.
debalina ghosh
debalina ghosh 2012년 1월 7일

0 개 추천

sir, i have tried following your specification firceqrip(). below is my code :
clear all
Fs = 100000;
Fn = Fs/2;
N = 200;
B = 16;
fc1 = 4911/Fn; %lower cutoff
fc2 = 5645/Fn;
Fc = [ fc1 fc2];
w = bartlett(N+1);
w = w/max(w);
w = round(w.*((2^(B-1))-1));
b = firceqrip(N,Fc,'bandpass',w);
Hd = dfilt.dffir(b);
Hd.arithmetic = 'fixed'; % Requires the Fixed-Point Toolbox
coewrite(Hd,16,'nrduce_bfcoefile');
Error in ==> firceqrip at 394
rs = [fo*(0:n1-1)/n1, fo, fo+(1-fo)*(1:n2)/n2]';
Error in ==> nooiserbar at 12
b = firceqrip(N,Fc,'bandpass',w);
please help

댓글 수: 1

Walter Roberson
Walter Roberson 2012년 1월 7일
You seem to have trimmed out the basic message about what error it thinks is occurring ?

댓글을 달려면 로그인하십시오.

debalina ghosh
debalina ghosh 2012년 1월 9일

0 개 추천

sir,
my error is Error in ==> firceqrip at 394 rs = [fo*(0:n1-1)/n1, fo, fo+(1-fo)*(1:n2)/n2]'; Error in ==> nooiserbar at 12 b = firceqrip(N,Fc,'bandpass',w); sir, i could not understood how would i rectify it.please help

댓글 수: 1

Walter Roberson
Walter Roberson 2012년 1월 9일
MATLAB never simply says that there is an error: it says what kind of error there is. For example, it might be displaying an error "vertcat error"

댓글을 달려면 로그인하십시오.

카테고리

제품

태그

아직 태그를 입력하지 않았습니다.

질문:

2012년 1월 6일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by