MAtlab傅里葉變換實驗報告_第1頁
MAtlab傅里葉變換實驗報告_第2頁
MAtlab傅里葉變換實驗報告_第3頁
MAtlab傅里葉變換實驗報告_第4頁
MAtlab傅里葉變換實驗報告_第5頁
已閱讀5頁,還剩6頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領

文檔簡介

1、班級 信工082 學號 16 姓名 劉剛 實驗組別 實驗日期 室溫 報告日期 成績 報告內(nèi)容:(目的和要求,原理,步驟,數(shù)據(jù),計算,小結(jié)等)1.求信號的離散時間傅立葉變換并分析其周期性和對稱性;給定正弦信號x(t)=2*cos(2*pi*10*t),fs=100HZ,求其DTFT。(a)代碼:f=10;T=1/f;w=-10:0.2:10;t1=0:0.0001:1;t2=0:0.01:1;n1=-2;n2=8;n0=0;n=n1:0.01:n2;x5=n>=0.01;x1=2*cos(2*f*pi*t1);x2=2*cos(2*f*pi*t2);x3=(exp(-j).(t2'

2、*w);x4=x2*x3;subplot(2,2,1);plot(t1,x1);axis(0 1 1.1*min(x2) 1.1*max(x2);xlabel('x(n)');ylabel('x(n)');title('原信號x1');xlabel('t');ylabel('x1');subplot(2,2,3);stem(t2,x2);axis(0 1 1.1*min(x2) 1.1*max(x2);title('原信號采樣結(jié)果x2');xlabel('t');ylabel(

3、9;x2');subplot(2,2,2);stem(n,x5);axis(0 1 1.1*min(x5) 1.1*max(x5);xlabel('n');ylabel('x2');title('采樣函數(shù)x2');subplot(2,2,4);stem(t2,x4);axis(0 1 -0.2+1.1*min(x4) 1.1*max(x4);xlabel('t');ylabel('x4');title('DTFT結(jié)果x4');(b)結(jié)果:2.用以下兩個有限長序列來驗證DTFT的線性、卷積和共

4、軛特性;x1(n)=1 2 3 4 5 6 7 8 9 10 11 12;x2(n)=R10(n)(1) 線性:(a)代碼:w=linspace(-8,8,10000);nx1=0:11; nx2=0:9;x1=1 2 3 4 5 6 7 8 9 10 11 12;x2=1 1 1 1 1 1 1 1 1 1;x3=x2,zeros(1,(length(x1)-length(x2);x4=2*x1+3*x3;X1=x1*exp(-j*nx1'*w);%頻率特性X3=x3*exp(-j*nx1'*w);%頻率特性X4=x4*exp(-j*nx1'*w);%頻率特性 sub

5、plot(5,3,1),stem(nx1,x1),axis(-1,13,0,15);title('x1'), ylabel('x(n)'); subplot(5,3,2),stem(nx2,x2),axis(-1,13,0,5);title('x2'); subplot(5,3,3),stem(nx1,x4),axis(-1,13,0,26);title('x4=2*x1+3*x3'); subplot(5,3,4),plot(w,abs(X1); ylabel('幅度') subplot(5,3,7),plot(

6、w,angle(X1);ylabel('相位') subplot(5,3,10),plot(w,real(X1);ylabel('實部') subplot(5,3,13),plot(w,imag(X1); ylabel('虛部')subplot(5,3,5),plot(w,abs(X3); subplot(5,3,8),plot(w,angle(X3); subplot(5,3,11),plot(w,real(X3);subplot(5,3,14),plot(w,imag(X3); subplot(5,3,6),plot(w,abs(X4); s

7、ubplot(5,3,9),plot(w,angle(X4); subplot(5,3,12),plot(w,real(X4);subplot(5,3,15),plot(w,imag(X4); (b)結(jié)果:(2)卷積:(a)代碼:nx1=0:11; nx2=0:9; nx3=0:20; w=linspace(-8,8,40); %w=-8,8分10000份 x1=1 2 3 4 5 6 7 8 9 10 11 12;x2=1 1 1 1 1 1 1 1 1 1;x3=conv(x1,x2);% x1卷積x2x4=x1*exp(-j*nx1'*w);% x1頻率特性x5=x2*exp(-

8、j*nx2'*w);% x2頻率特性x6=x3*exp(-j*nx3'*w);% x1卷積x2頻率特性x7=x4.*x5; subplot(2,2,1),stem(nx1,x1),axis(-1,15,0,15),title('x1');subplot(2,2,2),stem(nx2,x2),axis(-1,15,0,5),title('x2');subplot(2,1,2),stem(nx3,x3),axis(-1,25,0,80);title('x1卷積x2結(jié)果x3');figure,subplot(2,2,1),stem(x

9、4,'filled'),title('x1的DTFT結(jié)果x4'); subplot(2,2,2),stem(x5,'filled'),title('x2的DTFT結(jié)果x5'); subplot(2,2,3),stem(x6,'filled'),title('x3的DTFT結(jié)果x6'); subplot(2,2,4),stem(x7,'filled'),title('x4的DTFT結(jié)果x7'); figure,subplot(3,2,1),stem(w,abs(x6),

10、 ylabel('幅度'),title('x1卷積x2的DTFT'); subplot(4,2,3),stem(w,angle(x6),ylabel('相位') subplot(4,2,5),stem(w,real(x6),ylabel('實部') subplot(4,2,7),stem(w,imag(x6),ylabel('虛部') subplot(4,2,2),stem(w,abs(x7), title('x1與x2的DTFT的乘積'); subplot(4,2,4),stem(w,angle(

11、x7); subplot(4,2,6),stem(w,real(x7); subplot(4,2,8),stem(w,imag(x7); (b)結(jié)果:(3)共軛:(a)代碼:x1n=1 2 3 4 5 6 7 8 9 10 11 12;w=-10:10;N1=length(x1n);n1=0:N1-1;x1=real(x1n);x2=imag(x1n);x2n=x1-j*x2; X1=x2n*(exp(-j).(n1'*w);X2=x1n*(exp(j).(n1'*w);x3=real(X2);x4=imag(X2);X2=x3-j*x4;figure,subplot(211)

12、;stem(w,X1,'.');title('x1n共軛的DTFT');subplot(212);stem(w,X2,'.');title('x1n的DTFT取共軛且反折');(b)結(jié)果:3. 求LTI系統(tǒng)的頻率響應給定系統(tǒng)H(Z)=B(Z)/A(Z),A=0.98777 -0.31183 0.0256B=0.98997 0.989 0.98997,求系統(tǒng)的幅頻響應和相頻響應。(要求使用filter(B,A,(n)求解。(a)結(jié)果:A=0.98777 -0.31183 0.0256;B=0.98997 0.989 0.98997;

13、C=1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0y=filter(B,A,C);subplot(2,2,1);stem(y,'.');title('原始序列');mag=abs(y);ph=angle(y);ph=ph*180/pi;subplot(2,2,2);stem(mag,'.');title('幅頻特性');xlabel('時間信號n');ylabel('信號幅度');subplot(2,2,3);stem(ph,'.&

14、#39;);title('相頻特性');xlabel('時間信號n');ylabel('信號相位');(b)結(jié)果:4. 采樣和頻譜混疊給定信號x(t)=100*exp(-100*t)*cos(2*pi*500*t),求該信號的頻譜;當采樣頻率分別為fs1=2000HZ,fs2=1000HZ;fs3=500HZ;fs4=200HZ,時輸出序列的DTFT。(a)代碼:x=100*exp(-100*t).*cos(2*pi*500*t);t=-2:0.1:2;w=-10:0.1:10;y=x*(exp(-j).(t'*w);subplot(2,

15、1,1),plot(t,x);subplot(2,1,2),plot(w,y);title('原始信號的頻譜');figure,fs1=2000;Ts1=1/fs1;n1=-2:Ts1:2; fs2=1000;Ts2=1/fs2;n2=-2:Ts2:2; fs3=500;Ts3=1/fs3;n3=-2:Ts3:2; fs4=200;Ts4=1/fs4;n4=-2:Ts4:2;x1=100.*exp(-100*n1).*cos(2*pi*500*n1);y1=x1*(exp(-j).(n1'*w);subplot(221);plot(w,y1);title('經(jīng)2000Hz采樣后信號的DTFT');x2=100.*exp(-100*n2).*cos(2*pi*500*n2);y2=x2*(exp(-j).(n2'*w);subplot(222);plot(w,y2);title('經(jīng)1000Hz采樣后信號的DTFT');x3=100.*exp(-100*n3).*cos(

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論