## Friday, February 1, 2013

### adding wind to heuristic bike-speed model

The motivation for the preceding analysis was to add wind effects to my heuristic speed model. The philosophy of the heuristic speed model is to not rely on a constant power approximation, but try to model cyclist behavior directly. So how do riders behave when faced with a wind?

When I first started riding with a heart rate monitor, an early lesson was my heart rate dropped when I was riding into the wind. This was obviously psychological: the wind was defeating me and I lost the motivation to pedal hard.

Then I moved from the San Francisco Bay area to Austin where I lived for three years and winds were a predictable part of every ride, while extended hills were essentially gone. Instead of challenging myself on long hills, I learned to use treat the headwinds as a challenge rather than bad luck. As a result, I began increasing my heartrate, rather than decreasing it, when I encountered headwinds. With groups it's different: the group may be motivated to hammer into the wind, or it may be that nobody wants to pull and the speed drops.

Crosswinds are another matter: gusting crosswinds tend to reduce power because the rider needs to focus more on controlling the bike. It's hard to get into a rhythm with heavy cross-winds. Groups lose their coherence because riders get ridden into the gutter.

So lacking insight into behavior in winds, and with data on ground-level wind speed so much less reliable than climbing data, I'll just assume people ride constant power. Using a simple power-speed model with "reasonable" coefficients I derived for a headwind, on flat ground:

v0 = v00 exp[0.62 sw / v0 − (0.3 sw / v0)2],   tail/head-wind

where v00 refers to the level-ground speed in zero wind, and v0 is the level-ground speed at the given wind speed (measured in the same direction as the rider) sw.

For the cross-wind, the fit yielded:

v0 = v00 exp[−(0.37 sw / v0)2].   cross-wind

I can simplify this and combine them to arbitraty wind direction with the following, using sw to represent the total wind speed and swx to represent the wind in direction of travel:

v0 = v00 exp[2 swx /3 v0 − (sw / 3v0)2].   arbitrary wind

Note the square term applies to the absolute wind speed indpendent of direction, while the other term applies to the component of the wind speed in the rider direction. There is no explicit cross-wind term. The nice round numbers are justified since wind is never really constant anyway, either across the rider's body or over time, so higher prevision would be wasted.

The v0 in this equation is then a revised value to use for my heuristic speed model.

To test this, I constructed data for a rider traveling a 5 km radius circle at 8 mps nominal speed on the flat with a 3 mps wind from the north. The speed model with the wind adjustment predicted a speed varying from 5.15 mps into the wind (64%) to 9.11 mps with the tailwind (114%). Power varied from 112 watts into the wind to 126 watts with the tailwind. So that's a +/- 6% variation about the mean power for a variation in speed from -36% to +14%. So the rider maintained much closer to constant power than he would have with a constant wind-independent speed.

It's interesting to ask what this model predicts for the effect of constant wind for a closed circuit. As a test case consider a square course aligned with the constant wind direction. First, the 2nd-order term is constant: time is increased by a factor exp[(sw / 3v00)2]. But then there's the first order term. That aids on the headwind leg, but then reduces time on the tailwind section. The net effect on time is (1 + cosh[ 2 sw / 3 v00 ] ) / 2 (hyperbolic cosine). So the result is for a square course aligned with the wind the wind will increase time by a factor (neglecting fatigue):

exp[(sw / 3v00)2] ( 1 + cosh[ 2 sw / 3 v00 ] ) / 2

For a circular course the result will be a bit different, the cosh term replaced by something similar, the exponential term the same.