**By Alan Macy, BIOPAC Systems, Inc.**

Filtering is a core signal processing function. Filtering is the act of discrimination between one type of data and another. In the case of physiological signal processing, filters are employed to attenuate undesired signal frequencies and emphasize others. There are a few basic filter types and many methods available to implement those types. Commonly used filters are: Lowpass, Highpass and Bandpass. In the case of a Lowpass filter (LPF), signal frequencies lower than the filter cutoff frequency are emphasized versus those higher than the cutoff frequency. For a Highpass filter (HPF), the signal frequencies higher than the filter cutoff frequency are emphasized versus those lower than the cutoff frequency. A Bandpass filter (BPF) has two cutoff frequencies, a low and high cutoff. In this case, signal frequencies between the filter cutoff frequencies are emphasized versus those lower then the low cutoff frequency and higher than the high cutoff frequency. All types of filters can be crafted as a combination of Lowpass, Highpass and Bandpass filters. For example, a comb filter can be constructed from a cascaded series of Bandpass filters.

Filters can be implemented as analog or digital. Analog filters are physically realized using electrical components, such as resistors, capacitors, inductors, delay lines and operational amplifiers. Digital filters are implemented as an algorithm, which may reside in a computer, embedded microprocessor or digital signal processor. Digital filters require the signal data to be digitized, prior to processing. An analog to digital converter is used to convert time-varying signal data into a sequential string of proportional numbers. Digital filters process this input string of numbers to generate an output string of numbers. This output string of numbers can then be converted back into a time-varying signal through the use of a digital to analog converter.

Analog filters can be reasonably well-emulated by the combination A/D converter > Digital Filter > D/A converter. In the case of physiological measurements, it’s most common to employ analog to digital converters to direct the signal data straight to the computer. Once in computer memory, digital filters can be applied to the data to extract the signals of interest.

There are two popular algorithms used to implement digital filters, Finite Impulse Response (FIR) and Infinite Impulse Response (IIR). Both FIR and IIR filters incorporate delay elements, multipliers and a summing junction, however FIR filters don’t use feedback and IIR filters do use feedback. Feedback in an IIR filter means that some portion of the filter’s output is introduced back to the filter’s input. Assuming a perfect IIR filter, the recursive process implies that any input signal to the filter will have a residual influence on the output of the filter for an arbitrary period of time. This is why feedback or recursive filters are called infinite impulse response filters. An impulse applied to an IIR filter will produce a response that lasts for eternity. In practice, however, the impulse response of IIR filters will ultimately drop to a value range which can no longer be properly characterized by the significant digits employed during processing. Accordingly, the effective impulse response of IIR filters remains finite.

An FIR filter does not incorporate feedback or recursion into its design. This type of filter pushes the signal data through the filter in just one direction. In order to make an effective FIR filter, typically many internal filter stages are needed. A FIR filter stage consists of a delay element combined with a multiplier element. A 101 stage FIR filter will have 101 sequential delay stages and 101 multiplier stages. The multiplier stages sample the data present after each delay stage and multiplies the sensed value by some predefined constant, called a coefficient. The multiplier stage outputs are all summed together to create the FIR filter output.

Because IIR filters are recursive and FIR filters are non-recursive, they differ in important ways. If not properly designed, IIR filters can be unstable. Instead, no matter how an FIR filter is designed, it’s inherently stable. IIR filters do not have perfectly linear phase, even if they can be designed to have reasonably linear phase in regions of interest. FIR filters can have perfectly linear phase. Linear phase means that the filter will delay all frequencies by the same time period. This time delay is known as group delay. Linear phase filters can faithfully mimic the essential shape of complex input waveforms, whereas non-linear phase filters may introduce certain distortions to the shape of an input waveform. Because of similarities in topology, certain types of IIR filters are well-suited to emulate certain analog filters. Because analog filter design methods are very advanced and well-documented, this topological similarity allows analog design methods to be transposed to the digital domain. For example, common analog or digital IIR filter can both implement a transfer function defined by a ratio of biquadric functions. These filters are known as biquads or second order filters. When designing a biquad IIR filter, the biquad analog transfer function is converted to digital form via a substitution process called the bilinear transformation.

For more information on BIOPAC’s wide range of tools for recording, displaying, and analyzing EEG measurements and filtering data from human and animal subjects, visit BIOPAC’s filtering or electroencephalography pages, and view BIOPAC’s full line of electrodes, amplifiers, and wearable, wireless transmitters and loggers.

**BIOPAC Systems, Inc.** provides life science researchers and educators with data acquisition and analysis systems that inspire people and enable greater discovery about life. *Visit us at www.biopac.com.*

## Recent Comments