Wednesday, November 5, 2014

Reverse-engineering Strava's Grade-Adjusted Pace

Love it or hate it, Strava has some pretty cool features. The basic premise of the site is that it allows you to compare your performance on a particular running (or cycling) route or section of a route. Does your running group do the same loop every day? You can set up a leaderboard for that loop (it's called a "Segment" on Strava), and compare your performance on any given day with your best ever — and the best by any other Strava user. You don't even have to start or stop your timer at the start of the segment; just load your entire GPS record onto the Strava website and it will find any segments you crossed during your run.

Some people don't like Strava because it tends to foster competitiveness instead of just inspiring people to go out and have fun. But even if you opt out of Strava's competitive features (which is simple to do by making your profile private), it has some other nifty features that I find very useful. One of them is the Grade-Adjusted Pace (GAP).

The basic idea is simple: It doesn't take as much effort run an 8:00 mile on a flat road as it takes to run that same 8:00 mile going uphill. Similarly, an 8:00 mile is easier to run on a downhill slope (assuming the slope isn't too steep or technical).

Take today, for instance. I was doing a 2-mile tempo run as a part of a longer workout. Here's an elevation profile of the run:

I've color-coded the relevant sections

The two-mile tempo is around the 4-mile mark (in green and blue). I ran the first (green) mile in 6:04 and the second (blue) mile in 6:26, but the blue mile seemed WAY harder to me. Of course this was because the green mile was mostly downhill and the blue mile was mostly uphill. But I slowed down on the uphill — did the uphill seem harder just because I was tired from the first mile, or was I honestly working harder for that mile, despite the fact that I was going slower?

Strava has an answer for me: In that first (green) mile, I descended 112 feet. Of course that felt easier! How much easier? Strava's GAP for the mile was 6:27 — slower than my actual pace in the blue mile. In the blue mile, I climbed 85 feet, for a GAP of 5:56 a mile. So even though I ran slower in the blue mile, it actually felt like I was running faster!

But during the same workout I ran two other miles at tempo pace (in gray and red on the profile). The final (red) mile felt even harder to me than the blue mile. What does Strava say about that? Strava disagrees. My actual pace for the mile was 6:20, but my GAP was only 6:03 — slower than my GAP for the blue mile.

Looking at the elevation numbers from my workout, you can make a case that red mile was tougher: There was a total of 115 feet of climbing, versus just 85 feet in blue mile. Given that my actual pace was faster in that mile, why was my GAP slower?

In red mile, there were also some significant descents: 92 feet in all. Blue mile had 7 feet of descent. So on the net, blue mile climbed 78 feet versus just 23 feet in red mile.

But surely it's harder to run a mile with 100 feet of climbing and 100 feet of descending than a flat mile, isn't it? So similarly, wouldn't it be harder to run a mile with 115 feet of climbing and 92 feet of descending than a mile with a steady 23-foot climb?

Strava has actually made an effort to account for this problem, studying relevant research and posting some information on their engineering blog:
Our original GAP implementation was inspired by the research of C.T.M. Davies [1, 2] studying environmental effects on running. Our approach used a scaling factor that adjusted pace as a function of grade, with the adjustment getting larger with increasing steepness for both uphill and downhill terrain.
 That makes sense, but what they don't tell us is whether the factor is the same for uphill and downhill. It seems to me that the factor should be less for the downhill cycle. But there is a further problem, which Strava's engineers have also noted:
Additionally, GAP is only an estimate of the energy cost of running. It does not account for terrain surface or the technical skill involved in downhill running. It is extremely difficult to make aerobic fitness the limiting factor when running downhill, particularly on trail at steeper grades. Technical skill and motor control are almost always the limiting factor. For a constant-effort run on hilly trail, we generally see downhill GAP trending to the slow side due to these factors.
I've experienced the problem of "making aerobic fitness the limiting factor" firsthand at the Pikes Peak Marathon. There is simply no way I could have run the downhill portion of race at a the maximum pace I was capable of aerobically. The 15 percent downhill would have necessitated a pace in the 6-minute range, at which speed I would have tripped on the rocky terrain a hundred times a mile. I would have been reduced to a quivering mass of gristle in half a click!

Even on my run this morning, with a much more manageable 7- to 10-percent grade on paved roads, I had to consciously slow down in the darkness as my pace approached 5:30 per mile! At that grade, Strava was calculating my GAP at 7:19 per mile, so in order to put out a 6:00 effort, I would have had to run nearly a 4-minute pace. There's not much chance of me doing that safely on a dark night running with a dim headlamp.

On the uphill sections, by contrast, I was running about a 6:40 pace and putting out a sub-5:30 effort. No wonder it felt so hard! In the end, on a course with significant downhills, it's always going to be a technical problem putting out an equal aerobic effort there compared to the uphills. So while technically it might be true that I put out less total effort in the red mile, during the uphills, I really was putting out more effort than at any other point in the run, and there's no way I could have run the downhills fast enough to equal that effort.

Here's the link to my Strava record of the run.

Here's the Garmin record (which gives numbers for both the ascents and descents)

1 comment:

  1. Thanks for deconvoluting Stravs's GAP. It always seemed like cheating to me so I never turn it on. ("Here's how fast I WOULD have been running if I hadn't been running up a hill ... Except I was actually running up a hill... But if I hadn't been, I would have been faster.")

    All in all, I've been less than satisfied with Strava's data analysis capabilities. It drives me crazy that you can't zoom in on a specific portion of your pace graph and rescale the axes.

    So eventually, I wrote my own website: I'd love your feedback. Here are some of its features

    It will plot pace, heart rate, cadence, and elevation on the same graph. You can click on/off each graph to create the overlays of your choice.

    Your ave pace, ave heart rate and ave cadence are displayed on the graph.

    You can click and drag to zoom in on a specific portion of your run. The axes rescale and the averages are recalculated for the portion of the graph visible.

    You can select 1/4, 1/2, or full mile splits.

    It will automatically find your fastest 1/4 mile, 1/2 mile, mile, and 5K segment within a long run.

    You can select 4 different smoothing factors or no smoothing.

    GraphMyRun will determine your five heart rate zones from your max heart rate (or age) and your resting heart rate. It will figure your easy, long, tempo, and interval paces from a previous race time and distance. Then, with those zones, it will tell you what percentage of your run was spent in each zone as well as where in you run you which zone you were in.

    It will figure how much your pace slows versus hill steepness (grade) so you can tell if you were running constant pace or constant effort.

    Ditto heart rate versus grade and cadence versus grade.

    If you take walk breaks during your run, it will automatically find those breaks and figure your heart rate before and after walking to help you find your threshold heart rate.

    It can read multiple files at once to plot pace versus time, heart rate (ave and max) versus time, and cadence versus time using a box and whisker plot. This is to show if you are getting faster on average as you work through your training program.

    I'm currently writing the function to plot your fastest 1/4, 1/2, mile segments within a run versus time.