時頻工具箱介紹與使用


matlab時頻處理工具箱

標簽: 信號處理與分析


1. 工具箱

  1. emd

  2. 時頻分析(TFTB)

  3. 自適應時頻分析tfa

==============================================================

2.EMD工具箱安裝方法

  1. 下載emd工具箱:地址-http://download.csdn.net/detail/makenothing/6969345 ,(免費鏈接:http://download.csdn.net/detail/makenothing/9734265 )下載后解壓放在matlab的toolbox工作路徑下package_emd文件夾。

  2. 打開matlab,選擇File- Set Path- Add with Subfolders-你剛才下載的工具箱(package_emd)點進去- Save- Close。

  3. 此時選擇work下package_emd文件夾作為工作路徑,即是C:\Program Files\MATLAB\R2010a\toolbox\package_emd

  4. 在Command Window里面輸入mex -setup回車,問是否選擇已有的編譯器你選y回車,再問選擇哪個編譯器,你可以選擇C++的那個選擇相應的編號(如 2)回車,然后讓你核對是否選擇對了編譯器等等,你輸入y回車。就安裝成功了

     >> mex -setup
     Please choose your compiler for building external interface (MEX) files:
      
     Would you like mex to locate installed compilers [y]/n? y
      
     Select a compiler:
     [1] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2010a\sys\lcc
     [2] Microsoft Visual C++ 6.0 in C:\Program Files\Microsoft
     Visual Studio
      
     [0] None
      
     Compiler: 2
      
     Please verify your choices:
      
     Compiler: Microsoft Visual C++ 6.0
     Location: C:\Program Files\Microsoft Visual Studio
      
     Are these correct [y]/n? y
      
     Trying to update options file: C:\Users\Administrator\AppData\Roaming\MathWorks\MATLAB\R2010a\mexopts.bat
     From template: C:\PROGRA~1\MATLAB\R2010a\bin\win32\mexopts\msvc60opts.bat
     Done . . .
     Warning: The MATLAB C and Fortran API has changed to support MATLAB  
     variables with more than 2^32-1 elements. In the near future
     you will be required to update your code to utilize the new
     API. You can find more information about this at:
     http://www.mathworks.com/support/solutions/en/data/1-5C27B9/?solution=1-5C27B9
    

Building with the -largeArrayDims option enables the new API.
至此,表示安裝成功!!


截止2017.1月最新版(emd-1.3)下載地址:http://download.csdn.net/detail/makenothing/9734249
官方鏈接地址:https://atoms.scilab.org/toolboxes/emd_toolbox
(可能需要翻牆,如不能,上面有我上傳的免費鏈接)

==============================================================

3. 時頻分析工具箱安裝

  1. 首先下載工具箱,http://download.csdn.net/detail/makenothing/6969447。(免費鏈接:http://download.csdn.net/detail/makenothing/9734266)下載后解壓放在matlab的toolbox工作路徑下TFTB文件夾。
  2. 打開matlab,選擇File- Set Path- Add with Subfolders-你剛才下載的工具箱(package_emd)點進去- Save- Close。
  3. 此時選擇work下package_emd文件夾作為工作路徑,即是C:\Program Files\MATLAB\R2010a\toolbox\TFTB 。
  4. 在Command Window里面輸入mex -setup回車,問是否選擇已有的編譯器你選y回車,再問選擇哪個編譯器,你可以選擇C++的那個選擇相應的編號(如 2)回車,然后讓你核對是否選擇對了編譯器等等,你輸入y回車。就安裝成功了

    mex -setup
    Please choose your compiler for building external interface (MEX) files:
     
    Would you like mex to locate installed compilers [y]/n? y
     
    Select a compiler:
    [1] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2010a\sys\lcc
    [2] Microsoft Visual C++ 6.0 in C:\Program Files\Microsoft Visual Studio
     
    [0] None
     
    Compiler: 2
     
    Please verify your choices:
     
    Compiler: Microsoft Visual C++ 6.0
    Location: C:\Program Files\Microsoft Visual Studio
     
    Are these correct [y]/n? y
     
    Trying to update options file: C:\Users\Administrator\AppData\Roaming\MathWorks\MATLAB\R2010a\mexopts.bat
    From template: C:\PROGRA~1\MATLAB\R2010a\bin\win32\mexopts\msvc60opts.bat
     
    Done . . .
     
    ******************************************************
      Warning: The MATLAB C and Fortran API has changed to support MATLAB  
               variables with more than 2^32-1 elements. In the near future
               you will be required to update your code to utilize the new
               API. You can find more information about this at:
               http://www.mathworks.com/support/solutions/en/data/1-5C27B9/?solution=1-5C27B9
               Building with the -largeArrayDims option enables the new API.
    ******************************************************

至此,安裝成功 !

==============================================================
官網地址:http://download.savannah.gnu.org/releases/tftb

