FIR by using Frequency Sampling Methods

Hi everyone,
Can anybody tell me how can I design FIR filters (low pass, high pass, bandpass and stopband) by using Frequency Sampling Method. In MATLAB, I can't found a specific function to design these filters by using frequency sampling method like other methods such as window or optimal that include a specific function in MATLAB like kaiser, boxcar or firpm.
Please help me
Thank you

답변 (2개)

Honglei Chen
Honglei Chen 2012년 6월 20일

0 개 추천

댓글 수: 3

Mohammed
Mohammed 2012년 6월 21일
(firls) is for Least square linear-phase FIR filter design not for Frequency Sampling method.
thanks
Honglei Chen
Honglei Chen 2012년 6월 21일
Then this
http://www.mathworks.com/help/toolbox/signal/ref/fir2.html
Mohammed
Mohammed 2012년 6월 21일
Honglei you are right with the fir2 function, but this function not ideally method to design filters by frequency sampling but combine the window method with frequency sampling (Hamming window is the default). That's why I asked this question by only Frequency Sampling method.
Thanks for your answer.

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

Wayne King
Wayne King 2012년 6월 21일

0 개 추천

Hi Mohammed, you can use frequency sampling with certain fdesign objects and specifications like fdesign.arbmag for example
b1 = 0:0.01:0.18;
b2 = [.2 .38 .4 .55 .562 .585 .6 .78];
b3 = [0.79:0.01:1];
a1 = .5+sin(2*pi*7.5*b1)/4; % Sinusoidal response section.
a2 = [.5 2.3 1 1 -.2 -.2 1 1]; % Piecewise linear response section.
a3 = .2+18*(1-b3).^2; % Quadratic response section.
f = [b1 b2 b3];
a = [a1 a2 a3];
n = 300;
d = fdesign.arbmag('n,f,a',n,f,a); % First specifications object.
% use frequency sampling to design the filter
hd = design(d,'freqsamp','window',{@kaiser,.5}); % Filter.
fvtool(hd)
You can use designmethods to query which design methods are supported for a given specification.
For example: Design a very simple lowpass filter using fdesign.arbmap
d = fdesign.arbmag('N,F,A',10,[0 0.25 0.5 1],[1 1 0 0]);
designmethods(d)
Hd = design(d,'freqsamp');

댓글 수: 1

Mohammed
Mohammed 2012년 6월 21일
Thanks for your answer, but as I know 'freqsamp' is for arbitrary magnitude responses not for common response....

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

카테고리

태그

질문:

2012년 6월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by