EEMD: Ensemble Empirical Mode Decomposition

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/empirical_mode_decomposition.R

Description

This function performs ensemble empirical mode decomposition (EEMD).

Usage

1
2
3
4
5
EEMD(sig, tt, noise.amp, trials, nimf, trials.dir = NULL, verbose = TRUE, 
    spectral.method = "arctan", diff.lag = 1, tol = 5, max.sift = 200,
    stop.rule = "type5", boundary = "wave", sm = "none",
    smlevels = c(1), spar = NULL, max.imf = 100, interm = NULL, 
    noise.type = "gaussian", noise.array = NULL)

Arguments

sig

a time series to be decomposed (vector)

tt

The sample times of sig

noise.amp

Amplitude of white noise to use in denoising algorithm

trials

Number of times to run EMD

nimf

Number of IMFs to record, IMFs past this number will not be saved

trials.dir

Directory where EEMD trial files will be stored, defaults to “trials.” This will create a directory if none exists.

verbose

If TRUE, notify when each trial is complete

spectral.method

See Sig2IMF.

diff.lag

See Sig2IMF.

tol

See Sig2IMF.

max.sift

See Sig2IMF.

stop.rule

See Sig2IMF.

boundary

See Sig2IMF.

sm

See Sig2IMF.

smlevels

See Sig2IMF.

spar

See Sig2IMF.

max.imf

See Sig2IMF.

interm

See Sig2IMF.

noise.type

If unspecified or gaussian, produce a Gaussian noise series with length length(sig) and standard deviation noise.amp. If uniform, produce a uniform random distribution with length length(sig) and maximum absolute value of noise.amp. If custom, then use a custom noise array as defined in input parameter noise.array (see below).

noise.array

If noise.type = "custom", this array must be a TRIALS x LENGTH(TT) collection of time series to be used in the place of uniform or gaussian noise. Each row in the array corresponds to the noise series added for that particular trial during the EEMD run. By default, noise.array = NULL.

Details

This function performs ensemble empirical mode decomposition, a noise assisted version of the EMD algorithm. The EEMD works by adding a certain amplitude of white noise to a time series, decomposing it via EMD, and saving the result. If this is done enough times, the averages of the noise perturbed IMFs will approach the “true” IMF set. The EEMD can ameliorate mode mixing and intermittency problems (see references section).

This EEMD algorithm creates a directory trials.dir and saves each EMD trial into this directory. The number of trials is defined using trials. The trial files in this directory can then be processed using EEMDCompile to produce the averaged IMF set, or to plot the Hilbert spectrogram of the data. Keep in mind that the EEMD is an expensive algorithm and may take significant time to run.

Value

emd.result

The result of each individual EMD trial. This is saved directly to files in directory trials.dir (i.e. it is not returned by EEMD.)

Note

Previous versions of this function used a uniform random noise distribution (i.e. runif) to generate the noise time series. The default noise time series is now Gaussian in accordance with existing EEMD literature.

Author(s)

Daniel Bowman [email protected]

References

Wu, Z. A. and Huang, N. E. (2009) Ensemble empirical mode decomposition: A noise assisted data analysis method. Advances in Adaptive Data Analysis, 1, 1-41.

See Also

Sig2IMF, CombineTrials, EEMDCompile, PlotIMFs.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
data(PortFosterEvent)
trials <- 10
nimf <- 10
noise.amp <- 6.4e-07
trials.dir <- "test"

set.seed(628)
#Run EEMD (this may take some time)
## Not run: EEMD(sig, tt, noise.amp, trials, nimf, trials.dir = trials.dir)

#Compile the results
## Not run: EEMD.result <- EEMDCompile(trials.dir, trials, nimf)

#Plot the IMFs
time.span <- c(5, 10)
imf.list <- 1:3
os <- TRUE
res <- TRUE
## Not run: PlotIMFs(EEMD.result, time.span, imf.list, os, res)

Example output



hht documentation built on May 29, 2017, 9:26 a.m.