In analog filter design, I have a problem using IFFT with cheb2ap function.

조회 수: 1 (최근 30일)
WAN CHO
WAN CHO 2016년 7월 19일
답변: Star Strider 2016년 7월 19일
I'd like to design chebyshev type2(as known as inverse chebyshev filter) by using 'cheb2ap'.
t = -100:0.001:100;
dt = t(2)-t(1);
f = linspace(-1./(2.*dt),1./(2.*dt),length(t));
N=input('Enter the value of the N: ');
[z,p,k] = cheb2ap(N,50);
[num,den] = zp2tf(z,p,k);
f_cutoff = 0.06;
w_c = 2*pi*f_cutoff;
[num,den] = lp2lp(num,den,w_c);
w = 2.*pi.*f;
H = freqs(num,den,w);
irf_chebyshev2 = abs(ifft(ifftshift(H)));
irf = irf_chebyshev2./max(irf_chebyshev2);
figure(1);
plot(t,irf);
grid;
I choose odd number N, irf is reasonalbe form. but N is even, irf is unreasonable form.
this is N=5
and this is N=6
same problem happen to 'ellipap' function. how can i do to fix this problem?

답변 (1개)

Star Strider
Star Strider 2016년 7월 19일
You may be able to get a better result from the freqs function by increasing the number of frequency points it calculates. (The default is 200.)
From the documentation:
[h,w] = freqs(b,a,n) uses n frequency points to compute the frequency response, h, where n is a real, scalar value. The frequency vector w is auto-generated and has length n.
I would start with:
n = 2^12;

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by