A week reading papers before writing a single line
The power needed to ride a bike has an equation, it dates from 1998, and you can reproduce it numerically to find out whether you understood it. On the difference between a law, a validated model and a convention.
It all began by watching my brother train at home with a brand-new trainer, a Wahoo KICKR CORE 2. I watched him fiddling and swearing at the software that comes with it: poorly designed interfaces, and above all the scaffolding of a paid service. The idea came to us right there: a clean, native app for people who aren't after the social side but want a trainer that remembers them and helps them train.
I could have opened Xcode that very evening. The protocol for talking to the trainer is public, and I know Apple's APIs. Instead I spent a week reading, and this article is about what I found. Not because the reading is interesting in itself, but because it changed the way the app treats every number it shows.
Looking back, the discoveries of that week all answered the same question: where does this number come from? From a measurement, from a calculation, or from a habit that nobody ever checked?
Power has an equation, and it dates from 1998
The first discovery was that the central question of a simulator, how hard do I have to push to go at this speed on this road?, has a published and verified answer. It is the model by Martin, Milliken, Cobb, McFadden and Coggan, published in the Journal of Applied Biomechanics in 1998. The authors compared it with an SRM power meter on the road: R² of 0.97, standard error of 2.7 watts. Here is the equation, as the paper writes it:
The equation puts together five terms:
- air resistance, including that of the spinning wheels;
- the rolling friction of the tyres;
- the friction of the wheel bearings;
- gravity, that is, the cost of climbing;
- kinetic energy, that is, the cost of accelerating, wheels included.
All divided by the efficiency of the drivetrain, because chain and sprockets eat up part of what you put into the pedals.
The most useful thing in the paper, though, is the appendix. The authors give a worked example: a speed, a wind, a 0.3% gradient, and the value of each term. This turns reading into a verifiable exercise: if my code gives the same numbers, I did my homework well. Otherwise, I didn't.
| term | watts |
|---|---|
| air | 158.8 |
| rolling | 23.6 |
| bearings | 1.37 |
| gravity | 22.1 |
| kinetic energy | 2.3 |
| total, after the drivetrain | 213.3 |
The code reproduces all of them, and the exercise also settled a doubt. The PDF of the paper that you find online is a scan, and the exponent of the bearings term is hard to read: it could be 10⁻³ or 10⁻⁴. With 10⁻⁴ that term would be worth 0.137 watts; with 10⁻³ it is 1.37, which is the 1.4 the appendix reports. So it's 10⁻³, and it's the paper itself that says so, provided you redo the sums. Reading it wasn't enough: it was recalculating that showed which of the two readings was the right one.
Martin's model is the first type of number I learned about in this exploratory week, and it's a validated model: someone compared it with reality, declared how much it gets wrong, and anyone can redo the sums.
In reverse it's a cubic
The calculation is exactly the other way round in the case of a simulator. It doesn't know the speed: it knows the watts you're pushing, and has to tell you how fast you're going. Put like this, the equation becomes a cubic in the speed, and cubics have an exact solution, Cardano's, which you study at school and then forget. Personally I had no recollection at all of this most elegant solution. Or rather, I remembered the formula, but I had never understood even slightly what it was actually used for in the real world. It was truly fascinating to dig up a memory like this and find a real role for it. If you're wondering which simulator I'm referring to, that's a very fair observation. I wrote about it later in I built a fake trainer so I could build the real one.
The real app, though, doesn't use Cardano. It does something more elegant (and efficient): it integrates the speed step by step, ten times a second, because a bike accelerates and slows down, it doesn't jump from one speed to another. But when power and gradient stay constant, the speed at which the integration settles must be exactly the root of the cubic. Two independent routes to the same number: if they don't agree, one of the two is wrong. On seven combinations of power and gradient, they now agree to within 5 centimetres per second.
Here the check doesn't come from an experiment but from mathematics, and the root of a cubic isn't an opinion. It's the second type of number: the one that follows from a law, and which can therefore be recalculated. If two independent calculations don't agree, the error is ours.
TSS is not a law
The third type I found where I least expected it: in the numbers every cyclist knows. If you train with a power meter, you know TSS, the stress score of a workout, and its siblings: normalised power, intensity factor, power zones. Almost all of them come from the work of Allen and Coggan, and the reference book is Training and Racing with a Power Meter.
Reading it, what struck me is how little of that system is a discovery and how much is a choice. TSS is a definition: it says how to combine duration and intensity into a number, and that number is useful because everybody calculates it the same way. The seven power zones are a convention: boundaries placed at reasonable points, adopted everywhere, but not the result of an experiment showing that the body changes behaviour at exactly 75% of threshold.
There's nothing wrong with that. The problem starts when an app presents a convention with the same confidence with which it presents a measurement.

And neither is 220 minus age
The most famous example of a convention mistaken for a measurement is maximum heart rate. 220 minus age is written everywhere, and has no published experimental origin. In 2001 Tanaka, Monahan and Seals gathered 351 studies and 18,712 people, and the formula that comes out is a different one: 208 minus 0.7 times age.
At forty the two formulas give the same number, 180. The further you move away, the more they diverge: at seventy the old one says 150 beats and Tanaka's 159, nine beats of difference, enough to shift an entire zone workout.
And Tanaka too is an average, with a deviation of ten or twelve beats. That's why Grade uses it only until it knows better: if your heart has already reached higher than the formula says, your heart wins. Not the other way round. A recorded maximum that is lower only says that you have never pushed all the way, and lowers nothing.
In a single formula there were all three types of number: a convention presenting itself as a fact, a validated model that replaces it, and a measurement, yours, which when it exists beats them both.
Law, validated model, convention
At the end of the week those four readings lined up on their own, and I had in hand a distinction that became a rule of the project. Not all numbers are checked in the same way, and confusing them is the quickest way to give a convention the authority of a measurement.
| category | what it is | how it is checked | examples |
|---|---|---|---|
| law or definition | follows from physics, or from a definition | recalculate and compare | Cardano's cubic, TSS |
| validated model | has a dedicated study, with its own numbers | compare with those numbers | Martin 1998, Tanaka 2001 |
| convention | a widespread practice, with no experiment behind it | check that the number is the one declared, and that it is said | power zones, 220 minus age |
The rule that comes out of it is a single sentence: a convention gets a label. Using one is not a flaw. Presenting it as a measurement is.
“Insufficient data” is an answer
The distinction has a borderline case, and I understood it last: the one where the number isn't there. Neither law, nor model, nor convention: just data that isn't enough. This isn't in any paper, it's a habit. When the data isn't enough, you say so.
With fewer than five activities, the totals for a period are decided by chance. With fewer than twenty-eight days of history, training load tells you nothing about yourself. In those cases Grade doesn't show a number: it writes what is missing and why. Garmin, in the same situation, shows “No Status”, and it's the right choice.
A number shown with confidence, when there's nothing underneath, costs more than an empty space. Because the day the user notices, they stop trusting all the others too.
That week of reading didn't produce a single line of code. It produced the criterion by which every line, afterwards, was written.
Grade is a GPX route simulator for smart trainers. You import the track of a real ride, and the trainer gives you its climbs, gradient by gradient, metre by metre. iPhone, iPad, Mac.


