Automatic on/off detection algorithm based on a simple threshold rule
Automatic detection algorithm to determine the times at which muscles “turn on” (activity periods) and “turn off” (silence periods) in an EMG signal.
an ‘emg’ object.
in case of multi-channel data,
a threshold value to determine if a datum reresent activity (above the threshold) or silence (below the threshold) in a signal.
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
In this procedure, on and off time estimation is determined by the times at which the envelope of the signal (determined using
envelope) exceeds a threshold.
A numeric vector with values 0 (silence) and 1 (activity).
J.E. Macias-Diaz, J.A. Guerrero email@example.com
Rose W. (2014) Electromyogram Analysis. Mathematics and Signal Processing for Biomechanics. http://www.udel.edu/biology/rosewc/kaap686/
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") # change graphical parameters to show multiple plots op <- par(mfrow = c(2, 1)) # Detect the phases of activation in x b <- onoff_singlethres(x, t = 0.1) # Plot 'x' and the detected phases plot(x, main = "Sample EMG") plot(b, type = "l", main = "Detected phases (single thresholding)") # reset graphical parameters par(op)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.