I'm building a physics engine for my bike because Strava treats me like a point mass
In the pursuit of less power
Why didn’t evolution invent wheels? We could talk about how an axle fundamentally doesn’t work within a circulatory system, or the lack of useful intermediates, and these are great (correct) reasons that it didn’t; but it should’ve. Evolution is an efficiency optimization engine, and wheels are the most efficient means of motion. The human body at rest runs on a (relatively) minuscule 100 watts, survival of the ‘fittest’ usually selects those who can perform the most work for the least input, and humans excel at efficiency even compared to other mammals. The machines we invent don’t even come close to the energy efficiency of human metabolism, save for one! The bicycle, as conceived in the early 19th century (tubular frame, two wheels, chain/direct drive from the feet), unlocked transportation efficiency never seen before. It certainly varies by bike and individual, but bicycles are widely considered the most efficient means of transportation, converting roughly 97-99% of the human energy output at the feet into linear motion.
Flying blind
As an engineer (swe, so take it how you will) I’ve fixated on efficiency in every aspect of my life, and cycling enables me to take that to an unhealthy degree. I’ve got the GPS, I’ve got the power meter, I’ve got the optimal glucose/fructose/sodium ratio in my bottle, but I still don’t feel like I have visibility into how well I’m riding. The descent down the back side of Hawk Hill still terrifies me, the grades and corners are well within my ability, but the exposure of the Pacific Ocean on the other side of the road turns me into a senior citizen trying to make an unprotected left. Descending is ultimately a confidence game, and that comes with putting in the reps, but it also comes with understanding your limits.
I obsess over the data that’s already available to me, real time metrics help me gauge effort at the start of the climb, post ride analysis helps my recovery and level sets my goals. I also love the data free rides, enjoying the sun, feeling the wind, and chatting with friends. However, I see a very large, specific, gap in how cyclists are understanding their ride performance. Imagine an F1 team that knows exactly the horsepower of their car and precise lap times, but no visibility into suspension performance, cornering Gs, or braking; if all teams had the same data it would be the same (slower) league, but if one team had that extra information, they would optimize very differently, train differently, and ultimately go faster. Cycling computers (and Strava et al by proxy) simply treat the rider + bike as a point mass, taking one or more inputs (power, HR, cadence) and delivering one single output (GPS location: speed). What happens in between? Could you tell me why one descent is faster than another, or why I put out the same power output on that climb but went 15s faster the second time? There is a trove of complicated, fascinating, and understudied physics going on here.
Do it the hard way
I’m seeking to understand this missing physics, in part to get faster while avoiding improving my FTP, but fundamentally because I find it interesting. My first goal was to get real time grade (slope %) on my head unit as as the grade number you get from GPS is famously laggy. Grade is derived from vertical velocity over time, using a barometer but usually heavily smoothed to reduce noise. By the time the algorithm decides you are on a 10% grade, you are already 50 meters up the wall.
The obvious answer (attach a basic IMU to the frame, stream to head unit over Bluetooth) was a non-starter: the protocols are locked down and ‘grade’ isn’t a standard profile. So I had to do it the hard way.. I got to thinking, a standard IMU has 9 degrees of freedom (3 for acceleration, gyroscope, and magnetometer), and the hobby boards even have built in sensor fusion! There is far more data here than grade, I could see braking smoothness, body position stability, traction limits, and (infinitely) more if I were to combine it with the existing data. So I just said to myself: if I buy a 3D printer, learn CAD, learn to solder, write some firmware, write an android app, build async cloud processing, understand sensor fusion and signal processing, all while maintaining my day job, then I might be able to fixate on more numbers that tell me I’m slow, or maybe, finally tell me why.
So I’m here building, debugging, burning myself, short circuiting boards I don’t understand, and leveraging AI to help me do the busy work (this blog will be entirely my own voice, excessive colons and parentheticals included). As of lately, vibration damping is the hard problem of the hour. Early data showed overwhelming noise from road vibrations and subsequent gyroscope saturation (making fusion pointless), so I’m testing various materials (sorbothane, Kyosho Zeal) to address the noise at the road frequency band (40-100hz). If you’ve dealt with a similar problem, or have any suggestions, I’d love to hear about it.
I’m an engineer, not a writer. I’m building this in the open because I want to create something, find the data, fail fast, and have fun along the way. If you’re interested in the physics of why we stay upright and how to go faster, follow along.
Ben




