Inferensys

Glossary

Dynamic Movement Primitive (DMP)

A Dynamic Movement Primitive (DMP) is a mathematical framework for representing and generating smooth, goal-directed robot trajectories that can be easily adapted to new situations.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
ROBOTIC CONTROL

What is Dynamic Movement Primitive (DMP)?

A mathematical framework for generating and adapting smooth, goal-directed robot movements.

A Dynamic Movement Primitive (DMP) is a mathematical framework for representing and generating smooth, goal-directed robot trajectories that can be easily adapted to new situations. It models movement as a stable dynamical system, ensuring the trajectory converges to a specified goal. The core structure separates a canonical system that provides a phase variable from a transformation system that generates the actual motion pattern. This separation allows the shape of a learned motion to be preserved while its goal, timing, and spatial scaling can be modified independently.

DMPs are foundational in imitation learning and robotic skill acquisition. A movement is first learned from a single demonstration, often via regression on the forcing function of the transformation system. Once encoded, the trajectory can be robustly reproduced and adapted in real-time to new target positions, obstacles via potential fields, or altered temporal dynamics. This makes DMPs a critical component for dexterous manipulation tasks requiring flexible, reactive motion generation, bridging high-level planning and low-level motor control.

CORE ARCHITECTURE

Key Features of Dynamic Movement Primitives

Dynamic Movement Primitives (DMPs) are a mathematical framework for generating and adapting smooth, goal-directed robot trajectories. Their core features enable robust, reusable motor skills.

01

Canonical Dynamical System

The foundation of a DMP is a time-independent, stable canonical dynamical system, typically a second-order differential equation like a damped spring. This system provides a phase variable that monotonically drives the movement from start to finish, ensuring temporal consistency and stability regardless of execution speed or external perturbations.

  • Key Property: The phase variable replaces explicit time dependence, making the movement robust to temporal scaling and interruptions.
  • Mathematical Form: Often modeled as: ẋ = α(β(g - x) - ẋ)/τ, where τ is a temporal scaling factor.
02

Nonlinear Forcing Function

The shape of a specific movement is encoded in a nonlinear forcing function. This function is learned from a demonstration and superimposed onto the canonical system. It is typically represented as a weighted sum of radial basis functions (RBFs) centered along the phase variable.

  • Function: f(φ) = (Σ ψ_i(φ) w_i) / Σ ψ_i(φ) * φ, where ψ_i are basis functions and w_i are learned weights.
  • Role: This function sculpts the attractor dynamics of the canonical system to reproduce complex trajectory shapes, from simple reaches to rhythmic motions like waving.
03

Spatial and Temporal Scaling

DMPs provide explicit, closed-form equations for spatial and temporal scaling, allowing a single learned primitive to adapt to new goals and execution speeds without re-learning.

  • Spatial Scaling: The trajectory's amplitude and target (g) can be changed. The forcing function scales appropriately to preserve the movement's shape relative to the new start and goal positions.
  • Temporal Scaling: The execution speed is controlled by the parameter τ in the canonical system. Increasing τ slows the movement while preserving its dynamic profile.
  • Example: A DMP for a 10cm reach can be instantly adapted to perform a 50cm reach at half speed.
04

Obstacle Avoidance via Coupling Terms

DMPs can react to real-time sensory input through coupling terms. These terms modify the trajectory generation online by adding external forcing to the dynamical system equations, enabling reactive behaviors like obstacle avoidance without corrupting the underlying movement representation.

  • Mechanism: A coupling term C is added: ẍ = α(β(g - x) - ẋ)/τ + f(φ) + C(sensor_input).
  • Use Case: A repulsive vector field from an obstacle sensor can be used for C, causing the end-effector to deflect smoothly around the obstacle before converging back to the original goal.
05

Discrete vs. Rhythmic Formulations

The DMP framework has two primary formulations for different motion classes:

  • Discrete DMPs: Model point-to-point, finite-duration movements like reaching or placing. They use a critically damped spring canonical system that converges to a single goal state.
  • Rhythmic DMPs: Model periodic, continuous movements like walking, drumming, or cranking. They use a limit cycle oscillator (e.g., a modified Hopf oscillator) as the canonical system to generate stable oscillations.

This duality allows the same mathematical framework to encode a wide range of robotic skills.

06

Stability Guarantees

A critical feature of DMPs is their provable global asymptotic stability. The canonical system's dynamics ensure the trajectory will always converge to the goal g from any initial state, provided the forcing function vanishes at the end of the movement.

  • Engineering Benefit: This guarantees that the robot will not diverge to infinity or get stuck in spurious attractors, even if the learned forcing function is imperfect or external perturbations are applied mid-execution.
  • Contrast with Pure Playback: Unlike simply replaying a recorded trajectory, the DMP's stability property makes it robust to disturbances, allowing the robot to recover and still reach the goal.
COMPARISON

DMP vs. Other Trajectory Generation Methods

A technical comparison of Dynamic Movement Primitives against other common methods for generating robot motion trajectories, focusing on core features for dexterous manipulation.

Feature / MetricDynamic Movement Primitive (DMP)Spline InterpolationTrajectory OptimizationReinforcement Learning Policy

Mathematical Foundation

Nonlinear dynamical system with forcing function

