数字信号处理实验二.docx

上传人:b****3 文档编号:3790386 上传时间:2022-11-25 格式:DOCX 页数:16 大小:104.62KB
下载 相关 举报
数字信号处理实验二.docx_第1页
第1页 / 共16页
数字信号处理实验二.docx_第2页
第2页 / 共16页
数字信号处理实验二.docx_第3页
第3页 / 共16页
数字信号处理实验二.docx_第4页
第4页 / 共16页
数字信号处理实验二.docx_第5页
第5页 / 共16页
点击查看更多>>
下载资源
资源描述

数字信号处理实验二.docx

《数字信号处理实验二.docx》由会员分享,可在线阅读,更多相关《数字信号处理实验二.docx(16页珍藏版)》请在冰豆网上搜索。

数字信号处理实验二.docx

数字信号处理实验二

实验二

Q2-1

n=0:

100;

s1=cos(2*pi*0.05*n);

s2=cos(2*pi*0.47*n);

x=s1+s2;

M=input('滤波器所需长度=');

num=ones(1,M);

y=filter(num,1,x)/M;

clf;

subplot(2,2,1);

plot(n,s1);

axis([0,100,-2,2]);

xlabel('时间序号n');ylabel('振幅');

title('信号#1');

subplot(2,2,2);

plot(n,s2);

axis([0,100,-2,2]);

xlabel('时间序号n');ylabel('振幅');

title('信号#2');

subplot(2,2,3);

plot(n,x);

axis([0,100,-2,2]);

xlabel('时间序号n');ylabel('振幅');

title('输入信号');

subplot(2,2,4);

plot(n,y);

axis([0,100,-2,2]);

xlabel('时间序号n');ylabel('振幅');

title('输入信号');

axis;

输入的频率分量被离散时间系统抑制

Q2-2

线性时不变系统发生改变后,输入x的频率会发生改变。

Q2-5

clf;

n=0:

200;

x=cos(2*pi*0.05*n);

x1=[x00];

x2=[0x0];

x3=[00x];

y=x2.*x2-x1.*x3;

y=y(2:

202);

subplot(2,1,1)

plot(n,x)

xlabel('时间序号n');ylabel('振幅');

title('输入信号')

subplot(2,1,2)

plot(n,y)

xlabel('时间序号nn');ylabel('振幅');

title('输出信号');

当输入信号为cos(2*pi*0.1*n)时;

当输入信号为cos(2*pi*0.01*n)时;

当输入信号频率大于一定值时,输出信号的最低幅值为零。

Q2-7

clf;

n=0:

40;

a=2;b=-3;

x1=cos(2*pi*0.1*n);

x2=cos(2*pi*0.4*n);

x=a*x1+b*x2;

num=[2.24032.49082.2403];

den=[1-0.40.75];

ic=[00];

y1=filter(num,den,x1,ic);

y2=filter(num,den,x2,ic);

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

yt=a*y1+b*y2;

d=y-yt;

subplot(3,1,1)

stem(n,y);

ylabel('振幅');

title('加权输入:

a\cdotx_{1}[n]+b\cdotx_{2}[n]');

subplot(3,1,2)

stem(n,yt);

ylabel('振幅');

title('加权输出:

a\cdoty_{1}[n]+b\cdoty_{2}[n]');

subplot(3,1,3)

stem(n,d);

xlabel('时间序号n');ylabel('振幅');

title('差信号');

两个序列并不相等,该系统不是线性系统。

Q2-9

初始条件设为ic=[310];

系统在一定n之后趋于线性系统。

Q2-12

clf;

n=0:

40;D=10;a=3.0;b=-2;

x=a*cos(2*pi*0.1*n)+b*cos(2*pi*0.4*n);

xd=[zeros(1,D)x];

num=[2.24032.49082.2403];

den=[1-0.40.75];

ic=[00];

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

yd=filter(num,den,xd,ic);

d=y-yd(1+D:

41+D);

subplot(3,1,1)

stem(n,y);

ylabel('振幅');

title('输出y[n]');grid;

subplot(3,1,2)

stem(n,yd(1:

41));

ylabel('振幅');

title(['由于延时输入x[n',num2str(D),']']);grid;

subplot(3,1,3)

stem(n,d);

xlabel('时间序号n');ylabel('振幅');

title('差值信号');grid;

这两个序列是延时的关系,该系统是时不变系统。

Q2-15

初始条件设为ic=[310];

该系统不是时不变系统。

Q2-19

clf;

N=40;

num=[2.24032.49082.2403];

den=[1-0.40.75];

y=impz(num,den,N);

stem(y);

xlabel('时间序号n');ylabel('振幅');

title('冲激响应');grid;

Q2-23

clf;

x=[1zeros(1,40)];

n=0:

40;

den=[11.62.281.3250.68];

num=[0.06-0.190.27-0.260.12];

y=filter(num,den,x);

num1=[0.3-0.20.4];den1=[10.90.8];

num2=[0.2-0.50.3];den2=[10.70.85];

y1=filter(num1,den1,x);

y2=filter(num2,den2,y1);

d=y-y2;

subplot(3,1,1);

stem(n,y);

ylabel('振幅');

title('四阶实现的输出');grid;

subplot(3,1,2);

stem(n,y2)

ylabel('振幅');

title('级联实现的输出');grid;

subplot(3,1,3);

stem(n,d)

xlabel('时间序号m');ylabel('振幅');

title('差值信号');grid;

Y[n]和y2[n]是不相等的。

Q2-25

Ic1:

[2254]

Ic2:

[02]

Ic3:

[35]

Q2-28

clf;

h=[321-210-403];

x=[1-23-4321];

y=conv(h,x);

n=0:

14;

subplot(2,1,1);

stem(n,y);

xlabel('时间序号n');ylabel('振幅');

title('卷积所得输出');grid;

x1=[xzeros(1,8)];

y1=filter(h,1,x1);

subplot(2,1,2);

stem(n,y1);

xlabel('时间序号n');ylabel('振幅');

title('滤波生成输出');grid;

没有差别,对x补零可以减少,增加抽样点,满足点数对应。

Q2-32

clf;

num=[1-0.8];den=[11.50.9];

N=200;

h=impz(num,den,N+1);

parsum=0;

fork=1:

N+1;

parsum=parsum+abs(h(k));

ifabs(h(k))<10^(-6),break,end

end

n=0:

N;

stem(n,h)

xlabel('时间序号n');ylabel('振幅');

disp('值=');disp(abs(h(k)));

对应的离散时间系统差分方程是:

y[n]+1.5y[n-1]+0.9y[n-2]=x[n]-0.8x[n-1],该系统稳定

取较大N值1000

Q2-34

clf;

n=0:

299;

x1=cos(2*pi*10*n/256);

x2=cos(2*pi*100*n/256);

x=x1+x2;

num1=[0.50.270.77];

y1=filter(num1,1,x);

den2=[1-0.530.46];

num2=[0.450.50.45];

y2=filter(num2,den2,x);

subplot(2,1,1);

plot(n,y1);axis([0300-22]);

ylabel('振幅');

title('系统输出#1');grid;

subplot(2,1,2);

plot(n,y2);axis([0300-22]);

xlabel('时间序号n‘);ylabel('振幅');

title('系统输出#2');grid;

第二个滤波器更好的抑制输入信号的高频分量。

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 党团工作 > 入党转正申请

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1