Windmill Software Ltd
Windows Engineering Software

Filtering
March 1999

Monitor Newsletter Archive

Home
Newsletters
Shop


Issue 8: Filtering

CONTENTS

Windmill News | Filtering: removing interference from your signal | Choosing the right type of filter | Other filtering considerations | Examples of filtering in practice | Glossary T-Z


WINDMILL NEWS

As a special offer our subscribers can download the standard Windmill software, with the LabIML RS232 Instrument driver, absolutely free. This lets you connect almost any ASCII instrument with a COM port to, say, an Excel spreadsheet, without any programming. To download the software type your e-mail address and press the Subscribe button on the right.

The software comes with comprehensive on-line Help. We've also compiled a FAQ to answer your specific questions. It doesn't contain many questions yet - but perhaps you would let us know of any problems you've had which you solved without our help. We could then include them in our FAQ. E-mail monitor@windmillsoft.com with your questions and answers.


FILTERING: REMOVING INTERFERANCE FROM YOUR SIGNAL

Many analogue signals - temperature, pressure, strain, etc - can benefit from some type of conditioning to improve the quality of measurement. Filtering is a type of conditioning which removes interference from your signals.

The data acquisition interface might filter the signal (analogue filtering); alternatively analysis software like FAMOS might filter the signal. Here we are focusing primarily on analogue filtering in hardware.

For our purposes a filter is a device that removes undesired signals according to their frequency. If the frequency spectra of signals and interference are sufficiently different, filtering can be very effective.


Choosing the Right Type of Filter

High-Pass Filter
When a low-level transducer signal is superimposed on a large dc output voltage, a high-pass filter might be useful. This attenuates (removes) low frequencies. Using a cut-off frequency of, say, 4 Hz, will eliminate the dc voltage which has a frequency of zero.

A high-pass filter will remove "drift". This can be a particular problem with biological and chemical signals, but not usually with modern electronic signals.

*

Low-Pass Filter
More commonly used is a low-pass filter. This lets through the lower frequencies and attenuates the higher frequencies. Choose the cut-off frequency to be compatible with the unwanted frequencies, the frequencies present in the signal you are measuring, and the sampling rate of the analogue-to-digital converter.

