Skip to content

Commit 068fa65

Browse files
author
Daniel Precioso
committed
Update Millennium Bridge assignment brief
1 parent 23d3f4f commit 068fa65

1 file changed

Lines changed: 132 additions & 42 deletions

File tree

modules/ode-coupled/assignment.qmd

Lines changed: 132 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,68 +4,158 @@ subtitle: "Coupled ODEs: Millennium Bridge"
44
format: html
55
---
66

7-
This is a joint assignment with the main course **Mathematical Modelling**. Follow the official handout posted on the main course Blackboard: [Kuramoto_assignment.pdf](../../Kuramoto_assignment.pdf).
7+
This is still a joint assignment with the main course Mathematical Modelling. Upload your submission through the Mathematical Modelling course, since it counts for both courses. This time the assignment is individual.
88

9-
Your main goal is to **simulate the Millennium Bridge crowd–bridge synchrony model** from the handout. Conceptually, it is Kuramoto-like: pedestrians are phase oscillators, and their coupling is mediated by the bridge motion (@strogatz2005bridge; @eckhardt2007modeling).
9+
The brief below follows the official handout as closely as possible. Your main goal is to review the theory of synchronization of weakly coupled oscillators, study the Kuramoto model numerically, and then simulate the Millennium Bridge crowd-bridge synchrony model (@kuramoto2003chemical; @strogatz2000kuramoto; @pikovsky2001synchronization; @strogatz2005bridge; @eckhardt2007modeling).
1010

11-
Upload your submission to the Mathematical Modelling course (it counts towards both courses). This time, assignments are **individual**.
11+
## Kuramoto Model
1212

13-
## Summary of Goals
13+
Start from the basic Kuramoto model with all-to-all symmetric coupling:
1414

