Step 3: Filter Parameters

Using the EMG Tools Filter Parameters Panel

EMG Tools step 3 interface panel
  • 1

    Choose Filter Type

    Either bandpass or butterworth (lowpass) filters can be selected. Both filters are dual-pass zero-lag.

    Note

    Both butterworth and bandpass filter parameters are built using Matlab's butter function.

  • 2

    Enter Filter Parameters

    Enter all of the paramaters for the filter as well as for the linear envelope filter (single-pass butterworth).

  • 3

    Enter Downsample Frequency (Optional)

    The desired downsampling frequency can be entered or left alone if downsampled data is not desired.

Choose the filter type.

EMG Tools filter selector

The choice of filter is either a bandpass or a lowpass butterworth filter. Parameters for both are set up using Matlab's butter function as shown below.

% Bandpass Filter
[B, A] = butter(order, [cutoff_low,cutoff_high]/(sample_frequency/2), 'bandpass'); 

% Butterworth Filter
[B, A] = butter(order, cutoff_high/(sample_frequency/2), 'low'); 

Low cutoff.

EMG Tools low frequency cutoff value

Frequencies below this cutoff will be removed if you are using the bandpass filter. If you are using the butterworth filter, this is not used.

High cutoff.

EMG Tools high frequency cutoff value

Frequencies above this cutoff value will be removed. This cutoff value is used for both bandpass and butterworth filter options.

Filter order.

EMG Tools filter order

Sets the order of the selected filter.

Note

This order parameter is additional to the effect of the dual-pass filter.

Linear envelope.

EMG Tools linear envelope filter frequency

Sets the desired cutoff frequency of the linear envelope. Filter parameters are built using the code below.

% Set up linear envelope coefficients
[D, E] = butter(filter_order_LE, cutoff_LE/(sample_frequency/2), 'low');  

% Use coefficients in single-pass filter
data_LE = filter(D, E, data_full_wave_rectified); 

Linear envelope order.

EMG Tools linear envelope filter order

Sets the order of the linear envelope.

Select downsample frequency.

EMG Tools downsample frequency

If you would like to downsample the output data, set the desired downsample frequency here.

Related tutorials