- 243
- 0
- 约6.4千字
- 约 22页
- 2017-05-21 发布于浙江
- 举报
数字信号处理实验一信号、系统及系统响应
- PAGE 22 -
实验一 信号、系统及系统响应
一.实验内容1.认真复习采样理论、离散信号与系统、线性卷积、序列的z 变换及性质等有关内容;
2.掌握离散时间序列的产生与基本运算,理解离散时间系统的时域特性与差分方程的求解方法,掌握离散信号的绘图方法;
3.熟悉序列的z 变换及性质,理解理想采样前后信号频谱的变化。
二.实验内容
a. 产生长度为500 的在[0,1]之间均匀分布的随机序列,产生长度为500 的均值为0 单位方差的高斯分布序列。
实验代码:
N=500;
x1=rand(1,N);
figure(1);
plot(x1);
title([0,1]均匀分布);
x2=randn(1,N);
figure(2);
plot(x2);
title(均值为0,方差为1的高斯分布);
生成图像如下:
b.线性时不变系统单位脉冲响应为h(n)=(0.9)nu(n),当系统输入为x(n)=R10(n)时,求系统的零状态响应,并绘制波形图。
实验代码:
n=[1:1:1000];
y=0.9.^n.* heaviside(n=0);
x=ones(1,10);
z=conv(x,y);
stem(z)
axis([0 20 0 10]);
生成图像如下:
c.描述系统的差分方程为:y(n)-y(n-1)+0.9y(n-2)=x(n),其中x(n)为激励,y(n)为响应。计算并绘制 n=20,30,40,50,60,70,80,90,100 时的系统单位脉冲响应h(n);计算并绘制 n=20,30,40,50,60,70,80,90,100 时的系统单位阶跃响应s(n);由 h(n)表征的这个系统是稳定系统吗?
实验代码:
A=[1,-1,0.9];
B=[1];
%生成n=20,30,40时对应的h(n)及s(n)
figure(1);
hn=impz(B,A,20);
subplot(2,3,1);
plot(hn);
title(n=20时对应的h(n));
hn=impz(B,A,30);
subplot(2,3,2);
plot(hn);
title(n=30时对应的h(n));
hn=impz(B,A,40);
subplot(2,3,3);
plot(hn);
title(n=40时对应的h(n));
sn1=ones(1,20);
sn=filter(B,A,sn1);
subplot(2,3,4);
stem(sn);
title(n=20时对应的s(n));
sn2=ones(1,30);
sn=filter(B,A,sn2);
subplot(2,3,5);
stem(sn);
title(n=30时对应的s(n));
sn3=ones(1,40);
sn=filter(B,A,sn3);
subplot(2,3,6);
stem(sn);
title(n=40时对应的s(n));
%生成n=50,60,70时对应的h(n)及s(n)
figure(2);
hn=impz(B,A,50);
subplot(2,3,1);
plot(hn);
title(n=50时对应的h(n));
hn=impz(B,A,60);
subplot(2,3,2);
plot(hn);
title(n=60时对应的h(n));
hn=impz(B,A,70);
subplot(2,3,3);
plot(hn);
title(n=70时对应的h(n));
sn4=ones(1,50);
sn=filter(B,A,sn4);
subplot(2,3,4);
stem(sn);
title(n=50时对应的s(n));
sn5=ones(1,60);
sn=filter(B,A,sn5);
subplot(2,3,5);
stem(sn);
title(n=60时对应的s(n));
sn6=ones(1,70);
sn=filter(B,A,sn6);
subplot(2,3,6);
stem(sn);
title(n=70时对应的s(n));
%生成n=80,90,100时对应的h(n)及s(n)
figure(3);
hn=impz(B,A,80);
subplot(2,3,1);
plot(hn);
title(n=80时对应的h(n));
hn=impz(B,A,90);
subplot(2,3,2);
plot(hn);
title(n=90时对应的h(n));
hn=impz(B,A,100);
subplot(2,3,3);
plot(hn);
title(n=100时对应的h(n));
sn7=ones(1,80);
sn=filter(B,A,sn7);
subplot(2,3,4);
ste
原创力文档

文档评论(0)