第一范文网 - 专业文章范例文档资料分享平台

第二章实验离散时间系统的时域分析

来源:用户分享 时间:2025/5/17 20:12:17 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

Impulse Response21.51Amplitude0.50-0.5-1-1.50510152025Time index n303540

Q2.23 运行程序P2.6,计算输出序列y[n]和y2[n]以及差值信号d[n]。y[n]和y2[n]相等吗?

% Program P2_6 % Cascade Realization clf;

x = [1 zeros(1,40)]; % Generate the input n = 0:40;

% Coefficients of 4th order system den = [1 1.6 2.28 1.325 0.68]; num = [0.06 -0.19 0.27 -0.26 0.12]; % Compute the output of 4th order system y = filter(num,den,x);

% Coefficients of the two 2nd order systems num1 = [0.3 -0.2 0.4];den1 = [1 0.9 0.8]; num2 = [0.2 -0.5 0.3];den2 = [1 0.7 0.85]; % Output y1[n] of the first stage in the cascade y1 = filter(num1,den1,x);

% Output y2[n] of the second stage in the cascade y2 = filter(num2,den2,y1); % Difference between y[n] and y2[n] d = y - y2;

% Plot output and difference signals

subplot(3,1,1); stem(n,y);

ylabel('Amplitude');

title('Output of 4th order Realization'); grid; subplot(3,1,2); stem(n,y2)

ylabel('Amplitude');

title('Output of Cascade Realization'); grid; subplot(3,1,3); stem(n,d)

xlabel('Time index n');ylabel('Amplitude'); title('Difference Signal'); grid; 仿真结果如下所示:

Output of 4th order RealizationAmplitude10-10510152025303540Output of Cascade RealizationAmplitude10-10x 10-14510152025303540Difference SignalAmplitude0.50-0.50510152025Time index n303540

y(n)和y2(n)相等。

Q2.25 用任意的非零初始向量ic,ic1和ic2来重做习题Q2.23。 clf;

x=sin(2*pi*0.2*n); % Generate the input n = 0:40;

% Coefficients of 4th order system den = [1 1.6 2.28 1.325 0.68];

num = [0.06 -0.19 0.27 -0.26 0.12]; xi=[1 2 3 4];

% Compute the output of 4th order system

y = filter(num,den,x,xi);

% Coefficients of the two 2nd order systems num1 = [0.3 -0.2 0.4];den1 = [1 0.9 0.8]; num2 = [0.2 -0.5 0.3];den2 = [1 0.7 0.85]; xi1=[1 2];

% Output y1[n] of the first stage in the cascade y1 = filter(num1,den1,x,xi1); xi2=[3 4];

% Output y2[n] of the second stage in the cascade y2 = filter(num2,den2,y1,xi2);

% Difference between y[n] and y2[n] d = y - y2;

% Plot output and difference signals subplot(3,1,1); stem(n,y);

ylabel('Amplitude');

title('Output of 4th order Realization'); grid; subplot(3,1,2); stem(n,y2)

ylabel('Amplitude');

title('Output of Cascade Realization'); grid; subplot(3,1,3); stem(n,d)

xlabel('Time index n');ylabel('Amplitude'); title('Difference Signal'); grid;

仿真结果如下图所示:

Output of 4th order RealizationAmplitude100-100510152025303540Output of Cascade RealizationAmplitude50-50510152025303540Difference SignalAmplitude100-100510152025Time index n303540

Q2.27 用任意非零初始向量ic,ic1和ic2来重做习题Q2.26。 % Program P2.27

% Cascade Realization clf;

x = [1 zeros(1,40)]; % Generate the input n = 0:40;

% Coefficients of 4th order system den = [1 1.6 2.28 1.325 0.68];

num = [0.06 -0.19 0.27 -0.26 0.12]; ic=[4 10 2 12]

% Compute the output of 4th order system y = filter(num,den,x,ic);

% Coefficients of the two 2nd order systems num1 = [0.3 -0.2 0.4];den1 = [1 0.9 0.8]; num2 = [0.2 -0.5 0.3];den2 = [1 0.7 0.85];

% Output y1[n] of the first stage in the cascade y1 = filter(num2,den2,x,ic(1:2));

% Output y2[n] of the second stage in the cascade y2 = filter(num1,den1,y1,ic(3:4)); % Difference between y[n] and y2[n] d = y - y2;

% Plot output and difference signals subplot(3,1,1);

搜索更多关于: 第二章实验离散时间系统的时域分析 的文档
第二章实验离散时间系统的时域分析.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c3u2b82j2e0862m71dlak_5.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top