Improved Complete Ensemble Empirical Mode Decomposition with Adaptive Noise
decomposeICEEMDAN.RdComputes each residue as the average local mean of the previous residue perturbed by a mode of supplied noise realizations, and each mode as the difference between consecutive residues.
Arguments
- signal
Numeric vector of at least two finite values without
dim, in the units of the quantity.- noise
Finite numeric matrix with one row per sample of
signaland one column per realization, \(M \ge 1\); column \(m\) is a realization \(w^{(m)}\) of unit variance, used as supplied. The function draws no random numbers.- amplitudeRatio
Dimensionless ratio \(\varepsilon_0 \ge 0\). Default
0.2, as indecomposeEEMD.- normalizeNoise
TRUEorFALSE, without default. From the second stage on,TRUEdivides each noise mode by its standard deviation before scaling;FALSEkeeps its amplitude.normalizeNoise = TRUEcorresponds toSNRFlag = 2of ceemdan.m.- sifting
Named list of sifting controls, as in
decomposeEMD; the rule"consecutive"is rejected. The same list decomposes the noise realizations.
Details
Each column of noise is decomposed once with sifting,
\(\eta_k^{(m)} = E_k(w^{(m)})\). From \(r_0 = x\), before stage \(k\)
the common residue \(r_{k-1}\) ends the decomposition, in this order, with
"terminalResidue" when it has at most one extremum, with
"modeLimit" when \(k - 1\) equals sifting$maxModes and with
"insufficientExtrema" when its envelopes cannot be built. Stage
\(k\) perturbs \(r_{k-1}\) with
\(p^{(m)} = \beta_{k-1}^{(m)} \eta_k^{(m)}\), where
\(\beta_0^{(m)} = \varepsilon_0 \, \mathrm{sd}(x) / \mathrm{sd}(\eta_1^{(m)})\)
and, for \(k \ge 2\), \(\beta_{k-1} = \varepsilon_0 \, \mathrm{sd}(r_{k-1})\),
divided by \(\mathrm{sd}(\eta_k^{(m)})\) when normalizeNoise is
TRUE; standard deviations use the divisor \(N - 1\). With
\(A\) the average first mode of \(r_{k-1} + p^{(m)}\) and \(\bar p\)
the mean perturbation, the new residue is the mean local mean and the mode
the difference of residues:
$$r_k = r_{k-1} + \bar p - A, \qquad d_k = r_{k-1} - r_k.$$
A realization without \(\eta_k\) contributes a null perturbation and
stays in the divisor \(M\).
Value
A list with
- modes
Double matrix, samples by modes.
- residue
Numeric vector, the final common residue.
- iterations
Integer vector by mode, the sum of the subtractions of the \(M\) extractions of the stage.
- converged
Logical vector by mode:
TRUEwhen the \(M\) extractions accepted,FALSEwhen one ended without accepting or could not begin,NAwhen all completed fixed sifting.- stopReason
"terminalResidue","modeLimit"or"insufficientExtrema".
Conditions
A noise mode of zero standard deviation leaves its scale undefined and
stops the function with an error of class xemdZeroEnergy.
References
Colominas, M. A., Schlotthauer, G. and Torres, M. E. (2014). Improved complete ensemble EMD: A suitable tool for biomedical signal processing. Biomedical Signal Processing and Control, 14, 19–29. doi:10.1016/j.bspc.2014.06.009
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 <- seq(0, 9, length.out = 1000)
Signal <- sin(pi * Time) + sin(2 * pi * Time) + sin(6 * pi * Time) +
0.5 * Time
set.seed(628)
Noise <- t(matrix(stats::rnorm(10L * length(Signal)), nrow = 10L,
byrow = TRUE))
Sifting <- list(stopRule = "doubleThreshold", thresholds = c(0.05, 0.5),
fraction = 0.05, maxSift = 2000, boundary = "reflection",
maxModes = Inf)
# Two of the ten realizations keep the example short.
OUT <- decomposeICEEMDAN(Signal, noise = Noise[, 1:2], amplitudeRatio = 0.2,
normalizeNoise = TRUE, sifting = Sifting)
dim(OUT$modes)
#> [1] 1000 7
OUT$stopReason
#> [1] "insufficientExtrema"
max(abs(rowSums(OUT$modes) + OUT$residue - Signal))
#> [1] 4.440892e-16