华南理工大学信号与系统大作业

  • 格式:pdf
  • 大小:943.12 KB
  • 文档页数:24

下载文档原格式

  / 24
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Signal&System Works 五山禅院

ID:

W ORK

ORK11系统识别基本题Array

N=

n=

x=

y=

title(

title(

H=Y./X;%频率响应

h=ifft(H);%逆变换

subplot(3,1,1);

stem(n,h);

title('h[n]');

subplot(3,1,2);

plot(k,abs(H));

title('|H(e^j^w)|');

subplot(3,1,3)

plot(k,angle(H));

title('angle of H(e^j^w)');

解析法:

ω

j e −−2

1∴][)2

1(][n u n h n =

title('|Y(e^j^w)|');xlabel('w');

(2)比较卷积输出与理论输出

H=Y./X;

plot(w,abs(fftshift(H)));

title('|H(e^j^w)|');

h1=ifft(H);

y1=conv(h1,x);

subplot(2,1,1);

stem(n,y);

title('y');

subplot(2,1,2);

stem([0:length(y1)-1],y1);

title('y1');

y1=h1*x;

发现失真相当严重,原因是x只截取了0:64的值,此时用fft计算出来的为X1(e^jw),与实际的X(e^jw)存在误差。

N=200时,发现误差有了相当大的改善,所以推测正确!

(3)频率响应

H=Y./X;

plot(w,abs(fftshift(H)));

title('|H(e^j^w)|');

当X很小时,H=Y/X会产生尖峰,因此必须把尖峰平滑掉。After smooth:简单平滑,只是将尖峰点置零

H2=H;

for i=1:64

if(X(i)<0.01)

H2(i)=0;

end

end

plot(w,abs(fftshift(H2)));

title('|H2(e^j^w)|');

测试输出:

h2=ifft(H2);

y2=conv(h2,x);

subplot(2,1,1);

stem(n,y);

title('y');

y2=y2(1:64);%截取y2的一半

subplot(2,1,2);

stem([0:length(y2)-1],y2);

title('y2');

That’’s perfect!I love it. Oh!!That

终极smooth:

H2(1)=0.5721;

Before:简单平滑,只是将尖峰点置零

subplot(2,1,1)

plot(w,abs(fftshift(H2)));

title('|H2(e^j^w)|');

subplot(2,1,2)

plot(w,angle(fftshift(H2)));

title('angle of H2(e^j^w)');

After:终极平滑,把尖峰点置成与邻近点相同

H2=H;

for i=1:64

if(X(i)<0.01)

for j=i:64%将最近的不等0的wk赋给等于0的w0 if(X(j)>0.01)

H2(i)=H(j);

end

end

end

end

subplot(2,1,1)

plot(w,abs(fftshift(H2)));

title('|H2(e^j^w)|');

subplot(2,1,2)

plot(w,angle(fftshift(H2)));

title('angle of H2(e^j^w)');

(4)测试平滑后的输出,与理论输出对比h2=ifft(H2);

y2=conv(h2,x);

subplot(2,1,1);

stem(n,y);

title('y');

y2=y2(1:64);%截取y2的一半

subplot(2,1,2);

stem([0:length(y2)-1],y2);

title('y2');

由图可知,效果颇佳!

WORK3Hilbert Transform

(a)根据频率响应计算得出

n

n n h ππcos 1][−=所以,h[n]关于原点对称

(c)时移

(d)n =n1=n2=a =ha =ha =Ha =k =w =title(plot(w,Haangle);

α

(g)

输入:

)8

sin(n π卷积:

)(*)8

sin(n h n απ理论输出:

]

8/)20cos[(π−−n n =0:128;

n1=0:19;

n2=21:128;

a =20;

ha =(1-cos(pi*(n1-a)))./pi./(n1-a);

ha =[ha,0,(1-cos(pi*(n2-a)))./pi./(n2-a)];

x =sin(n*pi/8);

subplot(3,1,1);

stem(n,x);

title('sin(pi*n/8)')

xh =conv(x,ha);

xh =xh(1:128);%cut

subplot(3,1,2);

stem(0:length(xh)-1,xh);

title('x[n]*ha[n]')

xr =-cos((n-20)*pi/8);

subplot(3,1,3);

stem(n,xr);

title('Theoretical result:-cos((n-20)*pi/8)');