NPNitipong Praphaphankul GitHub repo
Research tool · Adaptive structures

When a member fails, can a truss repair itself by listening only to its neighbours? Fly-inspired local control.

A fruit fly walks without a central map: each leg reacts to a few signals from the legs next to it. Here every truss member does the same, with a force sensor, a length actuator and the overload signals of the members that share its joints.

T2 · 2-hop control · step 0live
tensioncompressionover the limitactuated
Peak ratio after loss
–
before any control
Self-only final
–
each member alone
Selected mask final
–
2-hop neighbours
Links per member
–
vs centralised
01 / Idea

From the fly's leg network to a truss

The fly brain (139,255 neurons in the FlyWire connectome) does not command the 42 leg joints. It sends a few descending signals to the ventral nerve cord, where each leg circuit follows three signed rules with its neighbours only (Walknet, as used in NeuroMechFly v2). The same information structure is given to an actuated truss: the designer sets one global value, the allowable stress, and each member acts on what its neighbours report.

Six legs, one rule set

3D insect with six legs and the Walknet coordination influences, next to a truss member and its neighbours

(a) Walknet: each leg sends signed influences to the adjacent legs on its side (rules 1 to 3) and to the opposite leg; a tripod gait emerges with no central pattern. (b) In the truss, an actuated member is a leg and the members sharing a joint are its adjacent legs.

Leg coordination rules

  1. A swinging leg inhibits the swing of the leg in front.
  2. A leg entering stance excites the leg in front and the opposite leg.
  3. A leg late in stance excites the leg behind and the opposite leg.

Correspondence

FlyActuated truss
Leg with sensors and musclesMember with force sensor and length actuator
Adjacent legs, coupled through the bodyMembers sharing a joint
Stance or swing stateOverload signal ej sgn(fj)
Signed rule weightSensitivity Sjk = ∂fj/∂δk
Descending commandAllowable stress σa, set once
Gait emerging from local rulesLoad path re-routed around the damage

The complete male connectome (166,700 neurons, brain and nerve cord, Berg et al., Cell 2026) adds the brain level: ascending neurons report the legs' state, a few descending neurons broadcast a modulating signal back. In the truss this becomes one upward overload report per member and one broadcast of the worst overload.

What is not transferred: the rhythm generators. A static structure needs the information structure of the leg network, not its oscillations.

02 / Input

Choose the truss, the damage and who listens to whom

The truss is a ground-structure cantilever, fixed on the left and loaded at the bottom tip, with members sized to carry their intact force at 80% of the allowable stress. Pick a damage case from the paper or click any member in the drawing to remove it. The model recomputes everything in your browser.

sets the truss, damage, mask and brain level below
0.25
fraction of the largest member; more area means more reserve
or click a member in the drawing
2
p = 2: plain law; larger p weights the worst members more (male CNS brain level)
0.20
0.95
5
0%
0%
600

Stress state ready

tensioncompressionover the limitactuated member× removedline width = stress ratio
final
03 / Model

Forces depend linearly on the actuators

Each member carries a length actuator that imposes a free elongation δk. Because the truss is linear, the member forces after damage are an affine function of the actuation, and one sensitivity matrix describes how every actuator moves every force.

Steps

  1. Size every member to its intact force at 80% of the allowable stress, with a minimum area.
  2. Remove one member: its area falls to 0.1% and it carries no stress.
  3. Compute the forces fd of the damaged truss and the sensitivities Sjk by unit elongations.
  4. Measure how far an actuator's influence reaches, hop by hop through shared joints.
f = fd + S δ, Sjk = ∂fj / ∂δk, rj = |fj| / (σaAj)

The influence of an actuator falls by a factor of about four over each of the first two hops (about 0.53 × 0.36h overall), so the first two rings of neighbours give each member a reliable direction.

Reach of one actuator

median and interquartile range of |Sjk| / |Skk| against the hop distance between members j and k, for the current damaged truss

Theory in five equations

  1. Closed-form sensitivity. Eliminating the displacements gives S = KmB K−1BTKm − Km = −Km½(I − P)Km½, with P a projection. So S is symmetric (Sjk = Skj, Maxwell reciprocity) and Skk < 0: a member can measure its own row by reading its force while its neighbours actuate.
  2. Convexity and the optimum. Each rj is |affine| and J is convex. The best peak ratio is the linear programme t* = min t subject to |fd,j + sjTδ| ≤ t fa,j, |δk| ≤ δmax,k; the damage is recoverable when t* ≤ 1.
  3. Why self-only stalls. With 𝒩(k) = {k}, a fixed point needs ek = 0 or |δk| = δmax,k. Every member still overloaded at the end of a self-only run has used up its stroke.
  1. Why two hops suffice. The influence of an actuator decays geometrically, |Sjk|/|Skk| ≈ 0.53 × 0.36h (R² = 0.98), as entries of the inverse of a banded stiffness matrix do. The local direction stays a descent direction: cos(dh, −∇J) averages 0.64, 0.85, 0.93 for h = 1, 2, 3 and never drops below 0.74 at two hops.
  2. Brain level as a p-norm. Reweighting by (oj/omax)p−2 is gradient descent on Σojp, and (Σojp)1/p → max oj as p → ∞, which is what the linear programme minimises.
