# Understanding Crowds Link: http://bit.ly/crowdstats --- ![](https://i.imgur.com/XpWb1NW.jpg) --- ## Big idea: Crowds are abit like gases in a box ![](https://i.imgur.com/gv1Ewdd.png) Let's assume a person is a sphere, just joking, this is not an assumption we make. --- ## In Newton's World $$\frac{dx_i}{dt} = V_i(p_i, t) \\ \frac{dp_i}{dt} = F_i(x_i, t) = \sum_{i\neq j} F_i(x_i, x_j, t)$$ If we know the above equations and the inital $x_i$ and $p_i$ we know everything about the entire system. We call ${x_i, p_i}$ the state of a particle. --- ## Laplace demon ![](https://i.imgur.com/rd8doOL.png) --- ## In Reality ![](https://i.imgur.com/xV55OGx.png) We cannot know the state and the laws of physics exactly so instead we restrict ourselves to ask the simpler question *what is the distribution of particles states* instead. --- ## But actually : the most likely distribution The most likely distribution is the distribution where there is the highest number of possible rearrangements for N identical particles such that the distribution remains the same. --- ## Consider the case of discrete number of states first The number of different arrangements of $N$ **identical** particles for $n_1$, $n_2$, $n_3$, ... , $n_m$ in each state i.e. for a particle distribution of particles across each state is. $$\binom{N}{n_1, n_2 ..., n_m} = \frac{N!}{n_1!n_2!..n_m!}$$ --- ## Factorials are hard to work with so, $$ W = \log \binom{N}{n_1, n_2 ..., n_m} = \log \frac{N!}{n_1!n_2!..n_m!} \\ = \log N! - \sum \log{n_i!} \\ \approx N\log{N}-\sum n_i\log{n_I} \\ = -\sum n_i\log{\frac{n_i}{N}}$$ --- ## Alright something we can work with $$ H = \frac{1}{N} W \\ = -\sum \frac{n_i}{N}\log{\frac{n_i}{N}} \\ \equiv -\sum p_i \log{p_i}$$ --- ## The most likely distribution is Find the distribution such that $$\max H$$ subject to $\sum p_i = 1$ and $\sum E_ip_i = E$ --- ## Solve this using lagrange multipliers Find the distribution such that $$\frac{\partial}{\partial p_i}-\sum p_i \log{p_i} + \alpha(\sum p_i -1) +\beta(\sum E_ip_i - E) \\ = - \log{p_i} + (\alpha-1) + \beta E_i = 0$$ $$\therefore p_i = \frac{1}{Z} e^{-\beta E_i} = \frac{e^{-\beta E_i}}{\sum e^{-\beta E_i}} $$ --- ## Some math later I used the constrains to solve the partition function assuming no/little interaction between particles and independence to find $P(V_x) = \frac{1}{\sqrt(2\pi v_{r.m.s})}\text{exp}\left(-\frac{1}{2}\frac{V_x^2}{v_{r.m.s}^2}\right)$ This is the basic model introduced by Henderson 1971 --- ## A few more words on Henderson 1971 - He introduces of prime vs composite individuals i.e. social cliques when collecting data to compare with his model - He also noticed that in reality his model didn't work because of the differences between men and women move in crowds breaking the assumption of identical particles. --- ## But what happened to time ? We are not just interested in the distribution of the particle , ahem i mean people, we are interested in how the **particle system evolves over time**. --- ## Considering the following Lets consider the following distribution function $f(x, v, t) d^3x d^3p$ such that the probability of finding a particle in phase space volumen $d^3x d^3p$ centered on $x$, $p$ and at time $t$. $$\int \int \int f(q, p, t) d^3x d^3p = N$$ --- ## What happens when the distribution evolves with time We can apply the chain rule $\frac{df(x, p, t)}{dt} = \frac{\partial f(x, p, t)}{\partial t} + \sum \dot{p}\frac{\partial f(x, p, t)}{\partial p} + \dot{x}\frac{\partial f(x, p, t)}{\partial x}$ --- ## Liouville theorem By Liouville theorem, which states that the phase space density remains constant i.e. $\frac{df(x, p, t)}{dt} = 0$ $\therefore \frac{\partial f(x, p, t)}{\partial t} + \sum \dot{p}\frac{\partial f(x, p, t)}{\partial p} + \dot{x}\frac{\partial f(x, p, t)}{\partial x} = 0$ --- ## Relationship between the Fokker Planck and Liouville theorem In the case with zero diffusion the fokker planck equations results in Liouville theorem, so I am still discussing very simple system of non-interacting and determinstic particles. This fact comes from the very fundemental conservation of information in physical law and reversible nature of physics. --- ## Boltzman Transport Equation $\therefore \frac{\partial f(x, p, t)}{\partial t} + \sum \dot{p}\frac{\partial f(x, p, t)}{\partial p} + \dot{x}\frac{\partial f(x, p, t)}{\partial x} = \left.\frac{df(x,p,t)}{dt}\right|_c$ This won't be equal to 0 due to collisions or coulomb interactions. In the special case of coulomb interactions we get a Mckean-Vlasov equation. Take note the above equation is a continutiy equation but in phase space. --- ## Deriving Navier-Strokes Equations If we intergate both sides of the Boltzman equation by $d^3p$ $\frac{\partial}{\partial t} \int f(x, p, t) d^3p + \sum \frac{\partial}{\partial x} \int \dot{x} f(x, p, t) d^3p+\\ \frac{\partial}{\partial p} \int \dot{p} f(x, p, t) d^3p= \int \left.\frac{df(x,p,t)}{dt}\right|_c d^3p$ --- ## Deriving Navier-Strokes Equations The first term is $\frac{\partial \rho}{\partial t}$, since $\rho(x,t) = \int f(x,p,t) d^3p$ --- ## Deriving Navier-Strokes Equations The second term is $\sum \frac{\partial}{\partial x_i}(\rho u_i) = \nabla \cdot (\rho u)$, since $p(x,t) = \int f(x,p,t) d^3p$ and $u = \dot{x}$ --- ## Deriving Navier-Strokes Equations The third term is $\int_{V} \nabla \cdot \dot{p} f(x, p, t) d^3p = \int_{S}\dot{p} f(x, p, t)dA$ becomes 0 because as $p \rightarrow \infty$ the $f(x,p,t)$ should become 0. --- ## Deriving Navier-Strokes Equations Putting all together $\frac{\partial \rho}{\partial t} + \nabla \cdot (\rho u) = 0$ --- ## Deriving Navier-Strokes Equations We can do the same for momentum and energy the entire set of Navier-Strokes Equations. The famous one being energy. ![](https://i.imgur.com/X8Yu6j7.png) This model was applied to crowds Henderson 1974. --- ## In Summary $$\frac{dx_i}{dt} = V_i(p_i, t) \\ \frac{dp_i}{dt} = F_i(x_i, t) = \sum_{i\neq j} F_i(x_i, x_j, t)$$ We tried to solve a very general problem of n-particle dynamics but given limited information we cannot solve this exactly so instead we try to find the most likely distribution. However, in order to find even the most likely distribution we had to make the assumption of non-interacting and non-active particles. Finally saw how they can be used to derive macroscopic relationships like naiver strokes. --- ## Next time ? The next step is how to extend what has been discuss to consider interaction terms i.e interaction kernels $F(x_i, x_j, t)$, for example a polynomial kernel $A|x_i - x_j|^{12} - B|x_i - x_j|^6$ to the crowd model or can this be learnt ? --- ## Some interesting work since then - Social Forces by Helsbring 1998 - SocialGAN by Fei Fei et al. 2018 CVPR - The Kernel Interaction Trick: Fast Bayesian Discovery of Pairwise Interactions in High Dimensions by Agrawal et al 2019 ICML. - AgentNet by Hawoong Jeong et al. 2020 - Mean-field approach to Crowd dynamics by Djehiche et al 2020 SIAM --- # Thank you! :smile: Hope you guys learn something new although I know it is very simple math wise. I think it is still cool to see how mircoscopic model (statistical mechanics) can lead to macroscopic models (fluid dynamics). --- # Sources - [Boltzman-Grad limit](http://www.scholarpedia.org/article/Boltzmann-Grad_limit#The_BBGKY_hierarchy) - [Ohio state Astronomy Notes](http://www.astronomy.ohio-state.edu/~dhw/A825/notes2.pdf) - [The Boltzmann Transport Equation: Theory and Applications: Matt Krems](https://pdfs.semanticscholar.org/d9ea/fd3035ec982b0664f505d26a4df23c073f39.pdf)
{"metaMigratedAt":"2023-06-15T11:59:26.572Z","metaMigratedFrom":"YAML","title":"Social Navigation and statistical physics","breaks":true,"description":"View the slide with \"Slide Mode\".","contributors":"[{\"id\":\"953d4117-6ebc-4223-a9cd-8edf5c77347a\",\"add\":12743,\"del\":4883}]"}
    155 views