Skip to contents

Decomposes a signal of two or more channels by successive extraction of vector modes, with vector envelopes built at the maxima of its projections onto directions of the channel space.

Usage

decomposeMEMD(signal, directionCount = 64, sifting)

Arguments

signal

Numeric matrix of finite real values, samples by channels, with two or more columns, as composed by the caller and without standardization.

directionCount

Whole number \(D \ge 1\) of Hammersley points; default 64, common to Rlibeemd and emdr. The projections use the \(2D\) unit vectors formed by those points and their antipodes.

sifting

Named list of sifting controls, as in decomposeEMD, with the rules "fixed", "consecutive" and "doubleThreshold" and boundary = "reflection" only. A missing stopRule is "doubleThreshold", whose thresholds, fraction and maxSift take the defaults of decomposeEMD; its extra field amplitudeRule, "globalMean" or "envelopePairs" (default), selects the amplitude of the ratio. Under "consecutive", consecutiveCount (a count, default 2) and maxSift (default 1000, at least consecutiveCount) apply. The default rule, the default amplitude and the defaults of "consecutive" are those of memd.m by Rehman and Mandic.

Details

The directions map \(D\) Hammersley points, built from the radical inverses in the bases of the first \(C - 1\) primes, to unit vectors \(\mathbf{v}_d\) through the angles of get.projections of emdr 1.2.3 (Pierre Masselot); their antipodes complete \(2D\) directions. For each direction, \(\mathbf{e}_d\) interpolates the vector samples at the maxima of the projection \(p_d = \mathbf{v}_d^{T} \mathbf{x}\), extended by reflection, and the sifting subtracts the mean of the \(2D\) envelopes, $$\mathbf{h}_{s+1} = \mathbf{h}_s - \frac{1}{2D} \sum_{d=1}^{2D} \mathbf{e}_d[\mathbf{h}_s].$$ The adaptive rules act on the projections. "consecutive" accepts when every projection keeps \(|E - Z| \le 1\) in consecutiveCount successive states after a subtraction, the run restarting when one does not. "doubleThreshold" accepts a state, the signal included, whose projections all keep \(|E - Z| \le 1\) and whose ratio \(|\mathbf{m}| / a\) meets the double threshold of decomposeEMD; \(a\) is the mean distance of the envelopes to their mean with "globalMean", or the mean half distance between the envelopes of antipodal directions with "envelopePairs". Before extraction \(k\) the decomposition ends with "terminalResidue" when every projection of \(\mathbf{r}_{k-1}\) has at most one extremum, with "modeLimit" when \(k - 1\) equals sifting$maxModes, and with "insufficientExtrema" when a direction has no envelope. One extraction serves all the channels, so they share the number of modes.

Value

A list with

modes

Double array, samples by modes by channels, in the order of the columns of signal.

residue

Numeric matrix, samples by channels.

iterations

Integer vector, the subtractions of each mode.

converged

Logical vector by mode, as in decomposeEMD.

stopReason

"terminalResidue", "modeLimit" or "insufficientExtrema".

References

Rehman, N. and Mandic, D. P. (2010). Multivariate empirical mode decomposition. Proceedings of the Royal Society A, 466, 1291–1302. doi:10.1098/rspa.2009.0502

The selection of the reflected extrema and the spline interpolation of the envelope nodes are adapted from emd.m (G. Rilling, March 2007), distributed with CEEMDAN revision af9a0f83, copyright (c) 2020 Marcelo A. Colominas, MIT License; see the NOTICE file of the installed package.

Examples

Time <- 2 * pi * (0:255) / 256
z <- cos(0.3 * Time) * exp(2i * Time) +
    0.3 * abs(sin(2.3 * Time)) * exp(17i * Time)
Signal <- cbind(Re(z), Im(z))
OUT <- decomposeMEMD(Signal, directionCount = 64,
                     sifting = list(stopRule = "fixed", fixedSift = 10,
                                    boundary = "reflection", maxModes = 3))
dim(OUT$modes)
#> [1] 256   3   2
OUT$stopReason
#> [1] "modeLimit"