AnyLearn
All lessons
Roboticsadvanced

Feedback, Movement Primitives, and Modern Practice

Where the pure feedforward story breaks: sensory entrainment, dynamic movement primitives for non-rhythmic motion, how CPGs combine with reinforcement learning in current legged robots, and the exoskeleton applications.

Updated · AI-authored, review-gated · how lessons are made

Not signed in: your progress and quiz score won't be saved.
Progress1 / 8

Why open loop is not enough

A CPG running alone is feedforward: it produces a rhythm regardless of what is happening to the body. That is what makes it robust to noise, and it is also its limitation.

On flat ground, a fixed rhythm works. Off it, three failures appear.

Timing drifts out of phase with reality. The oscillator says to lift a foot, but that foot has not yet touched down because the ground was lower than expected. Continuing the rhythm regardless means stepping into air.

Disturbances are not sensed. A push, a slip, or a foot catching on an obstacle does not register, so the pattern continues into a fall.

Terrain cannot be exploited. Slopes, compliance, and irregular surfaces all call for adjustments the open loop cannot make.

Animals do not run open loop. Real locomotion is an interplay between central pattern generators and reflexes, which is precisely the question Ijspeert's robots are built to investigate: the relationship between feedforward and feedback control.

The engineering question is how to add feedback without destroying the properties that made the CPG attractive.

Full lesson text

All 8 steps on one page, for reading, reference, and search.

Show

1. Why open loop is not enough

A CPG running alone is feedforward: it produces a rhythm regardless of what is happening to the body. That is what makes it robust to noise, and it is also its limitation.

On flat ground, a fixed rhythm works. Off it, three failures appear.

Timing drifts out of phase with reality. The oscillator says to lift a foot, but that foot has not yet touched down because the ground was lower than expected. Continuing the rhythm regardless means stepping into air.

Disturbances are not sensed. A push, a slip, or a foot catching on an obstacle does not register, so the pattern continues into a fall.

Terrain cannot be exploited. Slopes, compliance, and irregular surfaces all call for adjustments the open loop cannot make.

Animals do not run open loop. Real locomotion is an interplay between central pattern generators and reflexes, which is precisely the question Ijspeert's robots are built to investigate: the relationship between feedforward and feedback control.

The engineering question is how to add feedback without destroying the properties that made the CPG attractive.

2. Entrainment

The answer is a concept from nonlinear dynamics, and it is what makes CPG feedback different from ordinary error correction.

Entrainment is the phenomenon where a periodic external signal pulls an oscillator into synchrony with it. A pendulum clock adjusts to a rhythmic push. Fireflies flash together. Your sleep cycle locks to daylight.

Applied to locomotion, sensory signals become a rhythmic input that adjusts the oscillator's phase rather than a command that replaces it.

Oscillator says: lift the left foot now
Ground contact sensor: left foot still loaded

Ordinary control: an error, drive it to zero
Entrainment:      the phase is early, slow it slightly

The difference in behaviour is substantial. The rhythm adapts its timing to the actual mechanics rather than fighting them. Step on a step that is lower than expected, and the stance phase simply extends until contact occurs, then the cycle continues.

Mechanically, feedback enters as an additional term in the phase equation, of the same form as the coupling between oscillators. Sensory input is treated as another oscillator to couple with, which is why it integrates so naturally: the machinery for synchronising to a neighbour already exists.

3. Dynamic movement primitives

CPGs handle rhythm. Much of what robots do is not rhythmic: reaching, grasping, throwing, striking. These are discrete movements with a start and an end.

Dynamic movement primitives, developed by Auke Ijspeert with Jun Nakanishi and Stefan Schaal, extend the dynamical systems approach to cover them, and they became widely used well beyond locomotion.

The construction is a spring-damper system pulling toward a goal, plus a learned forcing term that shapes the path taken to get there. A phase variable decays monotonically from one to zero and modulates the forcing, so the forcing vanishes as the movement completes.

The resulting properties are what made them popular.

Guaranteed convergence. Because the underlying system is a stable attractor toward the goal, the movement always terminates at the goal regardless of the learned shape.

Learn from one demonstration. Fit the forcing term to a single recorded trajectory, and the movement is captured.

Generalise by changing parameters. Move the goal and the whole trajectory adapts. Rescale time and the movement speeds up or slows down while keeping its shape.

Robust to perturbation. Push the system mid-movement and it continues to the goal rather than resuming a stale plan.

The same formulation covers rhythmic movement by replacing the decaying phase with a cyclic one, which is what unifies it with CPGs.

4. One family, two regimes

Both formulations encode movement as an attractor rather than a stored trajectory, and the phase variable is what distinguishes them. That shared structure is why the same design philosophy covers walking and reaching.

flowchart TD
  A["Encode movement as a dynamical system"] --> B["Cyclic phase variable"]
  A --> C["Decaying phase variable"]
  B --> D["Rhythmic: CPG for locomotion"]
  C --> E["Discrete: DMP for reaching and grasping"]
  D --> F["Attractor is a limit cycle"]
  E --> G["Attractor is a goal point"]
  F --> H["Disturbance returns to the orbit"]
  G --> I["Disturbance still converges to the goal"]

5. CPGs and reinforcement learning

The legged robots making headlines today are largely trained with reinforcement learning in simulation, then transferred to hardware. It is fair to ask whether CPGs have been superseded.

The more accurate picture is that the ideas increasingly combine, and the reason is instructive.

