Friday, November 30, 2012

Converting Run Times to Cycling Times for Low-Key Hillclimbs: Part 3

Last time I described the procedure for constructing a look-up table for time conversion for road segments of a particular road grade. The road grade is the result of taking the route profile for a course, extracted for example from barometric altimetry + GPS data (Garmin Edge 500, Garmin Edge 800), and convolving it with a smoothing function to reduce grade changes which occur over substantially less distance than 25 meters. The approach is based on an equation fit to data from Minetti, et al, published in the Journal of Applied Physiology in 2002.

Here's the model, where metabolic cost is measured in energy per unit distance. Although metabolic heat is more conventionally reported in calories, I prefer joules in order to facilitate conversion between power, work, and heat. I assumed running for grades up to 12%, and walking for grades larger than 12%, which is consistent with my typical practice (perhaps not Gary "the" Gellin, who could run up a sheer vertical wall and still do sub-9 minute miles).

dE/ds =
a0 +
a1 (g' + g'0)2 +
a2 (g' + g'0)4 +
a3 (g' + g'0)6
where I define:

g' = grade / sqrt[ 1 + grade2 ]

and where I derived the following heuristic model parameters:
a0 = 1.68 J/m/kg a1 = 54.9 J/m/kg a2 = −102 J/m/kg a3 = 200 J/m/kg g'0 = 18.4%

To convert cycling power to metabolic cost, I assumed a 3% drivetrain loss rate, and I assumed a cyclist metabolic efficiency of 25.7%, which is the lowest value which avoids the bike rider requiring a greater rate of metabolic cost than the runner at the same road grade given the idealized assumption of zero bike weight and zero drivetrain efficiency. However, here I take a slightly different approach.

The retarding force from wind resistance is typically modeled as 1/2 ρ Cd A v2, where ρ is the air density (typically approximately 1.15 kg/m3), Cd is the coefficient of wind resistance, A is the cross-sectional area, and v2 is the square of the bike or runner speed. For the cyclist, I am going to arbitrarily assume a CdA of approximately 0.45 m2 per 75 kg of body mass, while for the runner, I will assume Cd of approximately 0.8 with an area of approximately 0.75 meters squared, totalling 0.6 m2 for the same 75 kg of body mass. So the runner, by virtue of an upright position, will have more wind resistance, and will typically be wearing less aerodynamically efficiency clothing, although he is spared the wind drag of a bicycle. For runners, the key question is how to convert this wind drag to merginal metabolic cost. For that I can just assume a marginal metabolic efficiency. 25% seems a good choice, so that's what I used.

For cycling, I assumed a CdA of 0.45 m2 for a 75 kg cyclist. I estimated a rolling resistance coefficient of around 0.4%. I set extra mass, including bike and clothing, to a modest 12% of the body mass (9 kg). I then assumed the cyclist could sustain 5 W/kg, which yields an Old La Honda time of just over 17 minutes.

As I noted last time, I asserted at high speeds the cyclist is retarded by safety considerations, which I applied as follows:

v → (v−4 + vmax−4)−1/4 .

Here's the resulting pace in minutes / km (I like min/km ore than min/mile because it makes calculation of times for 10 km races simple, perhaps except for a fractional minutes-to-second conversion):

bike and run
calculated minutes per km for model cyclist and runner. I assume the runner can do just under 4 min per km (4.3 meters/second) while the cyclist can sustain 5 W/kg (17-minute Old La Honda). I then scale runner speeds using my analytic fit to Minetti's metabolic cost data, adjusted for estimated wind resistance with a 25% metabolic efficiency. For the rider, I assume a climb-like bike position for wind resistance with 12% of total weight taken up by the bike + clothing.

As expected, the cyclist at negative and zero grades has a substantial advantage, but as the road gets steeper, the runner does better relative to the cyclist. Here there is no cross-over point, unlike my last calculation where the conversion between runner and cyclist was based on an assumption of metabolic efficiency However that approach substantially overestimated what speed I would be able to sustain up Old La Honda, so for this calculation the more heuristically based criteria for setting cyclist and runner speeds independently (I still used a metabolic efficiency for the small correction to runner speed due to wind resistance in still air) resulted in lower running speeds, and therefore the cyclist in this case is able to sustain an advantage to the 20% in the plot.

It appears from the trend as if the runner will eventually catch up to the cyclist pace but in fact this isn't the case due to the nonlinearity in the metabolic running cost with road grade. This is optimistic about the ability to sustain power on a bicycle at extreme grades, however. Eventually traction becomes an issue, and likely gearing becomes limited, unless you're riding a bike like Dan Guttierez's Fargo-Road-climbing-custom (video). But then who says you're not? My model shouldn't assume you're riding an inappropriate machine for the road.

Anyway, I then calculated a score conversion factor for running scores. As I noted, rather than rely heavily on my ad hoc assumptions about what speeds a model runner versus a model cyclist can sustain, I constrained the score conversion to 1 at a 12% grade. The result is here:

bike and run
Score conversion factor for runners versus road grade. Actual roads will be adjusted on a segment-by-segment basis using full profile data (with Gaussian smoothing). While specific assumed cycling and running speeds were used to generate this curve, the effect of these assumptions was only on wind resistance, and therefore for climbs the affect on the conversion factor is small. The dashed line is for equal time, the solid line adjusts for the runner taking more time and thus facing greater fatigue than the cyclist (for the grades on the plot). Each curve is independently normalized to 1 at a 12% grade.

What I'm missing in the dashed line in this plot is the effect of endurance, however. I started by assuming cyclists could sustain a given power and runners a given flat road pace, but of course they can't do that indefinitely. However, such a pace cannot be sustained indefinitely. Looking at world record times, there is a trend that these speeds fall around 5% every time the time required is doubled. I can model that as speed is inversely proportional to distance (at a given grade) raised to the power ln(1.05)/ln(2). There's a minor issue whether the 5% applies to doubling of distance or time. I'll assume time. That means to get an exponent to apply to distance I need to solve self-consistently, which can be done analytically via the transformation of the exponent k

kd = kt / (1 - kt )
where kt is the exponent for time and d is the exponent for distance. So in my application speed is changing over the course due to grade, but on constant grade I initially assume constant speed, so instead of kd here I can use initially calculated time. So what I do for endurance is to take a reference time at which the assumed flat-pace or power can be sustained, then assume that pace applies to any distance, then once I've calculated a power I multiply it by the ratio of the initially calculated time to the reference time raised to the power calculated to yield my 5%/factor-of-two-time speed loss, which is 0.0757.

The effect of the endurance adjustment is shown as the solid line in the preceding plot. For relatively flat or descending routes, the runner takes more time relative to the cyclist than he would on the reference 12% grade, and therefore his speed will be relatively degraded by the assumed 5%/factor-of-2-in-duration rate of decay. The effect is 5% total for when the conversion factor reaches 2 (which is what it is designed to do).

So that's it. All I need to do next is test it on a real hills.

Thursday, November 29, 2012

Converting Run Times to Cycling Times for Low-Key Hillclimbs: Part 2

To convert times for running to an "effective cycling" time the approach I want to take is to convert the running time to a cycling time of similar metabolic cost. Minetti measured metabolic cost for running on a treadmill tilted at different angles. This completely neglects wind resistance, yielding the running analog of rolling resistance, overcoming gravity, and drivetrain efficiency:


For cycling I have the standard equations, which I won't fully enumerate here. But in still air there's a wind resistance component proportional to area, air density, and speed cubed, a gravity component and a rolling resistance component each proportional to weight (gravity and mass), speed, and the sum of the road grade and the coefficient of rolling. Additionally there is a drivetrain loss component which is typically if inaccurately modeled as proportional to total power (in reality the fractional loss decreases at higher power).

There's several levels of approximation I could use. First, there's the issue of wind resistance, Wind resistance depends on speed, and so if I were to carefully model wind resistance I would get a different conversion factor for each runner based on his speed. But this adds needless complexity given the uncertainty in the model parameters, so I'll assume typical values for running and cycling speeds to account for the wind resistance effect.

Then there is what to use for the road grade. One approach is to use aggregate statistics for the climb. But while that is certainly simple and would be a substantial improvement on status quo, I feel I should do better: there is a substantial difference between a climb and descent, with zero net altitude gained, versus a flat road with zero net and gross altitude gained. So I will analyze the road on a piece-by-piece basis. But road grade has something of a fractal character: the closer you look, the more it varies, so I will smooth the road by a 25 meter bi-exponential smoothing function first.