Piecewise polynomial functions (e.g., cubic)

Numerical optimization (e.g., direct collocation)

Learned neural network mapping

Temporal Modulation

Spatial Scaling

Goal Adaptation

Real-Time Replanning

Handles Dynamic Constraints

Requires Explicit Via-Points

Computational Cost (Inference)

< 1 ms

< 1 ms

100 ms - 10 sec

1 - 10 ms

Training Data Requirement

1 - 10 demonstrations

Manual specification

Cost function definition

10^4 - 10^7 interactions

Stability Guarantees

Contact-Implicit Planning

Primary Use Case

Reproduction & adaptation of skills

Smooth point-to-point motion

Optimal, constraint-satisfying motion

Complex, adaptive behavior learning

DEXTEROUS MANIPULATION

Applications and Examples of DMPs

Dynamic Movement Primitives (DMPs) are a foundational framework for generating and adapting smooth robot trajectories. Their mathematical formulation makes them exceptionally versatile across robotics.

01

Learning from Demonstration (LfD)

DMPs are a core technique for Learning from Demonstration (LfD). A single human-guided trajectory is recorded and used to learn the parameters of the DMP's nonlinear forcing function. This allows the robot to:

  • Generalize the skill to new start or goal positions.
  • Reproduce the demonstrated motion profile with temporal and spatial consistency.
  • Scale the speed or amplitude of the movement while preserving its shape. This is fundamental for teaching complex manipulation skills like assembly or tool use without explicit programming.
02

Adaptive Pick-and-Place

In logistics and warehousing, DMPs enable robust pick-and-place operations. The canonical system provides a reliable baseline motion, while the forcing function encodes the specific lifting and placing dynamics.

  • Goal Adaptation: If a target bin's location changes, only the DMP's attractor goal parameter needs updating; the motion profile (acceleration, approach angle) remains intact.
  • Obstacle Avoidance: The trajectory can be modulated in real-time by adding coupling terms to the differential equations, allowing the arm to smoothly deviate around unexpected obstacles before converging to the goal.
  • Force-Sensitive Placement: For delicate items, the trajectory can be combined with impedance control at the endpoint.
03

Periodic Motions for Repetitive Tasks

The rhythmic DMP formulation is specifically designed for cyclic movements. Instead of converging to a single goal, it produces stable limit cycles.

  • Applications: Polishing, wiping, stirring, cranking, or walking gait cycles for legged robots.
  • The system learns the frequency and shape of the oscillation from demonstration.
  • Adaptation: The frequency, amplitude, and offset of the oscillation can be modified independently, allowing a stirring motion to adapt to a larger bowl or a wiping motion to cover a bigger surface without re-programming.
04

Dexterous In-Hand Manipulation

DMPs are used to coordinate the complex, contact-rich finger motions required for in-hand manipulation.

  • Finger Gaiting: A DMP can generate the trajectory for a finger to break contact, reposition, and re-establish contact during regrasping.
  • Object Reorientation: By sequencing DMPs for individual fingers or the wrist, an object can be rolled or pivoted within the hand.
  • The stability properties of the DMP's differential equations help ensure smooth force transitions, which is critical to prevent object slip.
05

Integration with High-Level Planners

DMPs act as a skill representation within hierarchical robot architectures.

  • A task and motion planner selects a sequence of high-level actions (e.g., grasp(bolt), insert(bolt, hole)).
  • Each action is parameterized by a corresponding DMP (or set of DMPs). The planner outputs the DMP parameters (start, goal, duration).
  • This decouples planning from low-level trajectory generation, making the system more modular and responsive. The DMP executes the smooth, goal-directed motion while the planner prepares the next skill.
06

Sim-to-Real Policy Transfer

DMPs are a key tool for bridging the sim-to-real gap in policy learning.

  • A policy can be trained in simulation using Reinforcement Learning (RL) or Imitation Learning to output DMP parameters rather than raw joint torques.
  • The DMP layer provides a structured action space that enforces smoothness and stability by design, which is more transferable than unstructured torque commands.
  • The policy learns which DMP to execute and how to parameterize it, while the DMP itself ensures physically plausible motions upon deployment in the real world.
DYNAMIC MOVEMENT PRIMITIVE (DMP)

Frequently Asked Questions

A Dynamic Movement Primitive (DMP) is a mathematical framework for representing and generating smooth, goal-directed robot trajectories that can be easily adapted to new situations. These FAQs address its core mechanics, applications, and relationship to other robotic control methods.

A Dynamic Movement Primitive (DMP) is a mathematical framework for representing and generating smooth, goal-directed robot trajectories that can be easily adapted to new situations. At its core, a DMP uses a set of nonlinear differential equations to encode a movement as a stable attractor system. This system consists of two main components: a canonical system, which is a simple phase variable that monotonically drives the movement from start to finish, and a transformation system, which generates the actual trajectory by combining a learned forcing function with a linear spring-damper system. The forcing function, typically represented by a set of radial basis functions, captures the shape of a demonstrated motion. The primary advantage of this formulation is temporal and spatial invariance; the same DMP can be sped up, slowed down, or have its goal and start point shifted without distorting the fundamental shape of the movement, making it exceptionally robust for robotic manipulation tasks.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.