| decomposeIF | R Documentation |
Decomposes a signal by successive extraction of components, each obtained by iterating the subtraction of a moving average whose filter is a supplied prototype resampled to a support set by the extrema of the residue.
decomposeIF(signal, filter, boundary, tolerance, maxIterations, stretch,
maxModes = Inf)
signal |
Numeric vector of finite values without |
filter |
Prototype filter, a numeric vector of finite weights of odd length, at least 3. No default. The package tests use the 13 weights that fifpy obtains from its prototype for a half width of 6. |
boundary |
|
tolerance |
Bound of the relative change between consecutive
iterates, greater than zero and less than one. No default; the package
tests use |
maxIterations |
Whole number |
stretch |
Number greater than zero that scales the support of the filter. No default; the package tests use 1.6. |
maxModes |
Whole number |
Before extraction k the decomposition ends with
"terminalResidue" when r_{k-1} has at most one extremum and
with "modeLimit" when k - 1 equals maxModes. Otherwise
the half width is l_k = 2\,\mathrm{round}(\mathrm{stretch}\, N / E)
for the E extrema of r_{k-1}; from the second extraction a value
that does not exceed the previous half width becomes
\lceil 1.1\, l_{k-1} \rceil. The prototype is resampled to
2 l_k + 1 weights and the iteration
f^{(q)} = f^{(q-1)} - \mathcal{L}_w f^{(q-1)}, \qquad f^{(0)} = r_{k-1},
with \mathcal{L}_w the moving average under boundary, stops at
the first q with
\|f^{(q)} - f^{(q-1)}\|_2 / \|f^{(q-1)}\|_2 \le tolerance
(converged TRUE) or after maxIterations
(converged FALSE). Then c_k = f^{(Q)} and
r_k = r_{k-1} - c_k. A shrinking prototype is integrated over
rescaled bins; an enlarged one is interpolated linearly and normalized to a
unit absolute sum. The components are not shown to satisfy the counting
conditions of intrinsic mode functions.
A list with
modes |
Double matrix, samples by components. |
residue |
Numeric vector, the final residue. |
iterations |
Integer vector, the iterations |
converged |
Logical vector by component. |
stopReason |
|
Cicone, A. and Zhou, H. (2018). Numerical Analysis for Iterative Filtering with New Efficient Implementations Based on FFT. arXiv:1802.01359.
The support rule, the resampling of the prototype and both iterations are adapted from fifpy, revision 26e51e7d45e551950dea8be37ece447fc4340296, copyright (c) 2022 Emanuele Papini, MIT License; see the NOTICE file of the installed package.
decomposeLMD, decomposeEMD
Time <- seq_len(1000) / 1000
Signal <- cos(2 * pi * 2 * Time) + 0.25 * cos(2 * pi * 24 * Time) +
0.0625 * cos(2 * pi * 288 * Time)
Filter <- c(6.6306270449357867e-06, 0.00053827687799438354,
0.0082858777882808092, 0.044245208647455882, 0.11927281750086954,
0.20513332487239222, 0.24503568511284984, 0.20513332487239222,
0.11927281750086952, 0.044245208647455903, 0.0082858777882808109,
0.00053827687799438213, 6.6306270449358087e-06)
OUT <- decomposeIF(Signal, filter = Filter, boundary = "periodic",
tolerance = sqrt(0.001), maxIterations = 200,
stretch = 1.6, maxModes = 3)
OUT$iterations
OUT$stopReason
Zero <- decomposeIF(Signal, filter = Filter, boundary = "zero",
tolerance = sqrt(0.001), maxIterations = 200,
stretch = 1.6, maxModes = 3)
Zero$iterations
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.