信号处理之DTFT及LSI响应

验证实信号的对称性质

在这里插入图片描述

建立序列奇偶分解evenodd函数,计算出x(n)的偶部和奇部分量,并画出原序列和分量序列列图形;求分量序列的DTFT,并划出图形、验证实信号DTFT的对称性质。
序列奇偶分解采用
xe(n)=[x(n)+x(-n)]*1/2;
xo(n)=[x(n)-x(-n)]*1/2;
实验代码如下:

t= -3:1:12;
N=16;
x=cos(t*pi/2);
xf=fliplr(x);
xe=(x+xf)*(1/2);%even
xo=(x-xf)*(1/2);%odd
figure;
subplot(3,1,1);
stem(t,x);
title("original");
subplot(3,1,2);
stem(t,xe);
title("even");
subplot(3,1,3);
stem(t,xo);
title("odd");
 
[Xe,w]=freqz(xe,1,512,'whole');
[Xo,w]=freqz(xo,1,512,'whole');
figure;
subplot(2,1,1);
stem(w,Xe);
title("even");
subplot(2,1,2);
stem(w,Xo);
title("odd");

求得原序列以及奇部偶部序列如下:
在这里插入图片描述

对奇偶序列分别傅里叶变换如下:
在这里插入图片描述

可以看到序列实部具有对称性

滤波器的幅度和相位响应

一个三阶滤波器由下面差分方程描述:

在这里插入图片描述

画出该滤波器的幅度和相位响应,并说明该滤波器的类型(低通、带通、高通)

b = [0.0181,0.0543,0.0543,0.0181];
a = [1.0000,-1.7600,1.1829,-0.2781];
[h,t]=impz(b,a);
k = [0:500];
w = (pi/500)*k;
t = t';
h = h';
H = h * ( exp(-j*pi/500) ).^(t'*k);
magH = abs(H);
angH = angle(H);
figure;
subplot(2,1,1);
plot(w/pi,magH);
title('Magnitude part');
subplot(2,1,2);
plot(w/pi,angH);
title('Angle part');

结果如图

在这里插入图片描述

可以看出这是一个低通滤波器

猜你喜欢

转载自blog.csdn.net/qq_36587495/article/details/108165590