Skip to Content

Kernel — Weighted Sliding Window

The kernel node applies a weighted sliding window to a live stream — a single, lightweight convolution that, by simply swapping the weights, can smooth noise, compute derivatives, detect spikes, or extract trends. The kernel you choose determines what the raw signal reveals.

Presets

Preset — selects which weights to apply. The weights panel shows the shape. Signal — switches the test input.

Loading kernel explorer...

Try this:

  • Pick spike3 on Impulses — spikes become peaks, the flat baseline drops to zero.
  • Pick rate3 on Sawtooth — each rising ramp becomes a flat line; the sharp resets become negative spikes.
  • Compare sg5 and smooth5 on Step Changes — Savitzky-Golay keeps the sharp edges.
  • Pick jerk on Sine + Noise — the output leads the input by a quarter cycle.

One Signal, Two Questions

The preset explorer shows what each kernel does to clean synthetic signals. With real data, the stakes are different — two presets of the same node, running simultaneously, answer two questions that neither can answer alone.

The setup

GPS speed from a heavy commercial vehicle, sampled once per minute. The 6-hour trip crosses steady highway stretches and congested urban zones where traffic slows to stop-and-go.

AssumptionValueWhy
VehicleHeavy commercial truckStandard freight vehicle
Sampling60 s (GPS speed)Typical telematics interval
Highway cruise48–52 km/hIndian national highway, loaded
Sluggish traffic10–50 km/h oscillatingUrban stop-and-go

What smoothing alone misses

sg5 smooths the speed and answers “what regime is the truck in?” — the cyan line shows a clean trend. But it cannot distinguish steady cruising at 45 km/h from stop-and-go traffic that averages 45. Both look the same after smoothing.

momentum5 answers a different question: “how choppy is the driving?” Its amplitude is a seesaw — calm on the highway, violent in sluggish traffic. That amplitude is the missing signal.

The top chart shows the speed regime. Now look at the bottom chart — compare the momentum trace in the first 100 minutes with minutes 180–260.

Loading matched filtering explorer...

What you’re seeing

Top chart — the smoothed line sits steady near 50 km/h for the first 120 minutes, then drops into a ragged 30–40 zone. The speed regime is clear: highway, then sluggish traffic.

Bottom chart — in the highway zone, momentum hugs zero. In the sluggish zone, it erupts ±10–15 with every acceleration and braking cycle. The calm seesaw has become a violent one.

The critical zone is the transition (minutes 120–180). The top chart still shows 45–48 km/h — it looks like highway. But the bottom chart is already swinging. The choppiness arrived before the speed dropped. That early signal is what sg5 alone cannot see.

Where the same pattern appears

  • Fleet fuel efficiency — choppy driving burns more fuel at the same average speed; momentum amplitude correlates with consumption
  • Bus route punctuality — a route averaging 30 km/h in free-flow vs stop-and-go has the same sg5 but different schedules
  • Insurance telematics — driving smoothness scoring beyond speed alone; momentum quantifies the seesaw
  • Delivery ETA — arrival time estimation in congested corridors needs choppiness, not just average speed

Quick Reference

Presets explored on this page. For the full catalog, see Kernel in the Reference.

PresetWhat it reveals
smooth5Moderate noise reduction — good general-purpose smoother
sg5Smooths while preserving sharp edges — speed regime detection
rate3Rate of change with zero lag
jerkHow sharply acceleration changes — leads the input signal
spike3Isolates sudden transients, removes slow trends
momentum5Weighted recent direction — driving choppiness indicator

References

  • A. Savitzky and M. J. E. Golay, “Smoothing and Differentiation of Data by Simplified Least Squares Procedures,” Analytical Chemistry, 36(8), pp. 1627—1639, 1964. doi:10.1021/ac60214a047 

  • A. V. Oppenheim and R. W. Schafer, Discrete-Time Signal Processing, 3rd ed., Pearson, 2010.


Next Steps

Last updated on