信號(hào)與線性系統(tǒng)課程設(shè)計(jì)報(bào)告_第1頁
信號(hào)與線性系統(tǒng)課程設(shè)計(jì)報(bào)告_第2頁
信號(hào)與線性系統(tǒng)課程設(shè)計(jì)報(bào)告_第3頁
信號(hào)與線性系統(tǒng)課程設(shè)計(jì)報(bào)告_第4頁
信號(hào)與線性系統(tǒng)課程設(shè)計(jì)報(bào)告_第5頁
已閱讀5頁,還剩10頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

信號(hào)與線性系統(tǒng)課程設(shè)計(jì)報(bào)告課題名稱:數(shù)字語音信號(hào)分析系統(tǒng)設(shè)計(jì)%---ExecutesonbuttonpressinFFT.functionpushbutton3_Callback(hObject,eventdata,handles)figure(2);[x,fs,nbits]=wavread('G:\design\qian1.wav');subplot(1,1,1)N=100;n=0:N-1;t=0.01*n;q=n*2*pi/N;X=fft(x,N);plot(q,abs(X));title('FFT')%---Executesonbuttonpressinjiaruzaosheng.functionpushbutton4_Callback(hObject,eventdata,handles)figure(3);[x,fs,nbits]=wavread('G:\design\qian1.wav');subplot(2,1,1)N=100;n=0:N-1;t=0.01*n;q=n*2*pi/N;X=fft(x,N);plot(q,abs(X));title('FFT')subplot(2,1,2)N=100;n=0:N-1;t=0.01*n;M=length(x);k=0:M-1;q=n*2*pi/N;y=x+0.05*cos(1.5*pi*k)';Y=fft(y,N);plot(q,abs(Y));title('FFT(withnoise)')%---ExecutesonbuttonpressinButterworthFilter.functionpushbutton7_Callback(hObject,eventdata,handles)figure(4);%ButterworthFilterwp=0.25*pi;ws=0.35*pi;Rp=1;As=17;T=1;OmegaP=wp/T;OmegaS=ws/T;[cs,ds]=afd_butt(OmegaP,OmegaS,Rp,As);[b,a]=imp_invr(cs,ds,T)[db,mag,pha,w]=freqz_m(b,a);subplot(2,1,1);plot(w/pi,mag);title('MagnitudeResponse')axis([0,1,0,1.1])subplot(2,1,2);plot(w/pi,db);title('MagnitudeinDB')axis([0,1,-40,5]);%---ExecutesonbuttonpressinChebyshevFilter.functionpushbutton8_Callback(hObject,eventdata,handles)figure(5);%ChebyshevFilterwp=0.25*pi;ws=0.35*pi;Rp=1;As=17;T=1;OmegaP=(2/T)*tan(wp/2);OmegaS=(2/T)*tan(ws/2);ep=sqrt(10^(Rp/10)-1);Ripple=sqrt(1/(1+ep*ep));Attn=1/(10^(As/20));A1=1/Attn;a1=sqrt(A1*A1-1)/ep;a2=OmegaS/OmegaP;N=ceil(logm(a1+sqrt(a1*a1-1))/logm(a2+sqrt(a2*a2-1)));fprintf('\nChebyshevFilterOrder=%2.0f\n',N)[cs,ds]=u_chb1ap(N,Rp,OmegaP);[B,A]=bilinear(cs,ds,T)[db,mag,pha,w]=freqz_m(B,A);subplot(2,1,1);plot(w/pi,mag);title('MagnitudeResponse');axis([0,1,0,1.1])subplot(2,1,2);plot(w/pi,db);title('MagnitudeinDB');axis([0,1,-40,5]);%---ExecutesonbuttonpressinButterworth.functionpushbutton9_Callback(hObject,eventdata,handles)figure(6);[x,fs,nbits]=wavread('G:\design\qian1.wav');subplot(3,1,1)N=100;n=0:N-1;t=0.01*n;q=n*2*pi/N;X=fft(x,N);plot(q,abs(X));title('FFT')subplot(3,1,2)N=100;n=0:N-1;t=0.01*n;M=length(x);l=0:M-1;q=n*2*pi/N;y=x+0.05*cos(1.5*pi*l)';Y=fft(y,N);plot(q,abs(Y));title('FFT(withnoise)')%ButterworthFilterwp=0.25*pi;ws=0.35*pi;Rp=1;As=17;T=1;OmegaP=wp/T;OmegaS=ws/T;[cs,ds]=afd_butt(OmegaP,OmegaS,Rp,As);[b,a]=imp_invr(cs,ds,T)[db,mag,pha,w]=freqz_m(b,a);subplot(3,1,3)y2=filter(b,a,y)N=100;n=0:N-1;t=0.01*n;M=length(x);q=n*2*pi/N;Y2=fft(y2,N);plot(q,abs(Y2));%---ExecutesonbuttonpressinChebyshev.functionpushbutton10_Callback(hObject,eventdata,handles)figure(7);[x,fs,nbits]=wavread('G:\design\qian1.wav');subplot(3,1,1)N=100;n=0:N-1;t=0.01*n;q=n*2*pi/N;X=fft(x,N);plot(q,abs(X));title('FFT')subplot(3,1,2)N=100;n=0:N-1;t=0.01*n;M=length(x);l=0:M-1;q=n*2*pi/N;y=x+0.05*cos(1.5*pi*l)';Y=fft(y,N);plot(q,abs(Y));title('FFT(withnoise)')%ChebyshevFilterwp=0.25*pi;ws=0.35*pi;Rp=1;As=17;T=1;OmegaP=(2/T)*tan(wp/2);OmegaS=(2/T)*tan(ws/2);ep=sqrt(10^(Rp/10)-1);Ripple=sqrt(1/(1+ep*ep));Attn=1/(10^(As/20));A1=1/Attn;a1=sqrt(A1*A1-1)/ep;a2=OmegaS/OmegaP;N=ceil(logm(a1+sqrt(a1*a1-1))/logm(a2+sqrt(a2*a2-1)));fprintf('\nChebyshevFilterOrder=%2.0f\n',N)[cs,ds]=u_chb1ap(N,Rp,OmegaP);[b,a]=bilinear(cs,ds,T)[db,mag,pha,w]=freqz_m(b,a);y2=filter(b,a,y)subplot(3,1,3)N=100;n=0:N-1;t=0.01*n;M=length(x);l=0:M-1;q=n*2*pi/N;Y2=fft(y2,N);plot(q,abs(Y2));%---Executesonbuttonpressinshiyucanshujisuan.functionpushbutton14_Callback(hObject,eventdata,handles)[x,fs,nbits]=wavread('G:\design\qian1.wav');N=100;n=0:N-1;t=0.01*n;M=length(x);%duanshinenglianghanshua=0;y2=0;fori=20:50y=x(i);a=a+y2;y2=y^2;i=i+1;endE=ab=0;y3=0;fori=20:50y=x(i);y3=abs(y);b=b+y3;i=i+1;endM=bc=0;y4=0;yf=0;yl=0;sgnf=0;sgnl=0;fori=20:50yf=x(i);ifyf>=0sgnf=1;elsesgnf=0;end;yl=x(i-1);ifyl>=0sgnl=1;elsesgnl=0;end;y4=y4+abs(sgnf-sgnl);c=c+y4/2;i=i+1;endZ=cset(handles.edit1,'string',E);set(handles.edit2,'string',M);set(handles.edit3,'string',Z);functionedit1_Callback(hObject,eventdata,handles)functionedit1_CreateFcn(hObject,eventdata,handles)ifispcset(hObject,'BackgroundColor','white');elseset(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunctionedit2_Callback(hObject,eventdata,handles)functionedit2_CreateFcn(hObject,eventdata,handles)ifispcset(hObject,'BackgroundColor','white');elseset(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunctionedit3_Callback(hObject,eventdata,handles)functionedit3_CreateFcn(hObject,eventdata,handles)ifispcset(hObject,'BackgroundColor','white');elseset(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end公式:%afd_butt.mfunction[b,a]=afd_butt(Wp,Ws,Rp,As)N=ceil((log10((10^(Rp/10)-1)/(10^(As/10)-1)))/(2*log10(Wp/Ws)));%上條語句為求濾波器階數(shù):N為整數(shù);%ceil朝正無窮大方向取整;fprintf('\nButterworthFilterOrder=%2.0f\n',N)OmegaC=Wp/((10^(Rp/10)-1)^(1/(2*N)))%求對(duì)應(yīng)于N的3db截止頻率;[b,a]=u_buttap(N,OmegaC);%freqz_m.mfunction[db,mag,pha,w]=freqz_m(b,a);[H,w]=freqz(b,a,1000,'whole');%在0-2*pi之間選取N個(gè)點(diǎn)計(jì)算頻率響應(yīng)H=(H(1:501))';%頻率響應(yīng)w=(w(1:501))';%頻率mag=abs(H);%響應(yīng)幅度db=20*log10((mag+eps)/max(mag));%增益pha=angle(H);%相位%imp_invr.mfunction[b,a]=imp_invr(c,d,T)[R,p,k]=residue(c,d);%部分分式展開p=exp(p*T);%從模擬到數(shù)字極點(diǎn)對(duì)應(yīng)關(guān)系,部分分式系數(shù)相同[b,a]=residuez(R,p,k);%將部分分式的形式變換成多項(xiàng)式之比的形式b=real(b');%求出數(shù)字濾波器系數(shù)a=real(a');%u_buttap.mfunction[b,a]=u_buttap(N,Omegac);[z,p,k]=buttap(N);%歸一化巴特沃思模擬低通濾波器原形%傳輸函數(shù)用極點(diǎn)形式表示p=p*Omegac;%將代入上式,相當(dāng)于分子乘以,極點(diǎn)乘以k=k*Omegac^N;B=real(poly(z));%poly為構(gòu)造具有指定根的

溫馨提示

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

最新文檔

評(píng)論

0/150

提交評(píng)論