Page: 607

Analysis Help
Maintenance: Filter

The filter operation allows you to create a smoothed waveform by filtering an existing one. You can also rectify the signal before filtering it, to obtain the linear envelope of that signal. You are presented a menu of options and parameters which control the filtering. Some or all of these will have to be set before you can proceed.

First, use the Waveform selection to set the waveform number for the data to be filtered. Then use the Highpass selection to select high-pass filtering, or the Notch selection to select notch filtering. If both selections are enabled, high-pass overrides notch filtering. Low-pass filtering is the default action, when neither of these two selections is enabled.

Use the Zero-lag selection to select whether or not you want "zero-lag" (two pass) filtering to be performed. The algorithm used for low-pass filtering is a version of the "Second-order, zero-lag Butterworth filter", but you can select whether or not the reverse pass is to be performed. If only the forward pass is made, phase-shift distortion will be introduced. If you select "zero-lag" filtering, it will take twice as long, but the reverse pass will eliminate the phase-shift. In either case, end-point extrapolation is used to start off the filter; points equal to the average of the first few points (and of the last few points) of the waveform are temporarily prepended (and appended) to the waveform.

The notch filter is a variable second-order, infinite impulse response (IIR) filter based on a bilinear transform, and the high-pass filter is a third order IIR filter. The Zero-lag option will also work with these, though phase lag tends to be less of a concern than with low-pass filtering at low cutoff frequencies.

Use the Cutoff selection to specify the cutoff frequency of the low-pass filter. You are prompted for the frequency in Hertz, which can be any positive real number. The program limits the cutoff frequency to 1/3 of the sampling rate for the new waveform, to avoid the "ringing" caused by too high a cutoff frequency. If you enter the number 0, then filtering will not be performed -- only the other processing, such as rectification and spurious point rejection, will occur.

The Divisor selection allows you to set the sampling rate divisor to be used when the new waveform is created. This divisor must be a positive integer. A divisor of 1, the initial value, will mean that the sampling rate will not be divided. The divisor must be 1 for "zero-lag" filtering.

The Rectify selection enables full-wave rectification of the signal, before filtering. This is disabled by default. The three remaining parameters -- the rectifier baseline and the lower and upper window discriminators -- can be set either by making the appropriate selection from the menu then entering the value, or by using the Visually selection then selecting the levels with the pointing device. (When you select Visually, the program asks you whether you want to view just the current analysis range, selected by the "Start of run" and "End of run" parameters, rather than the whole run. Whichever you choose, the waveform is displayed, and the cursor is turned on so you can point to the levels you want.) The window discriminators are used to perform spurious point rejection, as described below. If this is not desired, set them to the minimum and maximum allowed values. The baseline indicates the level to be used as the "zero" for full-wave rectification. To disable rectification, set it to the minimum allowed level, or just disable the Rectify option.

Finally, once all parameters have been set, use the Go selection of this menu to begin the filtering operation. If some of the parameters are set incorrectly, the operation will quit. Otherwise, you are asked for the number of the new waveform, which must be different from the one being filtered. If you enter the number of a waveform which already exists, this waveform is erased, and the new one takes its place.

A new waveform data file will be created, and any combination of four operations will be performed to generate the new waveform, depending on which options are set. If the window discriminators are set, spurious point rejection is performed; all points out of this range are rejected, and replaced with the last valid point. If the baseline level is set, the waveform will be full-wave rectified. If the cutoff frequency is set, the (possibly rectified) waveform will be filtered. Finally, if the divisor is set to some integer n, which is greater than 1, then the resulting waveform's sampling rate will be divided by n. That is, only the first of every n points will be kept in the file. Once the operation has completed, the run header in the frame file is updated.

If the signal being filtering is fairly weak, you may want to amplify the signal to preserve the smoothness of the resulting signal. You can accomplish this by using the Amp selection to set the gain of the filter, before you start filtering. If you want to differentiate the filtered signal, a strong signal is needed, so you probably should amplify it. You can amplify a signal beyond the range of 4096 levels generated by the A/D converter; the software allows eight times that range. A problem can occur if you use too large a gain on a signal that is not centered on zero volts: the offset from zero volts is also amplified, and it can overflow the short integer in which it is stored, in the calibration information. If this occurs, the calibration will be incorrect. The relative voltage levels will still be accurate for the new waveform, but the voltage offset of the waveform will be false. This may not be a problem if you're only interested in the differentials.


SCRC WWW administrator:
Copyright © 2017 G. R. Detillieux, Spinal Cord Research Centre, The University of Manitoba.