Thermodynamics of a gas of pedestrians: theory and experiment

In this paper, we perform an experiment on the interaction of pedestrians in a chaotic environment and investigate the possibility to study its results using a thermodynamic model. In contrast to simple single-file unidirectional scenarios, where only distance and time are relevant to adjust walking speed, bidirectional cases are much more complex since pedestrians can perform evading manoeuvres to avoid collisions. To better understand collision avoidance in a bidimensional environment we designed a set of experiments where people need to move chaotically for the whole time. Trajectories of moving pedestrians were obtained by tracking their head position, but a method to obtain body orientation failed, thus limiting reliable information on average quantities, i.e. average density and speed. By analysing those data, we showed that equations for thermodynamic processes can be used to describe pedestrian dynamics from medium densities or a state where interaction distances are very small. To allow combining low density cognitive aspects of collision avoidance with semi-random motion at medium densities we also developed a microscopic simulation model inspired by physics. Results show that, after calibrations, the simulation model allows to reproduce the fundamental diagram of different studies despite the very simple rules implemented. This shows that describing the statistical nature of specific crowds requires a relatively small set of rules and research should focus on cognitive/psychological aspects which are essential for understanding crowds of people.


Introduction
Studies considering single-lane unidimensional pedestrian motion already showed, both theoretically and experimentally, that headway distance and collision time are related to the formation of jam. When pedestrians are unable to adjust their distance from the preceding person, they need to stop, leading to a queue which propagates opposite to the walking direction. This fundamental mechanism of collision avoidance is also found in similar collective systems [1], with car traffic being the most prominent.
For the unidirectional case, it has been shown that there is a typical relationship between pedestrian density and walking speed and this property has been often referred to as the fundamental diagram ( Figure  1). In the unidirectional case, the speed-density fundamental diagram can be described using a monotonic function and many authors have proposed equations which allow a mathematical description [2]. From a practical aspect, the flow-density representation, where flow is typically computed by multiplying density and speed, is more interesting. The particularity of the flow-density representation lies on its non-monotonic nature, which allows to recognize the density region where congestion starts occurring as a peak.
In reality, pedestrian crowds are bidimensional entities and collision avoidance does not only occur by adapting speed and distance from other pedestrians, but evading manoeuvres (like overtaking) are also possible. When bidirectional flows are considered, then emerging structures (in the specific organized lanes) are formed as a result of coordination between groups of pedestrians moving in opposite directions. When even more complex forms of motion are considered, such as crosswalks, scramble crossings or random walk, then understanding how people avoid each other and what is the typical density at which motion starts being obstructed becomes very difficult.
In fact, when the fundamental diagram is plotted for the bidirectional case a quite different shape is obtained in the flow-density representation, but it is still possible to observe the typical elements recognized in the unidirectional case (see Figure 1). If more complex (multidirectional) streams are considered, it is remarkable to notice that the peak observed in the flow disappears (at least for medium densities as the ones considered in Figure 1). Fig. 1: Speed-density and flow-density fundamental diagrams from different studies considering pedestrian motion in specific environments. The Weidmann equation [3] is used to fit experimental data of each study [4,5,6,7]. Absolute speed is taken here and flow is defined as the product of speed and density.
The above discussion leads to two important considerations: (i) the typical definition of flow as the product of density and (absolute) speed possibly only holds for unidirectional (or similar) cases and (ii) complex bidimensional crowds need to be considered in vectorial manner, with collision avoidance being a combination of distance, speed and collision angle (or an equivalent quantity).

Experiment
To study collision avoidance and related aspects in a real environment we designed an experiment in which pedestrians need to walk continuously in a very chaotic scenario where emergent structures cannot form. Experimental setup and procedures will be provided in this section (for details see [8]). A room (whose dimensions are given in Figure 2) has been created using band partitions. An entrance was located in the middle of each side to allow pedestrians entering/leaving the room before, during and after the experiments. For each execution a fixed number of participants was allowed into the room and was asked to continuously walk without a specific aim for the whole length of the experiment. Although we predicted that the above instruction would result in a continuous chaotic motion, we were afraid that, in the long run, some emergent structures would appear (in the specific we wanted to avoid that people would start moving in a circle to reduce collisions). To make sure that it would be impossible to get organized in whatever way, we asked to some of the participants to continuously cross the room in four different directions. Crossing pedestrians would enter the room, cross it taking the shortest possible path, shortly step outside the exit on the opposite side, turn themselves by 180 degrees and then cross the room again in the opposite direction. Crossing pedestrians are indicated using lines in Figure 2.
Two different strategies were used to change the density inside the room. In a first set of experiments (configuration A) we gradually increased both the number of people inside the room and the ones continuously crossing it, thus ensuring that the ratio between both roles was maintained constant. In the second set of experiments (configuration B), we kept the number of crossing pedestrians constant at four (i.e. one for each direction) and we only increased the number of participants wandering inside the room. The number of pedestrians for each role and the resulting density are given in Table 1. After having participants ready at their initial positions, a loud "start" signal was given and people started walking. After roughly two minutes a "stop" signal was given, allowing them to stop and rest.
A camera was fixed 5.5 m above the ground pointing right at the centre of the room. Videos from the experiments were later analysed using PeTrack [9] software to gain trajectories of the participants using the caps as marker. Frames taken during different experiments are given in Figure 3. In an attempt to collect body orientation to allow a more detailed analysis on the mechanisms of collision avoidance, we also added some markers on the shoulders, which are visible as small dots in Figure  3. Unfortunately, shoulder markers became covered most of the time due to the geometrical location of the camera and the wide-angle lens employed. While it would still be possible to obtain body orientation by combining head and a single shoulder position at low densities, at high density the obstruction became very frequent and, in some cases, both markers became invisible.
As a consequence, we had to limit our analysis on the trajectories gained by tracking the position of the head, which, while accurate enough to obtain condensed information such as average speed or density, it does not provide sufficient accuracy to allow obtaining the orientation of the body by derivation (in addition, orientation of the body is not necessarily corresponding to the angle created by the trajectory).

