lowpass: Lowpass filter an EMG signal

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

View source: R/lowpass.R

Description

Lowpass filter an EMG signal.

Usage

1
lowpass(data, channel, cutoff = 50, n = 5, 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).

cutoff

cutoff frequency in Hertz for the lowpass filter.

n

filter order for the lowpass filter.

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

This procedure performs a lowpass filtering to the EMG signal with delay correction.

Value

An ‘emg’ object which contains the filtered EMG.

Note

This procedure only uses a butterworth type filter of order n. In order to apply a different type of filter, please see the documentation of the ‘signal’ package.

Author(s)

J.A. Guerrero jaguerrero@correo.uaa.mx

See Also

dcbiasremoval, whitening, highpass

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# This example computes the LE-envelope using the lowpass routine
# 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")

# Compute the rectified signal
x_rect <- rectification(x)

# Filter the rectified signal
y <- lowpass(x_rect, cutoff = 100)

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

# plot the original channel, the filtered channel and the 
# LE-envelope
plot(x, channel = 1, main = "Original  channel")
plot(x_rect, main = "Rectified  channel")
plot(y, main = "LE-envelope")

# reset graphical parameters
par(op)

Example output



biosignalEMG documentation built on May 2, 2019, 12:07 p.m.