Time-Varying Filter Empirical Mode Decomposition
decomposeTVFEMD.RdDecomposes a signal by successive extraction of components, each obtained by sifting with a local mean that is a B-spline approximation on knots placed by a time-varying cutoff frequency (TVF-EMD).
Usage
decomposeTVFEMD(signal, bandwidthThreshold, splineOrder,
intermittencyThreshold, maxSift, maxModes = Inf)Arguments
- signal
Numeric vector of finite real values without
dim, in the units of the quantity. Positions are sample indices and the cutoff is in radians per sample.- bandwidthThreshold
Dimensionless threshold \(\xi > 0\) of the relative instantaneous bandwidth. No default; the original study uses 0.1.
- splineOrder
Whole number \(n \ge 1\), the order of the B-spline (degree \(n - 1\)). No default; the original study uses 28.
- intermittencyThreshold
Dimensionless threshold \(\rho > 0\) of the intermittency test of the cutoff. No default; the original study uses 0.25.
- maxSift
Whole number \(\ge 1\) of subtractions of one component. No default; pytvfemd stops after five.
- maxModes
Whole number \(\ge 1\) or
Inf, the limit of components; defaultInf.
Details
Before extraction \(k\) the decomposition ends with
"terminalResidue" when \(r_{k-1}\) has fewer than four extrema,
maxima plus minima, and with "modeLimit" when \(k - 1\) equals
maxModes. A component is obtained by sifting,
$$h_{s+1} = h_s - m_s,$$
where \(m_s\) is the periodic least-squares B-spline approximation of
order \(n\) of \(h_s\) on knots at the extrema of
\(\cos\varphi\), \(\varphi\) the cumulative realigned cutoff. Each
iteration extends \(h_s\) by symmetric reflection of
\(\mathrm{round}(N/2)\) samples per side and restores the record
afterwards. The cutoff follows from the amplitude \(A\) and the frequency
of the analytic signal, interpolated at the minima and at the maxima of
\(A\); values above
\(0.9\pi\) are lowered to \(0.9\pi\), undefined or non-positive values
are interpolated, and the zones marked by intermittency events, where the
relative variation of the cutoff between consecutive maxima of the signal
exceeds \(\rho\), are replaced by interpolation.
The stopping rule aggregates the relative instantaneous bandwidth
\(\theta\) over the samples from \(\mathrm{round}(0.05N)\) to
\(\mathrm{round}(0.95N)\): \(h_s\) is accepted when the mean of
\(\theta\) is below \(\xi (1 + (s + 1)/4)\), from \(s = 1\) in the
first component and from \(s = 0\) in the later ones, or when the samples
with \(\theta > \xi\) are fewer than \(0.2N\). This aggregation of
pytvfemd 0.3.14 replaces the local criterion of the monograph.
converged is FALSE when maxSift subtractions end
without acceptance or when the cutoff or the knots cannot be built.
Acceptance refers to the aggregated rule above; it does not establish the
pointwise narrow-band condition. Neither that rule nor a returned component
guarantees the two classical IMF conditions.
Value
A list with
- modes
Double matrix, samples by components.
- residue
Numeric vector, the final residue.
- iterations
Integer vector, the subtractions of each component.
- converged
Logical vector by component.
- stopReason
"terminalResidue"or"modeLimit".
References
The stopping rule and the reflection of the sifting, the end of the decomposition, the interpolation, the bounds and the realignment of the cutoff, the relative bandwidth, the knots and the periodic B-spline approximation are adapted from pytvfemd 0.3.14 (Stefano Bianchi and Alessandro Longo), GPL-3; 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 <- decomposeTVFEMD(Signal, bandwidthThreshold = 0.1, splineOrder = 28,
intermittencyThreshold = 0.25, maxSift = 5)
dim(OUT$modes)
#> [1] 3000 4
OUT$iterations
#> [1] 1 2 1 1
OUT$stopReason
#> [1] "terminalResidue"