Monday, July 21, 2014

Calibrating the simulation

Having made a few adjustments to the newest peloton simulation model, I have produced an excellent simulation result of the women's 2013 BC Championships Points race. 

Figure 1 is a graph of the actual position data from the women's Points race.  There were 14 riders in the race.

Figure 1. Position data from 2013 women's Points race, BC Championships.

In the Netlogo model, I set 14 simulated riders with maximal-sustainable-outputs (MSOs) corresponding to those of the women in the race*.  Using the speed data from that race, I inputted the speeds in the appropriate time sequence into the simulation, corresponding to power values in the second graph from the top in Figure 2 below. This generated the position graph (top graph below). The similarities are quite remarkable, and this is good evidence that the new model is solid.

Figure 2.  Simulation results using data from women's Points race.  14 riders with MSOs corresponding to 200m sprint times. Speeds were input according to data (indicated by power graph), and the outputs are shown by the position graph, PCR, and peloton stretch. Peloton stretch is the distance from the front rider to the rear rider, indicating changing length of the peloton.

*I used the 200m sprint times as the starting point for these. There were three riders in the points race who did not race the 200m TT, and so I used the mean of the other 11 for the missing ones in the simulation.

Sunday, July 20, 2014

short addendum to "Peloton Sorting" post

I've ironed out a small problem that revealed itself in the PCR graphs in the last post.  There were some anomalous downward spikes in PCR values which indicated a problem. I've located the source of that problem, and can show that this has been fixed. 

Below are two updated samples to show this. Both graphs show mean PCR values in black, and a random cyclist in green. I've manually varied power-output factors at random times. 

In the top one, the sample cyclist exhibits values above the mean, which means that he/she is weaker than the mean (higher PCR means cyclist approaches threshold); while the second shows the sample cyclist PCR values generally below the mean. The troubling downward spikes are eliminated.  There is no concern that PCR values show >1, as these represent the effective values at the speed (or grade, wind-speed) selected. 

Saturday, July 19, 2014

Peloton sorting dynamics

Building on Erick Ratamero's MOPED peloton model [1], and introducing a number of new elements based on my earlier model [2] and concepts discussed in our paper [3], I have done a ton of work in the last few weeks to develop a version of our model that will show some very interesting things. The plan is to present these things in more detail in another published paper, but here I run through an illustration to show what we can expect to see.

Group sorting

The main dynamic to show is how a peloton sorts into subgroups according cyclists' individual maximal-sustainable outputs (MSO). Simply put, MSO is the cyclists maximum power output at a given moment, given the conditions. It is a threshold output, and if stronger cyclists seek to drive the peloton to speeds higher than weaker ones are capable of sustaining, the weaker ones must reduce their speed relative to the faster ones. Cyclists' speeds, hill grades, and wind-speeds, are the main factors that affect cyclists outputs and whether they approach MSO thresholds. And of course, by drafting, cyclists can reduce their output and travel at speeds they would be incapable of sustaining if they were on their own facing the wind.

Here I illustrate how these factors result in sorting of the peloton into groups of different average fitness, or MSOs.

Below is the starting set-up of a peloton. The values are their power-output MSOs.  The range of MSOs shown is based on a range of women's 200m sprint times posted from the results of the 2013 BC track championships.

We allow the simulation to run for about 2500 ticks (equivalent to seconds), riding up a hill, with a headwind, with settings as follows:
(5.35 m/s is about 20 km/h, and the wind-speed about 21 km/h; 90 degrees in Netlogo faces directly to the right, and the climb is moderately steep)

...we see the peloton in this formation:

Above I've toggled MSO values to their "PCR" values ("peloton-convergence-ratio"), which is a ratio of cyclists' current output, offset by drafting, to their MSO. Where values > 1, it means cyclists have had to decelerate in order to drop their current outputs below threshold. The image above shows a good number of the riders have had to slow down, and have fallen off the pace of the main group.

By manually reducing speed to 4 m/s (about 14 km/h), those off the back combine for their own group, shown below. I've toggled values back to MSOs. By eyeballing the MSO values, it is easy to see the average MSO of the group to the left is lower that the group ahead, to the right.

This is the key point here: given a range of fitness abilities and some energy reduction mechanism like drafting, when outputs reach a certain threshold, groups will sort into sub-groups whose members have very different average fitness.

Demonstrating general dynamics 

A whole range of dynamics can be shown with a series of graphs. In the set below, the top graph shows the relative positions of all the cyclists in the pack. Looking at the lower three graphs, we can see how by varying cyclists' power output by any of the factors (speed, hill gradient, and wind-speed), the dynamics of the peloton are altered. This is most obvious by looking at the highest spike in power output, and the rapid shift in positions of a number of cyclists as they reduced their speeds as a result. When the graph curves are roughly horizontal and parallel, it means the cyclists are stretched out in a straight line. We can see how the sudden spike in output caused this, but we can also see how it took some time, after cyclists reduced their speeds, for the peloton to become compact and resume constant relative positional shifting (as the criss-crossing curves show).

(for mean PCR and mean power, the red curves show the fluctuating values for a randomly selected cyclist)

Echelon formation

I was also very excited to figure out how to show the formations of echelons in the peloton due to cross-winds, shown in the image below. Interestingly, I stumbled on how to do this through an error in using a multiplication sign versus a plus sign when making an adjustment to a particular line of code originally set up by Eric Ratamero.  That led me to work in the effects of winds and crosswinds into the power output equations I was using (derived from helpful sources such as, Tom Jordan from, and 

So, there is a brief overview of some exciting developments!  More details and some actual data analysis will be included in a paper I am in the process of working up, and which hopefully will be published in the not-too-distant future.

[1] Ratamero, Erick Marins. 2013. MOPED: an agent-based model for peloton dynamics in competitive cycling. In: International Congress on Sports Science Research and Technology Support 2013 Vilamoura, icSPORTS 2013

[2] Trenchard, H. 2013. Peloton phase oscillations. Chaos, Solitons, Fractals 56, 194.

[3] Trenchard, H., Richardson, A., Ratamero, E., Perc, M. 2014. Collective behavior and the identification of phases in bicycle pelotons. Physica A 405 92-103