MATLAB编程冲击响应卷积DTFT与DFT的比较Word文件下载.docx
- 文档编号:5185386
- 上传时间:2023-05-04
- 格式:DOCX
- 页数:16
- 大小:184.60KB
MATLAB编程冲击响应卷积DTFT与DFT的比较Word文件下载.docx
《MATLAB编程冲击响应卷积DTFT与DFT的比较Word文件下载.docx》由会员分享,可在线阅读,更多相关《MATLAB编程冲击响应卷积DTFT与DFT的比较Word文件下载.docx(16页珍藏版)》请在冰点文库上搜索。
conv’sisalmosttwotimeswiderthanimpz’s.Meanwhiletheresultoffftisquitedifferentfromthatofimpzandconv.WhenvalueofNislarger,thewaveformsoffftaremoresimilartothatofimpzandconv.
(4)Explorezero-padding:
N=8;
K=N,1.5*N,2*Nand2*N-1,showninfigure7.
Figure7.
N=16;
K=N,1.5*N,2*Nand2*N-1,showninfigure8.
Figure8.
N=32;
K=N,1.5*N,2*Nand2*N-1,showninfigure9.
Figure9.
N=64;
K=N,1.5*N,2*Nand2*N-1,showninfigure10.
Figure10.
N=128;
K=N,1.5*N,2*Nand2*N-1,showninfigure11.
Figure11.
N=256;
K=N,1.5*N,2*Nand2*N-1,showninfigure12.
Figure12.
Comment:
Fromaboveresults,wecanfindthatwhenthevalueofKisincreasing,theresultoffftbecomesmoresamelikethatofconv;
andthenwhenKisequalto2*N-1,bothconvandfftprovidethesameresults.SincewhenKincreases,thenumberofsamplingpointsinthefrequencydomainincreases,whichrenderssmallerfrequencyinterval.Hence,thespectrumdensitywillaugmentandtheresultsoffftgraduallybecomethesameasthatofconv.
Accordingtotheanalysisabove,wecanfindwhenK=256impzandconv’sresultsaresame,andwhenK=2*N-1,fftandconv’sresultsaresame,thus,theconclusionis,whenK=256andK=2*N-1,allthreemethodsproducethesameresult.
Code:
1.Usingimpztocalculatey(n):
forN=8,16,32,64
>
a0=0.95;
a=[1-a0];
b=[1-a0];
c0=pi/13;
c1=0.95;
c2=cos(c0);
c=[1-c1*c2];
d=[1-2*c1*c2c1^2];
L=100;
NFFT=2^nextpow2(L);
N=8;
aa=a*b;
bb=conv(c,d);
y=impz(aa,bb,N);
y1=impz(aa,bb,N*2);
y2=impz(aa,bb,N*4);
y3=impz(aa,bb,N*8);
subplot(221);
stem(y)
title('
impulseresponseN=8'
)
subplot(222);
stem(y1)
impulseresponseN=16'
subplot(223);
stem(y2)
impulseresponseN=32'
subplot(224);
stem(y3)
impulseresponseN=64'
forN=128,256
y4=impz(aa,bb,N*16);
y5=impz(aa,bb,N*32);
stem(y4(1:
128))
impulseresponseN=128'
stem(y5(1:
impulseresponseN=256'
2.Usingconvtocalculatey(n):
x=impz(a,b,N);
h=impz(c,d,N);
y=conv(x,h);
subplot(221)
convolutionN=8'
x1=impz(a,b,N*2);
h1=impz(c,d,N*2);
y1=conv(x1,h1);
subplot(222)
convolutionN=16'
x2=impz(a,b,N*4);
h2=impz(c,d,N*4);
y2=conv(x2,h2);
subplot(223)
convolutionN=32'
x3=impz(a,b,N*8);
h3=impz(c,d,N*8);
y3=conv(x3,h3);
subplot(224)
convolutionN=64'
x=impz(a,b,N*16);
h=impz(c,d,N*16);
stem(y(1:
convolutionN=128'
x1=impz(a,b,N*32);
h1=impz(c,d,N*32);
stem(y1(1:
convolutionN=256'
3.Usingffttocalculatey(n):
x1=impz(a,b,N);
h1=impz(c,d,N);
y11=fft(x1,NFFT);
y21=fft(h1,NFFT);
y31=times(y11,y21);
y1=ifft(y31);
fftN=8'
x2=impz(a,b,N*2);
h2=impz(c,d,N*2);
y12=fft(x2,NFFT);
y22=fft(h2,NFFT);
y32=times(y12,y22);
y2=ifft(y32);
fftN=16'
x3=impz(a,b,N*4);
h3=impz(c,d,N*4);
y13=fft(x3,NFFT);
y23=fft(h3,NFFT);
y33=times(y13,y23);
y3=ifft(y33);
fftN=32'
x4=impz(a,b,N*8);
h4=impz(c,d,N*8);
y14=fft(x4,NFFT);
y24=fft(h4,NFFT);
y34=times(y14,y24);
y4=ifft(y34);
stem(y4)
fftN=64'
x1=impz(a,b,N*16);
h1=impz(c,d,N*16);
fftN=128'
x2=impz(a,b,N*32);
h2=impz(c,d,N*32);
fftN=256'
4:
Explorezero-paddingusingK-pointDFT
N=8,16,32,64,128and256
K=N,1.5*N,2*Nand2*N-1
K1=N;
y11=conv(x,h);
y121=fft(x,K1);
y122=fft(h,K1);
y123=times(y121,y122);
y12=ifft(y123);
plot(y11);
holdon;
stem(y12);
holdoff;
N=K,plotresultofconvandstemresultoffft'
K2=1.5*N;
y21=conv(x,h);
y221=fft(x,K2);
y222=fft(h,K2);
y223=times(y221,y222);
y22=ifft(y223);
plot(y21);
stem(y22);
K=1.5*N,plotresultofconvandstemresultoffft'
K3=2*N;
y31=conv(x,h);
y321=fft(x,K3);
y322=fft(h,K3);
y323=times(y321,y322);
y32=ifft(y323);
plot(y31);
stem(y32);
K=2*N,plotresultofconvandstemresultoffft'
K4=2*N-1;
y41=conv(x,h);
y421=fft(x,K4);
y422=fft(h,K4);
y423=times(y421,y422);
y42=ifft(y423);
plot(y41);
stem(y42);
K=2*N-1,plotresultofconvandstemresultoffft'
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- MATLAB 编程 冲击 响应 卷积 DTFT DFT 比较