rectification {biosignalEMG}R Documentation

Full-wave and half-wave rectification of an EMG


Obtains the full-wave or half-wave rectification of an EMG.


rectification(data, channel, rtype = c("fullwave", "halfwave"),, ...)



an ‘emg’ object.


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).


a string indicating if the rectification is full-wave ("fullwave", default) or half-wave ("halfwave").

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.


additional arguments to be passed to the generic function.


A full-wave rectified EMG is obtained by computing the absolute value of the raw signal; In half wave rectification, the positive values are passed, while the negatives values are blocked (set to zero).

Rectification is mainly used as a pre-proccessing step before another process like averaging or computing the envelope of the signal.


An ‘emg’ object which contains the rectified EMG.


J.A. Guerrero


Konrad P. (2005) The ABC of EMG: A Practical Introduction to Kinesiological Electromyography. Version 1.0, Noraxon INC. USA.

See Also

emg, dcbiasremoval, syntheticemg


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

# Simulate 5 seconds of an EMG
emgx <- syntheticemg(n.length.out = 5000, = 1, on.duration.mean = 350, = 10, = 0.05, off.duration.mean = 300, = 20, 
    on.mode.pos = 0.75, shape.factor = 0.5, samplingrate = 1000, units = "mV", = "Synthetic EMG")
plot(emgx, main = "Synthetic EMG")

# Full-wave rectified EMG
emgr1 <- rectification(emgx, rtype = "fullwave")
plot(emgr1, main = "Full-wave rectified EMG")

# Half-wave rectified EMG
emgr2 <- rectification(emgx, rtype = "halfwave")
plot(emgr2, main = "Half-wave rectified EMG")

# reset graphical parameters

[Package biosignalEMG version 2.1.0 Index]