Signal Processing Workbench
Process noisy IoT sensor samples, compare filters, inspect frequency evidence, and decide whether the result is trustworthy.
Signal Processing Workbench
Watch noisy IoT sensor samples pass through a processing chain. The aim is not just to make a smoother line; it is to preserve the useful signal, control delay, and make a more trustworthy decision.
Filtering is chosen for a task: smooth a trend, remove spikes, isolate changes, or reject a known interference tone.
The sample rate limits which frequencies can be trusted. Anything above Nyquist can fold into a false low-frequency pattern.
More smoothing usually means slower response. A good dashboard may be a bad alarm if it reacts too late.
The processed signal is useful only when error, spectrum evidence, and threshold decisions improve together.
Hidden Signal
The real physical value or target pattern is what the sensor is trying to reveal.
Sampled Raw Data
Noise, interference, spikes, bias, or sampling limits are added to the measurement.
Processing Method
A filter or transform changes the data according to a specific assumption.
Feature Or Event
The processed value is compared with a threshold or frequency clue.
Trust Check
The result is judged against error, delay, and aliasing risk.
Processing pipeline
raw, target, and processed signalSampling
A sampled system can only represent frequencies below half the sample rate.
Nyquist = sample rate / 2Moving Average
Averages the most recent N samples; smoother output usually means more delay.
y[n] = mean(x[n-N+1 ... n])EMA Low-Pass
A first-order recursive smoother that is common in microcontroller firmware.
y[n] = y[n-1] + alpha(x[n]-y[n-1])Threshold Decision
Processed data often feeds alarms, counters, or state changes, so accuracy must be checked at the decision point.
event = processed value > thresholdSignal Processing Quick Reference
Processing changes raw samples to support a task. The same filter can help one task and harm another.
- Low-pass smoothing is useful for slow physical variables such as temperature or tank level.
- Median filtering is useful when isolated spikes are the main problem.
- High-pass filtering emphasizes changes and removes slow baseline drift.
- Known-tone rejection can remove a repeated interference tone only when the sampled data contains enough information about it.
Method Selection
Choose the method from the failure pattern, not from the visual desire for a smooth plot.
- Moving average: simple, predictable, but delayed.
- EMA: memory-efficient and useful on small devices.
- Median: strong against spikes, weaker for continuous noise.
- High-pass: useful for vibration and sudden changes, poor for absolute level tracking.
Technical Accuracy Notes
- The hidden target is available only because this is a teaching simulation; real systems need calibration data, references, or field validation.
- The spectrum view uses a small direct DFT-style calculation for visual evidence, not a production FFT implementation.
- The EMA cutoff is an educational first-order approximation using alpha = 1 - exp(-2*pi*fc/fs).
- The known-tone rejection method subtracts a fitted sine and cosine at the selected interference frequency; it is not a general adaptive noise canceller.
- When the interference frequency is above Nyquist, the warning is intentional: the original tone cannot be uniquely recovered from the sampled values.
Implementation Checklist
- Pick a sample rate before interpreting frequency evidence.
- Estimate acceptable response delay for the application.
- Compare filtered output against the decision it feeds, not only against visual smoothness.
- Record the chosen method, parameter, units, and validation result.
Break Smoothing
Select Vibration, choose Moving Avg, and raise filter strength. Notice how a smoother line can destroy the useful motion pattern.
Find Aliasing
Select Mains Noise and lower the sample rate until the Nyquist warning appears. The spectrum evidence becomes misleading.
Compare Spike Handling
Select Tank Level, raise noise and interference, then compare EMA with Median. Spike rejection and smoothing are different problems.