Penalty-Based Contact Model
- Also called: spring-damper contact model, penalty method contact
- Category: Software & tooling › Simulation & twins
- Tags: contact, physics-simulation, differentiable-simulation, numerical-methods, dynamics
A contact model that lets bodies overlap slightly and pushes them apart with a spring-damper force proportional to penetration depth and penetration speed.
Definition
A penalty-based contact model treats contact as a stiff spring with damping. When two bodies overlap, the simulator measures the penetration depth along the contact normal and applies a repulsive force, typically k times the depth plus d times the rate of penetration, where k is a stiffness and d a damping coefficient. The force acts only while the bodies overlap and is clipped so contact never pulls the bodies together. Nonlinear variants exist; the Hunt–Crossley model, for example, makes the damping force grow with penetration depth to avoid the unphysical force jump at the moment of impact. Tangential friction is usually added as a regularized version of Coulomb friction.
The approach is attractive because it is simple and local: contact forces are explicit functions of the current state, so no global constraint problem has to be solved, and the forces are continuous in the state, which suits gradient-based optimization and differentiable simulation. The alternative family, hard or constraint-based contact, enforces non-penetration exactly through complementarity problems or constrained optimization, at the cost of more complex solvers and non-smooth behavior. Soft-constraint and hydroelastic models sit between the two.
The main difficulty is stiffness. A soft spring allows visible penetration and bouncy, spongy contact. A stiff spring keeps penetration small but makes the equations stiff, requiring very small time steps or implicit integration to remain stable, and produces large, rapidly changing forces. For differentiable simulation this also matters for gradients: stiff penalty contacts produce gradients that are very large near contact events, and their variance across rollouts grows as stiffness increases, which can make exact simulator gradients less useful for policy optimization than smoother estimates.
Why it matters
Contact is where robot simulation is hardest, and the choice of contact model controls how stable, fast, accurate and differentiable a simulator is. Penalty models are common in differentiable and research simulators, so understanding their stiffness trade-off explains many of the instabilities, penetrations and gradient problems engineers run into.
Key applications
- Differentiable physics simulators for control and design optimization
- Simulation of soft and deformable contact
- Legged locomotion simulation with compliant ground models
- Haptic rendering and virtual fixtures
- Simple custom simulators for prototyping and research
In practice
A researcher builds a simple differentiable simulator to optimize a pushing motion. Contacts between the pusher, the box and the table use a penalty model with a linear spring and damper along the normal and a smoothed Coulomb friction term. With low stiffness the box sinks visibly into the table and slides oddly; raising the stiffness fixes that but makes the simulation explode unless the time step is cut by an order of magnitude. Gradients of the final box position with respect to the push trajectory also become erratic. The researcher settles on a stiffness that keeps penetration to a fraction of a millimeter at the chosen time step, adds damping close to critical, and smooths the gradient estimates by averaging over several perturbed rollouts.
Common misconceptions
- Penetration means the model is broken — the spring needs some deflection to produce force, so small penetration is inherent and is tuned rather than eliminated
- Stiffer contact is always more accurate — higher stiffness requires smaller time steps, can destabilize the simulation and makes gradients higher in variance
- Penalty contact gives smooth gradients everywhere — the force is still switched on and off at the moment of contact, so gradients around contact events can be large or uninformative
Who should know this
- Physics simulation and engine developers
- Researchers working with differentiable simulation
- Locomotion and manipulation engineers who rely on simulation
- Haptics developers
Related technologies
- Hunt-Crossley Contact Model
- Kelvin-Voigt Model
- Linear Complementarity Problem
- Hydroelastic Contact
- Implicit Integration
Related terms
- Differentiable Simulation
- Coulomb Friction
- Contact mode
- Signed Distance Field
- Hybrid system
- Reduced Coordinates
Related projects
- Drake: MIT robotics toolbox for model-based dynamics, optimization, and control system design
- ProtoMotions: NVIDIA framework for training simulated digital humans and humanoid robots on GPUs
- PHC: Physics-based perpetual humanoid controller with fail-state recovery for real-time avatars
- SOFA Framework: Real-time physics simulation framework for medical simulation and soft tissue modeling
- DART: C++ physics engine for articulated rigid body dynamics and robotics simulation
- frax: JAX library for fast, differentiable robot kinematics, dynamics and inverse kinematics