有限长序列频谱DFT的性质.docx
- 文档编号:24443821
- 上传时间:2023-05-27
- 格式:DOCX
- 页数:20
- 大小:42.39KB
有限长序列频谱DFT的性质.docx
《有限长序列频谱DFT的性质.docx》由会员分享,可在线阅读,更多相关《有限长序列频谱DFT的性质.docx(20页珍藏版)》请在冰豆网上搜索。
有限长序列频谱DFT的性质
课程名称:
实验报告
数字信号处理
指导老师:
成绩:
实验名称:
有限长序列、频谱、DFT的性质实验类型:
演示
同组学生姓名:
一、实验目的和要求
设计通过演示实验,建立对典型信号及其频谱的直观认识,理解
DFT的物理意义、主要性质。
二、实验内容和步骤
2-1用MATLAB计算得到五种共9个序列:
2-1-1
实指数序列
x(n)
0nlength
otherwise
例如,a=,length=1O
a=,length=1O
a=,length=20
2-2
2-1-2
2-1-3
2-1-4
复指数序列
x(n)
(a
0
jb)n
0nlength
otherwise
1
例如,a=,b=,length=1O
x(t)=sin(2
ft+delta)抽样得到的正弦序列x(n)=sin(2fnT+delta)。
如,
从正弦信号
信号频率f=1Hz,初始相位delta=0,抽样间隔丁=秒,序列长length=10。
从余弦信号x(t)=cos(2ft+delta)抽样得到的余弦序列x(n)=cos(2fnT+delta)。
如,信号频率f=1Hz,初相位delta=0,抽样间隔丁=秒,序列长length=10。
含两个频率分量的复合函数序列x(n)=sin(2f1nT>+deltaxsin(2f2nT+phi)。
如,
频率f1
(Hz)
频率f2
(Hz)
相对振幅
delta
初相位phi
(度)
抽样间隔T(秒)
序列长
length
1
3
0
10
1
3
90
10
1
3
180
10
2-1-5
用MATLAB对上述各个序列,重复下列过程。
2-2-1
画出一个序列的实部、虚部、模、相角;观察并记录实部、虚部、模、相角的特征。
2-2-2
计算该序列的幅度谱、频谱实部、频谱虚部;观察和并记录它们的特征,给予解释。
2-2-3
观察同种序列取不同参数时的频谱,发现它们的差异,给予解释。
三、主要仪器设备
MATLAB编程。
四、操作方法和实验步骤
(参见“二、实验内容和步骤”)
五、实验数据记录和处理
实指数序列x(n)
0nlength1otherwise
1)a=,length=10
%program清除缓存
n=0:
9;%设置区间
xn=(.An).*(0<=n&*=9);
xw=dftmtx(10)*xn';%
DFT求频谱
f=n/10.*(0<=n&n<=5)+(10-n)/10.*(6<=n&n<=9);%
求出对应频率
figure
(1);%画出序列的实部、虚部、模、相角
subplot(2,2,1);stem(n,real(xn));
xlabel('n');ylabel('real(xn)');title('
序列的实部');
subplot(2,2,2);stem(n,imag(xn));
xlabel('n');ylabel('imag(xn)');title('
序列的虚部');
subplot(2,2,3);stem(n,abs(xn));
xlabel('n');ylabel('abs(xn)');title('
序列的模');
subplot(2,2,4);stem(n,angle(xn));
xlabel('n');ylabel('angle(xn)');title('
序列的相角');
figure
(2);%画出序列的幅度谱、频谱实部、频谱虚部
subplot(3,1,1);stem(f,abs(xw));
xlabel('f/Hz');ylabel('abs(xw)');title('
序列的幅度谱');
subplot(3,1,2);stem(f,real(xw));
xlabel('f/Hz');ylabel('real(xw)');title('
频谱实部');
subplot(3,1,3);stem(f,imag(xw));
xlabel('f/Hz');ylabel('imag(xw)');title('
频谱的虚部');
(2)a=,length=10
%program清除缓存
clear
n=0:
9;
xn=(.An).*(0<=n&*=9);
xw=dftmtx(10)*xn:
%用DFT求频谱
f=n/10.*(0<=n&n<=5)+(10-n)/10.*(6<=n&n<=9);%
求出对应频率
figure
(1);%画出序列的实部、虚部、模、相角
subplot(2,2,1);stem(n,real(xn));
xlabel('n');ylabel('real(xn)');title('
序列的实部');
subplot(2,2,2);stem(n,imag(xn));
xlabel('n');ylabel('imag(xn)');title('
序列的虚部');
subplot(2,2,3);stem(n,abs(xn));
xlabel('n');ylabel('abs(xn)');title('
序列的模');
subplot(2,2,4);stem(n,angle(xn));
xlabel('n');ylabel('angle(xn)');title('
序列的相角');
figure
(2);%画出序列的幅度谱、频谱实部、频谱虚部
subplot(3,1,1);stem(f,abs(xw));
xlabel('f/Hz');ylabel('abs(xw)');title('
序列的幅度谱');
subplot(3,1,2);stem(f,real(xw));
xlabel('f/Hz');ylabel('real(xw)');title('
频谱实部');
subplot(3,1,3);stem(f,imag(xw));
xlabel('f/Hz');ylabel('imag(xw)');title('
频谱的虚部');
(3)a=,length=20
%program清除缓存
n=0:
19;
xn=(.An).*(0<=n&*=19);
xw=dftmtx(20)*xn:
%用DFT求频谱
f=n/10.*(0<=n&n<=10)+(20-n)/10.*(11<=n&n<=19);%
求出对应频率
figure
(1);%画出序列的实部、虚部、模、相角
subplot(2,2,1);stem(n,real(xn));
xlabel('n');ylabel('real(xn)');title('
序列的实部');
subplot(2,2,2);stem(n,imag(xn));
xlabel('n');ylabel('imag(xn)');title('
序列的虚部');
subplot(2,2,3);stem(n,abs(xn));
xlabel('n');ylabel('abs(xn)');title('
序列的模');
subplot(2,2,4);stem(n,angle(xn));
xlabel('n');ylabel('angle(xn)');title('
序列的相角');
figure
(2);%画出序列的幅度谱、频谱实部、频谱虚部
subplot(3,1,1);stem(f,abs(xw));
xlabel('f/Hz');ylabel('abs(xw)');title('
序列的幅度谱');
频谱实部');
频谱的虚部');
subplot(3,1,2);stem(f,real(xw));
xlabel('f/Hz');ylabel('real(xw)');title('
subplot(3,1,3);stem(f,imag(xw));
xlabel('f/Hz');ylabel('imag(xw)');title('
二)复指数序列x(n)
(ajb)n
0
0otherwise
nlength1
%program清除缓存n=0:
9;
xn=(+j*.An).*(0<=n&n<=9);
xw=dftmtx(10)*xn';%
用DFT求频谱
f=n/10.*(0<=n&n<=5)+(20-n)/10.*(6<=n&n<=9);%
求出对应频率
figure
(1);%画出序列的实部、虚部、模、相角
subplot(2,2,1);stem(n,real(xn));
xlabel('n');ylabel('real(xn)');title('
序列的实部');
subplot(2,2,2);stem(n,imag(xn));
xlabel('n');ylabel('imag(xn)');title('
序列的虚部');
subplot(2,2,3);stem(n,abs(xn));
xlabel('n');ylabel('abs(xn)');title('
序列的模');
subplot(2,2,4);stem(n,angle(xn));
xlabel('n');ylabel('angle(xn)');title('
序列的相角');
figure
(2);%画出序列的幅度谱、频谱实部、频谱虚部
subplot(3,1,1);stem(f,abs(xw));
xlabel('f/Hz');ylabel('abs(xw)');title('
序列的幅度谱');
subplot(3,1,2);stem(f,real(xw));
xlabel('f/Hz');ylabel('real(xw)');title('
频谱实部');
subplot(3,1,3);stem(f,imag(xw));
xlabel('f/Hz');ylabel('imag(xw)');title('
频谱的虚部');
(二)从正弦信号x(t)=sin(2ft+delta)抽样得到的正弦序列x(n)=sin(2fnT+delta)
%program清楚缓存
t=0:
:
9;%设置区间以及步长
n=0:
9;%设置区间
xt=sin(2*pi*t).*(0<=t&t<=9);
xn=sin(2*pi**n).*(0<=n&n<=9);
figure
(1);
subplot(2,1,1);
xlabel('t');
ylabel('x(t)');
title('原序列');
subplot(2,1,2);
stem(n,xn);
xlabel('n');
ylabel('xn)');
title('抽样后序列’);
xw=dftmtx(10)*xn';%用DFT求频谱
f=n/1O.*(O<=n&n<=5)+(20-n)/10.*(6<=n&n<=9);%
求出对应频率
figure
(2);%画出序列的实部、虚部、模、相角
subplot(2,2,1);stem(n,real(xn));
xlabel('n');ylabel('real(xn)');title('
序列的实部');
subplot(2,2,2);stem(n,imag(xn));
xlabel('n');ylabel('imag(xn)');title('
序列的虚部');
subplot(2,2,3);stem(n,abs(xn));
xlabel('n');ylabel('abs(xn)');title('
序列的模');
subplot(2,2,4);stem(n,angle(xn));
xlabel('n');ylabel('angle(xn)');title('
序列的相角');
figure(3);%画出序列的幅度谱、
频谱实部、频谱虚部
subplot(3,1,1);stem(f,abs(xw));
xlabel('f/Hz');ylabel('abs(xw)');title('
序列的幅度谱');
subplot(3,1,2);stem(f,real(xw));
xlabel('f/Hz');ylabel('real(xw)');title('
频谱实部');
subplot(3,1,3);stem(f,imag(xw));
xlabel('f/Hz');ylabel('imag(xw)');title('
频谱的虚部');
(四)从余弦信号x(t)=cos(2ft
+delta)抽样得到的余弦序列x(n)=cos(2fnT+delta)
%program清楚缓存
t=0:
:
9;%设置区间以及步长
n=0:
9;%设置区间
xt=cos(2*pi*t).*(0<=t&t<=9);
xn=cos(2*pi**n).*(0<=n&*=9);
figured);
subplot(2,1,1);
xlabel('t');
ylabel('x(t)');
title('原序列');
subplot(2,1,2);
stem(n,xn);
xlabel('n');
ylabel('xn)');
title('抽样后序列’);
xw=dftmtx(10)*xn';%用DFT求频谱
f=n/1O.*(O<=n&n<=5)+(20-n)/10.*(6<=n&n<=9);%
求出对应频率
figure
(2);%画出序列的实部、虚部、模、相角
subplot(2,2,1);stem(n,real(xn));
xlabel('n');ylabel('real(xn)');title('
序列的实部');
subplot(2,2,2);stem(n,imag(xn));
xlabel('n');ylabel('imag(xn)');title('
序列的虚部');
subplot(2,2,3);stem(n,abs(xn));
xlabel('n');ylabel('abs(xn)');title('
序列的模');
subplot(2,2,4);stem(n,angle(xn));
xlabel('n');ylabel('angle(xn)');title('
序列的相角');
figure(3);%画出序列的幅度谱、
频谱实部、频谱虚部
subplot(3,1,1);stem(n,abs(F));
xlabel('k');ylabel('abs(F)');title('DFT
幅度谱');
subplot(3,1,2);stem(n,real(F));
xlabel('k');ylabel('real(F)');title('
DFT实部');
subplot(3,1,3);stem(n,imag(F));
xlabel('k');ylabel('imag(F)');title('
DFT的虚部');
xlabel('f/Hz');ylabel('imag(xw)');title('
频谱的虚部');
(五)含两个频率分量的复合函数序列
x(n)=sin(2fmT)+deltaxsin(2f2nT+phi)
(1)delta=0
%program清楚缓存
n=0:
9;%设置区间
xn=sin(2*pi**n).*(0<=n&n<=9)+*sin(2*pi*3**n).*(0<=n&n<=9);
xw=dftmtx(10)*xn:
%用DFT求频谱
f=n/10.*(0<=n&n<=5)+(20-n)/10.*(6<=n&n<=9);%
求出对应频率
figure
(1);%画出序列的实部、虚部、模、相角
subplot(2,2,1);stem(n,real(xn));
xlabel('n');ylabel('real(xn)');title('
序列的实部');
subplot(2,2,2);stem(n,imag(xn));
xlabel('n');ylabel('imag(xn)');title('
序列的虚部');
subplot(2,2,3);stem(n,abs(xn));
xlabel('n');ylabel('abs(xn)');title('
序列的模');
subplot(2,2,4);stem(n,angle(xn));
xlabel('n');ylabel('angle(xn)');title('
序列的相角');
figure
(2);%画出序列的幅度谱、频谱实部、频谱虚部
subplot(3,1,1);stem(f,abs(xw));
xlabel('f/Hz');ylabel('abs(xw)');title('
序列的幅度谱');
subplot(3,1,2);stem(f,real(xw));
xlabel('f/Hz');ylabel('real(xw)');title('
频谱实部');
subplot(3,1,3);stem(f,imag(xw));
xlabel('f/Hz');ylabel('imag(xw)');title('
频谱的虚部');
(2)delta=90
%program清楚缓存
n=0:
9;%设置区间
xn=sin(2*pi**n).*(0<=n&n<=9)+*sin(2*pi*3**n+*pi).*(0<=n&n<=9);
xw=dftmtx(10)*xn:
%用DFT求频谱
f=n/10.*(0<=n&n<=5)+(20-n)/10.*(6<=n&n<=9);%
求出对应频率
figure
(1);%画出序列的实部、虚部、模、相角
subplot(2,2,1);stem(n,real(xn));
xlabel('n');ylabel('real(xn)');title('
序列的实部');
subplot(2,2,2);stem(n,imag(xn));
xlabel('n');ylabel('imag(xn)');title('
序列的虚部');
subplot(2,2,3);stem(n,abs(xn));
xlabel('n');ylabel('abs(xn)');title('
序列的模');
subplot(2,2,4);stem(n,angle(xn));
xlabel('n');ylabel('angle(xn)');title('
序列的相角');
figure
(2);%画出序列的幅度谱、频谱实部、频谱虚部
subplot(3,1,1);stem(f,abs(xw));
xlabel('f/Hz');ylabel('abs(xw)');title('
序列的幅度谱');
subplot(3,1,2);stem(f,real(xw));
xlabel('f/Hz');ylabel('real(xw)');title('
频谱实部');
subplot(3,1,3);stem(f,imag(xw));
xlabel('f/Hz');ylabel('imag(xw)');title('
频谱的虚部');
⑶delta=180
%program清楚缓存
n=0:
9;%设置区间
xn=sin(2*pi**n).*(0<=n&n<=9)+*sin(2*pi*3**n+pi).*(0<=n&n<=9);
xw=dftmtx(10)*xn';%用DFT求频谱
f=n/10.*(0<=n&n<=5)+(20-n)/10.*(6<=n&n<=9);%
求出对应频率
figured);%画出序列的实部、虚部、模、相角
subplot(2,2,1);stem(n,real(xn));
xlabel('n');ylabel('real(xn)');title('
序列的实部');
subplot(2,2,2);stem(n,imag(xn));
xlabel('n');ylabel('imag(xn)');title('
序列的虚部');
subplot(2,2,3);stem(n,abs(xn));
xlabel('n');ylabel('abs(xn)');title('
序列的模');
subplot(2,2,4);stem(n,angle(xn));
xlabel('n');ylabel('angle(xn)');title('
序列的相角');
figure
(2);%画出序列的幅度谱、频谱实部、频谱虚部
subplot(3,1,1);stem(f,abs(xw));
xlabel('f/Hz');ylabel('abs(xw)');title('
序列的幅度谱');
subplot(3,1,2);stem(f,real(xw));
xlabel('f/Hz');ylabel('real(xw)');title('
频谱实部');
subplot(3,1,3);stem(f,imag(xw));
xlabel('f/Hz');ylabel('imag(xw)');title('
频谱的虚部');
六、实验结果与分析
观察实验结果(数据及图形)的特征,做必要的记录,做出解释。
包括:
6-1各种序列的图形(时域)和频谱(频域)各有何特征,给予解释。
6-2DFT物理意义。
X(0)、X
(1)和X(N1)的物理意义。
6-3DFT的主要性质。
(一)、实验结果:
2-1-1a:
a=,length=10
2-1-1b:
a=length=10
2-1-1C:
a=,length=20
观察以上三个序列,发现它们都为正的实序列,所以序列的虚部和相角都为零。
观察它们的发现实部是共轭偶对称,虚部是共轭奇对称。
验证了近1时,频谱越集中在直流分量处。
这是因为当抽样的点数越大的时候,有效的抑制了栅栏效应。
虚部都不为零而且既不是奇函数也不是偶函数。
fnT+delta)
此序列为一复指数序列,序列的幅度、相角、实部、
2-1-3从正弦信号x(t)=sin(2ft+delta)抽样得到的正弦序列x(n)=sin(2
该序列是正弦函数的采样序列,是一个共轭奇对称的实序列,序列的虚部为零,相角在序列取负
的地方为n。
观察序列的DFT结果发现其虚部为共轭奇对称。
验证了DFT的对称性质。
频谱实部接近
0,但不为0,而理论上由于该序列共轭奇对称,实部应该为0。
我想这是因为MATLAB^计算正弦函数
1Hz处,
各点的值时,近似取了小数点后的有限位,造成了误差。
观察序列的频谱发现频谱在频率为
与此
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 有限 序列 频谱 DFT 性质