==============================================================
(可能需要翻牆,如不能,上面有我上傳的免費鏈接)

4. adaptive time frequency analysis

自適應時頻分析工具包及其中文手冊。內核程序是在c ++中編寫的,GUI是一個matlab函數。其時頻分辨率遠高於短時傅里葉變換。
用法:將tfagui.m和tfagui.fig提取到matlab的存在路徑中,然后將atfr.exe解壓到系統路徑(例如“C:\ winnt”)。您可以通過在matlab的命令行中輸入“tfagui”來啟動工具包。

時頻工具箱函數

一、信號產生函數:

amexpo1s 單邊指數幅值調制信號
amexpo2s 雙邊指數幅值調制信號
amgauss 高斯幅值調制信號
amrect 矩形幅值調制信號
amtriang 三角形幅值調制信號
fmconst 定頻調制信號
fmhyp 雙曲線頻率調制信號
fmlin 線性頻率調制信號
fmodany 任意頻率調制信號
fmpar 拋物線頻率調制信號
fmpower 冪指數頻率調制信號
fmsin 正弦頻率調制信號
gdpower 能量律群延遲信號
altes 時域Altes信號
anaask 幅值鍵移信號
anabpsk 二進制相位鍵移信號
anafsk 頻率鍵移信號
anapulse 單位脈沖信號的解析投影
anaqpsk 四進制相位鍵移信號
anasing Lipscjitz 奇異性
anaste 單位階躍信號的解析投影
atoms 基本高斯元的線性組合
dopnoise 復多普勒任意信號
doppler 復多普勒信號
klauder 時域Klauder小波
mexhat 時域墨西哥帽小波

二、噪聲產生函數

noiseecg 解析復高斯噪聲
noiseecu 解析復單位高斯噪聲
tfrgabor Gabor表示
tfrstft 短時傅立葉變換
ifestar2 使用AR(2)模型的瞬時頻率估計
instfreq 瞬時頻率估計
sqrpdlay 群延遲估計

三、模糊函數

ambifunb 窄帶模糊函數
ambifuwb 寬帶模糊函數

四、Affine類雙核線性時頻處理函數

tfrbert 單式Bertrand分布
tfrdfla D-Flandrin分布
tfrscalo 尺度圖
tfrspaw 平滑偽Affine類Wigner分布
tfrunter Unterberger分布

五、Cohen類雙核線性時頻處理函數

tfrbj Born-Jordan分布
tfrbud Butterworth分布
tfrcw Choi-Williams分布
tfrgrd 歸一化的矩形分布
tfrmh Margenau-Hill分布
tfrmhs Margenau-Hill頻譜分布
tfrmmce 譜圖的最小平均互熵組合
tfrpage Page分布
tfrwv 偽Wigner-Ville分布
tfrri Rihaczek分布
tfrridb 降低交叉項的分布(Bessel窗)
tfrridbn 降低交叉項的分布(二項式窗)
tfrridh 降低交叉項的分布(漢寧窗)
tfrridt 降低交叉項的分布(三角窗)
tfrsp 譜圖分布
tfrspwv 平滑偽Wigner-Ville分布
tfrwv Wigner-Ville分布
tfrzam Zhao-Atlas-Marks分布

六、其他處理函數:

friedman 瞬時頻率密度
htl 圖像直線檢測中的Hough變換
margtfr 時頻表示的能量
momftfr 時頻表示的頻率矩
momttfr 時頻表示的時間矩
renyi Renyi信息度量
ridges 波峰提取
plotifl 繪制歸一化的瞬時頻率規律
tfrparam 返回用於顯示時頻表示的參數
tfrqview 時頻表示的快速可視化
tfrsave 保存時頻表示的參數
tfrview 時頻表示的可視化

非平穩信號的時頻分析-----Gabor變換

Gabor變換

matlab函數:

[[tfr[,dgr[,gam]]]=]tfrgabor(sig[,N[,q[,h[,trace]]]]);

sig為輸入信號,長度為Nx = length(sig); N為Gabor系數的個數,Nx必須為N的整倍數,否則出錯。N越大,頻率分辨率越高。q為過采樣度,是Gabor的時域個數N的除數,當q=1時,時頻面完全采樣;當q>1時,時頻面過采樣,Gabor系數的個數N必須為q的整數倍。h為綜合窗(默認為高斯窗,窗長為N+1)

程序1:

clc;
clear all;
close all;

N = 500;
dt = 1;
t = 0 : dt : N - 1;
f1 = 0.05;
f2 = 0.025;
x = zeros(size(t));
x(50:150) = cos(2 * pi * f1 * (t(50 : 150) - 50));
x(250:350) = cos(2 * pi * f2 * (t(250 : 350) - 250));

tfrgabor(x',100,100,gausswin(101));  %采用100個Gabor系數,過采樣度為100,采用長度為101的高斯窗進行Gabor變換。

111.png-21.8kB


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM