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.
Try this:
- Pick
spike3on Impulses — spikes become peaks, the flat baseline drops to zero. - Pick
rate3on Sawtooth — each rising ramp becomes a flat line; the sharp resets become negative spikes. - Compare
sg5andsmooth5on Step Changes — Savitzky-Golay keeps the sharp edges. - Pick
jerkon 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.
| Assumption | Value | Why |
|---|---|---|
| Vehicle | Heavy commercial truck | Standard freight vehicle |
| Sampling | 60 s (GPS speed) | Typical telematics interval |
| Highway cruise | 48–52 km/h | Indian national highway, loaded |
| Sluggish traffic | 10–50 km/h oscillating | Urban 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.
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.
| Preset | What it reveals |
|---|---|
smooth5 | Moderate noise reduction — good general-purpose smoother |
sg5 | Smooths while preserving sharp edges — speed regime detection |
rate3 | Rate of change with zero lag |
jerk | How sharply acceleration changes — leads the input signal |
spike3 | Isolates sudden transients, removes slow trends |
momentum5 | Weighted 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
- Detecting Sudden Shifts —
kalman1dwith innovation gating for step-change detection. - Kalman 1D Filter — adaptive smoothing that adjusts its own gain.
- Composition Patterns — chain a smoother with a derivative, or smooth before detecting.