一个关于频带转换中出现的问题!
Ts=1/600;N=6; W1=60/600; W2=120/600; Wn = ;= BUTTER(N,Wn) ;%得到N = 6; Wn =0.1137;
= FREQZ(B,A);
figure(3); plot(W,abs(H)); grid; axis();
%把模拟滤波器用脉冲相应不变法转化为数字滤波器;
Fs=1/Ts; figure(4); = IMPINVAR(B,A,Fs);
= FREQZ(BZ,AZ);
plot(WZ,abs(HZ)); grid; axis();
出现下列报错是什莫意思?请高手指教!
Warning: The output is not correct/robust.
Coeffs of B(s)/A(s) are real, but B(z)/A(z) has complex coeffs.
Probable cause is rooting of high-order repeated poles in A(s).
> In C:\MATLAB6p5\toolbox\signal\signal\impinvar.m at line 113
In C:\MATLAB6p5\work\my004.m at line 34
[ 本帖最后由 ChaChing 于 2009-12-12 14:32 编辑 ]
频带转换后的频谱图
%用plot进行画图:clear; Wp=60/600; Ws=90/600; Rp=1; Rs=15;
= BUTTORD(Wp, Ws, Rp, Rs); = BUTTER(N,Wn) ;
= iirlp2bp(B,A, 0.15, ); = FREQZ(num, den);
figure(3); semilogy(W,abs(H)); grid; axis();
%用工具箱的画图工具进行画图
fvtool(B,A, num, den);
第二种方法得到了我想要的图形,第一种为什莫差那末远呢?主要是指图像上水平的部分对应的w的区间
弄了好几天都弄不明白,请高手指点!
[ 本帖最后由 ChaChing 于 2009-12-12 14:34 编辑 ] 主要原因可能是:第一种方法返回的W的值为弧度值,如果想得到上的值,必须将其除以π,
即用下面的语句就可以得到和图2一样的图形
semilogy(W/pi,abs(H));grid; 同意楼上的
页:
[1]