Monday, December 29, 2014

Peloton hysteresis revisited



In analyzing peloton dynamics, an area ripe for exploration involves the mechanics of peloton density as it stretches and compresses. Speed and power output changes are obvious underlying mechanisms for these oscillations, but there are other more subtle dynamics at play. Among these subtleties are lags or delays in the transitions between density oscillations which are characteristic of hysteresis effects.

There is more than one type of hysteresis, but the general category of hysteresis I consider involves a lag between system input and output [1], meaning there is an asymmetry between a system trajectory, such as acceleration, and its complementary trajectory, such as deceleration. The following description, made in the context of vehicle traffic [2], well describes hysteretic behavior in pelotons:

"The dynamics of traffic flow result in the hysteresis phenomenon. This consists of a generally retarded behavior of vehicle platoons after emerging from a disturbance compared to the behavior of the same vehicles approaching the disturbance."

In a 2010 conference paper "Hysteresis in Competitive Bicycle Pelotons" [3] I proposed three different types of hysteresis in pelotons. Below I re-state and re-categorize them, hopefully with better clarity. In the 2010 paper I referred to "flow" to describe changing peloton density to be consistent with vehicle traffic models, but it is more intuitive to refer to compression (increase in peloton density) and stretching (peloton lengthening).

Types of peloton hysteresis

I.    Where a peloton decelerates relatively rapidly with corresponding rapid compression, followed by a proportionately longer acceleration time and peloton stretching. There are two sub-types:
  • A: occurs with corresponding changes in speed and power output preceding the disturbance and after it, such as slowing before a corner and accelerating out of it;
  • B: occurs with corresponding changes in speed but where power output may be approximately retained, such as when peloton compression and deceleration precede a climb and stretching occurs during the climb, but power output is roughly constant before and during the climb.
II. Where a peloton accelerates rapidly with corresponding stretching effect, followed by increased stretching  even as speeds decrease.

III. Inversely to II, where a peloton decelerates rapidly with corresponding compression, following by an increase in speed where compression either continues to increase for a short period or is temporarily retained even as the peloton accelerates.

For the purpose of this post, I am primarily concerned with types II and III.

Figures 1 & 2 below are re-scaled images from my 2010 hysteresis paper. Figures 3 & 4 show data from indoor velodrome races I videoed a couple of years ago.  Figures 1 - 4 involve speed data that is generated by the front rider in the group, which speed is applied to the entire group.

In Fig 1, the circled area and arrows show a period of decreasing speed following a rapid acceleration with a corresponding increase in stretching. In Fig 2, the arrows show the direction of the hysteresis curve as speed drops even as the peloton continues to stretch. The short arrow pointing down and slightly to the right (Fig 2 speed-stretch curve) is the hysteretic period of deceleration accompanies by increasing stretch. This direction in the speed-stretch trajectory characterizes Type II hysteresis. This indicates a lag or delay in the system's return to a compressed state as deceleration occurs. If the system dynamics were symmetrical, one would expect compression to accompany deceleration immediately, but we can see that is not necessarily the case. This delay is explainable by cyclists' collective fatigue and a recovery period following high acceleration. I refer to this fatigue induced delay in density oscillation as competitive hysteresis. This is the defining feature of type II peloton hysteresis.


Figure 1 independent speed and stretch curves
Figure 2 speed-stretch curve


Figures 3 & 4 below show another example of Type II hysteresis from a 3km indoor mass-start race (red arrows). Increasing stretch follows a double-whammy acceleration (the two sharp spikes preceding the arrows). Following the first of these accelerations to about 48km/h, there is deceleration and corresponding compression, as one would expect. After the second acceleration "whammy" there is the characteristic Type II down-and-to-the-right trajectory in system dynamics, as shown in Figure 4 (red arrow), indicating deceleration accompanied by increased stretching.

Figures 3& 4 also show an example of Type III hysteresis (green). Following soon after the Type II period, there is a period of increasing speed and increasing compression (Fig 3, green arrows), characterized by an up-and-to-the-left trajectory (Fig 4, green arrow) in the speed-stretch curve. This may occur when there is an acceleration from cyclists toward the rear of the peloton who pass riders ahead. In this case the hysteretic lag is in the return to a stretched state.

Type III hysteresis is also a precursor dynamic to the convective phase discussed in earlier papers [e.g. 5].


