5D Library › 五节点循环网络动力学、黄经历表与多尺度振子扰动 · English

第三章 极限环:行波、周期漂移与振幅包络

振荡长什么样

第二章说明,自身饱和低于阈值时,均匀状态让位于一个稳定的振荡。本章看这个振荡的形状:五个节点按什么次序达到峰值,周期多长,振幅由什么决定。最后一个问题对应提纲中的「非对称初始权重下的极限环振幅包络」,答案取决于系统是耗散的还是守恒的。

行波与周期

推导

# Chapter 3. p06: Period, travelling wave and envelope of the ring's cycle.
# Same replicator ring as p05 (c1 = 1, c2 = 0.5, mu_c = 0.7135), RK4 in
# log coordinates, step 0.05.
# A. Period from upward crossings of x_0 through its mean, against the
#    linear prediction 2 pi 5 / |Im lambda_1| at the same mu, and the
#    order and spacing of the five nodes' peaks.
# B. Envelope: the range of x over the cycle from different starting
#    weights, including lopsided ones, for the dissipative ring (mu < mu_c)
#    and for the zero-sum (antisymmetric) ring of p05.
import cmath
import math

W = cmath.exp(2j * math.pi / 5)
C1, C2 = 1.0, 0.5
MUC = C1 * math.cos(math.radians(72)) + C2 * math.cos(math.radians(36))

def soft(u):
    m = max(u)
    e = [math.exp(a - m) for a in u]
    s = sum(e)
    return [a / s for a in e]

def ring(mu, anti=False):
    a = [[0.0] * 5 for _ in range(5)]
    for i in range(5):
        a[i][(i - 1) % 5] += C1
        a[i][(i - 2) % 5] -= C2
        a[i][i] -= mu
        if anti:
            a[i][(i + 1) % 5] -= C1
            a[i][(i + 2) % 5] += C2
    return a

def step(u, a, h):
    def f(v):
        x = soft(v)
        ax = [sum(a[i][j] * x[j] for j in range(5)) for i in range(5)]
        m = sum(p * q for p, q in zip(ax, x))
        return [w - m for w in ax]
    k1 = f(u)
    k2 = f([p + h / 2 * q for p, q in zip(u, k1)])
    k3 = f([p + h / 2 * q for p, q in zip(u, k2)])
    k4 = f([p + h * q for p, q in zip(u, k3)])
    return [p + h / 6 * (q + 2 * r + 2 * s + t)
            for p, q, r, s, t in zip(u, k1, k2, k3, k4)]

def trace(a, x0, burn, look, h=0.05):
    u = [math.log(v) for v in x0]
    for _ in range(int(burn / h)):
        u = step(u, a, h)
    out = []
    for n in range(int(look / h)):
        u = step(u, a, h)
        out.append((n * h, soft(u)))
    return out

if __name__ == "__main__":
    print("A. period and travelling wave")
    print("   mu_c - mu   simulated period   linear 2*pi*5/|Im l1|")
    for d in (0.01, 0.05, 0.2):
        mu = MUC - d
        tr = trace(ring(mu), [0.2 + 0.01 * (i == 0) for i in range(5)],
                   3000, 600)
        mean = sum(x[0] for _, x in tr) / len(tr)
        ups = [t for (t, x), (_, y) in zip(tr, tr[1:])
               if x[0] < mean <= y[0]]
        per = (ups[-1] - ups[0]) / (len(ups) - 1)
        lin = 2 * math.pi * 5 / abs((C1 * W ** -1 - C2 * W ** -2 - mu).imag)
        print("   {:8.2f}      {:8.2f}            {:8.2f}".format(
            d, per, lin))
    first = []
    for i in range(5):
        seg = [(t, x[i]) for t, x in tr if ups[0] <= t < ups[0] + per]
        first.append(max(seg, key=lambda r: r[1])[0])
    order = sorted(range(5), key=lambda i: first[i])
    lags = [(first[order[(k + 1) % 5]] - first[order[k]]) % per / per
            for k in range(5)]
    print("   peak order (mu_c - mu = 0.2): nodes {}".format(order))
    print("   successive lags as fractions of the period: {}".format(
        [round(v, 3) for v in lags]))
    print("\nB. range of x over the cycle, by starting weights")
    starts = (("near uniform", [0.21, 0.2, 0.2, 0.2, 0.19]),
              ("lopsided", [0.4, 0.1, 0.2, 0.2, 0.1]),
              ("one dominant", [0.8, 0.05, 0.05, 0.05, 0.05]))
    print("   start           dissipative (mu_c - 0.05)   zero-sum ring")
    for name, x0 in starts:
        r1 = trace(ring(MUC - 0.05), x0, 3000, 300)
        r2 = trace(ring(0.0, True), x0, 0, 300)
        g1 = max(max(x) - min(x) for _, x in r1)
        g2 = max(max(x) - min(x) for _, x in r2)
        print("   {:<14}        {:7.4f}                 {:7.4f}".format(
            name, g1, g2))
    print("\nReading: the cycle is a travelling wave - each node peaks a")
    print("fifth of a period after the last - with a period the linear")
    print("spectrum predicts near threshold and that drifts away from it")
    print("further out. With dissipation every start ends on the same")
    print("envelope; in the zero-sum ring the starting weights fix the")
    print("envelope for ever.")
