top of page

Beyond the Data: A Primer on Filters

Physics is often described among the hard sciences, because of its "perceived methodological rigor, exactitude, and objectivity." In fact, in might be argued that many people perceive science as something that, once "discovered" or "tested" is fairly rigid, and the underlying assumption is that science is impersonal, and that nature speaks for itself through the clear-cut evidence it presents to researchers.

The reality, however, is not the ideal picture painted above. The American Association for the Advancement of Science in the 1990's published Science for All Americans, which attempted to describe the nature of science. Terms it used to describe it included durable and tentative -- words that seem almost opposing. Although science is durable, it is also tentative, and - sometimes - subjective. Why? Science is a human endeavor.

The above, however, does not suggest that science is so deeply flawed -- in fact, one might argue that seeing science through a subjective lens can lead to new insights that advance our understanding of the universe. (Take a look at the story of Michael Faraday, whose Sandemanian religion's fascination with circles provided fodder for a new paradigm of thinking about electricity and magnetism). Even while recognizing that science has elements of subjectivity, it is among the most objective practices that can be carried out to acquire new knowledge. This subjectivity, however, requires that scientists be scrupulous not just about assessing their own biases, but by identifying those of others.

Although there is often discomfort even among scientists when considering that science does not reach its ideal of objectivity, when considering data, it is important to recognize that we have our own socio-cultural and personal filters that we apply. Sometimes we only see what we want to see and ignore the rest, and sometimes we don't see what is apparently hidden to most of us.

Data filtering is not just a philosophical construct, however. There are actually times when it is nearly impossible to see the patterns that lie within.

While data filtering is typically not taught in primary or secondary school, I argue that doing so might help students to be more critical consumers and users of information. Understanding that data filtering can be applied subjectively (and implicitly) or for objective analysis is key.

Data filtering does not need to be difficult! While some of these data filters are even new to us (having graduated with physics and computer science degrees), we recognize that they are actually essential to a number of technical fields. Below are a number of examples of types of data filters and circumstances for when it might be appropriate to use them.

Simple Calibration

What it is: Simple calibration typically re-sets a starting measurement to a known or given value that improves accuracy by removing systematic instrumental error. For example, a phone placed at rest should read a linear acceleration of 0 in all three dimensions. If it does not, then an automatic filter is applied to remove any non-zero value consistently from all data. In other cases, the starting value should not be zero. For example, the air pressure reading should correspond to the non-zero reading of the nearest high-accuracy weather station. To calibrate this, the user can add or subtract the appropriate measurement from the phone reading so that it matches a more accurate source.

When to use it: Use this filter when the sensor reading does not start at the appropriate value or if it consistently reads too high or low when compared to a more accurate value.

Simple Calibration in Physics Toolbox:

To access available calibration options, click on the sensor of interest, then enter the "Settings" menu.

G-Force Meter (automatic calibration to 0, 0, 0)

Linear Accelerometer (automatic calibration to 0, 0, 0)

Gyroscope (automatic calibration to 0, 0, 0 in Physics Toolbox Sensor Suite PRO only)

Barometer (manual calibration in Physics Toolbox Sensor Suite PRO only)

Hygrometer (manual calibration in Physics Toolbox Sensor Suite PRO only)

Light Sensor (manual calibration in Physics Toolbox Sensor Suite PRO only)

Magnetometer (manual calibration in Physics Toolbox Sensor Suite PRO only)

Sound Meter (manual calibration in Physics Toolbox Sensor Suite PRO only)

Thermometer (manual calibration in Physics Toolbox Sensor Suite PRO only)

Moving Average

What it is: Moving average smooths data by minimizing random error. In essence, instead of plotting every raw piece of data, averages are calculated for the most recent number "n" data points. A displayed piece of data, therefore, is actually the average of a collection of sensed data points. For example, objects are almost constantly in motion, and a highly sensitive accelerometer will record some motion even when the measuring device appears to be at rest. However, because this random motion, by definition, tends to occur evenly across a mid-value of zero, an average of the random error should remove it (as the average of random positive and negative values is nearly zero). See the video clip below to learn more about how a moving average is calculated.

When to use it: Use this filter when you are looking for smooth patterns in a system that has a lot of random error. This might be especially helpful when looking for changes in acceleration or g-force while riding an elevator or observing periodic motion.

Moving Average in Physics Toolbox:

To access available moving average options, click on the sensor of interest, then enter the "Settings" menu. (Note that data saved to a file while using the filter will only provide "filtered-out data, not the raw data).

G-Force Meter (in Physics Toolbox Sensor Suite PRO only)

Linear Accelerometer (in Physics Toolbox Sensor Suite PRO only)

Gyroscope (in Physics Toolbox Sensor Suite PRO only)

Barometer (in Physics Toolbox Sensor Suite PRO only)

Magnetometer (in Physics Toolbox Sensor Suite PRO only)

Light Meter (in Physics Toolbox Sensor Suite PRO only)

Sound Meter (in Physics Toolbox Sensor Suite PRO only)

Kalman Filter

What it is: Kalman filters improve the accuracy of a "long-term" measurement of a single value by reducing random environmental or instrumental error. The simplest analogy is that a Kalman filter behaves like a weighted average that becomes more accurate as time of measurement elapses. Unlike a moving average, which only averages data in small parcels (perhaps 3, 4, or 5 data points at a time), the Kalman filter plots data as a function of the average value across the entire interval. As a result, in a system that is expected to be in equilibrium, such as the temperature of an object, illuminance, or sound intensity of the environment in which there are no changes made, the Kalman filter's output begins to settle near a particular value. As time goes by, the output of the Kalman filter becomes even more stable. See the video clip below to learn more about how a Kalman filter is applied to data.

When to use it: Kalman filters should only be applied to data in which a single "actual" value is the expected outcome. Use this filter when there is random error in an environment, but a single measurement value is anticipated. As such, don't use the Kalman filter when you expect there to be a lot of change in data!

Kalman Filter in Physics Toolbox:

To access available calibration options, click on the sensor of interest, then enter the "Settings" menu. (Note that data saved to a file while using the filter will only provide "filtered-out data, not the raw data).

G-Force Meter (in Physics Toolbox Sensor Suite PRO only)

Additional sensors with a Kalman filter will be added soon!

Low Pass Filter

What it is: Low pass filters are used to allow the display of low frequency data patterns, while eliminating high frequency data due to environmental or instrumental error. (In comparison, a high pass filter does just the opposite!) An analogy for considering how the low pass filter works is to consider an RC (resistor-capacitor) circuit. These circuits can be used to attenuate high frequency signals because high frequency electrical signals cannot fully "fill" a capacitor in the way that a lower frequency electrical signal can. Likewise, low pass filters can be constructed for acoustical systems by placing physical barriers that reflect high frequency sounds but transmit low frequency sounds. In optics, physical filters can be used to allow only high frequency wavelengths through (such as a violet filter that allows violet light through, but reflects and/or absorbs lower frequencies of light such as red and orange colors). See the video clip below to learn more about how a low pass filter is applied to data.

When to use it: Use a low pass filter when looking for low frequency changes in data that might occur in the presence of high frequency data. For example, multi-modal earthquakes and vibrations might display both high and low frequency "shakes" that correspond to different meanings or sources. In considering sound, sometimes very low frequencies can be transmitted along very great distances (as in elephant and whale communications). Hearing such low frequency sounds requires, among other things, removing high frequency background noise.

Low Pass Filter in Physics Toolbox:

To access available low pass filter options, click on the sensor of interest, then enter the "Settings" menu. (Note that data saved to a file while using the filter will only provide "filtered-out data, not the raw data).

G-Force Meter (in Physics Toolbox Sensor Suite PRO only)

Additional sensors with a low pass filter will be added soon!

Final Thoughts...

Filters can be very helpful to making sense of data. Filters can help to increase precision and accuracy by removing error and bringing patterns to light that otherwise would not have been seen. In the same way, our personal filters and biases can lend a new meaning to how data is interpreted. For the advancement or hindrance of learning, both statistical and human (subjective) filters can impact the scientific endeavor.

Featured Posts
Recent Posts
Archive
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page