Contact Dynamics · Numerical Simulation
MATLAB Reimplementation of CANAL
Cascaded Newton-based Augmented Lagrangian for rigid-body contact simulation
Demo
Example rigid-contact simulation from my MATLAB reimplementation of the CANAL solver.
Overview
As part of my research experience in the Interactive and Networked Robotics Laboratory at Seoul National University, I studied numerical methods for rigid-body contact dynamics and implemented a MATLAB version of the Cascaded Newton-based Augmented Lagrangian (CANAL) contact solver.
The project focused on understanding the numerical structure of complementarity-based rigid-contact simulation by reproducing the core solver pipeline and validating it on simplified rigid-body contact scenarios.
Notation
Key Formulation
Signorini–Coulomb Contact NCP
Rigid frictional contact is modeled as a nonlinear complementarity problem (NCP). The normal condition enforces unilateral contact, while the tangential conditions capture sticking and Coulomb frictional sliding.
Multi-Contact Dynamics
Each simulation step couples the discretized rigid-body dynamics with the nonlinear contact constraints represented by the set \(S_c\).
Slack-Variable Formulation
CANAL introduces the slack variable \(z\) to separate the dynamics from the contact interface. This enables the contact problem to be treated within an augmented-Lagrangian framework.
Augmented-Lagrangian Update
The outer augmented-Lagrangian iteration updates the multiplier \(u\) according to the mismatch between the physical constraint velocity \(J\hat{v}\) and the slack variable \(z\).
Cascaded Newton Inner Solve
Within each augmented-Lagrangian iteration, CANAL solves a convexified surrogate contact problem using a Newton-based procedure. The cascaded construction avoids directly applying a standard semismooth Newton solver to the original non-convex contact residual.
What I Implemented
Contact Dynamics Formulation
Implemented discretized rigid-body dynamics together with unilateral and frictional contact constraints in MATLAB.
Contact Projection
Implemented contact impulse updates and friction-cone operations required to distinguish open, sticking, and sliding contact states.
Augmented-Lagrangian Iteration
Implemented the outer primal-dual iteration that gradually enforces consistency between system dynamics and the contact constraints.
Cascaded Newton Solver
Reproduced the cascaded Newton structure used to solve the inner surrogate problem, including Newton updates and line-search-based step selection.
Simulation Pipeline
Built the simulation loop from contact detection and constraint construction through solver execution and rigid-body state integration.
Numerical Validation
Tested the implementation on simplified rigid-contact scenarios to examine convergence, contact forces, and resulting object motion.
Solver Structure
Outcome
This project gave me hands-on experience translating a mathematical contact model into a working physics simulator. In particular, I gained experience with nonlinear complementarity problems, frictional contact modeling, augmented-Lagrangian optimization, Newton methods, and numerical debugging of rigid-body simulation.
The implementation was a technical reproduction and learning project based on the CANAL formulation rather than a new contact-solver contribution.
Reference
J. Lee, M. Lee, S. Park, J. Yun, and D. Lee, “Variations of Augmented Lagrangian for Robotic Multi-Contact Simulation.”
Reference Paper →