Figure 3 speed of front rider, and stretch 

Figure 4 speed-stretch

Using the model in [4], I've sought to identify occurrences of Types II and III hysteresis in simulated peloton dynamics.

Similar to the speed data in Figures 1 - 4, Figures 5 & 6 show the speed of the front rider versus peloton density. Speed of the front rider was coded to randomly fluctuate every 60 ticks (equivalent to 60s) within a narrow range, hence the "square" appearance of the speed data, as well as in the speed-stretch curve.  In Fig 6, generally wherever the curve proceeds at an angle it indicates a hysteretic delay. Using Fig 6, it is difficult to trace the direction of the curve which would tell us the hysteretic Type, although we can roughly eyeball regions of both Types II and III in Fig 5.  I've noted two periods of stable front-rider speed versus increased stretching, which appear to be Type II periods (although difficult to know given the speed curve is stable in those regions).

In contrast, Figures 7 & 8 show the mean speeds of all the riders versus peloton density, which is a level of detail that provides a clearer indication of whether there is acceleration or deceleration occurring. These aggregate speeds are easy to trace in simulations, but are a level of detail I have not obtained for any empirical data. This level of detail could be obtained empirically if speed data was obtained individually for each rider and averaged over the course of the race. This sort of data is desirable.

In Fig 7 there are arrows in about the same locations as for Fig 5, and the opposing direction of the aggregate speed curve do suggest that these regions are indeed hysteretic periods, of Type II. While I have not noted a Type III occurrence, the Fig 8 speed-stretch curve winds in all directions rather like the trajectory of a fruit fly, so it seems the simulation captures a fairly continuous but non-linear hysteresis trajectory. A speed-stretch curve of the moving averages of the mean speeds and the stretch might produce visually more apparent looping patterns.

Figure 5 speed of front rider, and stretch

Figure 6 speed-stretch

Figure 7 mean speeds of all riders, and stretch 

Figure 8 speed-stretch 

Where else might this be applied? 

Regarding other types of flocking systems, similar system lags could be tested by accelerating groups to maximal sustainable outputs for specific periods, followed by deceleration periods, in much the same way as demonstrated here for pelotons.

Here I get highly speculative, but I wonder if there are similar kinds of competitive hysteresis processes in bacterial colonies, or perhaps cancer growths, that might reveal vulnerabilities in those systems. I do not know enough about either of those systems even to propose an experimental protocol to test such a hypothesis. It does seem worth looking into further, however, if it has not already been done.  

It further occurs to me that, having mentioned fruitflies, when we look at 3-dimensional fruit fly trajectories, perhaps there is a way to decompose those trajectories into 2-dimensional speed and stretch data. I don't have a good sense of how this would be done at this point, however, and am simply putting the idea out there.

If nothing else, we gain insight into peloton dynamics specifically, and may gain understanding of general evolutionary mechanisms for group formation in a variety of systems and how these systems behave.  

References
1. http://en.wikipedia.org/wiki/Hysteresis
2. Treiterer, J., Myers, J.A. 1974. The Hysteresis Phenomenon in Traffic Flow. In: Buckley, D.J. (ed.), Proceedings of the 6th International Symposium on Transportation and Traffic Theory: 13-38
3. Complex Adaptive Systems —Resilience, Robustness, and Evolvability: Papers from the AAAI Fall Symposium (FS-10-03)
4. Trenchard, H., Ratamero, E., Richardson, A., Perc, M. 2015. A deceleration model for peloton dynamics and group sorting. Applied Mathematics and Computation 251, 24–34
5. Trenchard, H.Richardson, A.Ratamero, E.  Perc, M. 2014. Collective behavior and the identification of phases in bicycle pelotons. Physica A: Statistical Mechanics and its Applications, 405 . pp. 92-103. ISSN 0378-4371


Tuesday, December 2, 2014

A deceleration model for peloton dynamics and group sorting - available online

Our paper:

Trenchard, H., Ratamero, E., Richardson, A., Perc, M. A deceleration model for peloton dynamics and group sorting,  Applied Mathematics and Computation, Volume 251, 15 January 2015, Pages 24–34  is now available online.  Elsevier is allowing general free access until January 21, 2014. Try this link for the temporary free access.

Wednesday, October 29, 2014

Video "Lessons from the Peloton"


