南昌大学数字信号处理实验3讲解Word格式.docx

上传人:b****2 文档编号:3269706 上传时间:2023-05-01 格式:DOCX 页数:43 大小:717.18KB
下载 相关 举报
南昌大学数字信号处理实验3讲解Word格式.docx_第1页
第1页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第2页
第2页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第3页
第3页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第4页
第4页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第5页
第5页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第6页
第6页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第7页
第7页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第8页
第8页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第9页
第9页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第10页
第10页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第11页
第11页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第12页
第12页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第13页
第13页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第14页
第14页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第15页
第15页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第16页
第16页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第17页
第17页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第18页
第18页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第19页
第19页 / 共43页
南昌大学数字信号处理实验3讲解Word格式.docx_第20页
第20页 / 共43页
亲,该文档总共43页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

南昌大学数字信号处理实验3讲解Word格式.docx

《南昌大学数字信号处理实验3讲解Word格式.docx》由会员分享,可在线阅读,更多相关《南昌大学数字信号处理实验3讲解Word格式.docx(43页珍藏版)》请在冰点文库上搜索。

南昌大学数字信号处理实验3讲解Word格式.docx

xlabel('

\omega/\pi'

);

ylabel('

Amplitude'

subplot(2,1,2)

plot(w/pi,imag(h));

ImaginarypartofH(e^{j\omega})'

pause

plot(w/pi,abs(h));

MagnitudeSpectrum|H(e^{j\omega})|'

plot(w/pi,angle(h));

PhaseSpectrumarg[H(e^{j\omega})]'

Phaseinradians'

回答:

Q3.1P3_1的原始序列-H(ejw)=(2+z-1)/(1-0.6z-1)

Pause命令作用–如果没有带参数则等待用户输入,否则按照参数来等待一定的时间

Q3.2P3_1图像显示如下:

DTFT是w的周期函数

周期-2*pi

四个图形表示的对称性:

(1)实部是以2pi为周期的偶函数

(2)虚部是以2pi为周期的奇函数

(3)幅度谱是以2pi为周期的偶函数

(4)相位谱是以2pi为周期的奇函数

Q3.3修改程序P3_1计算3.3的离散时间傅里叶变换:

%ProgramP3_1

N=512;

num=[0.7-0.50.31];

den=[10.3-0.50.7];

[h,w]=freqz(num,den,N);

TheplotsgeneratedbyrunningthemodifiedProgramP3_1areshownbelow:

DTFT是的周期函数.

周期是-2pi

产生相位谱跳变的原因是-计算机中反正切函数规定,在一二象限中的角度为0-pi,三四象限的角度为0-(-pi),若角度从零变到2pi,实际得到的结果是0-pi,再由(-pi)-0,在w=pi处发生跳变,叫做相位的卷绕

移除跳变后如下所示:

Q3.4修改P3_1的程序得到图形:

DTFT是w的周期函数

周期是2pi

相位跳变产生的原因是-角度变化了360度

Q3.5修改P3_1使得用度来衡量跳变:

%plotphaseindegrees

plot(w/pi,180*angle(h)/pi);

Phaseindegrees'

Project3.2离散时间傅里叶变换的性质

Q3.6通过给P3_2增加解释语句以及给轴做标记:

%ProgramP3_2Time-ShiftingPropertiesofDTFT

w=-pi:

2*pi/255:

pi;

wo=0.4*pi;

D=10;

num=[123456789];

h1=freqz(num,1,w);

h2=freqz([zeros(1,D)num],1,w);

subplot(2,2,1)

plot(w/pi,abs(h1));

MagnitudeSpectrumofOriginalSequence'

subplot(2,2,2)

plot(w/pi,abs(h2));

MagnitudeSpectrumofTime-ShiftedSequence'

subplot(2,2,3)

plot(w/pi,angle(h1));

PhaseSpectrumofOriginalSequence'

subplot(2,2,4)

plot(w/pi,angle(h2));

PhaseSpectrumofTime-ShiftedSequence'

控制时移的参数是-D

Q3.7产生的图像为:

通过图像观察到:

时移后幅度谱没有变化,相位谱的则更密了

Q3.8P3_2的时移为-5

图像如下:

得到的观察是:

时移后,幅度谱没有变化,相位谱更密了

Q3.9修改P3_2的程序使得–长度为4,时移为3

图像显示如下:

得到的观察:

时移后,幅度谱没有变化,相位谱则更加密了

Q3.10给P3_3增加解释语句并给轴坐标增加标签:

%ProgramP3_3

%Frequency-ShiftingPropertiesofDTFT

num1=[1357911131517];

L=length(num1);

h1=freqz(num1,1,w);

n=0:

L-1;

num2=exp(wo*i*n).*num1;

h2=freqz(num2,1,w);

MagnitudeSpectrumofFrequency-ShiftedSequence'

PhaseSpectrumofFrequency-ShiftedSequence'

控制频移的参数是–wo

Q3.11图像显示如下:

频移后幅度谱右移,序列的傅里叶变换不具有共轭对称性

Q3.12P3_3的频移是–wo=-0.5*pi

Q3.13改变序列长度和频移值–长度为4,频移为pi

Q3.14给P3_4加入解释语句和给轴加入标签后代码为:

%ProgramP3_4

%ConvolutionPropertyofDTFT

x1=[1357911131517];

x2=[1-23-21];

y=conv(x1,x2);

h1=freqz(x1,1,w);

h2=freqz(x2,1,w);

hp=h1.*h2;

h3=freqz(y,1,w);

plot(w/pi,abs(hp));

ProductofMagnitudeSpectra'

plot(w/pi,abs(h3));

MagnitudeSpectrumofConvolvedSequence'

plot(w/pi,angle(hp));

SumofPhaseSpectra'

plot(w/pi,angle(h3));

PhaseSpectrumofConvolvedSequence'

Q3.15图像如下:

可以知道两个序列逐点相乘得到的幅度谱和相位谱和原始序列进行时域卷积得到的相同

Q3.16改变序列长度后:

x1=[1357911],x2不变

得到观察是:

再次验证了DTFT的卷积性质,两个序列逐点相乘得到的幅度谱和相位谱和原始序列进行时域卷积得到的相同。

Q3.17加入解释语句和给坐标轴加上标签后代码为:

%ProgramP3_5B

%ModulationPropertyofDTFT

%freqencyvectorforevaluatingDTFT

%firstsequence

x2=[1-11-11-11-11];

%secondsequence

%yisthetimedomainpointwiseproductofx1andx2

y=x1.*x2;

%DTFTofsequencex1

%DTFTofsequencex2

%DTFTofsequencey

%plotthemagnitudespectrumofx1

subplot(3,1,1)

MagnitudeSpectrumofFirstSequence'

%plotthemagnitudespectrumofx2

subplot(3,1,2)

MagnitudeSpectrumofSecondSequence'

%plotthemagnitudespectrumofy

%itshouldbe1/2pitimestheconvolutionoftheDTFT'

s

%ofthetwooriginalsequences.

subplot(3,1,3)

MagnitudeSpectrumofProductSequence'

Q3.18图像如图:

两个序列乘积的幅度谱较之两个序列的幅度谱更趋于平缓

Q3.19改变序列长度后得到的图像如下:

x1是高通,x2是低通,乘积后的幅度谱是高通

Q3.20给P3_6加入解释和给坐标轴加上标签后:

%ProgramP3_6B

%TimeReversalPropertyofDTFT

%originalrampsequence

%note:

numisnonzerofor0<

=n<

=3.

num=[1234];

L=length(num)-1;

%DTFToforiginalrampsequence

%h2containsthesamplevaluesofh1inreverseorder,but

%itisNOTthetimereversedversionofh1.Thetime

%reversedversionmustbenonzerofor-3<

=0.However,

%h2isnonzerofor0<

=3.So,togetthetimereversed

%versionofh1,westillneedtotimeSHIFTh2totheleft.

%Thisisaccomplishedinthefrequencydomainusingthetime

%shiftpropertyoftheDTFT.Thus,h3,whichISthetime

%reversedversionofh1,isobtainedbymultiplyingh2times

%alinearphasetermtoaccomplishtherequiredtimeshift.

h2=freqz(fliplr(num),1,w);

h3=exp(w*L*i).*h2;

%plotthemagnitudespectrumoftheoriginalrampsequence

'

FontSize'

8)

