| decomposeVMD | R Documentation |
Decomposes a sampled signal into a given number of modes, each concentrated around a center frequency, by alternating updates of the mode spectra, the centers and a multiplier.
decomposeVMD(signal, samplingInterval, initialCenters, alpha, tau,
fixedZeroCenter, tolerance, maxIterations)
signal |
Non-empty numeric vector of finite values without |
samplingInterval |
Sampling interval |
initialCenters |
Numeric vector of initial center frequencies in Hz,
each in |
alpha |
Penalty |
tau |
Dual ascent step |
fixedZeroCenter |
|
tolerance |
Threshold |
maxIterations |
Whole number |
The record of N samples is extended to T = 2N samples by
reflecting \lceil N/2 \rceil samples at the start and the rest at the
end, and transformed with the unnormalized discrete Fourier transform; the
grid holds |\omega| in rad/s. Sweeps start from zero mode spectra and
multiplier. In each sweep mode k, updated after modes
1, \ldots, k - 1, is
\hat u_k = \frac{\hat x - \sum_{i \ne k} \hat u_i + \hat\lambda / 2}{1 + 2 \alpha (\omega - \omega_k)^2},
its center becomes the power-weighted mean of |\omega|, and the sweep
closes with \hat\lambda \leftarrow \hat\lambda + \tau (\hat x - \sum_k \hat u_k).
The iteration stops with "tolerance" when
\sum_k \|\hat u_k^{(n+1)} - \hat u_k^{(n)}\|^2 / \|\hat u_k^{(n)}\|^2 < \epsilon,
which cannot happen before the second sweep, or with
"iterationLimit" after maxIterations sweeps; the last sweep
is returned. The modes are the inverse transforms restricted to the record.
With tau = 0 the penalized formulation permits a nonzero fit residual.
VMD defines its modes through a bandwidth objective, without imposing the
geometrical IMF conditions of EMD.
A list with
modes |
Double matrix, samples by modes, on the input grid. |
fitResidual |
Numeric vector |
centers |
Numeric vector of the |
iterations |
Integer vector repeating, for every mode, the number of sweeps. |
converged |
Logical vector repeating, for every mode, the result of the joint stopping test. |
stopReason |
|
A mode without spectral energy leaves its center undefined and stops the
function with an error of class xemdZeroEnergy.
Dragomiretskiy, K. and Zosso, D. (2014). Variational Mode Decomposition. IEEE Transactions on Signal Processing, 62(3), 531–544. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1109/TSP.2013.2288675")}
decomposeMVMD, decomposeSVMD,
decomposeTSL
SamplingInterval <- 1 / 1000
Time <- seq_len(1000) * SamplingInterval
Signal <- cos(2 * pi * 2 * Time) + 0.25 * cos(2 * pi * 24 * Time) +
0.0625 * cos(2 * pi * 288 * Time)
OUT <- decomposeVMD(Signal, samplingInterval = SamplingInterval,
initialCenters = (0:2) / (6 * SamplingInterval),
alpha = 2000 * SamplingInterval^2 / (8 * pi^2),
tau = 0.5, fixedZeroCenter = FALSE, tolerance = 1e-6,
maxIterations = 98)
OUT$centers
OUT$stopReason
max(abs(OUT$fitResidual))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.