《用CZT求解系统函数的零极点:算法说明及MATLAB程序演示》由会员分享,可在线阅读,更多相关《用CZT求解系统函数的零极点:算法说明及MATLAB程序演示(6页珍藏版)》请在金锄头文库上搜索。
1、求解变换的零、极点z)(zX设是实序列,其变换一般是或的实系数有理分式。当的分子多项式和)(nxz)(zXz1z)(zX分母多项式的阶数很高时,分解因式求的零、极点就十分困难。在语音信号处理过程中,往)(zX往需要知道其变换极点所在的频率,利用 CZT 就能准确地测出来。z具体的做法是:利用不同半径的同心圆,进行等间隔的采样,即令,改变,计算0010WN2 00A| )(|lg20kzX,由的峰点决定的零、极点: 1,.,2 , 1 , 0,2| )(|lg20 NkkNjreX)dB( | )(|lg20jreX)(zX16. 056569. 064. 013137. 1)(22 zzzzz
2、X)4 . 0)(4 . 0()8 . 0)(8 . 0(43 4344jjjjezezezez(3-31))( .44. 169706. 1121由长除得zz由此可见,有两个零点,;有两个极点,)(zX418 . 0jez 428 . 0jez43j 34 . 0 ez 。由上式还可以看出,通过长除,把展成的 67 次多项式的形式,根据4344 . 0jez)(zX1z,就可以得到的前 68 个数值,例如, 0)()( nnznxzX)(nx1)0(x69706. 1) 1 (x这样,对长度的有限长序列,在平面的半径为、,.44. 1)2(x68N)(nxz2 . 04 . 06 . 0和等
3、 5 个同心圆上,分别等间隔地采样个点,利用 CZT 计算8 . 00 . 160M,如图 3.29 所示。由图可见,在半径为 0.4、相角为处, 1,.,2 , 1 , 0,2| )(|lg20NkkNjreX0135出现峰值,| )(|lg20jreX对应于的极点,而在半径为 0.8、相角为处,出现谷点,)(zX3z045| )(|lg20jreX对应于的极点。这与式(3-31)的结果是一致的。可见 CZT 确能求解的零、极点。)(zX1z)(zX% G079.M% 用 Chirp - z 变换求解系统函数的零极点%h_fig1 = figure;set(h_fig1, unit, nor
4、malized, position, 0.0, 0.0, 0.99, 0.94);set(h_fig1, defaultuicontrolunits, normalized);h_text1 = uicontrol(gcf, Style, text, Position, 0.05, 0.90, 0.92, 0.07,.String, 用 Chirp - z 变换求解系统函数的零极点 , FontName, 黑体, ForegroundColor, r, .FontSize, 26, FontWeight, Bold, BackgroundColor, 1, 1, 1); set(gcf, co
5、lor, w)h_pushbutton1 = uicontrol(h_fig1, Style, PushButton, Position, 0.9, 0.9, 0.06, 0.06,.string, 退出, BackgroundColor, 0.8 0.9 0.8, ForegroundColor, r, FontSize, 14, FontWeight, Bold,.callback, delete(h_fig1) h_text2 = uicontrol(h_fig1, Style, text, Position, 0.31, 0.87, 0.35, 0.04,FontSize, 14, F
6、ontWeight, Bold,. BackgroundColor, 1 1 1, ForegroundColor, k,. string, (系统函数模值 | H | = | B | / | A | ))h_axes00 = axes(Box, on, Position, 0.08, 0.215, 0.25, 0.55, FontSize, 8) % 在第 2 个图形窗中创建轴对象h_axes01 = axes(Box, on, Position, 0.4, 0.14, 0.53, 0.68, FontSize, 8) % 在第 2 个图形窗中创建轴对象% -b = 1,-1.13137,
7、0.64; a = 1, 0.56569, 0.16; % 分子分母系数向量z,p = tf2zp(b, a)hz = subplot(h_axes00)a = 1:129;theta = 2*pi/128;plot(sin(a*theta), cos(a*theta), LineWidth, 2); hold on;plot(real(p(1), imag(p(1), marker, *)plot(real(p(2), imag(p(2), marker, *)plot(real(z(1), imag(z(1), marker, o)plot(real(z(2), imag(z(2), ma
8、rker, o)a1 = angle(z(1)a2 = angle(p(1)abp = abs(p(1)abz = abs(z(1)axis(-1.1, 1.1, -1.35, 1.35);line(-1.1,1.1,0,0); line(0,0,-1.4,1.4);line(0,real(p(1),0,imag(p(1); line(0,real(z(1),0,imag(z(1); text(0.33, 0.3, R2 = 0.8, FontWeight, Bold); text(-0.5, 0.15, R1 = 0.4, FontWeight, Bold); xlabel(实部, Font
9、Weight, Bold, FontSize, 12); ylabel(虚部, FontWeight, Bold, FontSize, 12); title(z 平面, FontWeight, Bold, FontSize, 12);set(hz, LineWidth, 2);set(h_axes00, LineWidth, 2, FontWeight, Bold, FontSize, 10)format longb = 1,-1.13137, 0.64, zeros(1,32); % 分子多项式系数行向量a = 1,0.56569, 0.16; % 分母多项式系数行向量% -N = 512;
10、for r = 0.1 : 0.01 : 1.2w = exp(j*2*pi/N);A = czt(a, N, w, r);A = 1 ./ A;Amag = 20 * log10(abs(A);subplot(h_axes01)plot(2*(0:1/N:1-1/N), Amag, Color, r); hold on;axis(0, 2, -60, 100);B = czt(b, N, w, r);Bmag = 20 * log10(abs(B);plot(2*(0:1/N:1-1/N), Bmag, LineWidth, 2); grid; xlabel(w / pi, FontWeight, Bold, FontSize, 12); ylabel(dB, FontWeight, Bold, FontSize, 12); st = strcat( r = , num2str(r);title(st, FontWeight, Bold, FontSize, 12);legend(| 1/A |, | B |);set(h_axes01, LineWidth, 2, FontWeight, Bold, FontSize, 10)hold off;pause(0.2)end% -