The approach is then the following:

  1. Smooth the road grade with a bi-exponential smoothing function of length 25 meters.
  2. For each segment of road, calculate a metabolic cost per unit weight per distance for running.
  3. Estimate the time taken to run that segment as proportional to the metabilic cost multiplied by the distance.
  4. Calculate the time taken to ride the same segment, in steady-state, under the assumption of constant propulsive power. For this I need an assumption of rider propulsive power. The time should be modified on steep descents since riders tend to brake or coast for safety reasons.
  5. Sum up the course times for running and cycling.
  6. Adjust times for speed lost from event duration for runner and cyclist (I'll discuss this later).
  7. Calculate a ratio of running time to cycling time.
  8. Apply a scale factor to establish a desired balance of running versus cycling scores.

The issue of metabolic efficiency is important. When I used a similar approach to estimate my running time up Old La Honda Road, I got a substantially optimistic result, faster than even Gary "the" Gellin was able to pull off during a Low-Key Hillclimb. The metabolic efficiency question is an important one.

But whatever I pick for metabolic efficiency, there is the additional question of score balance. I want Low-Keys to be a cycling event, not a running one, so cyclists should generally score higher then runners.

For the metabolic efficiency of running versus cycling, I'll bypass the issue to some extent. For running, I can assume metabolic cost per unit time is constant, and thus speed is inversely proportional to metabolic cost per unit distance. There is a calibration factor to be determined, but to get this I just need to assert a given speed on flat roads. For example, 4.2 meters / second corresponds to a 39.7 min per 10 km, or 1:23:43 per half-marathon. Then for each road-grade I self-consistently solve metabolic cost of wind resistance and speed. For the incremental metabolic cost of wind resistance I'll arbitrarily assume a 25% marginal metabolic efficiency. Since wind resistance is approximately anyway, higher precision is pointless. So the sequence is solve total metabolic cost under an assumed speed, revise speed based on total metabolic cost, repeat.

For cycling, I simply set a target sustained power of 5 watts / kg. But since riders are typically presented by technical challenges on steep downhills which require some braking, this approach overestimated downhill speed. I set an arbitrary speed limit of vmax = 20 m/sec, which is 72 km/hr or 44.7 miles/hr. After I calculated a speed under full power, I did a transformation to get a final speed:

v → (v−4 + vmax−4)−1/4 .
This adjustment results in a certain amount of technically-related speed loss at all speeds. For example at an ideal speed of 50 kph it reduces actial speed to 47.5 kph.

These calculations give me a best-effort prediction of the relative speeds of runners versus cyclists for each road grade, assuming running at that pace and cycling with that power are comparable achievements. However, to use this conversion factor directly would balance running and cycling scores. I don't want to do that, since I want this to be a series where the focus is on cycling, not running. So the obvious remedy is to scale effective running times by an additional factor.

Rather than simply pick an arbitrary factor, a better approach is to attempt to emulate the present scoring, in which runners are scored on the same scale as cyclists, for some target road grade. So I will pick such a road grade and apply an additional adjustment factor on top of the one based on the ratio of best-estimate running speeds in order to bring the net adjustment factor to one. Note there will already be a grade at which the predicted speeds will equal. But as I previously showed, this grade is relatively steep, for example 15%. So by setting my reference grade to a smaller value, one at which cyclists are still at an advantage, I retain the cyclist focus of the series.

The steepest sustained road we've done is probably Metcalf Road, which averages 11.6% over the portion which maximizes its climb rating (using my rating formula). So I think that's a good reference grade to use. For steeper sections of climb, runners effective times will be increased (slower), while for more gradual sections runners effective times will be decreased (faster).

I'll run some numbers next time.

Wednesday, November 28, 2012

Converting Run Times to Cycling Times for Low-Key Hillclimbs: Part 1

In the Low-Key Hillclimbs this year, cyclists were scored using a factor to adjust for how spread out they were in time. On steeper climbs, riders tend to be proportionately more spread out, but on more gradual climbs, they tend to be more closely bunched together. Rather than apply a correction explicitly based on any particular characteristic of the road, a "slope factor" was derived from the rider data to yield a similar statistical distribution for any pair of weeks for riders doing both weeks.

This worked well for cyclists, but we also allow runners in the Low-Key Hillclimbs. We don't want it to turn into a running race, with teams recruiting runners to boost their scores, so instead of scoring runners on their own scale we score runners the same as their time would have been riding. Since only on extreme grades is running faster than cycling, this results in runners scoring relatively less. It's fun when running to do as well as one can against the riders, but it's recognized in advance it's overall a losing battle.

This was okay until this year, when we intriduced a "running division" in the overall score. This was a side-effect of introducing a tandem-specific division: it forced me to extend my scoring code to accomodate riders switching divisions one week to the next, and once I'd done that for tandems, it was absolutely trivial to extend it to runners. Since I was training for the California International Marathon this Low-Key season, it additionally gave me a competitive outlet without compromising my running focus.

The problem is that runners do not behave simply like slower cyclists. At some grade, for example 15.7% in an analysis I did previously, runners and cyclists may be similar: cycling is more efficient but the rider must carry the extra weight of the bicycle. On the other hand, on flat ground a cyclist can cruise along at close along at 1.5 minutes / km or 40 kph, while for a runner will be around 2.5 times slower (3.75 minutes per km). So the steeper the grade, the better things are for runners.

This was made evident in this year's series. In week 7, Bill Bushnell did a brisk hike up Kennedy Fire trail, shooting photos. Five days later Matt Allie ran 29.6 km in 2:23:10 up Mount Hamilton. That's a 1:42 half-marathin pace for a longer distance. Yet Bill scored more points for his walk. That is what it is; the scoring is designed for cyclists, with runners a relative side-show. But if runners merit a separate division, I owe it to them to equalize the scores week-to-week somewhat.

The approach I'll take is based on the measured metabolic cost of running. I already described this when I looked at data from Minetti. Here's that plot. I'll go more into it next time.


Tuesday, November 27, 2012

Montara Mountain from Grant Ranch dirt climb

Dirt climbs are fun, and while I've not ridden up this one (I've hiked it, and I've ridden down part of it), I decided to make a profile for it since it was recommended to me by a friend.

Montara Mountain is often overlooked when cyclists think of large climbs in the Bay area. The reason is that unlike many other large hills, there's no paved roads to the top. However, this was not always the case, and the "Planet of the Apes" route follows what was the inland road ("San Pedro Mountain Road") between Pacifica to the north and Half Moon Bay to the south. This road was replaced by the Devil's Slide portion of Highway 1, and nature quickly asserted control. The "road" is now in many places little more than single-track, it's paved past evident only in broken patches of crumbling asphalt.

This route begins at Grant Ranch, the southern extreme of Planet of the Apes. It then climbs steeply to a "Y", a left the route to Pacifica along San Pedro Mountain Road, the right the route of interest here, to the mountain summit. From there it's fairly straightforward until a dirt path to the left rises sharply to the summit viewpoint.

A Strava segment is here:

The profile shows just how challenging this route is:

profile My rating formula, which gives a big weight to extended sections a significant multiple of 8% grade (altitude gained at steady 20%, for example, counts 12 times as much as altitude gained at steady 8%), rates it 242 on the "Old La Honda = 100" scale.

Monday, November 26, 2012

posts per month to this blog

This year I went through a bit of a slump in posting to this blog: I was involved in a coding project which in the end turned out to be essentially unsuccessful since I had issues with dealing with the Strava API I was unable to resolve, and other priorities took over. In any case, I still had things I wanted to say here, so went back to posting after the slump.

Here's my accumulated posts each year, by month, since I started way back in 2008:
posting per month

I'm never sure for how long I'll go on with this, but I find it personally valuable to go back and see what my perceptions and feelings were at various points in the past. For example, 2008 was when I first started running after a long, long delay, and I like going back and reading race reports I posted then. Or I refer to equations I derived relating factors such as mass, aerodynamics, and rolling resistance to cycling speed.

I'll stick to it to some degree as long as I find it valuable. Facebook and Twitter, which have largely replaced blogging as an activity, don't do this nearly as well.

Sunday, November 25, 2012

Black Road + Skyline to Castle Rock

Typically climbs are up a single road (like Old La Honda Road), or up a relatively unambiguous path to a summit (like Diablo North Gate Road to Summit Road). But in the San Francisco Bay area, like many other places, there are often ridge roads into which roads up the hillside intersect. As Baird Webel pointed out to me when I was at Stanford, these side roads will typically seek out relatively low points in the ridge, so by turning when hitting the ridge road, the climb can be extended. He wasn't claiming this as an opportunity, but rather as a fate: don't take the ridge road for granted as the top of the climb. Another Baird quite, "We need to descend into that?!?!", when looking down into the smog-shrouded Silicon Valley was similarly memorable, but that's a digression.

Anyway, I typically ignore these sorts of options as "climbs". From the top of Old La Honda Road, for example,the climb can be extended without much traffic interference by turning right on Skyline Boulevard, climbing further to the peak before the descent to the store (and nearby Alice's Restaurant). I've never made a continuous targeted effort all the way to the summit. Old La Honda is what it is and that's the climb: the longer climb isn't "better" due to being longer. Rather it's a dilution.

But one section of Skyline is particularly challenging for Skyline, and that's the climb from Black Road to Castle Rock State Park. The thing about Skyline climbs is they are so easily underestimated. Skyline is a ridge road, after all, and as Baird was referencing, once you've reached the ridge road there's a tendency to consider the hard work over. A climb on the ridge road, even if it's substantially less challenging than the climb taken to reach it, nevertheless may be the coup de grace on tired legs.

This is what happened to me during the Sequoia Century 200 km ride in 1994. We'd climbed Mountain Charlie Road to Summit, which is a southern extension of the ridge road, then ridden north through a hilly narrow section of Skyline before arriving at Black. There the road begins an uphill slog to Castle Rock, gaining approximately 192 vertical meters (630 feet). With fresh legs and expecting a climb that's a nice little challenge, but finishing up the climbing of a 200 km ride with 3000 meters of total climbing, it can be a long, slow grind.

So I crawled up the hill until finally the grade relents and one reaches the rapid descent to the Highway 9 junction. Soon after we reached the ride's final rest stop at the fire station, where to my amazement there was an electric blender spinning up delicious smoothies. It was one of the most delicious smoothies I've ever had, given the context, and with it my fatigue disappeared for the final rollers to Page Mill which we descended in conjunction with Moody Road to reach the finish.

Anyway, that section of Skyline is a good climb. And since it begins at the top of Black Road, the most challenging single road to Skyline Boulevard, it makes for a nice combination. Black gains close to 11% sustained over two nice chunks, with some respite at the Lakeside school in between. A nice alternative to upper Black is heavily switchbacked Gist Road which connects to Skyline in between, but Black by itself is a tough climb on its own.

Here's the profile:


I ran these climbs through my rating code and I get the following. Note the rating formula is not linear: two climbs together need not have the same rating as the sum of the component climbs (this nonlinearity is by design, as I think it matches perception: a gradual climb situated between steep climb segments may actually subtract from the total rating, even if the gradual climb itself has a positive rating):

Black Road             : 150% Old La Honda
Skyline to Castle Rock :  31% Old La Honda 
total climb            : 170% Old La Honda

The Strava KOM is presently held by Adrien Costa, the 2012 Low-Key Hillclimbs solo male rider champion.

Saturday, November 24, 2012

Patterson Pass (E)

Last year the Tour of California, for the first time, rode the east side of Patterson Pass, the last climb in the stage into Livermore. The result was domination of the Strava leader board as the group blasted over the climb, down the other side, into the city for a few finishing circuits, then to the sprint which was dominated by Peter Sagan.

The Strava segment:

Here's my rendering of the profile data:


It begins gradually, traversing up the windmill-capped hill until the "oh-my-God" climb which leads to the pass. Although the view of this section is dramatic, the profile shows the grade is only 12%, which can cause distress but is not in the league of the steepest climbs in the Bay Area. Using my climb rating index, it rates 74% as high as Old La Honda Road.

I've ridden this climb in two major events: the Devil Mountain Double and the Patterson Pass Road Race. In the former, it comes between Mount Diablo and climbing the west side of Mount Hamilton. It's a noteworthy challenge, but in comparison to these other climbs, and Sierra Road which follows, it's a small obstacle to be traversed doing as little damage as is practical.

In the road race, it's another matter. One time I rode the climb in the E3 race strongly at the front before I was squeezed off the right side of the road, crashed, and the watch on my wrist tore open the skin there, leaving a substantial scar. Another time the headwinds were so strong over the pass that even the hefty sprinter types could crest with the lead group: the climb was completely neutralized since those at the front were riding into a block headwind which, even with the 12% slopes, prevented anyone from getting off the front.

So this climb has a lot of history. It's been used in many cycling events over the years, from training rides to recreational rides to amateur races to the Tour of California. Just don't panic when you see the final run to the pass.

Friday, November 23, 2012

Low-Key Hillclimbs: another successful series!

The 2012 Low-Key Hillclimbs are done! And it was an extremely successful year.

This was the year of the Junior, as the men's overall was taken by Adrien Costa, who capped off his successful year with the win in the Mount Hamilton Thanksgiving climb, beating Irish Hillclimb champion Ryan Sherlock in a tactical race. Adrien set the Strava KOM (beating a false match to Jacob Berkman's Mt Hamilton Road Race data; the road race doesn't do the time-sucking summit road), and broke David_Wyandt's long-standing record from 1998. Ryan, finishing second, also beat David's time, not giving him three of the top five times. To be fair, it's off-season for Ryan, but then again it's also off-season for Adrien. After third place Eric Wohlberg, fourth place also went to a junior, Andrew Biscardi. This is the best year yet for Low-Key juniors, the previous best arguably Menso de Jung's excellent season in 2006.

In the women's rankings, it was Lisa Penzel who finished at the top of every week's climb until Hamilton, when she finished third to Melanie Spath and Katelyn Connell. Melanie is Irish women's time trial champion. Lisa may have lacked the training volume for Hamilton's long distance. Despite that, she posted a very fine score for third place.

In the tandem division, it was the Paul's: McKenzie and Chuck, who took the overall. They were the most successful all-male tandem in Low-Key history: more often tandems are mixed male-female. Second place went to another excellent climb from the Brehmers: Dan and Winnie.

In the team competition it was all Team Brown Zone, who did it all. They delivered excellent rides at the climbs, they had a custom team kit which looked really good, and they produced an amazing team effort in coordinating the West Hwy 9 climb. In every way they deserved the position of top Low-Key team. Western Wheelers was a very strong second, while the Sisters and Misters of No Mercy was a solid third.

I missed the final climb due to a family event in Philadelphia. But it was great following the results as they appeared on Strava, then Pat Parseghian did an amazing job of preparing the Low-Key watch-timed results, and resolving the ambiguities which always pop up as tired riders gasp out their numbers. Results seem excellent.

I'm super-grateful to everyone who helped with the series.

One curious fact: turn-out was the best since 2009, but it was larger that year, the which was the best turn-out for a Low-Key climb since 1998. That's strange since conditions were excellent and turn-out has generally been excellent this year. Post-Lance-Armstrong-burnout? Perhaps. But there's also just random variation in turn-out, and the difference is within expected statistical variation.

Thursday, November 22, 2012

Kennedy Trail dirt: Mixing things up for Low-Key Hillclimbs

A big motivation for Kennedy was that it would mix things up a bit: not only the experience, but also the scoring. While the results in typical climbs can get almost frustratingly predictable, on the dirt skill, confidence, and balance can play a substantial role.

I like to compare the scores for riders who did climbs in any given pair of weeks, to see how their scores different (RMS average difference). Here's the result:

w1: Montebello
w2: Quimby Road (Murillo start)
w3: Morgan Territory Road (S)
w4: Hwy 9 from Boulder Creek
w5: Hwy 84 - West Alpine
w6: Soda Springs
w7: Kennedy Trail

rms score delta (riders doing each)
       w1    w2    w3    w4    w5    w6    w7
w1      .  4.73  2.99  5.29  6.04  3.40  6.88   w1 
w2   4.73     .  4.96  7.91  5.77  3.33  6.48   w2 
w3   2.99  4.96     .  4.07  6.41  3.09  6.72   w3 
w4   5.29  7.91  4.07     .  5.66  5.59  7.46   w4 
w5   6.04  5.77  6.41  5.66     .  4.59  8.02   w5 
w6   3.40  3.33  3.09  5.59  4.59     .  6.70   w6 
w7   6.88  6.48  6.72  7.46  8.02  6.70     .   w7 
       w1    w2    w3    w4    w5    w6    w7

The week-pairs for which scores were the closest match were Montebello and Morgan Territory. A close second was Morgan Territory and Soda Springs. The biggest difference was between Kennedy Fire Trail and W Hwy 84 - W Alpine, while Kennedy Fire Trail vs West Highway 9 was also a large difference. Scores between Kennedy and any other week differed RMS by at least 6.48 points. There's other weeks which also had mismatch, for example Quimby versus W Hwy 9, but in general Kennedy proved the most unique.

Here's a plot of the W 84 scores versus Kennedy scores for riders who did both. The scoring algorithm clumped the scores around the line y = x, so there's no evident strong bias to faster or more endurance-oriented riders. The only bias is towards riders relatively better or worse at climbing on dirt, as it should be:

week 5 vs 7

So the scoring worked well. As I've described before I calculate a parameter I call the "slope factor" which corrects for riders being relatively closely or relatively widely spaced in time on a given climb. Steeper hills tend to spread riders out more than flatter rides. But dirt also spreads people out more than pavement. It is curious to see if the result matches this expectation. Here's the scoring factor plotted, where each point relating road grade to slope factor is indicated with the week's number:

slope factors

Kennedy, indicated with the brown 7, is indeed an outlier, and separated the riders more than any other climb. This year's scoring code helps limit the relative influence of Kennedy versus, for example, Mount Hamilton on Thursday which traditionally yields far less separation due to its modest grades and intermediate descents.

Tuesday, November 20, 2012

Kennedy Fire Trail: GPS course matching & timing algorithm

Here's a summary of the method I used to extract times from GPS data on the Kennedy Fire Trail run.

  1. First I defined a course. This was done with a series of "lines": line segments the riders needed to cross in a specified direction. This is in contrast to Strava's approach of defining a course via points. For matching, Strava treats the start and end point as special, requiring the activity to pass them with close proximity. Intermediate points need to be matched in a much cruder fashion, and only then a certain fraction of the points. My approach, however, required all intermediate "lines" to be crossed. I defined these points using latitude-longitude coordinate pairs, which are easily extracted from Google Maps (select point, right-click, "What's Here?").
  2. Split times were specified as pairs of lines, where the start line is 0, and the finish line is the last line. For example, my course had split times from 0 to 1 (an initial 40 meter sprint), from 0 to 2 (from the start to a flattish point just past halfway up the hill), from 2 to 3 (from this point to the bottom of a short descent), and from 3 to 4 (from this point to the finish a 1/4 mile away).
  3. Lines were defined with two points and a width: the first point a center point, the next point establishing a right-hand direction, and the width defining the distance to the right-hand boundary of the line in the direction of that second point. The left boundary of the line was defined in the opposite direction the same distance as the right point.
  4. Line crossings were determined by considering the rider trajectory on a segment-by-segment basis, where each segment was defined by adjacent points on the data record. The intersection of the course line and the trajectory segment was determined. It needed to fall within the bounds of both the line and the trajectory segment for a crossing to have occurred. The vector cross-product of the line with respect to the trajectory was then checked to make sure it was in the positive-altitude direction (line defined from center to right points, using a right-hand coordinate system). This was to check that the crossing was done in the correct direction.
  5. Line crossings were considered only if they occurred at the starting point, or any point up to including the one following the last line crossing (if any). Thus, the start line needed to be crossed first, then either the start line or the point following, etc. With this approach, the activity could repeat an earlier line crossing, but if so had to begin again with the line following.
  6. Timing was initiated each time the start line was crossed. I linearly interpolated this time from the data, which is a substantial improvement versus Strava, which simply takes the time of a point. With Strava this introduces large errors during Garmin "smart sampling" or periods of momentary signal loss, where time gaps may be a substantial number of seconds. With my method, as long as the trajectory can be reasonably reproduced and the speed is reasonably uniform during the time, the estimated crossing time is relatively independent of the sampling rate.
  7. Timing was completed each time the finish line was crossed. If earlier times had been determined (multiple laps of the course) only the shortest net time was retained. Memory of line crossings was reset each time the finish line was crossed, so if the finish line was crossed, the next line crossing (if any) had to be the starting line.
  8. Split timings were initiated each time the first line in the split was crossed.
  9. Split timings were recorded each time the second line in the split was recorded. If this occurred multiple times, only the fastest time was retained. Note if the course was traversed multiple times, a given split might not have been from the same "lap" as the final time. One rider on Kennedy rode twice on different bikes. He submitted only the data from the fastest run. Had he submitted a combined activity with both runs, even though he'd gotten the same final time, he might have gotten faster split times, had any of the faster split times occurred on the slower run.

It's simple, really. The key difficulty is setting up the course. But for "events", that's not a concern for a reasonable number of distinct checkpoints.

My code had one feature I didn't use at Kennedy: a time budget to get between adjacent checkpoints. I'll use this next year, when I'll set up a course which climbs multiple short hills, where I'll give riders a reasonable time to get from the top of one hill to the bottom of the next. As long as their time between these checkpoints is less than the budgeted time, no time will count towards the overall time. If more time is taken, the time budget will be subtracted from the time taken to connect those two lines. The idea here is to allow riders to proceed at a relaxed, safe pace, maybe even efficiently repair a flat tire, but not to allow riders to substantially rest, stop for meals, etc.

start area
Plot showing subset of activities crossing the start line (red) and, subsequently the first checkpoint 40 meters later (green). The crossings must be from left-to-right, so those approaching on the road (higher stream) failed to trigger the start. Those moving to the right on the road would trigger the start but when subsequently moving right on the trail (lower stream) the start would be reset. The lines were generously defined (50 meter width for start, 100 meter width for first checkpoint) since the route is well-defined without short-cuts and failing to exclude valid rides was given a higher priority than rejecting data which was potentially low accuracy. Some anomalies in rider data are evident, such as the blue curve which loses signal briefly or else succumbs to Garmin "smart sampling" (281391197), but generally the data appear clean in the proximity of the line crossings, which helps explain the apparent good results which were attained with the first split time, despite it's short length. Strava would not have been reliable for such a short segment due to its lack of interpolation and its use of point-proximity rather than line-crossing as a criterion.

Monday, November 19, 2012

Kennedy Fire Trail run: VAM analysis

A followup to my run report... a look at VAM.

VAM on running is a very different beast than on cycling. With cycling, once overcoming gravity becomes the dominanant task, wind resistance and rolling resis\ tance playing substantially minority roles, a relatively constant VAM can be maintained as long as there's an available gear to support a cadence in the target ra\ nge, at least until holding the front wheel on the road becomes a challenge. With running, the analog of rolling resistance is much larger, so there is no point \ where it can be trivially ignored, and by that point running becomes impractical and movement is more by walking or even scrambling. So VAM without the context o\ f road grade is meaningless.

I repeat the analysys I did for Soda Springs Road, which is to plot VAM and road grade, each smoothed by a 30-second Gaussian convolution, on the same plot. H\ ere's the result:

VAM and road grade

What I see is, on these axes, VAM and road grade track nicely until towards the end of my run the VAM curve rises above the grade curve. To me this indicates \ my pacing was fine, even conservative in the beginning. I was able to increase my pace toward what I perceived to be the finish.

Unfortunately, it wasn't actually the finish...

I went for a nice 15-miler on Sunday in San Francisco to try and get over my frustration from Saturday. It partially worked. I ran fine, maintaining a decent\ pace when not impeded by intersections, and not feeling especially fatigued toward the end. It helped that I came upon the San Francisco Urbanthon runner expo c\ losing shop and was able to eat a few Clif samples half-way through. I still took a few hours upon returning before I felt restored, but that's always the case w\ ith long runs with me. So physically I recovered well from Saturday. Mentally it takes a bit longer, however.

Sunday, November 18, 2012

Low-Key Hillclimb: running Kennedy Fire Road (fail!)

Yesterday was the first-ever "self-ride" in Low-Key Hillclimb history. Since GPS has become sufficiently ubiquitous, it was a good opportunity to use a course which would be otherwise inaccessible to us. In this case it was Kennedy Fire Road.


For this purpose I wrote some Perl code which downloaded Strava activities using their rest API, the simple version 1 streams method. I'll provide more details on this next post. But in summary there were a series of "lines" which the data needed to cross in the correct direction in sequence. I had a start line, a first checkpoint 40 meters later to check for riders accidentally triggering the start before they'd actually started riding, a next checkpoint at a plateau a bit more then half-way, a third checkpoint at the dip before the final steep climb, then the finish. I had split times associated with each of these checkpoints.

I went to the trail head with Lisa Penzel, who gave me a ride there from the West Oakland BART station, which was super-easy for me to reach. She's an excellent trail runner in addition to an excellent cyclist (she's going to win the overall women's ranking in the series) so having her there would prevent me from slacking off. After a warm-up we set off together. She set a very nice pace on the opening climb and descent. Then the main climbing began. I was able to pass her there, but she was never far behind, so she provided constant motivation to keep the pace high.

Our start was good as indicated by that first 40 meter split. The data indicate I ran well: I see no fading in my rate of vertical ascent (although in running this is highly positively correlated with grade until it becomes difficult to walk, and the grade of Kennedy is highly non-uniform). I hit the second checkpoint at where I expected it: 3.9 km into the run, a sweeping right before the grade picked up.

Then came what I thought of the final push to the summit. I anticipated a steady grade, a flattish section which appeared to be the top, then a final "oh-my-god" wall to a brief left at whose exit point was the top. Then a flat plateau to a trail junction past the finish.

The trail leveled out and indeed this looked like it was the finish. I then turned the corner to see two riders riding up the hill in a low gear. I was able to run quicker than they could ride, and passed first one then the other. Approaching the top was a left turn. The actual summit was slightly past the exit point of the turn so I noted this and decided to move the finish line slightly.

Small detail: someone had volunteered to put chalk down on the trail at the start and finish of the course and indeed, there had been chalk placed at the start. I hadn't seen any at the finish but perhaps he'd been deterred from climbing by the wet weather.

After this peak was a descent: I continued running because Lisa had said there was a Strava segment to the junction. I came to a junction and concluded I was done. To the left appeared to be a lookout rather than another trail, but perhaps there was a small trail exiting the lookout. The Garmin was reading 5.7 km, I think, at this point, which was only slightly short of what I'd expected.

I waited a short time for Lisa to finish then congratulated her.

She seemed confused, however, uncertain this was the end. But I was able to convince her this was the the only junction on the course and surely it was the finish. Nevertheless after a delay we went a short distance to where there was another steep climb. We turned back here. This was my other big mistake: I'd studied the course beforehand and there was no climb following the plateau at the top. But I'd become convinced I had reached the top: two many details lined up, and I was at this point ignoring any evidence to the contrary.

She was dressed for climbing, not for standing around, so we began the run back. Along the way we came across Ralph Houk, a rider I'd not seen in a decade, and I didn't recognize him. But he recognized me, and we chatted a bit. He made it clear we'd not reached the top.

I felt shattered. It wasn't so much I'd spoiled my own run, but I'd spoiled Lisa's as well. I decided I'd pro-rate Lisa's time for the final short climb we'd missed by stopping at the lookout. It was a 400 meter section gaining approximately 45 meters, an average of 12.5 percent, but the actual climbing portion was more like half of that length at twice that grade. Despite this I decided to take her VAM on the last steep portion we'd climbed and apply it to the finish of the course. She was running a VAM of 1000 meters/hour here so the calculation was simple: 0.045 hours.

For myself, however, I deserved to pay the price for my mistake, so got a DNF.

Pat Parseghan photo
Descending after the climb

The run down was fun, an easy trot until Lisa decided to go for a CR on a segment along the way, and outsprinted me even though I tried to keep her pace. My top end speed is lacking and is something that clearly needs work.

At her car, she offered to wait for me to climb and descend the hill again, but I was tired from the first run and didn't want to make her wait around or try to arrange a ride with someone else.

I changed from my wet New Balance Minimus Road shoes into my Keen Sandles, putting my shoes briefly on the curb until I'd stepped into the sandles. Problem is they stayed on the curb, forgotten. Apparently someone later picked them up, so they're gone. I posted an ad to CraigsList but that yielded nothing. I'll need to find time to buy new shoes before CIM on 2 Dec, unless I want to run the marathon in my racing flats.

So a very bad day for me. I lost the overall lead in the running division in the Low-Keys. Since runners are scored on the same scale as cyclists, and Kennedy was by far the best climb for runners relative to cyclists, you needed to score there to rank. A runner who ran just Kennedy was able to score enough points there alone to beat my net score from Quimby + West Highway 9. Additionally my team, Low-Key, would have taken the top points for the ride and would have benefitted in the overall standings. Sigh. All for not having run an extra quarter-mile.

On the positive side despite the early rain the event had been a remarkable success. I can take some positive out of that. I'll plan more of these "self-rides" in the future.

Tuesday, November 13, 2012

Low-Key Soda Springs Road: VAM analysis

Last post I described my perception of the Low-Key Hillclimb up Soda Springs Road. I did the climb without obvious metrology: I relied only upon perceived exertion and the timer on my Garmin. It's interesting to see how data match perception.

My PowerTap wheel it far too heavy to haul up the hill, but a good surrogate for post-ride power analysis is VAM (vertical ascent rate). This works especially well with a hill like Soda Springs road which sustains a relatively constant steep grade the entire way.

I took my Garmin Edge 500 reported altitude as a function of time and differentiated it. That creates a highly noisy signal, so I convolved that with a Gaussian of sigma 30 seconds. I considered points only from the point I started riding, so points at the beginning and end wouldn't get smoothed with points from before the start or after the finish, which would cause sag in my VAM rate early and late in the ride. I then did a similar thing with road grade, which I extracted by differentiating the altitude with respect to position before smoothing it with respect to to time in the same manner.

Here's a plot of the smoothed VAM along with the smoothed road grade during the climb:


For the first few minutes the climbing rate was extremely high: close to 1600 meters/hour, which are Tour de France type VAM numbers. But then between 3 and 5 minutes my pace settled out to around 1275 meters/hour. Old La Honda gains 393 vertical meters, and we hit that altitude gained 17:27 into the effort. Old La Honda is less steep, so there's more wind and rolling resistance, but still it shows the pace wasn't exactly slackidasical to this point.

At around 21:30 in my VAM dropped for a bit before recovering to around 1270 meters/hour. Approaching the finish I was able to boost it up back over 1400 meters/hour.

The droop is interesting. What caused that? Looking at the grade data makes it clear: in this section the road leveled out a bit, and rather than immediately upshifting and keeping up the effort, I got lazy and failed to proportionately increase my speed, letting my climb rate fall. Eventually I got my act back together and my climb rate returned.

The finish surge was good. It's natural to have a boost in power at the end when you no longer need to worry about the long-term metabolic costs of anaerobic efforts. But the surge wasn't too big, either: had I had too much in the tank at this point it would have indicated I'd been too conservative in my pacing.

Overall I found this plot very encouraging. When I go out too hard, as I clearly did here in the enthusiasm of the start, it's common for my climb rate to decay steadily the rest of the way. Here I was able to hold a relatively steady climb rate before the surge for the finish. Part of the reason for this may have been, as I discussed last time, that much of the pain I was feeling was discomfort from running-specific muscles which were not becoming increasingly fatigued by the cycling effort, but rather whined and complained at a fairly constant rate the whole way.

The one potential source of improvement here would be to get on top of changes in grade quicker: shift up immediately, increase the speed, and not succumb to the temptation to recover. If acceleration is a big deal due to rapid speed changes, or if the grade gets small enough that wind and rolling resistance come into serious play, then optimization can be more sophisticated, but in this case I think it's clear I could have done slightly better at this point of the course.

Low-Key Hillclimb: Soda Springs

My original plan was to run the Soda Springs Road Low-Key Hillclimb: a steady 5.3 mile slog at 8.5%. But Cara suggested I should do a long, flat run in preparation for the California International Marathon, which I'm running, in three weeks. Specificity suggests running up steep hills isn't the best preparation for that.

So I registered instead as a rider. Never before had I done a Low-Key with such poor preparation. I'd been focusing on running since August, and as my running recovery and distance grew, my riding numbers diminished in proportion until even my short rides to and from the train I take to work were gone: replaced with runs or walks.

I knew from past years the effect running can have on my riding. I'd do a Low-Key Hillclimb on Saturday, run Sunday and Tuesday, then ride Old La Honda with the noon ride on Wednesday before easy rides Thursday and Friday in preparation for the next Low-Key. On my Wednesday climb I'd be dreadfully uncompetitive, unable to keep up with guys who I was able to finish ahead of on Saturday. Part of this was my bike: my Fuji SL/1 racing bike is considerably lighter, and with time trial tires lower rolling resistance, then the Ritchey Breakaway I typically use during the week. But simple physics said weight was only a fraction of the difference: my legs felt like sludge following the run.

But my recovery from runs had improved substantially since I started focusing on running in August. For example, consider this past week. On Sunday I raced the San Francisco Half Marathon, where I did close to expectations. On Monday I ran to the train, just 0.8 miles. Then Tuesday I added a slow group run at work for 9.3 miles total on the day. Wednesday I took this longer: an 11 mile total. Then Thursday another good solo run (this time a Trader Joe's run where I picked up some snacks which I carried in my hands the rest of the way). With my train runs that totalled 11.3 miles. Friday I did commute runs totaling 2.5 miles. So that was 48.0 miles in the preceding 6 days, not counting walking. On the other hand, all of this running meant I knew I could sustain a degree of suffering for at least the 1:31 it took me to finish the Half (once I cleared start line traffic). Soda Springs had taken me 32:06 last time we'd done it, in 2009. It was a mere sprint, shorter than any running race I do.

I warmed up by climbing the bottom half of the climb, then descending. When I started my descent I noticed my brake pads were squealing. Not too surprising, I decided, since I'd cleaned my chain with WD-40 that morning and likely some had gotten on the rims. But then I alarmingly realized I'd forgotten to swap the rubber metal-rim brake pads for my Swiss-Stop yellow carbon-specific brake pads. The common knowledge is that with rubber pads, metal shards become embedded in the rubber from the rim and, if subsequently used on carbon, can abrade it. But I had no choice: I had to get back down the hill.

At the start I pulled off my wheel. This wasn't as easy as it should have been since I'd swapped my light KCNC quick release skewers for lighter skewers which require a hex wrench, and I had to borrow a hex wrench. Sure enough, my pads had embedded pieces of metal in them. Fortunately with Soda Springs Road's steady grade I'd not need to brake on the climb. But the following descent seemed like a terrible idea. Maybe I could find something at the top to pick out the metal pieces, like a knife or nail file or safety pin.

And after I organized other riders at the start line, this week trying a new experiment where I'd pre-assigned start line positions (it worked great), it was time to start. Howard and Barry started their cars, Howard hit his horn, and it were off.

I suddenly felt a jolt of adrenaline. I was ready to hammer this puppy: no speed was too great, no rider too strong, for me to hang on. Unfortunately, reality gradually imposed itself, and I was forced to slot in with a group as we watched the leaders methodically pull away. I didn't try to think about it: the goal was to find my pace and stick to it.

Riding hurt, but in a different way than it hurts when I've been riding too much. Fatigue from running occurs to different muscles than are the focus in cycling, so these muscles complain disproportionate to their propulsive contribution. Whereas when I'm tired from riding, the activity just makes things progressively worse, with running fatigue it tends to be that the fatigue remains constant, so instead of a slowly increasing level of suffering culminating in the final push to the finish, I suffer the whole way.

This struck home when I looked at my Edge, which was serving basically as a stop watch since I'd not put it on the correct display page for lap distance/altitude, and saw 6+ minutes. Ouch: I expected this to take around 32. So I tried to not worry about 32 minutes and focus instead on 10. After the first 10 comes the second 10 and then there's only 10 more until I'm in the final two and I can always deal with two minutes of pain.

Riding to my constant pain threshold, I went from losing ground to passing riders. I took this as a good sign: I wasn't fading, and once fading begins, it tends to accelerate.

I passed a driveway where the owners were hanging prominent "No Trespassing" signs, blocking the way. I smiled. Tresspassing was obviously the last thing on my mind passing the driveway. They'd known we were riding here today, and I wondered at what sort of paranoia possessed them to go through this effort.

Ten minutes came and went: I did it once, I could do it again.

Thomas Preisler photo

One of the deals we'd made with the local residents was that if there were cars passing each other, we'd stop to let them do so, then the time taken would be subtracted at the finish. Sure enough I came to the local F250-sized truck barely squeezing by another resident's normal-size car on the narrow road. Who buys such a huge vehicle on a road barely wide enough for two cars? Well, maybe he had a good reason. Fortunately, though, they cleared each other before me or the riders around me arrived. I gave a friendly wave to the driver and continued on.

Every little distraction helps. By this time I was chasing another rider. Ahead of him, I saw who I thought was Daryl Spano, someone I'd been able to finish ahead of when going well, but who beats me when I'm not. He'd lost a lot of weight this year and was super-lean, and was climbing strongly. But maybe this late in the year he was becoming tired. Daryl would disappear around a corner only to re-appear when line of sight improved. But eventually he stopped re-appearing.

I still had the other rider, though, Jared Hudson of Squadra SF, so I focused on him.

With all of this focus on other riders whiz-bang I was well past twenty minutes. The ride was entering end-game.

I eventually caught Jared and was able to pass him. The time had reached 30 minutes and no end in sight but I knew the finish was approaching. I could tell from the view we were approaching the top, yet I looked for the "200 paces" sign which indicated the sprint would begin.

And then it appeared: time to let loose all inhibitions and simply ride as fast as I could. Cara was there: she had climbed the hill earlier, and she shouted someone was chasing me. My finishing kick is typically a weakness, but I hoped I had enough of a gap. And I did: I crossed the line, slowing slightly just before due to the crowd which was forming not far past.

My time, 33:16, was initially unimpressive in comparison to the 32:06 I got in 2009. According to my ride reports from that climb I was around 1 kg lighter then (I've lost weight this year since I started focusing on running after the Mt Tam Double, but I'm not quite to my optimal climbing mass yet). That's close to 25 seconds right there, and would take me down to 32:51. But also consider that this was the first hard ride I'd done in well over a month. I'd ridden "sweeper" up West Alpine Road the week before, a nice easy pace up that climb. But I'd done no hard climbing in what seems forever. This was the first Low-Key I'd ridden this year.

Consider as well my state of fatigue. My preparation for climbs has always been a day of recovery and a day of light effort in the two days preceding. This week I recklessly did a decently long run on Thursday, then some light running the day before. After long runs Tue, Wed, and Thu, not to mention that hard half marathon last Sunday, my legs were tired.

Given that, I have to say I'm pleased with how it went. I finished up with some solid climbers. I had fun, I pushed myself hard, and got to ride on a world-class cycling road. I couldn't ask for more than that.

Sunday, November 11, 2012

Low-Key Hillclimbs: score slope factor versus road grade

In the Low-Key Hillclimbs this year I've introduced a parameter I call the "slope factor". After calculating scores as 100 multipled by the ratio of a reference time to a rider's time, I raise the (score/100) to a power equal to the "slope-factor" (it's a slope on a log-log plot). If the scores are more compressed than average (given the riders who turned out for that week), the slope factor will be larger than one, and the adjustment will spread the scores out more. If they're more spread out than average, the slope factor will be less than one, and the scores will be compressed. This was done based on the observation, consistent with physics, that steeper climbs tend to result in a larger relative separation in times, while more gradual climbs tend to result in a more compressed separation.

Here's a plot of slope factors calculated for the scores so far this year, plotted versus the average grade of each road. Each point is marked by the week number.

slope factors

The points fall in a nice line. Noteworthy is weeks 1, 2, and 6 were mass start, week 3 was small groups, while weeks 4 and 5 were "no drafing" individual starts. There's not much evidence the start type has a strong effect, although start type is correlated with road grade. To really test this we'd want to compare the same climb done with two different start formats.

In any case, it appears the slope factor is accomplishing what it was intended to do, which is to reduce the effect of road grade on the spread in scores.

The two remaining weeks are Kennedy, which is self-timed (a dirt climb which is a mixture of small groups and individuals), and Mount Hamilton (which includes substantial descents). These are each sufficiently atypical that it wouldn't surprise me if they fall off the smooth curve.

Thursday, November 8, 2012

Passing analysis of 2012 Low-Key Hillclimbs week 5

I wanted to compare how passing on last Sunday's Low-Key Hillclimb compared with expectations. So this time I made a few changes to my simulation relative to the week before:

  1. I used actual rider start times, including missing riders, rather than assuming every rider showed up and started at even intervals.
  2. I used actual rider ranking scores, using maximum score in a ride this year, or maximum score in the most recent ranking year available for the rider with a 1%/year depreciation rate. For riders who had not before done a Low-Key, I assumed a modified normal distribution with a 14.4% sigma (I modify it to an asymmetric probability distribution which can only asymptotically approach zero).
  3. I changed the rider week-to-week variation to 3.76%, which I extracted from scoring data this year weeks 1-5 by comparing variation in rider scores for the same rider on different weeks. This number is the rms variation from one week to another divided by sqrt(2), since I assume week-to-week variations are uncorrelated.
  4. I applied a "slope factor" for the week of 1.081, implying it takes a 1.086% change in score to yield a 1% change in speed. This was extracted by the scoring code, which uses it to balance the distribution of scores in different weeks.

I omitted tandems, and as before, I assume no rider is passed by and subsequently passes the same other rider. I guessed a reference (100 point) male finish time of 65 minutes based on the Strava KOM. The actual median turned out to be 65:24.

The result was the average rider was passed by 7.343 others, and passed the same number of others. The rider getting passed the most was passed by 86 riders in 100 thousand iterations. The rider passing the most passed 47.

When I ran the actual numbers I was pleased. The average rider passed, and was passed, 7.14 times. One rider was passed 78 times. Another rider passed 23 others.

Here's a plot of passes versus start position. One rider didn't finish, and that introduces an offset of one along the way, but I didn't worry about that. The agreement was very nice, I thought, making this a useful tool for future rides. riders passed by other riders

Wednesday, November 7, 2012

Low-Key week-to-week score variance

I had some questions about the Low-Key scores from a rider who didn't understand why he scored better in one week than in another. I can't answer that question, but I decided to look again to see if I could see any bias in the results. For example, did strong riders tend to score better in one week versus the other, which would unfairly advantage strong riders who had done well in the higher-scoring than the lower-scoring week?

The way I like to check this is by plotting scores one week versus the other. This isn't rigorous statistical analysis, more what Flannery and Press call "chi by eye": check to see if trends are evident to visual inspection.

Week 2 was a mass start up the steepest climb so far: Quimby Road. Weeks 4 and 5 were individual starts on roads which included both relatively flat portions and significant, but not particularly steep climbs.

First I compare Quimby (week 2) versus Boulder Creek to Saratoga Gap (week 4). These were highly dissimilar climbs so I might expect some sort of systematic difference:

weeks 2, 4

And here's Boulder Creek to Saratoga Gap compared with the following week, San Gregorio to West Alpine Road. These were similar weeks so I might expect systematic differences to be absent here:

weeks 4, 5

However, I see no systematic biases. The scoring seems to do as designed: a "cloud" of points around x = y. Stronger riders tend to do better than less-strong riders, and each rider sometimes does a bit better or worse, but in any given score range the number of riders doing better in the former week is approximately matched by the number doing better in the latter.

I then did a quantitative check: what was the root-mean-squared (RMS) difference between scores of riders who did any given pair of weeks? If I compare the difference of scores of riders in weeks 1 and 2, and I square each differences, take an average, then take the square root of the average, that provides some measure of how much each climb tends to favor a unique sub-set of riders. For example, if climb x favors riders A, while climb y favors riders B, then you might expect the RMS difference in scores for these climbs would be greater than for climbs x and z which are more similar. Here's the result:

w1: Montebello
w2: Quimby Road (Murillo start)
w3: Morgan Territory Road (S)
w4: Hwy 9 from Boulder Creek
w5: Hwy 84 - West Alpine

rms score delta (riders doing each)
       w1    w2    w3    w4    w5
w1      .  4.54  2.83  5.03  5.78   w1 
w2   4.54     .  4.77  7.69  5.47   w2 
w3   2.83  4.77     .  3.88  6.18   w3 
w4   5.03  7.69  3.88     .  5.47   w4 
w5   5.78  5.47  6.18  5.47     .   w5 
       w1    w2    w3    w4    w5

The net average is 5.318.

The biggest differences were between weeks 2 and 4 (7.69) and between weeks 3 and 5 (6.18 points). The smallest differences were between weeks 1 and 3 (2.83 points) and 3 and 4 (3.88 points). Curiously weeks 4 and 5 weren't particularly similar (5.47 points). It's normal this RMS difference would bounce around a bit from one pair of weeks to the other, due just to random variation. I don't see any profound patterns here.

An interesting aspect of this analysis is it gives some indication of how much one can hope to change ones score week-to-week. For example, a rider scoring 100 points in a given week might well hope to boost that to 105 points in a following week, but boosting it to 110 points would exceptional unless the first week was a particularly off week.

Tuesday, November 6, 2012

Vote or Die

Last chance to take positions on the election...

First, I'll address the Proposition 30-38 issue. In my discussion of the California Propositions, I essentially treated these separately. Proposition 38 is a classic "split the vote" play. It's a very effective tactic: put a second proposition on the ballot mutually exclusive with a first. Make it just different enough from the first that some will prefer it, yet some will prefer the first. Voters who wish to express a preference for the first will vote against the second, while those who wish to express a preference for the second will vote against the first. As a result, even if only a small minority prefer "none of the above", it can be very easy for both propostions to fail to receive a voter majority. Both fail, which was the point all along of introducing the second measure. In this case, I like each enough I vote for both. I encourage others to do the same.

Onto some candates.

US House of Representatives: Nancy Pelosi is running for re-election. I simply cannot vote for her: she's a classic example of why people turn against the Democratic party. Pork, pork, pork. With California's new open primary this election is a two-candidate run-off. I regret there is no alternative, but the natural selection principle of voting is unfit genotypes are eliminated without regard to what replaces them. I thus regretfully vote Republican here. I have nothing against individual Republicans, but the party has become absolutely appalling. Still, I stick to the principle: it's the only way to hold candidates accountable. If I have to vote Republican, John Dennis is a good one to vote for.

US Senate: Dianne Feinstein is pro-war, pro-military, and I will never vote for her. Ever. But I simply cannot vote for Emken and her "Pipeline for posterity". I can only leave this one blank. It goes against my principles, but I'm stuck in a corner. This is the most wretched selection I've ever seen for Senate.

BART Board: This is a classic example of a local election where individual votes have some punch. People tend to overlook these, focusing way more on elections like that for President, where in California your vote is so close to meaningless it may as well be tossed in the trash. It's important to give some attention to these races.

Peter Klivans, challenging for the second time, says the right things "transit-oriented development". "Coordination with Caltrain" (easier said than done, unfortunately"). Here's his website. There's also a nice video from a candidate forum on YouTube. He seems to have vision that transit can be better.

Luke Lucas is another challenger. Here's his video. About all he can say is "Lets get things done." Did he hire Ed Lee's campaign manager?

Incumbent Radulovich doesn't have much campaign material out there. Web page is minimal. No youtube video I can find. No info on smart He does have going for him that he was against the OAK boondoggle: here's an SF Weekly article. The Examinger likes the way BART has been going and endorces him (and the other incumbent, Linelle Sweet, who's in a different district).

My ranking on these candidates is Klivans, Radulovich, and Lucas. I like Klivan's vision that transit can be better, that other cities provide examples of transit-oriented development and of inter-agency integration. But Radulovich gets my second-place vote.

For the school board, I leave that to voters with kids.

Sunday, November 4, 2012

US Half Marathon

The US Half Marathon was my second "training race" for the Sacramento International Marathon four weeks from today, where my goal is to qualify for Boston. My idea was to do a 10 km race in October, a half-marathon (21.1 km) in November, then the full marathon in December (42.2 km). This is a nice factor-of-two progression in race distances.

At first my goal was to use these races to practice my marathon pace, but this plan didn't last long. As each race approached, I was drawn to the attraction of distance-cspecific time goals: 40 minutes for the 10 km, then 90 minutes for the half-marathon. Unfortunately my 10 km race yielded a disappointing 41:46, well off my target.

Going into the half I was forced to admit my 1:30 goal was probably unrealistic. While I like to believe that my running fitness is better than it was last August when I ran 1:30:56 in the San Francisco Giants Half Marathon (as "Fred"). But that course, while sharing many of the elements of this one, was clearly easier in the differentiating elements. The Giants race includes a long out-and-back on the Embarcadero, while the US Half winds through Presidio hills, and does a loop over the Golden Gate Bridge pedestrian walk, down and under the bridge along a dirt trail, then up the steep Conzelman Road to the west path (normally for cyclists) which we take back to the City. The Giants race gained 38 meters while the US Half gained 211, according to Strava. The difference of 173 meters takes its toll, especially on me since I run relatively slowly down hill and am less able than others to recover time lost going up.

Despite the 7 am start time, since it was the first day of standard time I had no problem getting up in time for a 4 am breakfast, then at 5:20 getting on my bike for the spin across town to the start. I got there right after 6 am, so had plenty of time to use the porta-potties, lock my bike, drop off my backpack, and relax.

At 6:50 am, ten minutes before the scheduled start, I slotted in a bit back from the front of the line. I didn't want to be swarmed in the initial rush by starting further up. This was the first big road race I've done where there were no signs offering pace guidance for staging. In retrospect I was too self-critical in my start position selection. I spent most of my time waiting squatting in the start area, trying to relax.

At the start, first nothing happened, then the slow shuffle to the line began. The line was approaching both too slowly and too quickly. At this point I'd have preferred for people to let a bit of a gap open in front of them so we could hit the line with some speed, but instead I was still in slow walk mode when I hit the timing pad. Game on. I immediately began threading myself through gaps in the crowd to try and move up to people at close to my target pace, which was around 4:15/km.

2:13 into the run and I'd gone only 430 meters. That included 22 meters of elevation gain, but a similar climb at the end of the race took me only 1:47, so I'll estimate I lost around 25 seconds in this early scrum. Normally slowing results in some offsetting recovery but since this was at the start of the race there was nothing from which to recover yet.

Finally I slotted into some groups which appeared to be going a good pace, nice and relaxed but not effortless. Races are funny like that; looking back not he data I was going too quick here. I heard one woman next to me say she wanted to drop back to a 7-min mile pace. That was my target as well, but I'd need to be a bit faster on the flat & fast sections to average that with all of the climbing in the route.

At mile marker 1 I tried to see my time on my Garmin but it was hopeless: my sunglasses had fogged up in the unusually humid morning air. I was relieved: I decided to run by feel rather than addicted to what my Garmin told me. Indeed, after the race I heard from some other runners the mileage markers were imprecisely placed, and thus the pacing information would have been misleading anyway.

Rest stops were approximately every two miles. I decided to get something at every one to practice my technique. "Water or Cytomax?" volunteers shouted as I approached stop #1. I decided to lead off with water, switching to Cytomax later. As I reached the water table I moved over and felt a small bump from behind as someone brushed my shoulder. "Asshole!" he shouted. I tried to ignore him. Relative to my experience in bike races what had happened was nothing, a small bump, zero danger. At following stops things weren't as crowded and I never had another such incident, except for a runner who accidentally stepped on my heel from behind. That was clearly his fault, but it didn't bother me in the slightest. Stuff happens in races.

I grabbed the half-filled water cup fine and even managed to take a sip without it going up my nose. I decided to keep running rather than slow, taking sips as I could. Finally I was done. But by now I was well past the drop zone so I decided to hold onto the empty cup until the next water station, careful to keep the opening in the trailing direction to minimize wind drag.

On an 11.7 km training run a few weeks ago in moderate temperatures I lost 800 grams in water. That extrapolates to 1600 grams lost in a half-marathon. To replace all of that I'd need to drink 1.6 liters of water. Obviously that wasn't going to happen. But I don't need to replenish all of it: in a marathon, it's typical to lose around 3% of body mass. For me that's around 1.7 kg for a full marathon, or 850 grams for a half marathon. So I needed to replace at least 650 grams, or milliliters, to avoid losing weight at faster than a 3%/marathon pace, assuming the rate of loss was the same as on my test run. With the half-filled cups at the rest stops that would certainly require drinking at each of the stops here.

At the second stop I dropped my empty cup then took another cup of water. This time, for some reason, drinking didn't go as well, and water ran up my nose. I decided to invest a few seconds in a fast walk for drinking. I took maybe four walking steps before I finished the water, then I was on my way again. Since this walk provides some recovery, I get some of the lost time back in a faster sustainable pace once I start running again.

By this point we were approaching the marketing highlight of this run: the Golden Gate Bridge crossing. When I'd registered, I'd expected the auto lanes would be closed, allowing us the rare pleasure of running across the bridge without the interference of cars. But I had no such luck: instead of stopping car traffic, they gave pedestrians and cyclists the boot. I did see a truck hauling a trailer with bikes mounted on it, so perhaps they were running a bike shuttle. But this was a disappointment. As I began running along the eastward, pedestrian side path, I was accompanied by the deafening sound of freeway traffic on my left. Fortunately there wasn't a strong exhaust smell, but I had to wonder what the air quality was. Runners can run along the side path any time they want, but honestly I've never really wanted to. There's so much nicer places to run then along freeways.

As I ran, I felt my foot slip slightly on a metal plate on the running path. I tried to keep my path as straight as possible while avoiding these plates, which were placed irregularly. When I'm running, I always try to optimize: hit the tangents in corners, optimized draft behind other runners, stay on the most efficient surface. Global optimization requires a compromise between these factors, and trying to hit the net optimum is part of the fun of racing.

I reached the other side and followed runners ahead of me off the path and through the parking lot at the Vista Point Lot. We were quickly through the lot, and then entered a dirt trail I hadn't known existed. It wend down, then under the bridge, connecting with Conzelman Road half-way up its ascent from the outskirts of Fort Baker up to the west side of the bridge. The descent was a wonderful break from the bridge path: much less noise, a gorgeous view of the mist hovering over the water in the Bay, and the soft dirt path a pure joy to run down. It reminded me why I like trail running so much.

I did my usual measured tempo not he climb of Conzelman. I'm a slow descender, as I've noted, but while I'm a lot better at climbing, I'm not as fast as I'd think I'd be based on cycling. For example, of the 68 runners who've so far posted their races on Strava, I'm tenth on this climb, 2:58 versus the top time of 2:19. From his Strava time that runner, Benjamin Leibald, ran 1:19:25 for the full course. I wish I could run that fast.

Approaching the bridge again we reached the third water stop. Having taken water at the first two, I chose Cytomax here. Once again I walked a few steps to drink it efficiently and it tasted good. I'd brought some PowerBar-branded gel chews, tucked under my compression sleeves, but I felt no desire to eat these. Getting a bit of sugar with the Cytomax was a good idea at this point. I ended up getting Cytomax, at the fourth stop as well later in the run.

Running back on the western side had added novelty because it's normally restricted to cyclists. It was hotter here: I could feel the heat from the cars on the road. And I suspected there was a tailwind in this direction, as I felt fast. I was now heading toward the finish line, so felt a dose of motivation to pick up the pace. But it was still fairly early, not much past half-way, so I didn't want to get too enthused, but didn't want to get slackidasical either.

I was running next to a larger shirtless guy when we were passed by a guy not much bigger than me who appeared to be gliding over the road more then running. He didn't even seem to be trying, just coasting along without effort. I decided to try to follow him, to emulate what he was doing, but I'm sure I wasn't successful. We reached the end of the bridge and turned onto the path which descends from bridge level and once on that descent he was gone. I never saw him again.

Having come off the bridge, we ran down to Marine Drive toward Fort Point, a landmark in many of my longer runs. As we descended this road we passed a quite large woman, number pinned to her shirt, struggling up the hill. I was impressed: this was going to be a long effort for her. How many women with her body would attempt a half-marathon? I cheered her on.

It was slightly confusing what side of the path we were supposed to follow here, but once we were on Marine Drive it was clearly on the left. On the right side of the roughly paved road decent-sized groups of runners were returning. This was a nice reminder of how many people were faster than I was. But I wasn't as far back from them as I feared: the turn-around was well before Fort Point. Past the pylon marking the turn-around, it was straight to the finish line without any further convolutions.

After returning on the rough pavement, we entered the dirt trail along the water. This is a very popular trail for runners and dog walkers, and I saw no signs indicating a running race was occurring. Of course it's conventional to run on the right on pedestrian paths, but without course markings I ran on the left, since the path was curving that way. Courses are always marked assuming runners follow "tangents", the shortest legal route, and I didn't want to run even an extra meter than I had to. But this trajectory involved a degree of conflict with the 3-abreast and dog-walking crowd. To be honest, it annoys me when people see a race obviously in progress and decide they're still going to take up a wide chunk of the path. The term "pig-headed" entered my head on way more than one occasion. Maybe I'm the one who's pig-headed for thinking my oh-so-important race really matters, that if I were to lose a few seconds staying out of the way of people enjoying the morning it makes any difference. But when other people are racing I certainly show respect for that and stay out of their way.

After the path, we diagonalled to the paved walkway on the side of Marina Blvd. This went on for further than I wanted, Fort Mason hill looming in the distance. I was surprised to pass the fifth water stop here. It was too close to the finish to get much benefit from drinking, I felt, but I took a water and dumped it on my back for cooling. I felt a bit guilty about wasting a cup and filtered water this way but sometimes a bit of water on the back or head can provide a jolt of energy on even temperate days like today.

Finally, Fort Mason. This was it: up, down the other side, then a sprint for the finish. I put in a hard dig on the climb and a volunteer shouted "That's the way to attack the climb!". It was corny but it all helps. On the Strava segment I defined for this climb I was 6 seconds faster than I'd been at the half marathon last year, ranking 6th/54 who triggered the segment today. However, following the climb is the descent. I decided to try and lengthen my stride, relax, and let gravity carry me down rather than making a strong effort. This proved to be a failure, as I was 5 seconds slower than I'd been last year here. Of course it's possible these time differences are in part due to GPS noise, but I'd prefer to believe I can learn something about how I executed this part of the course today. The conclusion: "gliding" down hills isn't fast, you need to work hard as well. But I already knew this from trail running where the guys going fast down gradual hills always seem to be breathing harder than me.

This was it: the sprint for the finish. It wasn't much of a sprint. But I consoled myself with the message that if I had been able to sprint, I'd have been better off going harder the rest of the way. The fact I tried to release all inhibitions, recklessly throw the throttle forward, and didn't have much to give was a good sign.

Cara was there! "Go, Dan!" she shouted. It always makes me happy when she comes out to watch.

approaching finish
approaching finish (Cara Coburn photo)

The clock was there, ticking, as always way faster than it should. I hit the finish at close to 1:33, which translated to 1:32:26 in chip time. I was 82nd place overall out of 3632 total runners (80/1781 males, 1851 females). That's top 5% of males, so I can't complain. But of course I always want to be faster.

So could I have broken 1:30 on the Giants marathon course? There was that estimated 25 seconds lost from my poor start position: with a better start position maybe I could have gotten 1:32:01 Then there's 173 meters of added climbing If that adds 2:01 that works out to 5147 vertical meters per hour gained in time. I certainly think for two courses of the same distance, one gaining and losing 514.7 vertical meters (more than Kings Mountain Road) and the other dead flat, the one with the vertical gain would be at least 6 minutes slower. So I think I could have cracked 1:30 with my fitness today had I been running the flatter Giants route. But of course it would be better to have actually done it on this course, then no calculations would be required.

Another interesting aspect is the dirt. I definitely seem to run slower on the dirt. When I look at my data, my kilometer splits on the road tend to be in the 4:05 to 4:10 range, but on the dirt they invariable go up into the 4:20's. Running on the dirt is more enjoyable and less impact, but it shouldn't be a shock that it would be slower. Every time you push off with your foot on the dirt it slips a bit. We ran that dirt trail in both of these marathon courses, dodging pedestrians. I don't think there's anything like that in the Sacramento course.

Thursday, November 1, 2012

Low-Key Hillclimb ITT passing data

Low-Key 2012 week 4, the time trial from Boulder Creek to Saratoga Gap, was an amazing success. For all the concerns expressed about passing, concerns I did my best to dispel, it simply wasn't a problem. Many of us were left scratching our heads over why people were so worried.

I posted a simulation of the passing simulation here. This was based on certain simplifying assumptions:

  1. Riders left at uniform one-minute intervals. This turned out to not be the case, as starters allowed late-comers to start on 30-second intervals. Of course, these late-starters left a 1:30 gap ahead of them, partially mitigating the effect of the now 30-second gap behind them. Additionally, many riders failed to show up, leaving gaps in the start sequence.
  2. Riders were ranked based on a previous result. This assumption neglected that for some riders it was their first event. For these riders, placement was somewhat arbitrary. Secondly, volunteers who rode were started at times which allowed them to perform their volunteer duties (either early or late) rather than based only on projected speed.

Gaps in the schedule reduce passing proportional to the fraction who fail to show, assuming DNS rate is independent of start position. This wasn't quite the case, with the highest DNS rate apparent in riders with a relatively later start time yet not the latest start times, as the latest starters were the fastest and they tend to be more likely to show up. However, in any case gaps are going to reduce the passing rate.

The other effects will increase the passing rate, however, so it might be anticipated the projection was somewhat optimistic.

Here's the result, omitting the early starting tandems who simply pulled away from the earliest solo riders. The smooth curve was the result of 100 thousand simulations, averaged, while the discrete points are actual results.


You can see there's fewer riders in the actual data because of the DNS rate. The position shown is position in the actual start order, not scheduled start order But if you look at the shape of the data, it follows the trend of the prediction quite nicely. The earliest starters tend to get passed more often, then the following starters have a relatively large number of passings, then it flattens out until the final starters are more likely to pass than be passed.

The average turned out somewhat higher than predicted, by 16%. The simulation predicted the rider passed the most would be passed 24.6 times, while in reality a rider was passed 27 times. Recall, though, the prediction was an average over 100 thousand simulations. I haven't checked, but I think it's safe to say these results are consistent with the scatter in the individual simulation results. The non-ideal effects I describe appear to have mostly canceled: the no-shows compensated for the imperfect seeding and the occasional 30-second gaps. The simulation served its purpose nicely.

I expect more passings at this weekend's Highway 84 - West Alpine individual time trial. But with wider shoulders on the early part, and steep grades on the later part, passing should be much less of a concern, even if it was a concern on Highway 9.