(A) Drosophila larvae have segmented bodies. (B) An overview of the model for one segment. Only input neural and proprioceptive signals are shown to the neural controller, its output is not shown. Shades mark subsystems. Red lines show excitatory neural synapses, blue denotes inhibitory synapses. (C) The larva body is modeled as a linear chain of masses, connected by damped linear springs. Head and tail segments are coupled mechanically, denoted by the green line. Each segment feels friction due to contact with the substrate. Body segments are actuated with muscular forces, , that are excited by input from the larva VNC. VNC is modeled as a chain of excitatory, , and inhibitory, , neural populations. Self-coupling of populations are not shown. VNC gets proprioceptive input that signals contraction of a particular segment, shown by lines with arrows on both ends. (D) Segment-to-segment propagation of neural activity happens through neural () and proprioceptive () couplings. Detailed description and model equations are given in the Model section.