04 / Control law

Each member listens, weighs and corrects

A member hears the overload signals of the members in its mask, weights each by how strongly its own actuator moves that member's force, and takes the least-squares correction for what it hears. Self-only, neighbour and centralised control are the same law with a different mask.

Update of member k

  1. Overload signal of member j: ej = max(0, rj − r*), sent with its sign.
  2. Sum the signals heard from 𝒩h(k), weighted by Sjk.
  3. Divide by the squared sensitivities heard (a Jacobi-type scaling) and multiply by the gain γ.
  4. Clip at the actuator stroke and repeat.
δk ← clip( δk − γ · Σj∈𝒩(k) ej sgn(fj) Sjk/fa,j ⁄ Σj∈𝒩(k) (Sjk/fa,j)² )

Without neighbours, each overloaded member sheds load onto members that are shedding it back, and the group stalls above the limit.

Brain level (male CNS connectome)

The complete male fly connectome links the brain to the ventral nerve cord. In the truss, each member reports its overload upwards, one node broadcasts the worst overload back, and each signal is reweighted as ej = oj(oj/omax)p−2. Larger p steers the members towards the minimax optimum at a cost of two extra links per member.

Members around the damage

stress ratio of the members within two hops of the removed one: after the loss, after self-only control and after the selected mask
05 / Results

Self-only, neighbours or everyone

All four masks run on the same damaged truss with the same gain. The paper compares them with the best any controller could do (a linear programme); for the paper's damage cases that optimum is shown below.

Convergence

Summary

Communication radius sweep

final peak ratio and links per member for each radius, current case

Regime map of the paper cases

final peak ratio of every paper case (T1, T2, p = 2) against its LP optimum; grey band = marginal range; the current case is ringed in pink when it is a paper case

What the paper found

  1. If the best possible peak ratio (LP optimum) is below 0.9, every mask recovers, self-only control fastest and cheapest.
  2. In the marginal band 0.9 to 1.0, self-only control stalls (1.29 on T2) while 2-hop coupling reaches 1.01, equal to the centralised gradient, with 77% fewer links.
  3. Above 1.0 nothing can recover, but 2-hop still matches centralised control in reducing the overload.
  4. The price of locality is actuation: on T2, four to six times the centralised amount for 1-hop and two to three times for 2-hop in the hard cases.
  5. With the brain broadcast and p = 16, the mean gap to the optimum falls from 0.31 to 0.04 (1-hop) and from 0.09 to 0.03 (2-hop), with less actuation.
  6. Three further load cases on T2 (27 damage cases) give the same picture: with the brain broadcast the gap to the optimum is 0.04 (1-hop) and 0.03 (2-hop).

Neighbour coupling matters in a band of damage that is severe relative to the redundancy and margin of the structure.

Brain level: effect of p

final peak ratio of the selected mask for p = 2, 4, 8, 16 with the brain broadcast, current case; dotted line = LP optimum when known

Spatial truss T3 (338 members): plan view of each layer

Spatial truss T3 drawn as plan views of its three layers, after the loss, after one-hop control and the one-hop actuation

Columns are the top, middle and bottom layers seen from above (supports shaded at x = 0, load points as black squares, removed member crossed). Row (a): members above 0.9 of their limit after the loss, four of them just over 1.0. Row (b): after one-hop control every member is at or below the target 0.95. Row (c): the actuated members stay in the cluster around the removed one. On a structure this redundant every mask recovers, so neighbour coupling is not needed.

06 / Multi-hazard

Impact, then fire, then cooling: can the truss stop the cascade?

An impact removes the damaged member above, a fire then heats every member within 1.5 bays of it (EN 1993-1-2 strength, stiffness, buckling and thermal strain of S355 steel) and the zone cools back to 20 °C. After each control window a member in tension above fu/fy = 1.32 ruptures and a member in compression above its buckling capacity buckles, one at a time, so failures can cascade. Every controller runs the same law as above; “no control” keeps the actuators locked.

Run the sequence

500 °C
1.5
1.0
5
0.95
0.5
100%
uses the truss and damaged member chosen in 02

failed = members failed after the impact (and over the whole sequence); λ/λ0 = load factor the surviving truss can carry with the final actuator setting, relative to the intact truss.

Peak stress ratio through the sequence

transient peaks follow each temperature increment; a line that stops marks a collapse

Residual state

pink band = heated zone; black members with a ring have failed; cross = member lost in the impact

What the paper found (all cases)

  1. Without control the impact alone collapses up to all cases of a structure; member-level control arrests most cascades, on the space grid roof only when members listen two joints away.
  2. Under the fire, two-hop coupling raises the critical temperature over self-only control by 72 °C on average over 39 cases (up to 172 °C on one truss) and stays within 34 °C of centralised control. A nonlinear OpenSees model of the four planar systems, with tension rupture, reproduces 41 of 51 critical temperatures within 50 °C.
  3. Actuators cancel restrained thermal expansion; the strength loss of the heated zone sets the limit. The brain broadcast helps under fire only with a large heated zone or a lower target, because it leaves little margin for the next increment.
  4. Controlled survivors end with no failed member besides the removed one and keep 0.83 of the intact capacity.

