# Could one predict from power data whether a cyclist is standing or sitting?

I was wondering about this machine learning problem: Take a large sample of data from rides that includes whether a cyclist was standing, what the cadence, power, (or perhaps even torque?) and gradient are. Is it possible to predict using machine learning (ML) techniques whether a cyclist is standing or not? I would assume that this would be of some use for Zwift or other racing apps to show whether a cyclist is standing or sitting (and perhaps even determine air resistance based on that). Right now their algorithm is a bit too simplistic (with a fixed gradient/cadence rule).

My idea is roughly that the power distribution over a single stroke should look different for a standing cyclist and a sitting cyclist. Of course this would all need to be conditioned on personal variables of the rider (weight, trainer model, power meter) but those are issues that ML is really good at. But I wonder if there are any reasons why this would be completely impossible (for example, if power meters can only measure power over 1 second at sufficient precision).

Update: Indeed most power meters measure torque at a higher frequency and transmit this data to the cycling computer/trainer app/etc.. However, these cycling computers usually only provide files at a data frequency of one datapoint per second. Therefore it seems that only cycling computer specific solutions would be possible.

• Technical issue aside, getting a large enough data set with known values (standing or sitting) might be the limitation. FWIW, if it was important, it would be trivial to put a load sensor on the saddle, which could possibly provide other useful metrics for training and bike fit. Fitting out a large peloton with such sensors might be a way to provide the ML system the data it needs. Jun 8, 2021 at 3:24
• I don't have time right now to give a full answer but perhaps someone else can. Yes, you can generally tell, and it doesn't require ML. You can generally tell from the rate of change in crank torque and by the change in aerodynamic resistance, assuming known wind and gradient. However for the purposes of Zwift, the aero resistance isn't realistic enough, and changes in crank torque are limited by the specific load generator of whatever trainer you're using. That is, you'd have to calibrate for each rider on each type of trainer. Jun 8, 2021 at 5:13
• @MaplePanda: not none, just few youtu.be/tfKS0P6Dy7Y Jun 8, 2021 at 6:21
• Could you include why you want to figure this out? Might help avoid being an XY problem. meta.stackexchange.com/questions/66377/what-is-the-xy-problem
– Criggie
Jun 8, 2021 at 7:23
• @MaplePanda Nobody is going 1000W in the saddle ORLY? That's at the end of a race, and I did about 1000W in the saddle for about 45 sec or so. Jun 8, 2021 at 21:39

The short answer is: with power data alone? No. With power and speed data? Yes, sometimes. The longer answer is an explanation of the conditions under which one can sometimes tell.

First, here is Fig. 2 from Martin et al. "Modeling sprint cycling with field-derived parameters and forward integration" with the transition from standing to sitting highlighted with red rectangles superimposed on the original figure.

These data were collected from maximum sprint efforts for three world-class track cyclists, and you can clearly see the discontinuity in power from standing to sitting. The data were collected at 5Hz using a crank-spider-based power meter (the SRM track model). So, this is evidence that there are situations where one can spot the difference between standing and sitting even without using a pedal-based power meter.

A harder question is whether one can, under more general conditions, determine whether a rider is transitioning between standing and sitting, or between sitting and standing, using power and speed data. The answer, it appears, is "sometimes, under certain conditions."

First, let us clarify that there are two different situations where one stands while pedaling: often one stands when one is trying to accelerate (as when accelerating from a stop, or when attacking in a race--those two situations are illustrated below); sometimes one stands just to change position, but without changing speed or power. If speed and power don't change, then power and speed data will not be able to tell the difference. In addition, sometimes we only stand for a pedal stroke or two and then sit down, as when starting off from a stop. This is a case where the shorter the time spent standing, the harder it is to determine from power and speed data alone whether the standing occurred. This is related to the sampling rate of data collection: in the example above from Martin et al., the data were collected at 5 Hz; in situations where the data are collected at 1 Hz (as is common for most "consumer-level" power meters), it is harder to spot discontinuities in power and speed.

In this study published in 2020, Wilkinson et al. discuss biomechanical differences between seated and standing climbing. They found that there are differences in power production via changes in pedal force and pedal speed but, as mentioned above, one cannot always tell when a rider is sitting or standing.

There are still situations where it is possible using 1 Hz data to spot the transition from standing to sitting, but it is easier the greater the change in power and the longer the standing "excursion" is before returning to sitting. In the plot below are two sections from the same ride showing speed, power, pedal force, and cadence, where I stood, briefly, marked in blue. The data were collected from a hub-based power meter, once again not from a pedal-based power meter.