End-to-end reinforcement learning must discover rhythm from scratch. The policy has to learn, from reward alone, that locomotion is periodic and that limbs should maintain particular phase relationships. That is a large search problem, and it is a substantial part of why these methods need so much simulated experience.

Using a CPG as the action space changes the problem. Rather than outputting joint torques directly, the policy outputs CPG parameters: frequency, amplitudes, phase offsets. The rhythm is then structural rather than learned.

The benefits follow directly. The search space shrinks to a handful of meaningful parameters. Outputs are smooth by construction, since the oscillator cannot command a discontinuous jump. And behaviour degrades gracefully, because even a poor parameter choice yields a coordinated gait rather than flailing.

The cost is a ceiling on expressiveness: motions outside what the oscillator structure can express are unavailable, so highly dynamic or acrobatic behaviours may need the unconstrained action space.

6. Exoskeletons and rehabilitation

The application where this architecture has a distinctive advantage is not a robot walking alone but a machine walking with a person.

Exoskeletons and rehabilitation devices face a problem no autonomous robot has: the device and the human must move as one system, and the human is not a controllable subsystem.

CPGs suit this for reasons that follow from everything above.

Entrainment works in both directions. If the device's oscillator can be entrained by the user's motion, it synchronises with their intent rather than imposing a fixed cadence. The user leads and the device follows, which is the correct relationship for assistance.

Smooth output is a safety property. A device strapped to a person must never command an abrupt movement, and oscillator output is continuous by construction.

Few parameters are clinically interpretable. Frequency is cadence, amplitude is range of motion, phase bias is symmetry between limbs. A clinician can reason about these, which matters far more in a medical device than an opaque learned policy.

The rhythm is biologically appropriate. Gait rehabilitation aims to re-establish a patient's own locomotor pattern, and a controller built on the same principles as the neural circuits involved is a natural fit.

7. Choosing an architecture

Where each approach belongs, since the useful answer is layered rather than exclusive.

RequirementBest fit
Steady rhythmic locomotion, cheap hardwareCPG alone
Rough terrain, blindCPG with sensory entrainment
Precise foot placement on known terrainPlanning or MPC on top of a CPG
Discrete reaching or manipulationDynamic movement primitives
Behaviour hard to specify by handRL, optionally over CPG parameters
Human-coupled assistanceCPG, for entrainment and interpretability
Highly dynamic acrobaticsUnconstrained RL or trajectory optimisation

The layered picture used in practice puts a CPG or similar pattern generator at the bottom, running fast and close to the actuators; sensory feedback entraining it in the middle; and a planner, learned policy, or operator at the top, sending a few modulating parameters.

Two gotchas worth carrying.

Coupling strength gates feedback. Tune the oscillator network too rigidly and sensory entrainment stops working, silently removing the adaptation you added it for.

A CPG will happily walk into a wall. Rhythm generation contains no notion of where the robot is going. Obstacle avoidance, footstep selection, and goal-directed navigation are separate problems layered on top, and this architecture is not a complete locomotion system by itself.

8. What this path establishes

Four claims, and the principle underneath them.

Locomotion is not a planning problem. It is rhythmic, fast, unstable, and made discontinuous by contact, and biology solves it with spinal circuits that generate rhythm without the brain and without sensory input.

Coupled oscillators are enough. A network of phase oscillators with amplitude dynamics produces coordinated gaits, where a gait is nothing more than a set of phase biases, and the attracting limit cycle supplies disturbance rejection as a property of the dynamics.

A demonstration in hardware settled a biological question. The salamander robot showed that a body CPG plus limb oscillators plus a single scalar drive is sufficient to produce swimming, walking, and the transition between them, with gait switching emerging from oscillator saturation rather than any decision.

Feedback and modern methods compose with it. Sensory entrainment adapts the rhythm to real terrain, dynamic movement primitives extend the same formulation to discrete movements, and reinforcement learning over CPG parameters shrinks the search space while guaranteeing smooth coordinated output.

The principle worth taking away: build the right dynamical structure and the control problem becomes low-dimensional. Complexity lives in autonomous coupled dynamics; the interface exposes only what the layer above genuinely needs to decide.

Check your understanding

The lesson ends with a 5-question quiz. Take it in the player above to see your score.

  1. How does entrainment differ from ordinary error-correcting feedback?
    • It requires no sensors, using only internal state
    • It corrects position errors faster than a PID controller
    • Sensory signals adjust the oscillator's phase rather than being treated as an error to drive to zero
    • It replaces the oscillator's output with the sensed value
  2. What guarantees that a dynamic movement primitive reaches its goal?
    • The learned forcing term is constrained to end at the goal
    • The underlying system is a stable attractor toward the goal, and the forcing term vanishes as the phase decays
    • The trajectory is replanned whenever a disturbance is detected
    • The phase variable is reset when the goal is reached
  3. What is the main benefit of using a CPG as the action space for reinforcement learning?
    • It removes the need for simulation during training
    • It guarantees the learned policy is globally optimal
    • It allows training without any reward function
    • The rhythm becomes structural rather than learned, shrinking the search space and guaranteeing smooth coordinated output
  4. Why are CPGs particularly well suited to exoskeletons?
    • Entrainment lets the device synchronise with the user's intent, and its few parameters are clinically interpretable
    • They require no actuators to be attached to the limbs
    • They can predict the user's intended destination
    • They eliminate the need for safety limits on joint torque
  5. What can a CPG not do on its own?
    • Produce coordinated multi-limb gaits
    • Adapt its timing to unexpected ground contact
    • Goal-directed navigation and obstacle avoidance
    • Transition smoothly between different gaits

Related lessons