Decorrelates an EMG signal using an SVD decomposition of a covariance matrix.
1 
data 
an ‘emg’ object. 
channel 
in case of multichannel 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 
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
).
An ‘emg’ object storing the whitened EMG.
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).
J.E. MaciasDiaz, J.A. Guerrero jaguerrero@correo.uaa.mx
Implementing PCA/Whitening http://ufldl.stanford.edu/wiki/index.php/Implementing_PCA/Whitening
dcbiasremoval
, highpass
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)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.