I've prepared an 8 minute video Lessons from the Peloton  in which I discuss the concept of group sorting and phase transitions in pelotons. I show my own footage of various bicycle races, flocks, non-biological systems, and other kinds of human organizations.  It's a "popular" video, which I've actually entered as a submission to the Vancouver Island Short Film Festival.  As an amateur videographer, I don't have a good sense of its chances in making it into the festival, but whether the video gets into the festival or not, it helps to explain in a non-technical way some of my own work and interest in the behavior of pelotons.





Tuesday, September 2, 2014

Peloton Anatomy - some updates


Following on an earlier post about sorting dynamics, here I recap generally a few developments with some short demonstrations.

I've incorporated a deceleration algorithm that allows us to show how much a following cyclist needs to decelerate in order to stay at or below his/her threshold if a leading cyclist drives the speed of the peloton too high for the following cyclist. This is a significant development over previous models, one of mine, and one by Erick Ratamero.  Basically, I've incorporated the new deceleration algorithm into Ratamero's model, for a new model.

Ratamero's model is still sound because it models cyclists' overall energy expenditure in peloton conditions, while this new model allows us to see changing peloton dynamics as group speeds change throughout the course of a race. Nor is my earlier model invalidated, since it applied the same basic principle I use in the new model, except that the old model did not apply any actual speed, power or MSO data. That said, while I could defend the basic principles of my old model, we can now essentially discard it in favor of this new model.

To demonstrate the new model, first take a look at the link below of accelerated footage of the 2013 BC Championships women's Points Race. Pay attention to the oscillations between stretching (single-file) and compact formations. The accelerated motion of the video is about 2X normal speed. I hope the "Ride of the Valkyries" background music isn't too distracting!

 Points race - accelerated

Keeping the dynamics of that race in mind, below is a simulated version of the same race, accelerated to about twice as fast again so you can see the whole race occur in a short time. I've incorporated the speed parameters that I derived at two timing places per lap, and encoded it into the simulation.You can see the speed changes according to the power graph to the lower right. When the power output spikes, you can see certain cyclists are forced to decelerate relative to others. When the speed relaxes, the peloton reintegrates and its density increases.  This relaxation oscillation is well modeled by the new algorithm.

The numbers you see on the "backs" of the riders are their "maximal sustainable outputs" (MSOs), or their maximal sustainable power for a duration between 30 seconds and 5 minutes. These are derived from the cyclists' 200m sprint times, and multiplied by a value that reflects their sustained maximum output during the race for between 30s and 5 minutes.

simulated peloton 14 cyclists

With that fairly accurate simulation, we can try some experiments. For example, we can increase the size of the peloton.  Here is a view of 50 cyclists with the same speed profile as for the 14 cyclists above.

simulated peloton 50 cyclists

Now let's take a look at 100 cyclists (link below).  I've only included part of the video here, since the simulation runs slower with 100 cyclists, and the point is made with a slightly abbreviated version.  Quite a bit more impressive, though, to see a much larger group and its dynamics, using the same speed profile as for the original 14 cyclists. What is interesting with 100 cyclists, which is not so easy to see with smaller the simulated pelotons, is that in the position profile graph we can see some evidence of the "convection" dynamic that I have spoken of in previous posts.  It seems that it may be a dynamic that only clearly emerges at some threshold peloton size and speed.  You can see this somewhat for 50 cyclists, but still it seems clearer in runs of 100 cyclists.

 simulated peloton 100 cyclists

I am looking to have the new model published (with the same three collaborators on our last published paper: Richardson, Ratamero, Perc). In this new paper, we will show how the model demonstrates sorting of the peloton into groups, and some results to this effect.

In future, we still need to investigate and report more definitively on the convection dynamic. So that could be the subject of the next paper - or I am also interested in obtaining  some more evidence of the hysteresis effect I observed a few years ago, and presented in principle at an AAAI conference.

I'm also now interested in developing a peloton solution to the tragedy of the commons (ToC),  having been somewhat inspired by Francis Heylighen's recent efforts to show a self-organized solution to the ToC (not yet published).

Of course there is also some fluid dynamics analogies I want to develop, and recently I have been thinking about Stokes Law and particle settling as somewhat analagous to peloton sub-group sorting. Is there some sort of equivalency between the size of a particle moving through fluid, and the MSO of a rider?



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 analyticcycling.com, Tom Jordan from flacyclist.com, and kreuzotter.de). 




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