There are a number of other ways of removing high frequency noise from your signals. The amplifier itself has a high frequency cut-off. An integrating A-D converter will also act as a low-pass filter. (See Monitor Issue 4, http://www.windmill.co.uk/adc.html, for more details on integrating converters.) Keeping signal wires as short as possible, using twisted together or shielded wires, keeping away from electrical machinery and using differential inputs will all help reduce interference.

*

Anti-Aliasing Filter
When recording a signal waveform, a computerised data acquisition system takes readings from (samples) the signal and interpolates for whatever the signal is doing between readings. Basically it joins up the dots to make a waveform. Too few dots and it can produce a totally misleading picture, showing a waveform with much too low a frequency. This is known as aliasing.

An example of aliasing is when stage coach wheels on a film appear to be going backwards when the coach is actually travelling forwards. The camera samples the scene 24 times each second. This sampling rate is too slow for the speed of the spokes of the wheel. Instead of each frame showing the spokes a little bit further round, each spoke advances to just short of the original position of the spoke in front, giving the appearance of rotating backwards.

You can solve aliasing by making sure the sampling rate is at least twice the highest input frequency present in your signal (Nyquist Theorem). In practice it should be 10 to 20 times the highest frequency component of the real signal. So where does filtering come in? Well, if you have high frequency interference and you sample according to the lower frequency of your signal, you will alias the interference - making it look like a part of the signal you are trying to measure. You can remove the interference using an anti-aliasing filter, which is a type of low-pass filter.

An anti-aliasing filter generally has a sharper cut-off than a normal low-pass filter. It is specified according to the sampling rate of the system and there should be one filter per input signal. For example, in data acquisition using a 12-bit analogue-to-digital converter, attenuation of -78 dB will get rid of signals that the converter can't resolve. Here are some guidelines for selecting the cut-off frequency of the filter.

Signal Type Cut-Off Frequency Criterion
pulsed dc rate of change (V/sec)/1V
sinusoid 1/period
complex periodic 20/fundamental period
single events 1/pulse width

With suitable hardware you can set the cut-off frequency for high-pass, low-pass and anti-aliasing filters from Windmill software.

*

Band-Pass and Band-Stop Filters
A band-pass filter allows only a pre-defined frequency band through, whilst a band-stop (or notch) filter does the reverse - stopping a pre-defined frequency band. A band-pass filter might be useful when your signals are all at one frequency, and a band-stop when you want to remove mains interference. If your signal is 0-200 Hz, for example, you could use a band-stop filter to remove the 50 or 60 Hz mains band. This would slightly distort your measured signal but by much less than letting through the mains interference.

An integrating A-D converter, with the integration time chosen to be one full cycle of the line or mains voltage, could average the interference at the line frequency to zero. It would thus act as a band-stop filter.


Other Filtering Considerations

Speed: One Filter for Each Signal
Using any type of filter reduces the maximum sampling speed. This is because a filtered signal takes time to settle to its final value. Sharing a filter would increase the settling time proportional to the number of signal inputs. If you are using filters in high speed applications therefore, use hardware that has a filter for each input signal.

*

Post Collection Filtering
Provided the signal has been accurately recorded, in particular aliasing effects have been avoided, you can view the signal waveform on the computer screen and apply additional software filtering if required. For system development projects we tend to use the waveform analysis package FAMOS to review and post-process the acquired waveforms. FAMOS allows the design of common digital filter types.


Examples of Filtering in Practice

Most electronic measurement systems should require neither pre-digitisation filtering in hardware, nor post-capture filtering in software. However, where long leads are used, or in particularly noisy environments, or when recording from sensors that interact with the systems they are monitoring (such as electrochemical or biological sensors) then filtering might be needed.

Another class of applications where filtering is required is when comparisons are made between measurements made on different systems. Crash testing of automobile and aircraft components is an example. Here the specifications of the measurement system, in particular its frequency characteristics, are tightly controlled.

For measurements from crash test dummies, transducer amplifiers can be given different hardware filters: for example a low-pass filter of 1000 Hz (1 dB point) for the head accelerometers. Dummy torsos have greater inertia, so they have a lower frequency response and the chest accelerometers are specified to have a low-pass filter of 180 Hz. The sled itself has still greater inertia, so it is filtered at 60 Hz. We record the raw signal filtered at 180 Hz, and then do post recording filtering down to 60 Hz in software. Specifying the limits to the frequency response in this way means that complex calculations carried out on the recorded waveforms (for example Head Injury Criteria, HIC) can be compared between test laboratories.


GLOSSARY OF PC-BASED DATA ACQUISITION TERMS: T-Z

Talker
A device on the GPIB (general purpose interface bus) that sends information to a Listener on the bus.
Thermal
Coefficient of Resistance The change in resistance of a semiconductor per unit change in temperature, over a specific range of temperature.
Thermal Conductivity
A measure of the rate of flow of thermal energy through a material in the presence of a temperature gradient. Materials with high electrical conductivities tend to have high thermal conductivities.
Thermocouple
Popular temperature sensor because of its low cost, wide operating range and ruggedness. Consists of two dissimilar metals joined together, making a continuous loop. When one junction has a different temperature from the other an electromotive force (voltage) occurs. There are several types of thermocouples, constructed from different metals and with differing temperature ranges and accuracies. More details of thermocouples are in Issue 5 of our newsletter, Monitor.
Thermistor
A temperature sensor. The name comes from thermal resistor. It is a semiconductor that exhibits a large change in resistance as a function of temperature. Most thermistors exhibit a negative temperature coefficient, where resistance decreases as temperature rises. These are referred to as NTC thermistors.
Throughput
Number of results produced per unit time.
Time stamp
Information added to data to indicate the time at which it was collected.
Transducer
A device which converts a physical quantity into an electrical signal. Examples include thermocouples and photocells. Most sensors are also transducers.
Transient
A short surge of current or voltage, often occurring before steady-state conditions have become established.
Truncation
Rejection of the final digits in a number, thus lessening the precision but not necessarily the accuracy.
TTL
Abbreviation for transistor-transistor logic. Referring to logic circuits consisting of two or more directly interconnected transistors, to provide conditional switching capability.
TTL-Compatible
For digital input circuits, a logic 1 is obtained for inputs of 2.0 to 5.5 V which can source 40 microA, and a logic 0 for inputs of 0 to 0.8 V which can sink 1.6 mA. For digital output signals, a logic 1 is represented by 2.4 to 5.5 V with a current source capability of at least 400 microA; and a logic 0 by 0 to 0.6 V with a current sink capability of at least 16 mA.
T-Type Thermocouple
Copper-constantan thermocouple with a temperature range of -200 to 400 oC.
Twisted Pair
Cable that consists of individual wires wrapped around each other for carrying telephone or computer data. Reduces pickup noise levels in signals.
Unipolar
A signal range that is always positive or always negative, for example 0 to +10 V.
UPS
Uninterruptible Power Supply. Used to keep critical equipment, including computers, running in the event of a mains power failure.
USB
Universal Serial Bus A serial bus gradually replacing RS232 on PCs because of its higher speed. Generally fitted as standard in new PCs.
VAC
AC Voltage
Velocity
The rate of change of displacement; dx/dt.
Volt
SI unit of potential difference such that the potential difference across a conductor is 1 volt when 1 ampere of current in it dissipates 1 watt of power. Named after Count Alessandro Volta (1745-1827). Symbol V.
Voltage
The value of an electromotive force or potential difference expressed in volts.
Voltage-to-Frequency Converter
A device that converts an analogue input voltage into a sequence of digital pulses with a frequency that is proportional to the input voltage.
WAN
Wide area network. A network of circuits spanning a large region which is used to transmit data.
Wheatstone Bridge
A network of four resistances, an emf (voltage) source, and an indicator connected such that when the four resistances are matched, the indicator will show a zero deflection or "null" reading. Prototype of most other bridge circuits.
x-axis
Conventionally, the horizontal axis of any type of graph.
y-axis
Conventionally, the axis perpendicular to and in the horizontal plane through the x-axis of any type of graph.
x-axis
Conventionally, the vertical axis in any three-dimensional co-ordinate system.
Zero Balance
With transducers like strain gauges, the output is large compared to the changes caused by the strain. Setting a zero balance subtracts an offset (actually a fraction of the bridge excitation voltage), so the changes caused by the strain can be accurately measured.

Do you have a comment or suggestion for this newsletter? Why not email the editor - Jill - at monitor@windmillsoft.com

* Copyright Windmill Software Ltd
* Reprinting permitted with this notice included
* For more articles see http://www.windmill.co.uk

We are happy for you to copy and distribute this newsletter, and use extracts from it on your own web site or publication, providing the above notice is included and a link back to our website is in place.


Subscribing

To subscribe to Monitor please fill in your email address below. We will not pass your address to any third parties.


Previous Issue Next Issue


Home | On-Line Shop | Free Literature and Software Demos | Contents | Search

Copyright Windmill Software Ltd 2006
PO Box 58, North District Office, Manchester, M8 8QR, UK.
E-mail:monitor@windmillsoft.com,
Tel:+44 161 833 2782
http://www.windmill.co.uk/
Data Acquisition News Feed (RSS) Free measurement news feed...
Designed by Studholme.net
Newsletter Archive: