新浪博客

老外写的EMD经验模式分解matlab工具箱使用方法

2016-12-09 11:40阅读:
参考文献[1]的作者写的多通道信号经验模式分解包,位置:D:\Digital Signal Processing\HHT,用法如下:
1. EMD函数 memd.m
imf = memd (X);
产生三维矩阵,'imf(N,M,L)',N表示通道数,M表示imf数量,L为数据点数。
例如,imf_k = imf(k, : , :) 得到第 k (1 <= k <= N) 个变量的 IMF。
imf = memd (X, num_directions);
整型 num_directions 设定总的投影数。根据经验,其最小值应该是通道数的2倍。例如,对于3变量信号,num_directions = 6。缺省值为64。为了提取有意义的IMF,num_directions应大于信号维度。
imf = memd (X, num_directions, 'stopping criteria'):
参数'stopping criteria'控制筛选过程(sifting process),可选项有:
'stop': 使用标准的停止判据 [2];
'fix_h': 使用[3]提出的修改的停止判据;
缺省值为'stop'。
imf = memd (X, num_directions, 'stop', stop_vec);
根据标准的停止准则计算IMF,参数在 'stop_vec' 中设置。
stop_vec 有三个元素,用来设置threshold 和 tolerance values,请参考[2];
默认值是step_vec = [0.075 0.75 0.075];
只有在'stopping criteria'被设置为'stop'的时候才有效。
imf = memd (X, num_directions, 'fix_h', n_iter):
只有当'stopping criteria' 设为'fix_h'时,整数 n_iter 指定当极值点数量与过零点数量相差最多1个时的连续迭代次数[3]。默认值为n_iter = 2;
这个程序允许处理输入信号的通道数为3-16,
使用的算法请见文献[1]
- 为了将程序应用到16个通道以上的数据,修改程序第510行的变量'Max_channels';
- 使用双通道与3通道的数据进行EMD,我们建议使用下面链接的工具箱:
http://perso.ens-lyon.fr/patrick.flandrin/emd.html
2. 如果想研究 memd 的 filterbank 的属性或画HHT谱,可使用下面函数:
g-noise-imfs.mat
存储imf_emd,它是对8个长度5000的Gaussian噪声应用EMD后得到的IMFs。
filt_band.m
画出多变量IMF的滤波器组结构。输入为上面数据的IMF矩阵。然后数据集被分割成1000个元素片段,因此数据集至少要有1000个元素,否则程序无法工作。
例1:MEMD的滤波器组
imf8_memd=memd(wgn(8,5000,0));
filt_bank(imf8_memd);
例2:标准EMD的滤波器组
load g-noise-imfs.mat;
filt_bank(imf_emd);
INST_FREQ_local.m
输入IMF矩阵(N*M,N是IMF个数,M是数据长度),这个函数用 Hilbert 变换计算Hilbert-Huang谱,瞬时幅度,和瞬时频率。输出矩阵的维度与IMF矩阵维度一样。
spectrogram_emd.m
2D瞬时幅度和瞬时频率变换为3D谱矩阵,便于在time-freq平面画出瞬时幅度的等值线。
disp_hhs.m
用spectrogram_emd输出的谱矩阵画3D Hilbert-Huang谱。
例子:
[instAmp, instFreq] = INST_FREQ_local(imf);
spect = spectrogram_emd(instFreq, instAmp, 1000);
disp_hhs(spect);
---------------------------------------------------------------------------
The following .mat files contain dataset which may serve as an input to memd.m. Just load any of these files in matlab and send the resulting output vector as an input to the function nemd.
1) syn_12channel_inp.mat: contains synthetically generated 12 channel data set (with combination of 5 tones (sinewaves) and noise added to few channels).
2) syn_16channel_inp.mat: contains synthetically generated 16 channel data set (combined 6 tones (sinewaves) and noise added to some channels).
3) syn_hex_inp.mat: contains synthetically generated 6 channel data set (combined 4 sinewaves and noise added to some channels - see the Multivariate EMD paper and the Supplementary Material for more detaiil)
4) taichi_hex_inp.mat: contains hexavariate real world taichi dataset (two 3D recordings from intertial bodysensors combined into a single hexavariate signal [left wrist and left ankle]).
参考文献:
[1] Rehman and D. P. Mandic, 'Multivariate Empirical Mode Decomposition', Proceedings of the Royal Society A, 2010
[2] G. Rilling, P. Flandrin and P. Goncalves, 'On Empirical Mode Decomposition and its Algorithms', Proc of the IEEE-EURASIP Workshop on Nonlinear Signal and Image Processing, NSIP-03, Grado (I), June 2003
[3] N. E. Huang et al., 'A confidence limit for the Empirical Mode Decomposition and Hilbert spectral analysis', Proceedings of the Royal Society A, Vol. 459, pp. 2317-2345, 2003

我的更多文章

下载客户端阅读体验更佳

APP专享