Decorrelates an EMG signal

Share:

Description

Decorrelates an EMG signal using an SVD decomposition of a covariance matrix.

Usage

1
whitening(data, channel, method = c("PCA", "ZCA"), k = 4, r = 1, data.name)

Arguments

data

an ‘emg’ object.

channel

in case of multi-channel data, channel is the specific channel to be considered by the procedure. Possible values: a character vector specifying the name of the channel to be considered (case sensitive) or a numeric value specifying the channel to be considered (number of column in data).

method

the whitening method to be applied to the EMG signal: "PCA" (default) or "ZCA" (see ‘References’).

k

number of columns (see ‘Details’) to construct the covariance matrix.

r

column to be used as the whitened signal (see ‘Details’).

data.name

a string specifying the name of the variable which will appears on the plots. If empty or not provided is taken from the object given as data.

Details

Whitening an EMG signal is a preprocessing step that can improve amplitude estimation, onset activation detection and fecature classification.

A whitening transformation reduces autocorrelation within a signal.

The implemented methods are PCA and ZCA, both based on a SVD decomposition of a covariance matrix. The (artificial) matrix is constructed with k shifted versions of the EMG signal. The result is then an matrix with k columns. The output of the whitening procedure is (usually) the first column (r=1).

Value

An ‘emg’ object storing the whitened EMG.

Note

The output is not fully whitened. The method decorrelates the columns of the artificial matrix, which contains a shifted version of the signal. At the end only one column (which can be autocorrelated) is taken as the output. Also, it works better when the sampling rate is high (low sampling rates tend to produce decorrelated samples).

Author(s)

J.E. Macias-Diaz, J.A. Guerrero jaguerrero@correo.uaa.mx

References

Implementing PCA/Whitening http://ufldl.stanford.edu/wiki/index.php/Implementing_PCA/Whitening

See Also

dcbiasremoval, highpass

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Load a data.frame with EMG data
data(emg95306000)
# Coerce a data.frame into an 'emg' object
x <- as.emg(emg95306000, samplingrate = 1000, units = "mV")

# Whitening x
y <- whitening(x)

# change graphical parameters to show multiple plots
op <- par(mfrow = c(2, 1))

# plot the original channel and the corresponding whitened channel
plot(x, main = "Original  channel")
plot(y, main = "Whitened channel")

# reset graphical parameters
par(op)