# A. period and travelling wave
#    mu_c - mu   simulated period   linear 2*pi*5/|Im l1|
#        0.01         49.60               47.81
#        0.05         56.91               47.81
#        0.20         84.52               47.81
#    peak order (mu_c - mu = 0.2): nodes [0, 1, 2, 3, 4]
#    successive lags as fractions of the period: [0.201, 0.2, 0.2, 0.2, 0.2]
#
# B. range of x over the cycle, by starting weights
#    start           dissipative (mu_c - 0.05)   zero-sum ring
#    near uniform           0.3149                  0.0200
#    lopsided               0.3149                  0.3198
#    one dominant           0.3149                  0.7607
#
# Reading: the cycle is a travelling wave - each node peaks a
# fifth of a period after the last - with a period the linear
# spectrum predicts near threshold and that drifts away from it
# further out. With dissipation every start ends on the same
# envelope; in the zero-sum ring the starting weights fix the
# envelope for ever.

A 段说明振荡是一个行波:五个节点按 0、1、2、3、4 的次序依次达到峰值,每个比前一个晚恰好五分之一个周期(0.2)。次序与生成方向相同:峰值沿着「生成」的箭头绕环传播。这是循环对称的直接结果:在阈值附近,振荡几乎全部是模 1,而模 1 的傅里叶向量本身就是一个相位逐节点均匀推进的行波。

周期在阈值附近接近线性理论的预言:μc−μ=0.01\mu_c – \mu = 0.01 时模拟周期 49.60,线性预言 47.81。离阈值越远,周期越长:0.05 时 56.91,0.2 时 84.52。线性预言只描述阈值附近;远离阈值后,周期由非线性决定。

B 段回答振幅包络的问题。在耗散的环(μ=μc−0.05\mu = \mu_c – 0.05)里,近乎均匀、偏斜与单一节点占优三种初值,最终的振荡范围都是 0.3149:初值被遗忘,包络是吸引子的性质。在零和环里,同样三种初值给出 0.0200、0.3198 与 0.7607 三个完全不同的范围,而且永远保持:零和环没有吸引子,每个初值都在一条由第二章的守恒量 HH 决定的闭轨上运动。所以「振幅包络由初始权重决定」只对守恒的零和环成立;一旦有耗散,它就不成立。

远离阈值:模的能量与边界

推导

# Chapter 3. p07: Far from threshold: Fourier-mode energy and the boundary.
# Same ring as p05-p06. Along the cycle, the deviation x - 1/5 is split
# into the ring's Fourier modes, z_k(t) = sum_j (x_j - 1/5) w^{-jk}; the
# time-averaged share of |z_1|^2 + |z_4|^2 (the travelling wave born at
# the Hopf point) is reported, with the period and the smallest x on the
# cycle, as mu moves away from mu_c. Near a heteroclinic cycle the
# period grows without bound while min x falls towards 0.
import cmath
import math

W = cmath.exp(2j * math.pi / 5)
C1, C2 = 1.0, 0.5
MUC = C1 * math.cos(math.radians(72)) + C2 * math.cos(math.radians(36))

def soft(u):
    m = max(u)
    e = [math.exp(a - m) for a in u]
    s = sum(e)
    return [a / s for a in e]

def step(u, mu, h):
    def f(v):
        x = soft(v)
        ax = [C1 * x[(i - 1) % 5] - C2 * x[(i - 2) % 5] - mu * x[i]
              for i in range(5)]
        m = sum(p * q for p, q in zip(ax, x))
        return [w - m for w in ax]
    k1 = f(u)
    k2 = f([p + h / 2 * q for p, q in zip(u, k1)])
    k3 = f([p + h / 2 * q for p, q in zip(u, k2)])
    k4 = f([p + h * q for p, q in zip(u, k3)])
    return [p + h / 6 * (q + 2 * r + 2 * s + t)
            for p, q, r, s, t in zip(u, k1, k2, k3, k4)]

