EXPLORABLES

This explorable illustrates how remarkable spatio-temporal patterns can emerge when two dynamical phenomena, **synchronization** and **collective motion**, are combined. In the model, a bunch of oscillators move around in space and interact. Each oscillator has an internal oscillatory phase. An oscillator's movement and change of internal phase both depend on the positions and internal phases of all other oscillators. Because of this entanglement of spatial forces and phase coupling the oscillators are called **swarmalators**.

The model was recently introduced and studied by **Kevin P. O’Keeffe**, **Hyunsuk Hong**, and **Steve Strogatz** in the paper "Oscillators that sync and swarm", *Nat. Comm.*, **8**: 1504 (2017). It may capture effects observed in biological systems, e.g. populations of chemotactic microorganisms or bacterial biofilms. Recently swarmalators were realized in groups of **little robots** and a **flock of drones**.

* Press Play*,

*, and keep on reading....*

**count to 100 (!)**## This is how it works

Here we have \(N=500\) swarmalators. The state of swarmalator \(n\) is defined by **three variables**: the internal phase \(\theta_n(t)\) and the two positional variables \(x_n(t)\) and \(y_n(t)\). The phase is depicted by a color of a continuous rainbow colorwheel.
Initially, the swarmalators' phase variable is random, all of them are placed randomly in the plane, and all are at rest. For the math savvy, the equations of motion that govern the system are discussed below. Here we will outline the mechanics qualitatively.

### Movements

The swarmalators are subject to two opposing forces. We have **short range repulsion**: when two swarmalators come too close, a repulsive force dominates and pushes them apart, so they avoid bumping into each other. This force is negligable when swarmalators are far apart.

Additionally, any two swarmalators experience a force that pulls them towards each other. The magnitude of this attractive force does not decrease with distance, which is why it's a **long range attractive force**.
The clue is that this attractive force between two swarmalators, say \(n\) and \(m\), depends on their phase difference \(\theta_m-\theta_n\). When the * "Like attracts like" parameter* \(J\) is positive, a similarity in phase enhances the attractive force, when this parameter is negative, swarmalators are more attracted to others of opposite phase.

### Synchronization

The swarmalators phases advance at a constant phase velocity (frequency) \(\omega\) like an internal clock.
Additionally, a swarmalator's phase also changes as a function of the phases of the other swarmalators. When the * synchronization parameter* \(K\) is positive the phase difference \(\theta_m-\theta_n\) between two swarmalators \(n\) and \(m\) decreases and they tend to synchronize. When \(K\) is negative, the opposite occurs.
The magnitude of this phase coupling force decreases with distance and therefore depends on the positions of the swarmalators. This type of phase coupled synchronization is also explored in the Explorables

**"Ride my Kuramotocycle"**and

**"Janus Bunch"**.

## Observe this

You can observe a variety of stationary or dynamic patterns in this simple model just by changing the two parameters \(J\) and \(K\) * with the two corresponding sliders*. The

*that automatically yield different patterns.*

**radio buttons help selecting parameter combinations***turns on the comoving reference frame along the phase dimension on so only relative phases are color coded.*

**Freezing the phase**The * Rainbow Ring pattern* emerges when the synchronization force vanishes and the "Like attracts like" parameter is positive. The swarmalators sort themselves out to a stationary ring pattern. You need some patience for this pattern to emerge.

In the * Dancing Circus* the swarmalators are attracted to others of the similar phase but desynchronize when they are close decreasing the attractive force. This back and forth generates a dynamic pattern in which the swarmalators can't settle into a stationary configuration. Initially, the system needs some time to get moving, so wait a bit here, too.

In the * Uniform Blob* setup the synchronization force is very strong. Eventually the swarmalators will settle into a regular, fully synced stable state.

When you select the * Solar Convection* setup, the

*because for this one you need variation in the swarmalators' natural frequencies \(\omega_n\). Otherwise, this system is like the Uniform Blob. Because the swarmalators are all a bit different, those with most disparate natural frequencies get pushed to the periphery and show behavior reminiscent of convection.*

**advanced settings are turned on**The pattern * Makes me Dizzy* is complementary to

*Solar Convection*in terms of the strength of forces.

*Solar convection*occurs in a parameter regime with large sync strength \(K\) and small but positive "Like attracts like" force \(J\).

*has weak but positive sync strength, but strong "Like attracts like" forces. The patterns is very dynamic, mixing and beautiful once it sets in. My favorite.*

**Makes Me Dizzy***.*

**Make sure to turn on Freeze Phase**** Fractured:** An interesting pattern emerges when the "Like attracts like" force is very strong, but the swarmalators have a slight tendency to desynchronize. To see this pattern you need patience. It takes a while to stabilize. After a transient ring shaped pattern, you will finally see a pattern that looks like a horizonal slice through an orange.

## The math

The dynamic equations that are at work here and define the model are given by differential equations for the positions and the phases of the swarmalators. Denoting the position vector of swarmalator \(n\) by \(\mathbf{r}_{n}=(x_{n},y_{n})\) these are:

\[ d\mathbf{r}_n/dt=\mathbf{v}_n+\frac {1}{N}\sum_{m\neq n}\frac{\mathbf{r} _m - \mathbf{r} _n}{|\mathbf{r} _m - \mathbf{r} _n|}(1+J\cos(\theta_m-\theta_n))-\frac{\mathbf{r} _m - \mathbf{r} _n}{|\mathbf{r} _m - \mathbf{r} _n|^2} \]

and

\[d\theta_n/dt = \omega_n +\frac{K}{N}\sum_{m\neq n}\frac{\sin(\theta_m-\theta_n)}{|\mathbf{r} _m - \mathbf{r} _n|} \]

In the first equation, we see three contributions to the velocity. The first term \(\mathbf{v}_n\) is a swarmalators natural propulsion velocity at which it would move when isolated. In the explorable, this is set to zero. Giving the swarmalators a nonzero velocity doesn't change the equilibrium patterns substantially. The third term is the repulsive force. The second term governs attraction. Attraction is modulated by the \(1+J\cos(\theta_m-\theta_n)\) expression. This modulation enhances the attractive force when \(J>0\) and decreases it when \(J<0\).

In the second equation \(\omega_n\) is the natural frequency of swarmalator \(n\). The second term is a phase coupling as in the Kuramoto model that effectively decreases the phase difference between two oscillators when \(K>0\). The spatial coupling enters here, because the strength of this synchronization coupling decreases with distance.

## Further Information

Kevin P. O’Keeffe,

**Hyunsuk Hong**, Steven Strogatz, "Oscillators that sync and swarm",*Nat. Comm.*,**8**: 1504 (2017)Kevin P. O’Keeffe, Joep H. M. Evers, and Theodore Kolokolnikov, "Ring states in swarmalator systems",

*Phys Rev E*,**98**: 022203 (1018)Kevin P. O’Keeffe, Christian Bettstetter, "A review of swarmalators and their potential in bio-inspired computing" in Micro- and Nanotechnology Sensors, Systems, and Applications XI, Thomas George and M. Saif Islam (eds.),

*SPIE*,**10982**: 383-394 (2019)Hyunsuk Hong, "Active phase wave in the system of swarmalators with attractive phase coupling",

*Chaos*,**28**: 103112 (2018)