Skip to contents

Evaluates numerical diagnostics of the intrinsic mode function conditions for each column of a matrix: the balance of extrema and zero crossings, and a double threshold on the envelope mean relative to its amplitude.

Usage

assessIMF(modes, thresholds = c(0.05, 0.5), fraction = 0.05,
          boundary = "reflection")

Arguments

modes

Finite numeric matrix, samples by columns. Attributes other than dim do not reach the outputs.

thresholds

Two dimensionless numbers \(0 < \theta_1 < \theta_2\); default c(0.05, 0.5).

fraction

The admitted fraction \(\alpha\) in \([0, 1)\); default 0.05.

boundary

"reflection" (default) or "extrapolation", the extension of the envelopes at the borders, as in decomposeEMD. The defaults are those of emd.m, shared with the sifting controls.

Details

The ideal envelope condition is a zero local mean. This diagnostic uses tolerances and a specified boundary rule; passing it does not establish recovery of a physical component. For methods defined by other conditions, such as a bandwidth objective, it is an additional EMD-based diagnostic.

count tests \(|N_e - N_z| \le 1\), with the extrema \(N_e\) and zero crossings \(N_z\) counted as in decomposeEMD. deviation applies to $$\sigma = \frac{|m_e|}{a_e},$$ \(m_e\) and \(a_e\) the half sum and the half difference of the envelopes, the double threshold that accepts a mode under stopRule = "doubleThreshold": the fraction of samples with \(\sigma \ge \theta_1\) is at most \(\alpha\) and no sample has \(\sigma \ge \theta_2\).

Value

A list of two logical vectors with one element per column:

count

The counting condition.

deviation

The double threshold, NA where the boundary rule leaves the column without envelopes.

References

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 = 3000)
Signal <- sin(pi * Time) + sin(2 * pi * Time) + sin(6 * pi * Time) +
    0.5 * Time
OUT <- decomposeEMD(Signal, sifting = list(stopRule = "doubleThreshold"))
# The signal, its modes and its residue as columns.
assessIMF(cbind(Signal, OUT$modes, OUT$residue))
#> $count
#> [1] FALSE  TRUE  TRUE  TRUE FALSE
#> 
#> $deviation
#> [1] FALSE  TRUE  TRUE  TRUE    NA
#>