资源简介
本文件是变分模态分解(Variational Mode Decomposition,VMD)的VMD_test文件
代码片段和文件信息
clear all;
close all;
clc;
% Time Domain 0 to T
T = 1000;
fs = 1/T;
t = (1:T)/T;
freqs = 2*pi*(t-0.5-1/T)/(fs);
% center frequencies of components
f_1 = 2;
f_2 = 24;
f_3 = 288;
% modes
v_1 = (cos(2*pi*f_1*t));
v_2 = 1/4*(cos(2*pi*f_2*t));
v_3 = 1/16*(cos(2*pi*f_3*t));
% for visualization purposes
fsub = {};
wsub = {};
fsub{1} = v_1;
fsub{2} = v_2;
fsub{3} = v_3;
wsub{1} = 2*pi*f_1;
wsub{2} = 2*pi*f_2;
wsub{3} = 2*pi*f_3;
% composite signal including noise
f = v_1 + v_2 + v_3 + 0.1*randn(size(v_1));
f_hat = fftshift((fft(f)));
% some sample parameters for VMD
alpha = 2000; % moderate bandwidth constraint
tau = 0; % noise-tolerance (no strict fidelity enforcement)
K = 3; % 3 modes
DC = 0; % no DC part imposed
init = 1; % initialize omegas uniformly
tol = 1e-7;
%--------------- Run actual VMD code
[u u_hat omega] = VMD(f alpha tau K DC init tol);
%--------------- Visualization
% For convenience here: Order omegas increasingly and reindex u/u_hat
[~ sortIndex] = sort(omega(end:));
omega = omega(:sortIndex);
u_hat = u_hat(:sortIndex);
u = u(sortIndex:);
linestyles = {‘b‘ ‘g‘ ‘m‘ ‘c‘ ‘c‘ ‘r‘ ‘k‘};
figure(‘Name‘ ‘Composite input signal‘ );
plot(tf ‘k‘);
set(gca ‘XLim‘ [0 1]);
f
相关资源
- 变分模式分解实测程序
- matlab变分模态分解VMD
- 变分模态分解matlab
- VMD分解的matlab程序
- Vmd的分解代码
- 变分模态分解的源代码
- VMD分解变分模态分解
- EMD EEMD VMD比较
- VMD 变分模态分解
- EMD_EEMD_VMD 可用于信号的EMD、EEMD、VM
- Variational Mode Decomposition 内含VMD相关
- 基于小波的VMD程序
- VMD算法程序
- VMD_2D 二维变模态分解(TWO-DIMENSIONAL
- VMD 变模式分解(Variational Mode Decompo
- vmd-verify vmd终极修改版
- VMD vmd修改版
- vmd-verify3 vmd经验模态分解
- VMD 对故障信号进行去噪
- EEMD经验变分模态分解
- 变分模态分解
- vmd去噪MATLAB代码
评论
共有 条评论