1 / 11

個人報告

個人報告. 老師:侯春茹 學生:陳勤明. 濾波 FIR與移動平均濾波 功率頻譜密度. 濾波程式. 濾波後強度頻譜比較. 濾波後強度頻譜程式. M 點移動平均濾波器. M 點移動平均 濾波器程式. M=5; yy =[]; for i =1:1:N-M+1 yy1=f7(i:i+M-1); yy2=mean(yy1); yy =[ yy yy2]; end yy5= yy ; %10 M=10; yy =[];. for i =1:1:N-M+1 yy1=f7(i:i+M-1); yy2=mean(yy1);

dane-riddle
Download Presentation

個人報告

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 個人報告 老師:侯春茹學生:陳勤明 濾波 FIR與移動平均濾波 功率頻譜密度

  2. 濾波程式

  3. 濾波後強度頻譜比較

  4. 濾波後強度頻譜程式

  5. M點移動平均濾波器

  6. M點移動平均濾波器程式 • M=5; • yy=[]; • for i=1:1:N-M+1 • yy1=f7(i:i+M-1); • yy2=mean(yy1); • yy=[yy yy2]; • end • yy5=yy; • %10 • M=10; • yy=[]; • for i=1:1:N-M+1 • yy1=f7(i:i+M-1); • yy2=mean(yy1); • yy=[yy yy2]; • end • yy10=yy; • fs=1024; • T=1/fs; • r_yy_M5=xcorr(FIR5',FIR5'); • fft_r_yy_M5=fft(r_yy_M5); • N=length(r_yy_M5) • fd=1/(N*T); • fy=(0:(N-1)).*fd;

  7. FIR與移動平均濾波器

  8. FIR程式 • %FIR • M1=5; • b1=ones(M1,1)/5; • FIR5=filtfilt(b1,1,f7); • M2=10; • b2=ones(M2,1)/5 • FIR10=filtfilt(b2,1,f7);

  9. 功率頻譜密度-直接法

  10. 功率頻譜密度-間接法

  11. 功率頻譜密度程式 • xcorr_SignalData_detrend=xcorr(f7,f7); • N=length(f7); • xx1=xcorr_SignalData_detrend(N:(2*N-1)); • % Indirect method • xf1=fft(xx1); • xpsd1=abs(xf1(1:N/2)); • % Direct method • xf2=fft(f7); • xpsd2=abs(xf2(1:N/2)).^2; • f=2.*(0:N/2-1); • figure(7) • plot(f,xpsd1) • xlabel('f/fs') • ylabel('Magnitude') • title('Power Spectral Density Indirect method') • figure(8) • plot(f,xpsd2) • xlabel('f/fs') • ylabel('Magnitude') • title('Direct method')

More Related