Experimental results and discussion
As already discussed earlier, since the fundamental diagram represents a widely studied property of pedestrian motion, our experimental analysis will focus on considering the speed-density relation and the equation which can be used to describe the particular scenario considered in this study. The speed-density fundamental diagram is presented in Figure 4 for the two different experimental configurations given in Table 1.
To allow a more accurate estimation of density, Voronoi cells have been used to account for the reduction in density observed when crossing pedestrians briefly step out from the room (for this reason densities given in Table 1 are not exactly the same of Figure 4). Speed has been simply computed by considering the whole crowd and excluding the speed-up and slow-down periods occurring after the "start" and "stop" signals were given (i.e. only steady-state conditions are studied). The Weidmann equation [3] has been often used to describe the speed-density relationship of human crowds and has been therefore chosen as the first candidate to fit experimental data. The general form of the Weidmann equation describing speed in function of density is given by: where 0 is the free walking speed, the maximum density and an empirical parameter. Although the number of points for case A is limited, it is seen that in both cases the Weidmann equation allows for an accurate description of the reduction in speed resulting from the increase of density.
Given the nature of our experiment and previous research indicating that pedestrian crowds can be modelled based on equations from gas dynamics [10,11], we also tried to use simple equations obtained from thermodynamics. By introducing density into the ideal gas law and combining it with the expression defining thermodynamic transitions in a polytropic process, it is possible to show that density and temperature in two separate states (1 and 2) are satisfying the following equality: where is the polytropic index, specifying the conditions under which the thermodynamic process occurs, and that we consider as a model parameter since the nature of such thermodynamic process is not clear for pedestrians. Now, defining a reference state 0, it is possible to describe the variation of temperature in a polytropic process according to: with 0 and 0 being the temperature and density at the reference state. Since the average of the squared gas velocity is proportional to the temperature, we may assume (for modelling purposes) that an expression substituting with may allow to describe the speed-density relationship of our experiments. As shown in Figure 4, such an expression does not allow a sufficiently good representation of the experimental results, which may be a consequence of the overly simple model considered in this first modelling attempt. However, by excluding low density points (where thermodynamic velocity goes to infinity) a much better fitting (eventually even better than the Weidmann equation) is achieved.
The reasons which could explain the contrasting results obtained by considering the different set of points is related to the range of interaction and the obvious diversity between gas and humans (which, in contrast to particles, do perform collision avoidance to avoid dumping into each others). In brief, the very different results obtained by excluding low density points show that collision avoidance is a long-range interaction and cannot be modelled with overly simple short-range thermodynamics. This also shows that a model specific for humans is required for low density scenarios characterized by long-range interactions.