def run(mu, burn=4000.0, look=1500.0, h=0.05):
    u = [0.05 * math.cos(2 * math.pi * i / 5) for i in range(5)]
    for _ in range(int(burn / h)):
        u = step(u, mu, h)
    e = [0.0] * 5
    low, ups, prev = 1.0, [], None
    for n in range(int(look / h)):
        u = step(u, mu, h)
        x = soft(u)
        for k in range(5):
            z = sum((x[j] - 0.2) * W ** (-j * k) for j in range(5))
            e[k] += abs(z) ** 2
        low = min(low, min(x))
        if prev is not None and prev < 0.2 <= x[0]:
            ups.append(n * h)
        prev = x[0]
    per = (ups[-1] - ups[0]) / (len(ups) - 1) if len(ups) > 1 else 0.0
    return (e[1] + e[4]) / sum(e), per, low

if __name__ == "__main__":
    print("   mu_c - mu   share in modes 1,4   period    min x")
    for d in (0.02, 0.1, 0.2, 0.4, 0.6):
        share, per, low = run(MUC - d)
        print("   {:8.2f}         {:8.5f}       {:7.2f}   {:.2e}".format(
            d, share, per, low))
    print("\nReading: near threshold the cycle is almost purely the mode")
    print("born at the Hopf point. Further away the other modes share in")
    print("it, the cycle presses towards the edges of the simplex and the")
    print("period lengthens: the orbit approaches a heteroclinic cycle,")
    print("where each node in turn is nearly extinct for longer and")
    print("longer.")
#    mu_c - mu   share in modes 1,4   period    min x
#        0.02          0.98808         51.41   9.57e-02
#        0.10          0.94031         66.19   2.01e-02
#        0.20          0.88063         84.53   2.92e-03
#        0.40          0.76154        113.57   3.25e-05
#        0.60          0.64212        133.60   6.43e-08
#
# Reading: near threshold the cycle is almost purely the mode
# born at the Hopf point. Further away the other modes share in
# it, the cycle presses towards the edges of the simplex and the
# period lengthens: the orbit approaches a heteroclinic cycle,
# where each node in turn is nearly extinct for longer and
# longer.

阈值附近,振荡的能量有 0.98808 集中在模 1 与模 4——在 Hopf 点诞生的那一对模。远离阈值时,其他模分走了一部分能量:μc−μ=0.6\mu_c – \mu = 0.6 时只剩 0.64212。与此同时,轨道越来越贴近单纯形的边缘:最小的 xx 从 9.57e-02 降到 6.43e-08,周期从 51.41 拉长到 133.60。

这是轨道逼近异宿环(heteroclinic cycle)的特征:每个节点轮流几乎消失,在那里停留的时间越来越长,因此周期不断变长 (Hofbauer and Sigmund 1998; Strogatz 2015)。在有限精度的数值计算中,这样的轨道最终会被舍入误差推到边界上;本书用对数坐标积分,使所有 xix_i 始终为正,但读者应当知道,最小值 6.43e-08 已经在提示这种模型在真实世界中的可信范围。

五个节点在极限环上的份额:每个节点比前一个晚五分之一个周期达到峰值,峰值沿生成方向绕环传播。

注

行波不是因果链。 节点按生成方向依次达到峰值,容易被读成「前一个节点导致了后一个」。在模型里,这只是循环对称加上 Hopf 分岔的几何结果;换一个方向的耦合,行波就反向传播。由峰值的先后推断因果,在这个模型里是错误的。

假说 · 尚未验证

作者的假说(尚未验证): 在第二章的生成-抑制环中,异宿环附近的周期随 μc−μ\mu_c – \mu 的增长近似对数发散,就像经典的三节点「石头-剪刀-布」异宿环。什么结果会证明它错:把模拟延伸到更小的 μ\mu 后,周期随 ln⁡(1/xmin)\ln(1/x_{\min}) 的增长不是线性的。

小结

生成-抑制环的极限环是一个沿生成方向传播的行波,相邻节点相差五分之一个周期;周期在阈值附近符合线性预言,远离阈值时被非线性拉长,轨道逼近异宿环。耗散环的振幅包络与初值无关;只有守恒的零和环,包络才由初始权重决定。

参考文献

Hofbauer, Josef, and Karl Sigmund. 1998. Evolutionary Games and Population Dynamics. Cambridge University Press.
Strogatz, Steven H. 2015. Nonlinear Dynamics and Chaos. 2nd ed. Westview Press.

Fan, Y. (2026). Five-Node Cyclic Network Dynamics, Solar-Longitude Ephemeris and Multi-Scale Oscillator Perturbations: Rock-Paper-Scissors-Lizard-Spock Lotka-Volterra Graphs, Equation-of-Time Keplerian Mechanics and Jacobian Sensitivity Bounds [五节点循环网络动力学、黄经历表与多尺度振子扰动] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090168 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).