Noise Canceling Headphones: Filtering the World

How can headphones silence a jet engine? Anti-sound. Learn how this 'Signal Processing' is used to clean up noisy robot sensor data.

Noise Canceling Headphones: Filtering the World

You put on Bose or Sony headphones. You flip the switch. The airplane engine hum vanishes. It’s not magic; it’s Destructive Interference.

  1. Microphone: Listens to the outside noise (a Wave).
  2. Processor: Inverts the wave (flips it upside down).
    • Peak becomes Trough. +1 becomes -1.
  3. Speaker: Plays the “Anti-Noise” alongside your music.
  4. Physics: +1 (Noise) + -1 (Anti-Noise) = 0 (Silence).

Noisy Sensors

In robotics, our sensors are “noisy” too. A distance sensor pointed at a stationary wall should read “100cm.” Instead, it reads: 100, 101, 99, 102, 98, 100. It jitters. This is electrical noise. If we plugged this directly into our motors, the robot would shake violently (“The robot is jittering!”).

The Low Pass Filter

We use Signal Processing code to “Cancel” the noise, just like the headphones.

  • Average Filter: taking the average of the last 10 readings.
    • Average = (99+101+100...) / 10.
    • The result is a smooth 100.
  • Low Pass Filter: “Verify slow changes pass. Block fast, spiky changes.”
    • NewValue = (OldValue * 0.9) + (SensorReading * 0.1) (Weighted Average).

This smoothing makes the robot move gracefully. We effectively put “Noise Canceling Headphones” on the robot’s brain so it can focus on the signal, not the static.

Explore FIRST® Robotics

FIRST® (For Inspiration and Recognition of Science and Technology) is a global robotics community preparing young people for the future. Discover the ultimate sport for the mind and see how you can get involved in STEM and robotics!

Learn More at firstinspires.org