Nonuniform Signal Resampled

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

# Problem

_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.

# Results

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.

# Direction

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