%plotthemagnitudespectrumofthetimereversedrampsequence

MagnitudeSpectrumofTime-ReversedSequence'

%plotthephasespectrumoftheoriginalrampsequence

%plotthephasespectrumofthetimereversedrampsequence

PhaseSpectrumofTime-ReversedSequence'

怎么实现时间反转–通过使用fliplr函数将矩阵反转,在利用DTFT的时移性质来得到

Q3.21图像显示如下:

反转后幅度谱不变,相位谱变化方向。

Q3.22改变序列的长度:

Num=[135791113]

Num=[246810]

时间反转后,幅度谱没有变化,频谱呈对称

3.2离散傅里叶变换

Project3.3DFT和IDFT计算

Answers:

Q3.23MATLAB程序计算并画出L点DFTX[k]和长度为N的序列x[N]并且L

N计算并画出IDFTX[k]:

%ProgramP3_3DFT

%ComputeandplottheL-pointDFTofanN-pointsignal,L>

=N.

%Initialize

N=200;

%lengthofsignal

L=256;

%lengthofDFT

nn=[0:

N-1];

kk=[0:

L-1];

%thesignalx

xR=[0.1*(1:

100)zeros(1,N-100)];

%realpart

xI=[zeros(1,N)];

%imagpart

x=xR+i*xI;

%DFT

XF=fft(x,L);

%plotxRandxI

subplot(3,2,1);

grid;

plot(nn,xR);

Re\{x[n]\}'

Timeindexn'

subplot(3,2,2);

plot(nn,xI);

Im\{x[n]\}'

%plotrealandimagpartsofDFT

subplot(3,2,3);

plot(kk,real(XF));

Re\{X[k]\}'

Frequencyindexk'

subplot(3,2,4);

plot(kk,imag(XF));

Im\{X[k]\}'

%IDFT

xx=ifft(XF,L);

%plotrealandimaginarypartsoftheIDFT

subplot(3,2,5);

plot(kk,real(xx));

RealpartofIDFT\{X[k]\}'

subplot(3,2,6);

plot(kk,imag(xx));

ImagpartofIDFT\{X[k]\}'

信号总长度N=200。

的DFT长度L=256。

可见,256点DFT的共轭对称的期望。

从IDFT获得的信号的长度为L=256,但是将原始信号上舍入相同。

Q3.24代码如下:

%ProgramQ3_24

%Usea

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

当前位置:首页 > 高中教育 > 高考

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2