Cascade without control, rerouting with two-hop control

T2 after impact and a 450 degree fire: failure cascade without control and stress states with two-hop control

T2, member 103 lost, 450 °C fire. (a) Without control 11 members fail at the impact (black) and leave a mechanism: the truss collapses. (b) Two-hop control holds the peak at 0.95 at 450 °C; circles mark actuated members. (c) After cooling: no failed member, residual capacity 0.83 of intact.

Against other strategies

Comparison of the two-hop law with ADMM, decentralised MPC, an online centralised LP and passive strengthening or fire protection

Recoverable cases of T1 and T2. An online centralised LP reaches about the same critical temperature as the two-hop law but fails once its computer is lost at the fire; ADMM and sequential decentralised MPC do no better with the same communication; 25 or 50 percent more steel stays below the controlled truss, and doubling the steel matches it but still loses 3 to 4 members, because restrained thermal forces grow with the stiffness. Only controllers that keep every member below its limit end with no failed member.

Standard fire, minutes of resistance

ISO 834 fire with cooling, protected steel temperatures, mean fire resistance of six structures and paired comparison of two-hop control

ISO 834 heating then cooling, protected members heated by EN 1993-1-2 with member-specific section factors, load ratio 0.6, 39 cases on five structures. Two-hop control gives a longer fire resistance than self-only control in 35 cases and a shorter one in none (39 minutes longer on average), keeps the truss free of further failures 1.6 to 3.6 times longer, and ties with centralised control in 36 of 39 cases.

Checked with a nonlinear model

OpenSees verification: restrained member with and without actuation, critical temperatures of the nonlinear model against the linear modelDeformed OpenSees model

OpenSees model of the four planar systems with corotational fibre elements, the EN 1993-1-2 law of hot steel, a bow of L/1000 and tension rupture (ruptured members are removed), the controller acting on it in closed loop. (a) One restrained member: the locked actuator lets the force build up until the member buckles; the retracting actuator keeps it at zero. (b, c) 41 of 51 critical temperatures agree within 50 °C, and the bridge collapses at the impact in both models. Control survives hotter fires than no control in 15 of 17 cases, but buckled members keep part of their load, so self-only control catches up with two-hop control. Bottom: deformed OpenSees model of T2 with member 103 lost; last converged states: no control collapses early in a 400 °C fire, self-only control at 500 °C, and two-hop control survives 500 °C with three buckled members.

Six structures

Bridge, space grid roof and braced frame with their mean critical fire temperature under each controller

Bridge B1, space grid roof R1 and braced frame F1 (top) and their mean critical fire temperature under each controller (bottom). On the roof, an uncontrolled impact collapses 10 of 12 cases and only controllers listening two joints away arrest every cascade; on the bridge every impact leaves a mechanism under any controller.

Nine parameters

Mean critical temperature of T2 against nine parameters

Mean critical temperature on T2 against each parameter. The load ratio in the fire, the fraction of actuated members, the response time and sensor noise govern the benefit; at load ratios of 0.5 to 0.7 uncontrolled trusses survive hotter fires but lose 8 to 21 members, two-hop controlled ones almost none.

07 / Code

The same law in Python

This page is a JavaScript port of the Python model used in the manuscript (numpy, scipy for the LP optimum). The full code, data and figure scripts are at github.com/cnnitipong/fly-to-structures.

def control(f_d, S, A, sigma_a, mask, steps=600, dmax=1.0,
            gain=0.2, target=0.95, active=None):
    fa = A * sigma_a; M = len(f_d); delta = np.zeros(M)
    act = np.ones(M, bool) if active is None else active
    Sm = S * mask                              # who listens to whom
    denom = ((Sm / fa[:, None])**2).sum(0) + 1e-12
    for t in range(steps):
        f = f_d + S @ delta                    # structure responds
        r = np.where(act, abs(f) / fa, 0.0)
        e = np.where(act, np.maximum(0, r - target)
                     * np.sign(f) / fa, 0.0)   # overload signals
        g = (e[:, None] * Sm).sum(0)           # what member k hears
        delta = np.clip(delta - gain * g / denom, -dmax, dmax)
    return delta

Cite

N. Praphaphankul and C. Khosakitchalert, Neighbour-coupled local control of damage-adaptive trusses inspired by fly leg coordination, submitted to Structures, 2026.

N. Praphaphankul and C. Khosakitchalert, Fly-inspired neighbour-coupled actuation arrests cascading failure of adaptive trusses under sequential impact and fire, submitted to Engineering Structures, 2026.

Built on NeuroMechFly v2 (Wang-Chen et al., Nature Methods 2024), the FlyWire connectome (Dorkenwald et al., Nature 2024) and Walknet (Cruse 1990; Schilling et al. 2013).

Charts could not load (Plotly CDN unreachable). The truss drawing and the numbers still work.