💾 Archived View for jb55.com › ward.asia.wiki.org › nonuniform-signal-resampled captured on 2022-01-08 at 14:04:50. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-04)
-=-=-=-=-=-=-
A colleague reported high jitter when sampling fuel flow by counting pump cycles. I suggested reconstructing the signal before resampling at the desired rate. wikipedia
_The sampling theory of Shannon can be generalized for the case of nonuniform samples, that is, samples not taken equally spaced in time. You're sampling samples. Look to reconstruct the first samples and then sample that._
This is the sort of problem that should be easily explored within wiki given some handy signal processing plugins. But what plugins? See How We Connect Data
I thought I'd explore the problem in a simpler environment, pure javascript on an html page. I wrote functions that provided likely process steps and then assembled them to explore the problem with plots at every step.
Plots (view source for code)
In my model I represented the pump signal as uniform samples that were zero everywhere except at the moment when the pump fired when they represented the fixed volume of the pump. I smoothed that by redistributing this volume evenly over the subsequent zero samples.
I wasn't particularly impressed with my analysis or the tooling I had made to perform it. View Source for code.
I vacillated choosing representations under the influence of javascript primitives. I ended up separating x from y, and using several different fixed sizes for records, not streams, though that might have been under the influence of the plot package.
I found that small changes in the pump volume had a strong influence on the interpolation and subsequent jitter. My test signal was low frequency. Instead I was observing a beat frequency between the regular pump and the timer resolution. Again, this comes from modeling choices, not the original problem.
I've found my choice of using Plotly for charts useful because they render detailed data so well. But when I wanted to interact with the model behind the data I found myself on my own.
See Interpreting Visual Gestures where I start to explore why Plotly provides one thing while I would want another.
Dom objects emit a variety of drag-related events. These are easily attached to objects that aren't already interpreting events on there own. Of course SVG objects are slightly different. page