The Form of Swarms: A Primer of Swarm Equilibria · The emergent organization of swarms can be...

47
The Form of Swarms: A Primer of Swarm Equilibria Andrew J. Bernoff Harvey Mudd College Chad M. Topaz Macalester College Supported by: National Science Foundation DMS-0740484

Transcript of The Form of Swarms: A Primer of Swarm Equilibria · The emergent organization of swarms can be...

  • The Form of Swarms:A Primer of Swarm Equilibria

    Andrew J. BernoffHarvey Mudd College

    Chad M. TopazMacalester College

    Supported by: National Science Foundation DMS-0740484

  • Andrew J. BernoffHarvey Mudd [email protected]

    Chad M. TopazMacalester [email protected]

    Abstract:Biological aggregations (swarms) exhibit morphologies governed by social interactions and responses to environment. Starting from a particle model we derive a nonlocal PDE, known as the aggregation equation, which describes evolving population density. The solutions to the aggregation equation can exhibit a variety of behaviors including spreading without bound, concentrating into δ-functions and formation of compactly supported equilibria. We describe some tools for investigating the asymptotic behavior of solutions. We also study equilibria and their stability via the calculus of variations which yields analytical solutions. Finally we present a case study about how these methods can be used to construct a model of locust swarms.

    Useful References:• A. J. Bernoff & C. M. Topaz, “Nonlocal aggregation models: A primer of swarm equilibria.” SIAM Review 55 (2013)

    709-747. Note the introduction and epilogue to this paper contain a potentially useful literature review.

    • A. J. Leverentz, C. M. Topaz & A. J. Bernoff. “Asymptotic Dynamics of Attractive-Repulsive Swarms,” SIAM J. Appl. Dyn. Sys. 8 (2009) 880-908.

    • C. M. Topaz, A. J. Bernoff, S. Logan & W. Toolson, “Aggregations, Interactions, and Boundaries: A Minimal Model for Rolling Swarms of Locusts,” Eur. Phys. J. - Spec. Top. 157 (2008) 93-109.

  • Many aggregations have sharp boundaries.

    Sinclair, 1977

  • Biological questionHow are individual behavior and

    group behavior connected?

    Mathematical questionHow do different social interaction kernels affect the

    (asymptotic) macroscopic behavior of a solution?

  • Three Key Ideas:• Continuum model of swarm density, .• Individuals interact pairwise and social forces are additive.− Repel at short distances (collision avoidance)− Attract at longer distances (swarming behavior)

    • Kinematic Model (velocity ∝ social forces)

    Previous Work:• Bodnar & Velazquez (2006) considered well-posedness and blow-up in 1D.• Bertozzi & Laurent (2007) proved axisymmetric blow-up in N-dimensions.• Bertozzi & collaborators (2008 . . .) working on general blow-up in N-dimensions.

    A Continuum Model of Swarming

  • Computing the Velocity

    dy

    ⌘ fs ⇤ ⇢v(x) =Z 1

    y=�1fs(x� y)⇢(y) dy

    Velocity for a test mass at from the density ⇢(y)x

    x

    fs(x)

    ⇢(y)

    Where is the social force induced by the mass distribution with density .

    fs(x)

    ⇢(y)

  • Conservation of Mass

    And the velocity is given by

    x

    xfs(x)

    The flux, J, is given by:

    So the equation of conservation of mass is:

    J = v⇢

    v =

    Z 1

    �1fs(x� y)⇢(y) dy ⌘ fs ⇤ ⇢

    @⇢

    @t

    +@J

    @x

    = 0 ) ⇢t

    + (v⇢)x

    = 0

    J J

    �x

  • Conservation of Mass

    And the velocity is given by

    x

    xfs(x)

    ⇢(y)

    The flux, J, is given by:

    So the equation of conservation of mass is:

    J = v⇢

    v =

    Z 1

    �1fs(x� y)⇢(y) dy ⌘ fs ⇤ ⇢

    @⇢

    @t

    +@J

    @x

    = 0 ) ⇢t

    + (v⇢)x

    = 0

  • Continuum Model:• Difficult to simulate, particularly, in higher dimensions• Simulation difficulty independent of number of particles.• Relationship to biology not always clear.• Much better tools for analysis

    Continuum vs. Discrete

    Discrete Model:• Easy to simulate a small number of particles.• Easy to generalize to higher dimensions.• Relationship to biology well understood.• Difficult to analyze or find exact solutions.

    0.5 1 1.5 20

    0.4

    0.8

    1.2(b)

    x

    z

  • SIAM J. APPLIED DYNAMICAL SYSTEMS c⃝ 20XX Society for Industrial and Applied MathematicsVol. 0, No. 0, pp. 000–000

    Asymptotic Dynamics of Attractive-Repulsive Swarms∗

    Andrew J. Leverentz†, Chad M. Topaz‡, and Andrew J. Bernoff†

    Abstract. We classify and predict the asymptotic dynamics of a class of swarming models. The model consistsof a conservation equation in one dimension describing the movement of a population density field.The velocity is found by convolving the density with a kernel describing attractive-repulsive socialinteractions. The kernel’s first moment and its limiting behavior at the origin determine whetherthe population asymptotically spreads, contracts, or reaches steady state. For the spreading case,the dynamics approach those of the porous medium equation. The widening, compactly supportedpopulation has edges that behave like traveling waves whose speed, density, and slope we calculate.For the contracting case, the dynamics of the cumulative density approach those of Burgers’ equation.We derive an analytical upper bound for the finite blow-up time after which the solution forms oneor more δ-functions.

    Key words. swarm, aggregation, integrodifferential equation, attractive-repulsive, asymptotic dynamics, porousmedium, burgers, blow-up

    AMS subject classifications. 92, 35

    DOI. 10.1137/090749037

    1. Introduction. Biological aggregations such as fish schools, bird flocks, ungulate herds,and insect swarms have drawn considerable attention from mathematical modelers in recentyears. These animal groups—which for brevity we refer to simply as swarms—have implica-tions for ecological dynamics, human food supply availability, disease transmission, and, onthe longest spatiotemporal scales, evolution [19, 23]. Increasingly, they serve as prototypesfor the development of algorithms in robotics, engineering, and artificial intelligence [6, 22].Furthermore, biological swarms are a rich and versatile source of pattern-forming behavior,taking on morphologies including vortices, advancing fronts, branched dendritic structures,and more exotic patterns [12, 20].

    The emergent organization of swarms can be mediated by exogenous influences such asnutrients, light, or gravity, as well as by endogenous ones, namely social interactions betweenindividuals. Since some species swarm even in the absence of meaningful external stimuli, oneconcludes that social interactions play a key role. The most important social forces are thoughtto be attraction, repulsion, and alignment [9, 12, 13]. Attraction refers to the evolutionarilypreprogrammed tendency of conspecific organisms to move towards each other, which offersbenefits such as protection and mate choice, while repulsion refers to the tendency to move

    ∗Received by the editors February 8, 2009; accepted for publication (in revised form) by J. Sneyd April 15, 2009;published electronically DATE. The first and second authors were partially supported by the NSF through grantDMS-0740484. The third author was also supported by the NSF through grant DMS-0807347.

    http://www.siam.org/journals/siads/x-x/74903.html†Department of Mathematics, Harvey Mudd College, Claremont, CA 91711 ([email protected], ajb@hmc.

    edu).‡Department of Mathematics and Computer Science, Macalester College, St. Paul, MN 55105 (ctopaz@

    macalester.edu).

    1

    SIAM J. APPLIED DYNAMICAL SYSTEMSVol. 8, No. 3

    © 2009 Society for Industrial and Applied Mathematics

    Meet Andy.

    Andy LeverentzHMC 2008

  • x

    fs(x

    )

    (0, 1 − F )

    (0, −1 + F )

    (a)

    x

    fs(x

    )

    (0, F̃ )

    (0, −F̃ )

    (L̃, −1)

    (−L̃, 1)

    (1, 0)

    (−1, 0)

    (b)

    The Continuum Model (1D)

    Morse Social Force Piecewise Linear Social Forcefs(x) fs(x)

    xx

    Conservation of Mass OddFinite first momentCont. & piecewise diff. (x ≠ 0)Jump discontinuity (x = 0)Crosses zero for exactly one |x|{

  • A Menagerie of Behaviors

    !4 !2 0 2 40

    0.1

    0.2

    0.3

    0.4

    x

    !(x)

    (b)

    !20 !10 0 10 200

    0.05

    0.1

    0.15

    0.2

    x

    !(x)

    (a)

    !2 !1 0 1 20

    0.5

    1

    1.5

    2

    x

    !(x)

    (c)

    !4 !2 0 2 40

    0.5

    1

    1.5

    x

    !(x)

    (d)

    Spreading Steady state

    Blow-up Blow-up

  • A Phase DiagramMorse Social Force:

    F

    L

  • Cumulative Mass FunctionDefine the cumulative mass function:

    Where satisfies a wave equation

    And the velocity can be approximated as

    Where .Note that as the density is positive, , is increasing.

  • Burger’s EquationThe dynamics are dominated by

    - If social forces are repulsive at small distances and density is bounded for all t.

    - If social forces are attractive at small distances and will form a shock.

    But as ,Shocks = Density δ-functions!!

    See Bodnar & Velazquez (2006)

  • Spreading SwarmsExpand velocity at long lengthscales:

    Where is the first moment

    Substitute into C of M,

    ,to yield the porous media equation,

    Barenblatt Solution

    which has spreading solutions for κ< 0.

  • Barenblatt Solution

    Rescaled Density Approaches Barenblatt Solution

    RMS width has proper time dependence

  • ∫ βα

    V (|z − z′|)ρ(z′) dz′ = λ − f(z),

    ∫ βα

    ρ(z′) dz′ = M

    EnergyFredholmintegral

    equationfirstvariation

    Fredholm Integral Equation Mass Constraint

    Where α < z < β is the support of the solution

    !4 !2 0 2 40

    0.1

    0.2

    0.3

    0.4

    x

    !(x)

    (b)

    !20 !10 0 10 200

    0.05

    0.1

    0.15

    0.2

    x

    !(x)

    (a)

    !2 !1 0 1 20

    0.5

    1

    1.5

    2

    x

    !(x)

    (c)

    !4 !2 0 2 40

    0.5

    1

    1.5

    x

    !(x)

    (d)

    Steady stateFinding Steady StatesWhen β > 0, κ< 0 we expect steady solutions.

    Details

    Coming

    Later

  • Phase Diagram RevisitedMorse Social Force:

    F

    L

  • Some conclusions

    • Repulsion (attraction) at the origin suppresses (causes) blow-up and density concentrations.

    • First moment governs spreading at long lengthscales. Spreading governed by porous media equation.

    • Steady states can be found via integral equations.

    Open Questions • Necessary and sufficient conditions for spreading

    and convergence to Barenblatt solution.

  • A fly in the ointment . . .

    Social Force Density Plot

    RMS Width Final Steady State

    This potential has β > 0, κ> 0 which suggests spreading

  • Let’s focus on locusts . . .

  • Locusts form giant, destructive swarms.

    1010 locusts

    100 km2

    10 - 100 km/daydays or weeks

    $10 billion/yr for pesticides (all insects)$100 million/yr for control (Africa)$100 million/yr in crop loss (Africa)

    (EPA, UN

    FAO)

    National Geographic, “A Perfect Swarm”

  • Catastrophic

    With gravity, swarm forms a bubble.

    Sticky boundary

    Gravity G = 1

  • With wind, swarms roll

    Takeoff Resting LandingUvarov, Grasshoppers & Locusts (1977)

    Wind U = 1Catastrophic

  • 0.5 1 1.5 20

    0.4

    0.8

    1.2(b)

    x

    z

    Can we explain the swarm morphology?

    Steady Catastrophic Locust Swarm

    Empty Gap

    Mass concentration on ground

  • A Continuum Swarming Model

    • Pairwise, additive • Antisymmetric• Finite first moment• Jump discontinuity (x = 0)

    Morse Social Forcex

    fs(x

    )

    (0, 1 − F )

    (0, −1 + F )

    (a)

    x

    fs(x

    )

    (0, F̃ )

    (0, −F̃ )

    (L̃, −1)

    (−L̃, 1)

    (1, 0)

    (−1, 0)

    (b)

    q(x)

    x

    Velocity

    External Force

    Conservation of Mass

    • Finite Mass• Compact Support

    Bodnar & Velasquez (2005,2006)

  • Energy for the Continuum Model

    • Pairwise, additive [ Q’(x)= - q(x) , F’(x) = - f(x) ]• Repulsive at small x and attractive at large x• Symmetric • Pointy at (x = 0)

    Morse Potential

    Energy

    External Potential

    Energy Dissipation

    • Energy dissipated unless equilibrium• Connection to optimal transport

  • First Variation and Steady SolutionsLet

    Then

    Where the first variation is given by:

    where is a steady solution and is a zero mass perturbation.

    For the first variation to vanish, in the support of the solution:

    which is a Fredholm Integral Equation.

    Z

    �⇢̄

    Q(x� y)⇥̄(y) dy + F (x) = � for x 2 �⇢̄.

    Constant energy per unit mass

  • Second Variation and Stability

    Then for stability two conditions are sufficient:

    Suppose is an equilibrium solution satisfying:Z

    �⇢̄

    Q(x� y)⇥̄(y) dy + F (x) = � for x 2 �⇢̄.

    I) The energy per unit mass minimizes the induced potential, :� �(x)Z

    ⌦⇢̄

    Q(x� y)⇥̄(y) dy + F (x) = �(x) � �

    II) Second Variation is positive definite:

    W2[�̃, �̃] =

    Z

    �⇢

    Z

    �⇢

    Q(x� y)�̃(x)�̃(y) dx dy > 0

    for zero mass perturbations, .

    �(x)

    �(x) = �

  • EnergyFredholmintegral

    equationfirstvariation

    Fredholm Integral Equation Mass Constraint

    Where α < z < β is the support of the solution

    !4 !2 0 2 40

    0.1

    0.2

    0.3

    0.4

    x

    !(x)

    (b)

    !20 !10 0 10 200

    0.05

    0.1

    0.15

    0.2

    x

    !(x)

    (a)

    !2 !1 0 1 20

    0.5

    1

    1.5

    2

    x

    !(x)

    (c)

    !4 !2 0 2 40

    0.5

    1

    1.5

    x

    !(x)

    (d)

    Equilibrium state

    Finding Equilibrium States

    Equilibrium solutions satisfy an integral equation

  • EnergyFredholmintegral

    equationfirstvariation“invert”integraloperator

    ODE

    then

    yields

    So applying to

    If

    Finding Equilibrium States

    !4 !2 0 2 40

    0.1

    0.2

    0.3

    0.4

    x

    !(x)

    (b)

    !20 !10 0 10 200

    0.05

    0.1

    0.15

    0.2

    x

    !(x)

    (a)

    !2 !1 0 1 20

    0.5

    1

    1.5

    2

    x

    !(x)

    (c)

    !4 !2 0 2 40

    0.5

    1

    1.5

    x

    !(x)

    (d)

    Equilibrium state

  • EnergyFredholmintegral

    equationfirstvariation“invert”integraloperator

    ODE

    LinearODE

    Plug in and satisfy mass

    constraint

    Solution

    ρ(z) = A + B cos (μz)

    Solving

    Yields in the support of the solution.

    Finding Equilibrium States

    !4 !2 0 2 40

    0.1

    0.2

    0.3

    0.4

    x

    !(x)

    (b)

    !20 !10 0 10 200

    0.05

    0.1

    0.15

    0.2

    x

    !(x)

    (a)

    !2 !1 0 1 20

    0.5

    1

    1.5

    2

    x

    !(x)

    (c)

    !4 !2 0 2 40

    0.5

    1

    1.5

    x

    !(x)

    (d)

    Equilibrium state

  • 10

    20

    30

    0.5 4.5

    ρ vs. zSteady Solutions (N = 100)

    Continuum solutions agree with discrete (numerical) ones.

    ρ(z) = A + B cos (μz)

    F = 0.5, L = 2

  • A Primer of Swarm Equilibria

  • Repulsive Forces on a Finite Interval

    −1 −0.5 0 0.5 10

    0.15

    0.3

    (a)

    x

    ρ

    Numerics

    • Laplace Repulsive Potential:• Finite Interval: -d < x < d• Equipartition of mass between concentrations at the endpoints and classical solution in interior.• Mass Concentrations can’t be found by classical integral equation methods

  • Repulsive Forces in a Quadratic Potential

    −0.4 −0.2 0 0.2 0.40

    1.3

    1.4

    1.5(c)

    = ==

    x

    ρ

    Numerics

    • Laplace Repulsive Potential:• Quadratic external potential: • Solution is compactly supported on .• Jump discontinuities at edge of support• Global energy minimizer.

  • • Laplace Repulsive Potential:• Half line: • If M < g all mass concentrates at origin.• If M > g some mass concentrates at origin and the remainder forms a compact swarm.• Global minimizer and probably global attractor.

    0 0.25 0.5 0.75 10

    0.2

    0.4

    0.6(b)

    x

    ρ

    Numerics

    As a swarm model: - Concentration on ground (good) but no gap (bad).

    Repulsive forces in a gravitational potential

  • Catastrophic Morse Potential in Free Space

    −3 −2 −1 0 1 2 30

    0.15

    0.3

    (a)

    x

    ρ

    Numerics

    • Morse Potential in catastrophic regime .• Solution is compactly supported on .• Width of support independent of mass!! • Jump discontinuities at edge of support.• Local energy minimizer.• Probably a global energy minimizer.

    Morse Potential

    Analytic Solution

  • H-Stable Morse Potential on bounded interval

    −1 −0.5 0 0.5 10

    0.26

    0.265(b)

    = ==

    x

    ρ

    Numerics

    • Morse Potential in H-stable regime.• No solution in free space (swarm spreads forever).• Mass concentrations at endpoints of interval. • Global energy minimizer.• Probably global attractor.

    Morse Potential

  • Repulsionfrom mass concentrated

    on ground

    ~ dz2ln(z)

    Gravitygz+ =

    Stable gap(for some parameters)

    x

    z

    Suppose that we look at a quasi-2D mass distribution

    This has an associated potential, :

    This allows steady swarms with a gap at zero:

    Quasi 2D-Potential

    Empty Gap

    Mass concentration on ground

    Airborne swarm

    Q2D(z) =

    Z 1

    x=�1Q(

    px

    2 + z2) dx =

    Z 1

    x=�1e

    �px

    2+z2dx

  • The quasi 2D potential yields dynamically stable bubbles.

    1D

    Quasi2D

    Organism column Density profileρ

    z

    ρ

    z35 insects

  • 0 4 8 1212

    12.4

    12.8

    (c)

    x

    Λ(x)

    0 4 8 120

    2

    4

    6

    8

    (d)

    x

    ρ(x)

    Quasi 2D Locust Swarms• Quasi 2D Laplace Repulsion Potential.• Gravity & Ground: - Linear potential on a half space.• Mass concentration on ground • Gap above ground.• Continuous family of solutions• Solution is only a local “swarm” minimizer.

    0.5 1 1.5 20

    0.4

    0.8

    1.2(b)

    x

    z

    Quasi-2D Numerics

    Empty Gap

    Mass concentration on ground

    Airborne swarm

  • 2D Morse Equilibria

    0 4 8 120

    2

    4

    6

    8

    (d)

    x

    ρ(x)

    2D Morse Ribbons

    x

    z

    Empty Gap

    Mass concentration on ground

    Airborne swarm

    2D Catastrophic Swarm!18 0 18!18

    0

    18

    !0.6 0 0.6

    !0.6

    0

    0.6

    !50 0 50

    !50

    0

    50

    !0.6 0 0.6

    !0.6

    0

    0.6

    (a)

    (c)

    (b)

    (d)

    Louis Ryan HMC 2012

    Why are theremass concentrations

    at the edges?

  • 2D Morse - Ribbon

    Quasi 2D Swarmz

    �(z)

    Morse Potential

    Quasi-2D Morse Potential

    Q2D(z) � |z|2 ln |z|

    |z| � 1Quasi-2D Morse Potential ( )

    ⇥ �(z) = C⇤L2 � z2

    |z| < L

    Z L

    �L|y|2 ln |y|⇥(z � y) dz = � |z| < L

    Integral Equation (Carleman)

    7

    −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.20

    100

    200

    300

    400

    500

    600

    Position

    Density

    (a) L = 1.5

    −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.20

    20

    40

    60

    80

    100

    120

    140

    Density

    Position

    (b) L = 1.6

    Figure 2. This is a comparison between Carleman’s and the numericalsolution as for C = 2, and L = 1.5, 1.6. Carleman’s solution is in red andthe numerical solution is in blue.

    Carleman

    Numerical

    x

    L

    -LQ2D(z) =

    Z 1

    x=�1Q(

    px

    2 + z2) dx

  • 2D Morse - Circular Swarm 2D Catastrophic Swarm

    (Particle Simulation)!18 0 18

    !18

    0

    18

    !0.6 0 0.6

    !0.6

    0

    0.6

    !50 0 50

    !50

    0

    50

    !0.6 0 0.6

    !0.6

    0

    0.6

    (a)

    (c)

    (b)

    (d)

    0 0.1 0.2 0.3 0.4 0.5 0.6 0.70

    20

    40

    60

    80

    100

    120

    140

    160

    180

    radius

    dens

    ity

    Plot of Swarm Density for C = 1.500000e+000, L = 2, n = 1600

    2D Catastrophic Swarm(Continuum Model)

    Found as an Energy Minimizer

    Radius [r]

    Den

    sity

    [ 𝜌(

    r) ]

    Singular mass concentrationat the edges�(r) ⇠ Cp

    R� r

    Dimensionality of local minimizers of the interaction energyD Balagué, JA Carrillo, T Laurent, G Raoul Archive for Rational Mechanics and Analysis (2013)

  • Conclusions • Energy methods allow us to analyze equlibria

    and their stability.• Equilibria satisfy a Fredholm Integral

    Equation. This yields some analytical solutions.

    • Equlibria often contain concentrations on boundaries.

    • For locust model, quasi-2D repulsive potential and gravity yield a ground concentration together with a gap.

    • 2D Morse yields inverse square-root mass singularities on boundaries.

    • Inverse square-root singularities appear generic in 2D for “pointy” repulsive potentials.

    z

    Empty Gap

    Mass concentration on ground

    1D

    Quasi 2D

    Bernoff & Topaz “Nonlinear Aggregation Equations: A Primer of Swarm Equilibria.” SIREV (2013).