Simulation model
Inspired by our (partial) success in reproducing the experimental data with a simple thermodynamical model, we have considered the possibility of describing the results of our experiments using a microscopic "particle gas" (molecular dynamics) model [10], i.e. a simulation model in which pedestrians are explicitly represented in a continuous space and inter-pedestrian interactions are modelled using physical forces.
Theoretical or simulation models aiming to describe the motion of active matters have been already proposed in the past [11,12], but comparison with experimental data has been more difficult to perform due to the lack of experiments with comparable conditions. Although in this work we will not attempt any theoretical analysis in which the macroscopic (thermodynamical) crowd properties are derived from the microscopic dynamics using statistical mechanics methods, to let the possibility of realising such a program, we will explicitly use a Hamiltonian model on which statistical mechanics approaches may be applied. The goal of such a simulation model is not to exactly reproduce pedestrian trajectories observed in experiments but rather show what are the minimal requirements to be satisfied to see similar behaviours, and more in general to investigate the correspondence between microscopic interaction rules and macroscopic statistical properties such as the fundamental diagram.
In such a model, we would assume that pedestrian behaviour may be modelled using a potential depending only on relative distance. More explicitly, we would need at least three potentials: one describing attraction to a point of interest; one describing physical interactions; and one describing collision avoidance. Nevertheless, although the potential concerning physical interactions is definitely relevant to introduce the finite volume effects present in high density crowds, for simplicity's sake we will ignore it in the following discussion.
A relatively simple Hamiltonian model describing the remaining two behaviours was introduced in [13]. Its departure from the usual gas of physical particles lies in the assumption that pedestrians may have a limited field of view (for simplicity's sake, a cone with a fixed aperture angle and radius centred on the pedestrian velocity) and perform collision avoidance only towards those pedestrians that fall in their field of view. This leads to a Non-Newtonian dynamics, a term that we use to mean that the dynamics does not follow the third (action-reaction) law of dynamics. Interestingly, this Non-Newtonian model can still be analytically treated in the two-body case, and, although the explicit solution is cumbersome, it is easy to show that the system is dissipative. Numerical simulations show that in the N-body problem the system converges, for any given initial condition (excluding a measure 0 set) to a "frozen" state with zero kinetic energy. A way to avoid this "freezing" of the system is to provide pedestrians with "memory", i.e. to allow them to remember the position of the other pedestrians for a short time after they have left the field of view.
For reasons of space we cannot reproduce here a detailed analytical and numerical treatment of the model. Readers may refer to [13] for an introduction to the model and to [14] for a full treatment. A statistical mechanics treatment of a Non-Newtonian model of pedestrian dynamics is performed in [15].

Comparison between experimental and numerical results
In [13,14] a throughout analysis of the dependence on field of view extension and memory of the statistical properties of this system had been performed. Nevertheless, the original work made no reference to the concept of crowd density, which is crucial for our current purpose. We may introduce the concept of density by fixing the radius of the self-consistent KV charge distribution [14] so that we have = 2 = 9 square meters (in line with our experimental setting), varying the number of simulated pedestrians and defining density as the ratio between the pedestrian number and the area . In this way, for each set of model parameters, we may obtain a fundamental diagram by plotting how the average pedestrian velocity varies with density.
As in [13,14], the potential describing the attraction to the point of interest is a 2D harmonic potential which means that the point of attraction is the centre of the self-consistent charge area. To differentiate between ordered and disordered velocity, we computed the projection of the pedestrian velocity towards the centre (point of attraction) and plotted the system speed as the average of the absolute value of the latter radial velocity (this method applies only for Fig. 5 and 6), and the flow as the product of speed and density. As shown in the results of Figure 5, for a large set of parameters the system has a non-zero (radial or ordered) velocity for moderate and high density, as observed experimentally in our work and reported in other studies [6,7]. Studying the (radial or ordered) flow, we see a transition in parameter space from a flow with a maximum for low density to a constant flow and finally a concave monotonic function similar to the experimentally observed one. For intermediate parameters we see a convex growth range as reported for high density in [7].
Encouraged by these results, we tried to explicitly investigate the parameter values that minimise the difference between the flow in the model and in the experimental data of the current work and of [6,7].
Each different data-set presents a different "free speed", i.e. the speed that is observed (or extrapolated) in the zero-density limit. In the microscopic model, such velocity is the average velocity of a system with a single pedestrian, which is determined by the constant in Eq. (4). For this reason, to replicate the flow of each data-set we would need to change the value of but this would introduce a new parameter. A simple way to avoid this is to study normalised flow, i.e. to divide the flow by the free speed, and optimise (using a Genetic Algorithm) on these data that have, by definition, the same low density limit.   [8]. We may observe that the model reproduces extremely well the fundamental diagram observed in [7], while the agreement with the other two data-sets is less good.

Conclusion
This study presented the results from an experiment where people need to move in chaotic way trying to reduce collisions. Our simple analysis showed that there are similarities with physical systems and in particular thermodynamic laws for gases may help describing the transitions occurring when density is increased as a sort of thermodynamic process. However, since humans do perform mostly long-range collision avoidance to avoid colliding with other people, such similarities hold true only for packed crowds where evading manoeuvres are very difficult but often necessary (thus a short-range interaction).
A numerical model inspired from physics but also including elements typical of human cognitions partially helped improving the results at low densities by including a mechanism of collision avoidance where people (or particles) are able to see and remember motion of others. However, results showed that while it is possible to reproduce with good accuracy datasets from similar studies, the model reproduced with less accuracy the experimental data presented in this work.
The conclusions from the above remarks assume therefore a dual nature. On one side, our study showed that even a very simple model may clarify the basic mechanisms that lead to the emergence of the statistical behaviour of pedestrians and help in the development of more realistic models. In particular, when people move in a very chaotic context and influence of the environment is minimal, a very simple model may be sufficient to describe the overall behaviour.
On the other side, we also showed the limits of modelling pedestrians as physical entities, thus implying, as some author [16] already pointed out, that cognitive and/or psychological knowledge is required to correctly reproduce the behaviour of pedestrians in simulations. Realistic and more complex simulation models should therefore focus on psychological crowd phenomena, which are the leading cause to the different behaviour between humans and physical particles.