In the plot, the left shows an acceleration from a stop light in black dots, while the right (in red dots) shows an acceleration from a speed of about 30 km/h to 60 km/h, as one does when attacking during a race. What is common to both standing intervals is a sudden increase in pedal force (and a concomitant increase in power) as I stood, and a decrease in pedal force as I re-sat.

However, what I don't show is that there were a few stop lights during that ride, where I stood for just two pedal strokes or so, at more moderate pedal force, and it is very difficult to identify the standing solely from power and speed, as Wilkinson et al. concluded.

Thus, the longer answer: sometimes you can tell, yes, but not always. The longer the standing excursion (or equivalently, the higher the data frequency) and the greater the difference in pedal force and pedal speed, the easier it is to spot the transition.

• Excellent answer, thank you so much!
– HRSE
Jul 6, 2021 at 7:13

There is a problem here in that there is currently no sensor on the market (that i'm aware of) to measure sitting/standing. And unless i'm misunderstanding ML, we would need that input into our data for it to learn how this correlates to the cyclists power/cadence etc.

However, i'll ignore that and look at a couple of options that might give promising results.

1. Power curve analysis: Maple Panda suggested in comments that no-one does 1000W in the saddle, and whilst this isn't true (track sprinters), it may be fair to say that if a user is within 20% of their peak 1s power then they are out of the saddle. This wouldn't translate to zwift very well though since riders are very rarely hitting these very high powers.

2. Power phase analysis: Some power meters transmit phase data. This tells us how much torque is being applied at different parts of the pedal stroke. In general when people get out of the saddle, the pedal stroke becomes less 'round' with more pronounced dead spots. The problem with this approach is that I don't believe all power meters support this data.

• I think power phase is the way to go if possible. Certainly all the trainers I've used (in the gym, mainly when recovering from a broken shoulder) have and show this information. Jun 8, 2021 at 8:32
• Power phase is the key, the neural network should be able to be learned for this. But it might still be somewhat rider-specific. Jun 20, 2021 at 11:41

A few thoughts on the feasibility and reliability.

1. Placement of sensors. As the key characteristic of "sitting" is using a surface to sit on, it only makes sense to put the sensor into the seat. The farther away the sensor placement is from the saddle (handlebars, pedals, tires etc.), the more work it is to tell the outcomes apart and more noise of unrelated nature to deal with. It may require having and simultaneously analyzing multiple sensors (incline, acceleration etc.) to make up for the suboptimal placement of the main sensor. For example, you can use a videocamera in a car riding alongside the cyclist and filming the ride as a sensor. Then you are tasked with classifying the human's posture from the recording, which is a lot of data to process.

2. Fuzzy border between activities. While there are situations clearly described by humans and potentially detectable by computers as "sitting" or "standing", whatever machinery and algorithms are used, there will always be a grey zone of "don't know". There are always transitions from sitting to standing and back. There are also times of incompletely or skewedly loading the saddle, not even touching the bike etc. Compared to the two "positive" situations, how much of the "unknown" state will be present in the data for an average ride? Ultimately, it depends on the intended usage of such data. For some applications having the "don't know" answer 5% of the time would be unacceptable, while in other cases even 50% of unclassified input would be tolerable as long as the remaining 50% of the time is correctly classified into the two categories.

3. Individual calibration. Regardless of the approach, it will require some (or a lot) tuning of its algorithmic parameters to tell the outcomes apart. Finesse in this strongly affects the quality of the results. For example, for a single saddle pressure sensor, the calibration process may be limited to finding a single pressure threshold to cut the most of the noise. For a machine learning algorithm, you'll have to feed it thousands of manually marked-up traces of trainings in a hope to teach it something, but not too much. For more classic algorithmic approaches, you will most likely have to provide several numbers describing specific cyclist's and used bicycle geometry and weight characteristics.

• The power meter pedals from a GPS producing company do exactly this. They derive the information 'standing cyclist' from the extra deformation of the sensor strips in the pedals caused by the weight of the rider. No need to re-invent the wheel, the algorithms exist! Jun 8, 2021 at 9:15
• You mention pressure sensors. They weren't discussed in the original post, but that does open up the discussion in terms of validating a machine learning model to predict rider stance from power meter data alone. Basically, if you do that, you are best off with some sort of gold standard to use as a reference. I.e. you need to know if the person's actually standing. You could do a randomized trial in a lab and tell people to stand, or you could consider attaching position sensors (e.g. Leomo) to a number of riders and doing a field trial. Jun 28, 2021 at 16:42