GSSNS

Resampling discontinuous power to 1 Hz

tl;dr: Averaging rowing power over each second really is chaos: off by about 110% at 22 spm, against about 4% for cycling. But average per stroke first and then go to 1 Hz, and almost nothing is lost. A time-weighted average of the strokes keeps total work exactly right and everything else within about half a percent. Store each stroke’s own power next to it, and even its last downside is gone.

Cycling power is stored at 1 Hz. Rowing power is mostly stored once per stroke. A discussion on the Rowing Data Standard made me wonder: both sports produce power discontinuously, so why does 1 Hz work fine for cycling? And what do you lose if you resample rowing power to 1 Hz?

These are my notes from trying to find out.

Why bother with 1 Hz

Why resample at all, instead of keeping the data the way it was recorded?

Two places where information gets lost

  1. Instantaneous → one value per revolution or stroke: the shape within the stroke is lost: peak power, timing, force build-up.
  2. One value per revolution or stroke → 1 Hz: the link to the stroke, exact timing, maybe some stroke-to-stroke variation.

Peak power is gone after step 1, whatever you do next. This post is mostly about step 2.

The data

To see what happens within a stroke, I need power at a much higher rate than once per second:

Both give force, not power. Power is force × speed, and neither records speed within a stroke, so I assume it’s constant:

Not the true instantaneous power, but “actual enough” for what matters here: when power is on, and for how long.

Why cycling gets away with it

Step 1 explained above is optional: you can also average instantaneous power over each second. In rowing that gives the “chaos” from the discussion. In cycling it works fine. Why?

1 Hz can only represent changes slower than 0.5 Hz, the Nyquist frequency (half the sample rate).

Three revolutions on a Wattbike at 88 rpm and three strokes on a Concept2 rowing machine at 22 spm, with the average per revolution or stroke and the average per second on top. For cycling both averages stay around 200 W. For rowing the per-stroke average stays around 112 W, while the per-second average jumps between 0 and about 300 W.

Real recordings. (script, data extraction, data: cycling, rowing)

So for rowing: average per stroke first, then go to 1 Hz. The question is how.

Six ways to get to 1 Hz

MethodNote
AAverage each second of instantaneous powerThe “chaos” baseline
BHold the last completed strokeWhat the Concept2 monitor shows
CGive each second the stroke it falls in
DTime-weighted average of the strokes in the secondTotal work exactly right
EInterpolate linearly between strokes
FAverage the strokes that ended in the secondIdentical to B below 60 spm

B to F only use what a per-stroke file holds: start, end and average power of each stroke. F is how you’d compute power from ANT+ data (accumulated power ÷ event count). Below 60 spm at most one stroke ends per second, so for rowing F is the same as B, and I’ll leave it out below.

The same three rowing strokes resampled to 1 Hz in six ways. A jumps between 0 and 300 W. B to F stay between 110 and 113 W, close to the per-stroke averages, but differ in timing: B and F lag a stroke behind, C follows the strokes, D and E blend neighbouring strokes.

The same three strokes as above. Note the different y-axes: A spans 0 to 300 W, B to F only 110 to 114 W. (script, data)

On steady strokes B to F are within 3 W of each other. They differ in timing:

Whether that matters shows once the pace changes.

Setup

The reference (“ground truth”) is each stroke’s power held over that stroke’s duration: what rowers mean by power, and what a per-stroke file holds. 1 Hz values are rounded to whole watts, as FIT stores them.

(analysis.py produces every number below, extract_sessions.py gets the strokes out of the recordings, results.json has all the numbers.)

Results

1. Is the chaos real at every stroke rate?

The figure above shows a few strokes at one stroke rate. Does averaging each second (A) go wrong at every rate, and does cycling get away with it at every cadence? For every stroke rate from 16 to 45 spm and every cadence from 50 to 130 rpm, I simulated 5 min at a constant 200 W and measured how far each 1 Hz value lands from the actual power.

Average error of each 1 Hz value against stroke rate for rowing and cadence for cycling. Rowing is off by about 140% at 16 spm, dropping to about 35% at 45 spm. Cycling stays between 2.5 and 9% from 50 to 130 rpm.

The more strokes fit in a second, the better a 1 s average works. Rowing never has enough.

2. Do work, mean-max and normalised power come out right?

These are the numbers people actually use. I weigh total work the most: it’s what kilojoules, calories and training load build on, and if a file has both per-stroke and 1 Hz power, both should add up to the same work.

Mean-max error per method for 1 s to 5 min. Rowing: A is 75% too high at 1 s and about 6% at 5 and 10 s. B is 3.3% too high at 1 min, E 1.6%. C and D stay within about 0.6%. Cycling: all methods within about 1.2%.

F is dashed because it’s identical to B for rowing.

Rowing, assembled session, error vs the reference:

Work1 s5 s1 minNP
A. average each second0.0%+75%+6.5%+0.5%0.0%
B. hold last completed+0.7%0.0%+0.3%+3.3%+1.0%
C. stroke the second falls in0.0%0.0%+0.2%+0.2%0.0%
D. time-weighted0.0%−0.2%−0.2%0.0%0.0%
E. linear interpolation+0.4%−1.4%−0.4%+1.6%+0.5%

3. Can you get the strokes back?

The main objection to 1 Hz: you lose the link to the stroke. FIT has a field for that, total_cycles: the number of strokes so far, stored with every 1 Hz record. With it, every stroke’s power can be read back from the 1 Hz data:

Without total_cycles you only see a stroke where the value changes, and 3–4% of the strokes disappear because two strokes in a row had the same power in whole watts. So store total_cycles.

4. Live, or after the fact?

A stroke’s power is only known once the stroke is over. That decides when each method can write a second:

In practice a file never needs to be live, not even one recorded during the session. A recorder can keep the last few seconds in memory and write each second once its stroke is over. Nobody notices a file being three seconds behind. So:

Conclusion

For rowing files, D is probably the way to go: total work exactly right, mean-max and normalised power within about half a percent, and with total_cycles nearly every stroke can be read back.

D has one weakness left: in the second where two strokes meet, its value is a blend of both, so not every 1 Hz value is a real stroke’s power. That’s solved by storing each second’s stroke power next to it, as a separate average stroke power field (method C). Then every time-based tool gets power that adds up to the right work, every stroke can be read back exactly, and total_cycles links the two. Nothing the comparison above found is lost. What’s left is the shape within the stroke, and that needs the per-stroke data and force curves anyway.

So the question for the Rowing Data Standard isn’t per-stroke or 1 Hz. Per-stroke data stays. The question is whether a few extra fields per second are worth it, so that every time-based tool can read rowing files without solving this again.

Caveats: the real rowing data is short and easy, the hard session is assembled from those strokes, and instantaneous power is derived from force rather than measured. A long, hard, real session is the next thing to try.