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