



下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、精選優(yōu)質(zhì)文檔-傾情為你奉上附錄D利用FFT實(shí)現(xiàn)基于MP的信號(hào)稀疏分解參考程序% MATLAB script for MP algorithm based on FFT%* Preparation part *%* part 1:imput signal *%read signal data (to be processed)% Here we can input different types of data, to check the program.% In this example, we read one signal data from disk, which is saved in
2、 the% format: save bat.dat bat -asciiload bat.dat _ascii;signal=bat;%*part 2: set parameters *iterative_number= 30 ; % the matching pursuit processing iterative numbera,N=size(signal); % the length of signal and the length of atoms; Nsignal_reconstruct=zeros(1,N);signal_r=signal;a_base=2; % scale: t
3、he scale is determined by a and j;j_min=0;j_max=log2(N); u_base=l/2; % the transmission or displacement u should determined as followingv_base=pi; % the frequency vk_min= 0 ;w _base=pi/ 6; % the phase wi_min= 0 ;i_max= 12 ;%*wipe off the direct current vector *signal_reconstruct=( 1 /N)*sum(signal);
4、signal_r=signal-signal_reconstruct;%* create dictionary *atoms=dic_a(signal_r,N,a_base,j_min,j_max,u_base,v_base,k_min,w_base,i_min,i_max%* start calculation *for n=1: iterative_numbern% *the following program uses one subroutine to select the best atom*proj,scale,translation,freq,phase=select_best(
5、signal_r,N,a_base,j_min,j_max,u_base,v_base, k_min,w_base,i_min,i_max,atoms);%*reconstruct the best atom from the parameters gotted by above subroutine*t=0:N-1;t=(t-translation)/scale;g1=(1/sqrt(scale)*exp(-pi*t.*t).*cos(freq*t+phase);g=g1/sqrt(sum(g1.*g1);%* reconstruct signal and renew the residua
6、l*signal_reconstruct=signal_reconstruct+proj*g;signal_r=signal_r-proj*g;%*the figure of result *subplot(221);plot(signal); % original siganlsubplot( 222 );plot(g); %the atomsubplot( 223 );plot(signal_r); %the residualsubplot( 224 );plot(signal_reconstruct); %reconstruct signalend% * end of main prog
7、ram file *% * the following is the atom dictionary creation program*function atoms=dic_a(signal_r, N, a_base, j_min, j_max, u_base, v_base, k_min, w_base, i_min, i_max)% this subroutine is to create the dictionary% INPUT% the signal_r:the signal or the residual of the signal to be decomposed% the N:
8、 the length of the signal or of the residual of the signal or the length of the atoms% parameters :the parameter to construct the dictionary, it has much influence on the%speed of the decomposition%OUTPUT% atoms:the dictionarysize_dic=1;atoms=zeros(size_dic,N);% * creat dictionary *for j=j_min:j_max
9、for k=k_min:2(j+1)for i=i_min:i_maxsize_dic=size_dic+1; %the munber of atomss=a_basej; %scale of the atomu=N/2; % transmission of the atomv=k*(1/s) * v_base; %frequency of the atomw=i*w_base; %phase of the atomt=0:N-1;t=(t-u)/s;g=(1/sqrt(s)*exp(-pi*t.*t).*cos(v*t+w); %generate the atomg=g/sqrt(sum(g
10、. *g); %normalizationatoms(size_dic,:)=g;endendend%* end of the dictionary creation subroutine program*% *the following is the best atom selecting subroutine program using FFT*Function projscale,translation,freq,phase=select_best(signal_r,N,a_base.j_minj.ubase, v_base.k_min,w_base,i_min,i_max,atoms)
11、% this subroutine is to select in the dictionary the best atom suited the siganl or the %residualof the signal using FFT to reduce computational time% INPUT% the signal_r:the signal or the residual of the signal to be decomposed% the N: the longth of the signal or of the residual of the signal or th
12、e length of the atoms% parameters :the parameter to construct the dictionary , it has much influence on the%speed of the decomposition%OUTPUT% proj: the projection of the signal or the residual of the signal on the best atom% the scale: the scale of the best atom (s in the formula)% the translation
13、: the translation of the best atom (u in the formula)% the freq:the frequency of the best atom (v in the formula)% phase: the phase of the best atom (w in the formula)% proj_trans :to determine which projection is biggest%*intializtion* m n=size(atoms);re=zeros(5,m);proj_trans=0;proj=0;size_dic=0;%*
14、selcet the best atom*for j=j_min:j_maxfor k=k_min:2(j+1)for i=i_min:12size_dic=size_dic+1;g=atoms(size_dic, N:-1:1);co=real(ifft(fft(signal_r,2*N).*fft(g,2*N);recon=co(N/2+1):3*N/2);proj_trans e=max(abs(recon);proj_trans=rccon(e); %choose the biggest projectionre(:,size_dic)=proj_trans j e k i;endendendse=re(1,:);
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 高三地理上學(xué)期第一次月考試卷
- 62 選擇性必修3 素養(yǎng)加強(qiáng)課10 PCR技術(shù)與電泳相關(guān)問題
- 2025年廣東省中考地理真題(含答案)
- 采石場(chǎng)環(huán)保治理與經(jīng)營(yíng)權(quán)轉(zhuǎn)讓合同
- 非銀行支付機(jī)構(gòu)短信催收服務(wù)協(xié)議
- 素描系統(tǒng)教學(xué)課件
- 恐龍教學(xué)課件模板
- 國(guó)家電網(wǎng)電氣安全工作知識(shí)相關(guān)試題測(cè)試卷
- 2024-2025學(xué)年江蘇省百校聯(lián)考高一下學(xué)期5月月考英語試題及答案
- 汶川地震教學(xué)課件
- 國(guó)開(四川)2024年秋《社會(huì)學(xué)概論》形考任務(wù)1-2答案終結(jié)性考核答案
- SAP S4HANA 用戶操作手冊(cè)-FICO-006-財(cái)務(wù)月結(jié)
- 電商平臺(tái)供應(yīng)鏈管理技術(shù)分析
- 燃油燃燒器常見故障現(xiàn)象的原因分析及排除方法
- 北京匯文中學(xué)初一新生分班(摸底)語文考試模擬試卷(10套試卷帶答案解析)
- DL∕T 901-2017 火力發(fā)電廠煙囪(煙道)防腐蝕材料
- GB/T 4074.1-2024繞組線試驗(yàn)方法第1部分:一般規(guī)定
- MOOC 集成電路設(shè)計(jì)基礎(chǔ)-華中科技大學(xué) 中國(guó)大學(xué)慕課答案
- 數(shù)學(xué)分析教學(xué)課件
- 地震反演原理課件
- 工程業(yè)務(wù)推廣培訓(xùn)方案
評(píng)論
0/150
提交評(píng)論