Skip to main content

Variational Mode Decomposition (VMD) algorithm

Project description

Variational mode decomposition Python Package

Function for calculating Variational Mode Decomposition (Dragomiretskiy and Zosso, 2014) of a signal
Original VMD paper:
Dragomiretskiy, K. and Zosso, D. (2014) ‘Variational Mode Decomposition’, IEEE Transactions on Signal Processing, 62(3), pp. 531–544. doi: 10.1109/TSP.2013.2288675.

original MATLAB code: https://www.mathworks.com/matlabcentral/fileexchange/44765-variational-mode-decomposition

Installation

  1. Dowload the project from https://github.com/vrcarva/vmdpy, then run "python setup.py install" from the project folder

OR

  1. pip install vmdpy

Citation and Contact

If you find this package useful, we kindly ask you to cite it in your work.
Vinicius Carvalho (2019-), Variational Mode Decomposition in Python

A paper will soon be submitted and linked here.

contact: vrcarva@ufmg.br
Vinícius Rezende Carvalho
Programa de Pós-Graduação em Engenharia Elétrica – Universidade Federal de Minas Gerais, Belo Horizonte, Brasil
Núcleo de Neurociências - Universidade Federal de Minas Gerais

Example script

#%% Simple example  
import numpy as np  
import matplotlib.pyplot as plt  
from vmdpy import VMD  

#. Time Domain 0 to T  
T = 1000  
fs = 1/T  
t = np.arange(1,T+1)/T  
freqs = 2*np.pi*(t-0.5-fs)/(fs)  

#. center frequencies of components  
f_1 = 2  
f_2 = 24  
f_3 = 288  

#. modes  
v_1 = (np.cos(2*np.pi*f_1*t))  
v_2 = 1/4*(np.cos(2*np.pi*f_2*t))  
v_3 = 1/16*(np.cos(2*np.pi*f_3*t))  

f = v_1 + v_2 + v_3 + 0.1*np.random.randn(v_1.size)  

#. 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)  

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vmdpy-0.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

vmdpy-0.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file vmdpy-0.1.tar.gz.

File metadata

  • Download URL: vmdpy-0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for vmdpy-0.1.tar.gz
Algorithm Hash digest
SHA256 169872d9f3e015e6a83a4382b77e08d6a7ea7b6c4c1c3f37ead74df45e74d5be
MD5 de0348f2192aad11e976ef2f216e2cb1
BLAKE2b-256 a97fbe8f311ca9e6a42aecdf19de2a9674161fe92faef52c8585a47c50a83634

See more details on using hashes here.

File details

Details for the file vmdpy-0.1-py3-none-any.whl.

File metadata

  • Download URL: vmdpy-0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for vmdpy-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b76e5eba708125cbe35a4e6214cb6a1ae22b028226b4e0a4386fe789b3ced387
MD5 99f7ab8f421dd02d68d5803c7108a22a
BLAKE2b-256 a9b06600bb338973539da8f74490be3dfdd88f0a9ec85fbd651396f9279679cc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page