필터 지우기
필터 지우기

How to apply a FIR filter?

조회 수: 3 (최근 30일)
Neuron
Neuron 2011년 12월 30일
I have a sound signal sampled at 44100Hz and I want to keep the frequencies 100 to 800 Hz. How can I do this with a FIR filter using the default hamming window? What are the correct values for order n, ripple etc. It seems hard to find this information.. thank you in advance.

답변 (3개)

Abhishek Gupte
Abhishek Gupte 2012년 1월 11일
Try using the FDATOOL.
  댓글 수: 1
Neuron
Neuron 2012년 1월 17일
I have to write code, gui not useful.
ty

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


Sebastian Gatzka
Sebastian Gatzka 2012년 1월 17일
Try to find the correct filter with the FDATOOL. Once you have found it you can implement it into your code!

Wayne King
Wayne King 2012년 1월 17일
Are you sure you want to use the window method in this case?
At any rate, for the window method, the wider the main lobe, the smaller the side lobes and hence the smaller the ripple. Values for the more popular windows including the Hamming are published.
For the Hamming, the main lobe in radians per sample is (8*pi)/M where M is the length of the window (order of your filter-1). Accordingly, to determine your order take the width of main lobe (the passband width), set that equal to (8*pi)/M and solve for M
The first sidelobe for the Hamming window is around -53 dB, so that equals a ripple of 20*log10(delta) = -53
Let's say you want a passband (mainlobe width) of 0.3pi-0.1pi=0.2pi. You can solve for the order: 0.2pi = (8pi)/M M = 40
To design the filter (I'll just make the order 40, which gives 41 coefficients)
d = fdesign.bandpass('N,Fc1,Fc2',40,0.1,0.3);
Hd = window(d,'window',@hamming);
fvtool(Hd);
Make the necessary adjustments for specifications in Hz.
And just FYI, you can design the filter in FDATool and then generate the MATLAB with File -> Generate MATLAB Code

카테고리

Help CenterFile Exchange에서 Hamming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by