Monday 29 July 2019

Measuring (accurately) run courses

Runners often compare distance measurements from GPS devices only to be surprised by the extent of the variation. Some devices do perform better than others (and many enthusiasts have published good comparisons: fellrnr, dcrainmakerthe5krunner) but the errors are often hard to predict and depend upon the atmospheric conditions, the number of turns in the route, visibility of the sky, the positioning of the GPS satellites and the data sampling rate. The importance of accurate distance measurements is easy to appreciate when looking at race data. A twenty minute 5km runner takes 0.24s to cover a metre, so a course that is 50m short (1% error in the distance measurement over 5K) should take 12s less to complete and that is a significant amount of time when comparing 5km race efforts. The problem is that GPS devices generally have errors greater than 1% (fellrnr) often the errors can be closer to 5%.

For road-running races one ideally needs a measurement technique that has less than 0.1% error. Even at 0.1% error the performances can differ by enough of a margin to begin to cause problems, but even using the best techniques it is hard to achieve a higher level of accuracy than that. This level of error is equivalent to 1 m per km, so 5 meters in a 5 km race. Whilst this error is significant in performance terms, it is the level of accuracy where other factors, like the choice of racing line, become more significant even for the seasoned competitor. By way of an example: imagine running a 5000m on an athletics track. If you run the 12.5 laps in lane 1, the regulation 30cm from the inside edge, you will cover 5,000m precisely. Now imagine you could run closer to the inside edge, say 12cm away from it - then, you will save yourself 14 meters. If you run 12cm within the outer line of lane 1 you would have to run a further 76m than the person hugging the inside lane. This example of poor racing line is a 1.5% error in distance. So, most runners should be happy once a course has a distance measurement of 0.1% accuracy since their choice of racing line will be the biggest source of error.

To get within 0.1% accuracy is not difficult. Steel measuring tape is available in 30m lengths and has a thermal expansion coefficient that is so low that we don't need to worry about it (0.001% per degree C). But, laying out this long tape 167 times to make a 5km measurement would be terrible. This is where wheel-based techniques win since each revolution of the wheel is the equivalent of laying down a new length of tape. As long as we can measure how far the wheel travels per revolution and count the number of revolutions then an accurate measurement would seem to be easy to make. Of course surveyor's wheels are readily available and for a modest investment (~£100) a model with calibration certificate can be found. However, they still have the drawback of requiring a person to push it along the whole course and they typically cannot easily deal with rough terrain. It is for these reasons that many prefer to use the wheels on a bicycle - a bicycle that can be ridden at a sensible speed. Indeed, the IAAF only allow race measurements made with 'Jones' counters that follow their extensive manual. The Association of UK Course Measurers replicates most of these procedures including a free (but lengthy) certification process. The Jones counter is nothing terribly special - it is a physical counter turned by a sprocket mounted on the front wheel which provides about 24 counts per wheel revolution (it isn't actually 24, they make great play of the use of prime numbers within their counters to minimize wear). Since Jones counters are relatively expensive, I have implemented a cheaper version (£6, a Hall effect pulse counter) which has slightly lower accuracy (1 revolution) but still sufficient to get within 0.1%.

Whilst the IAAF and Jones themselves use the front wheel for measurements, it seems to me that the rear wheel should be more repeatable. The front wheel will almost always take a longer course than the rear wheel when cycling due to wobble. I think the idea behind using the front wheel is that the rider can see the line the wheel is taking and also read the counter - but, in doing so it accumulates the additional distance from small steering corrections, these corrections represent errors, and are much smaller on the rear wheel.

The process of calibrating the wheel

After mounting my counter I made the magnet, which was attached to the spokes, highly visible with red insulation tape. This is because the counter only reports whole, completed revolutions, and I was going to have to look back at my back wheel and judge the fractions of a revolution completed beyond each full revolution. I also ensured that my counting probe was mounted just off the vertical axis of the wheel so that I could begin each ride with the red-tape on the magnet at the 12 o'clock position making judging the fractions of a revolution much easier.

After I inflated my rear tyre to 80 PSI (the recommended maximum for the tyre) I then found a 10m steel tape measure and a flat smooth indoor surface with a clear line and measured the distance travelled during 4 complete revolutions of the wheel whilst pushing the bike. Simple arithmetic then yielded a calibration of 2144 mm per revolution. Since I was interested in the effect of tyre pressure on the pushing calibration I lower the pressure to 40 PSI and found the circumference hardly changed (2143mm). Clearly with no rider weight there was very little compression of the tyre.

I then set-off to create a calibrated distance that I could also cycle to allow me to determine the change in effective wheel diameter which occurs between pushing the bike and when it is being ridden. I found a solid white line, between a cycle-path and pavement, close to my home that was little-travelled, clear of debris, with well defined start and end points and over 300m long. I did a series of repeated measurements whilst pushing my bike and determined it was 339.3m long. I then did a series of rides along the line at a range of different tyre pressures each time noting down the number of revolutions completed. I calculated the effective tyre circumference when I (68 kg including clothing) was riding the bike with a tyre pressure of 80 PSI. From that data I produced the graph shown in Figure 1.
Figure 1. The percentage error in the distance estimate resulting from applying the 80 PSI calibration to measurements made whilst cycling a bike with the 'counting' tyre at a range of different pressures. The steepness of the line (2nd order polynomial fit) indicates the least sensitivity to tyre pressure is at high pressures.

It shows the percentage error in the distance measurement which would result from using the 80 PSI calibration when the tyre was actually at a different pressure. It is clear that tyre pressure is important since a fall in tyre pressure to 60 PSI produces a 0.25% error (or 12.5m on a 5km route). For this reason it is important to have a calibrated distance close to the site of the course measurement such that the calibration can be done with the tyres inflated to exactly the same extent as they were when the course measurement took place (and with the same rider weight).

The choice of tyre pressure is an interesting one. Whilst Figure 1 does show that high pressures are likely to result in more consistent measurements, there is a problem with rough courses. High pressures mean the tyre is more likely to slip over the ground and also the bike will tend to 'measure' small undulations due to stones/rocks. A lower tyre pressure may allow small stones to pass under the tyre with increased deformation allowing the 'real' distance to be more accurately assessed.  This problem is analogous the the problem of measuring a coast-line which has fractal-like properties - the more accurate the measurement the longer the distance becomes. In this case, we are aiming to approximate the course of a 70kg mass on springs with a stride length of over a meter and for such a system one would not want to take small surface undulations into account.

In my limited experience, so far, it is reasonably clear that by far the biggest error comes from the choice of racing-line. Whilst it is simple to specify the shortest line, measuring it is not always easy especially when there are other road users on the course.