15-
Below is a brief summary of the goals; use the handout for full details and instructions.
15+
$$
16+
\dot\theta_i = \omega_i + \frac{K}{N}\sum_{j=1}^N \sin(\theta_j-\theta_i),
17+
\qquad i=1,\dots,N.
18+
$$ {#eq-ode-coupled-assignment-1}
1619
17-
### Kuramoto Model (Coupled Oscillators)
20+
Here $\theta_i \in [0,2\pi]$ is the phase of oscillator $i$, $K>0$ is the coupling constant, and the natural frequencies $\omega_i$ are sampled from a unimodal symmetric distribution $g(\omega)$.
1821
19-
Start with the basic all-to-all Kuramoto ODE (@kuramoto2003chemical; @strogatz2000kuramoto)
20-
$$\dot\theta_i = \omega_i + \frac{K}{N}\sum_{j=1}^N \sin(\theta_j-\theta_i),\qquad i=1,\dots,N.$$ {#eq-ode-coupled-assignment-1}
22+
## Numerical Integration
2123
22-
From this, you can implement the following tasks:
24+
Write a Python script that integrates the Kuramoto equations numerically. Start with the following values:
2325
24-
- Plot $r(t)$ (order parameter) versus time. $r_\infty\approx 0$ for $K<K_c$ (up to fluctuations) and $r_\infty\in(0,1)$ for $K>K_c$, with fluctuations typically decreasing like $\mathcal{O}(N^{-1/2})$.
25-
- Animate oscillators on the unit circle (optionally plot the centroid $r e^{i\Psi}$).
26-
- Estimate $K_c$ numerically by sampling multiple $K$ values and plotting $r_\infty(K)$ with error bars. We suggest averaging over a tail window to reduce fluctuations.
27-
- Compare with the theory in @strogatz2000kuramoto (implicit curve for $r_\infty(K)$) and the special case of the Cauchy distribution.
26+
- $N=100$ oscillators.
27+
- $g(\omega)$ equal to the standard normal distribution.
28+
- $K=7$.
2829
29-
### Millennium Bridge Crowd Synchrony
30+
For the initial condition, write a function that assigns phases either randomly over the whole circle, the disperse case, or over a small arc, the concentrated case. For the numerical integration, you may write your own scheme, for instance explicit Euler, or use `scipy.integrate`. In either case, produce the following outputs:
3031
31-
Modeling assumptions:
32+
1. A graph of $r(t)$, the order parameter, versus time. In the subcritical case $K<K_c$, the asymptotic value $r_\infty$ should be approximately zero up to fluctuations, while for $K>K_c$ you should observe $r_\infty \in (0,1)$ for large $t$. The amplitude of the fluctuations should decrease as $N$ grows, typically like $\mathcal{O}(N^{-1/2})$.
33+
2. An animation of the oscillators moving on the unit circle. You may also plot the centroid $re^{i\Psi}$.
3234
33-
- The bridge is a single lateral vibration mode (damped harmonic oscillator).
34-
- Each pedestrian is a phase oscillator whose lateral forcing is periodic in its stepping phase.
35+
## Critical Coupling
3536
36-
Bridge dynamics:
37-
$$M\,\ddot X(t)+B\,\dot X(t)+KX(t)=\sum_{i=1}^N G\sin\theta_i(t),\qquad \Omega=\sqrt{K/M}.$$ {#eq-ode-coupled-assignment-2}
37+
Review the lecture notes and the first part of @strogatz2000kuramoto until you are comfortable with the derivation of the critical coupling $K_c$. For more detail, see @pikovsky2001synchronization. Then compare the theoretical prediction with the value obtained numerically.
3838
39-
Pedestrian phase dynamics (see @strogatz2005bridge):
40-
$$\dot\theta_i(t)=\Omega_i + C\,A(t)\,\sin\big(\Psi(t)-\theta_i(t)+\alpha\big),\qquad i=1,\dots,N.$$ {#eq-ode-coupled-assignment-3}
39+
1. Sample 20 values of $K$ between $K_{\min}$ and $K_{\max}$ such that $K_{\min}<K_c<K_{\max}$. A reasonable choice is $K_{\min}=K_c/3$ and $K_{\max}=3K_c$.
40+
2. For each sampled value of $K$, estimate $r_\infty$ by making sure that $r(t)$ has reached its saturation regime, then average over a tail window to reduce fluctuations. The handout suggests averaging over the last 300 time steps. Keep both the mean and standard deviation.
41+
3. Plot $r_\infty(K)$ with error bars and identify the approximate value of $K_c$, comparing it with the theoretical prediction.
42+
4. Validate your results with different choices of $g(\omega)$, for instance normal distributions with different variance, and check whether the theoretical prediction for $K_c$ remains consistent.
43+
5. Plot the smooth theoretical curve defined implicitly in equation (4.5) of @strogatz2000kuramoto together with your numerical points:
4144
42-
Bridge amplitude/phase definitions:
43-
$$X(t)=A(t)\sin\Psi(t),\quad \dot X(t)=A(t)\Omega\cos\Psi(t),$$ {#eq-ode-coupled-assignment-4}
44-
$$A(t)=\sqrt{X(t)^2+\Big(\dot X(t)/\Omega\Big)^2},\qquad \Psi(t)=\operatorname{atan2}\!\Big(X(t),\dot X(t)/\Omega\Big).$$ {#eq-ode-coupled-assignment-5}
45+
$$
46+
1 = K\int_{-\pi/2}^{\pi/2} \cos^2\theta\, g\big(Kr\sin\theta\big)\,d\theta.
47+
$$ {#eq-ode-coupled-assignment-2}
4548
46-
Synchronization measure:
47-
$$R(t)e^{i\Phi(t)}=\frac{1}{N}\sum_{j=1}^N e^{i\theta_j(t)}.$$ {#eq-ode-coupled-assignment-6}
49+
6. If you are not able to solve the implicit equation numerically for a general distribution $g(\omega)$, include at least the Cauchy case, where the formula is explicit:
4850
49-
Critical crowd size (simplest case $\alpha=\pi/2$ and symmetric $P(\Omega)$ about the bridge frequency):
50-
$$N_c=\frac{2B\Omega}{\pi G C\,P(\Omega)}.$$ {#eq-ode-coupled-assignment-7}
51+
$$
52+
g(\omega) = \frac{1}{\pi(1+\omega^2)},
53+
\qquad
54+
r_\infty(K) = \sqrt{1-\frac{K_c}{K}}.
55+
$$ {#eq-ode-coupled-assignment-3}
5156
52-
Wobbling and synchronization emerge together when $N$ crosses $N_c$ (see also @strogatz2005bridge).
57+
Check that your numerical points approach the theoretical curve more closely as $N$ becomes large.
5358
54-
## Required (Millennium Bridge experiment)
59+
## Millennium Bridge Crowd Synchrony
5560
56-
Use `scipy.integrate.solve_ivp` to run the controlled **crowd ramp** experiment:
61+
Soon after the Millennium Bridge in London opened, it showed unexpected lateral oscillations when crowded. A standard explanation is a positive feedback loop: small lateral bridge motion influences pedestrians' gait, the lateral forcing becomes more coherent, and that increased coherence amplifies the bridge motion (@strogatz2005bridge).
5762
58-
1. Start with $N=N_0$ pedestrians. Every $\Delta T$ seconds, increase the crowd by $\Delta N$ (add new pedestrians with fresh $\theta_i(0)$ and $\Omega_i$) until reaching $N_{\max}$.
59-
2. Compute $N_c$ using the formula in the handout (using your chosen parameters/distribution).
60-
3. Define $t_c=\inf\{t: N(t)\ge N_c\}$.
61-
4. Produce three stacked plots and draw a vertical dashed line at $t=t_c$ labeled "$N=N_c$":
62-
- $N(t)$ vs $t$ (crowd size staircase)
63-
- $A(t)$ vs $t$ (bridge wobble amplitude)
64-
- $R(t)$ vs $t$ (degree of synchronization)
65-
5. Briefly describe what happens before/after $t_c$ and whether the observed onset is close to the theoretical prediction.
63+
### Modeling Assumptions
6664
67-
Reference code is available in [amlab/odes_coupled/bridge.py](../../amlab/odes_coupled/bridge.py). Use it for ideas, but **do not copy it**.
65+
The simplified model uses two main idealizations:
6866
69-
\vspace{1cm}
67+
- The bridge is represented by a single lateral vibration mode, a damped harmonic oscillator.
68+
- Each pedestrian is represented by a phase oscillator whose lateral force is periodic in the stepping phase.
7069
71-
**Good luck and enjoy your coding!**
70+
### Bridge Dynamics
71+
72+
Let $X(t)$ be the lateral displacement of the relevant bridge mode. Then
73+
74+
$$
75+
M\ddot X(t) + B\dot X(t) + KX(t) = \sum_{i=1}^N G\sin\theta_i(t),
76+
\qquad
77+
\Omega = \sqrt{K/M}.
78+
$$ {#eq-ode-coupled-assignment-4}
79+
80+
Here $M$ is the modal mass, $B$ the damping coefficient, $K$ the stiffness, and $G$ the maximum lateral force per pedestrian.
81+
82+
### Pedestrian Phase Dynamics
83+
84+
Each pedestrian is modeled as a phase oscillator with natural stepping frequency $\Omega_i$ drawn from a unimodal distribution $P(\Omega)$ centered near the bridge frequency. The bridge motion perturbs the gait according to
85+
86+
$$
87+
\dot\theta_i(t) = \Omega_i + C\,A(t)\sin\big(\Psi(t)-\theta_i(t)+\alpha\big),
88+
\qquad i=1,\dots,N,
89+
$$ {#eq-ode-coupled-assignment-5}
90+
91+
where $C$ measures sensitivity to bridge vibrations and $\alpha$ is a phase-lag parameter. The pedestrians do not interact directly with one another. They are all driven by the same bridge motion, and together they drive the bridge through the forcing term in @eq-ode-coupled-assignment-4.
92+
93+
### Bridge Amplitude and Phase
94+
95+
Following @strogatz2005bridge, define the instantaneous bridge amplitude $A(t)$ and phase $\Psi(t)$ by
96+
97+
$$
98+
X(t) = A(t)\sin\Psi(t),
99+
\qquad
100+
\dot X(t) = A(t)\Omega\cos\Psi(t).
101+
$$ {#eq-ode-coupled-assignment-6}
102+
103+
Equivalently,
104+
105+
$$
106+
A(t) = \sqrt{X(t)^2 + \Big(\dot X(t)/\Omega\Big)^2},
107+
\qquad
108+
\Psi(t) = \operatorname{atan2}\!\Big(X(t),\dot X(t)/\Omega\Big).
109+
$$ {#eq-ode-coupled-assignment-7}
110+
111+
### Synchronization Measure
112+
113+
Define the Kuramoto order parameter by
114+
115+
$$
116+
R(t)e^{i\Phi(t)} = \frac{1}{N}\sum_{j=1}^N e^{i\theta_j(t)}.
117+
$$ {#eq-ode-coupled-assignment-8}
118+
119+
Here $R(t) \in [0,1]$ measures crowd synchrony. For incoherent phases, $R(t)$ fluctuates at scale $\mathcal{O}(N^{-1/2})$, while partial synchronization produces values of order one.
120+
121+
### Theoretical Critical Crowd Size
122+
123+
In the simplest case $\alpha = \pi/2$ and for a distribution $P(\Omega)$ symmetric about the bridge frequency $\Omega$, the theory gives the critical crowd size
124+
125+
$$
126+
N_c = \frac{2B\Omega}{\pi G C\,P(\Omega)}.
127+
$$ {#eq-ode-coupled-assignment-9}
128+
129+
When $N$ crosses $N_c$, bridge wobbling and pedestrian synchronization emerge together through the feedback loop.
130+
131+
If you take $P(\Omega)$ to be a normal distribution with mean $\Omega$ and standard deviation $\sigma$, then
132+
133+
$$
134+
P(\Omega) = \frac{1}{\sqrt{2\pi}\,\sigma},
135+
\qquad
136+
N_c = \frac{2B\Omega\sqrt{2\pi}\,\sigma}{\pi G C}.
137+
$$ {#eq-ode-coupled-assignment-10}
138+
139+
## Required Numerical Experiment
140+
141+
Implement a numerical solver for the coupled bridge-pedestrian system. You may use `scipy.integrate.solve_ivp`, which is recommended here, or another standard ODE solver such as RK4. Use random initial phases $\theta_i(0) \sim \mathrm{Unif}[0,2\pi)$ and small initial bridge motion, for instance $X(0) \approx 0$ and $\dot X(0) \approx 0$.
142+
143+
Perform the following controlled crowd-ramp experiment:
144+
145+
1. Start with $N=N_0$ pedestrians. Every $\Delta T$ seconds, increase the crowd size by $\Delta N$, adding new pedestrians with fresh initial phases and natural frequencies, until reaching $N_{\max}$.
146+
2. Compute the theoretical value of $N_c$ using your chosen parameters and frequency distribution.
147+
3. Define the first time at which the crowd reaches the theoretical threshold,
148+
149+
$$
150+
t_c = \inf\{t : N(t) \ge N_c\}.
151+
$$ {#eq-ode-coupled-assignment-11}
152+
153+
4. Produce three stacked plots, and in each one draw a vertical dashed line at $t=t_c$ labeled "$N=N_c$":
154+
- $N(t)$ versus $t$, the crowd-size staircase.
155+
- $A(t)$ versus $t$, the bridge wobble amplitude.
156+
- $R(t)$ versus $t$, the degree of synchronization.
157+
5. Briefly describe what happens before and after $t_c$, and comment on whether the observed onset of wobbling and synchrony is close to the theoretical prediction.
158+
159+
Reference code is available in [amlab/odes_coupled/bridge.py](../../amlab/odes_coupled/bridge.py). Use it for ideas, but do not copy it.
160+
161+
Good luck and enjoy your coding.

0 commit comments

Comments
 (0)