Robot Impedance Control: Yielding Under Contact
Instead of insisting on an exact position during a push, a robot can act like a chosen spring and damper. The push then changes its motion in a predictable way.
Why Does This Exist?
A tool reaches a tabletop slightly earlier than expected. A stiff position tracker keeps trying to remove the remaining position error, which can build a large contact force. Impedance control specifies how force, displacement and motion should relate, allowing the tool to yield under a push while tending toward a reference.
Stiffness measures the restoring force per displacement. Damping resists velocity. Inertia resists acceleration. Together they describe a dynamic response, rather than a single target force. Impedance control is useful when the environment's exact location is uncertain and controlled compliance helps interaction.
Feedback control introduces tracking error, but the command interface matters. A torque command can implement a restoring force law; a position-only interface needs a different construction. This page starts with an ideal force-controlled mass and then connects it to an arm.
Think of It Like This
A drawer attached to a spring and a dashpot
Push a drawer connected to a spring. It moves away from its resting position until the spring's pull balances your push. A softer spring lets it move farther. Add a dashpot, like a door closer, and the drawer resists rapid motion and settles with less oscillation. Its mass determines how quickly it initially accelerates.
The spring maps to virtual stiffness, the dashpot to damping and the drawer to effective inertia. The analogy stops at implementation: the robot may have no physical spring or dashpot. Sensors, computation and actuators must realize the chosen response, and their delays and limits can spoil it.
How It Actually Works
Start from force balance and fix the sign
Take a mass on a horizontal frictionless rail, with position increasing to the right. Its reference is fixed. Define displacement error , so positive error means the mass is to the right of its reference. Let be motor force and the environment's force on the mass, both positive rightward. Newton's law is .
Choose the motor law , where is stiffness in N/m and damping in N s/m. Substitution gives
This is a mass-spring-damper impedance. The chosen force response uses the actual mass in this simple controller; it doesn't arbitrarily replace the mass with a desired value. Shaping apparent inertia requires additional dynamics compensation. MIT's manipulator-control notes distinguish stiffness control from inverse-dynamics controllers that also shape inertia.
Work the same push against two stiffnesses
Use a synthetic mass kg with reference . Apply a constant N to the right. At equilibrium velocity and acceleration vanish, leaving , where is the settled displacement.
For N/m, m, or 6 cm. Motor force is N; it balances the external N. For N/m, displacement is m, or 3 cm, with the same final motor force. Stiffer tracking means a smaller displacement under the same imposed force, not a smaller external force.
The diagram uses the same position scale in both rows. The dashed vertical reference is the same zero position; the block centers move 60 and 30 drawing units from it. The equal rightward arrows mean equal applied forces. The coil drawings are symbols for virtual springs, not physical springs whose pitch determines their stiffness.
If instead a rigid surface constrains the mass to an offset of 6 cm, the two restoring forces are N and N. That is a different experiment: the first fixes force and measures displacement; the second fixes displacement and measures force. This distinction explains why reducing position error can increase contact load.
What does damping change?
For the ideal constant-coefficient scalar system, natural frequency is in inverse seconds and damping ratio is . With , and , s⁻¹ and : critical damping. Starting at rest, the displacement under the step push is
At s, displacement is approximately m; at s it is m. Initial acceleration is m/s². Damping changes the transient, while the constant-force equilibrium remains 6 cm. Keeping while doubling makes , rather than preserving critical damping. To preserve it in the stiffer ideal system, choose N s/m.
These results follow from the stated differential equation. They are not hardware gain recommendations: an arm's apparent inertia varies with posture and direction.
How does the force law reach an arm?
For translational Cartesian error vector , a virtual wrench can contain , with stiffness matrix and damping matrix . The Jacobian transpose maps the commanded wrench into joint torque. Estimated gravity support and other compensation terms may be added. A positive diagonal permits different stiffness along declared coordinate axes; changing the frame changes those directions. Rotational error needs an appropriate orientation representation, not subtraction of arbitrary rotation matrices.
The official libfranka Cartesian impedance example illustrates an error-based task torque, a Jacobian transpose and model terms. An example controller's assumptions are specific to its interface and supplied model; its numerical gains don't establish your robot's damping ratio. Full apparent-inertia shaping is a more demanding controller than merely adding a Cartesian spring.
Admittance control reverses the practical interface: a measured external force drives a virtual motion model, whose position or velocity reference is tracked by an inner loop. This can fit a stiff position-controlled robot, but inherits force-sensor bias, filtering and inner-loop tracking limits. Impedance and admittance describe related force-motion behavior, with different implementation requirements.
Where does the ideal response stop applying?
A constant reference and positive mass, damping and stiffness give a passive ideal spring-mass-damper: it stores or dissipates energy rather than creating it at the interaction port. A moving reference or varying stiffness can inject energy. Sampling, delay, torque filtering, inner loops and saturation also require separate analysis. The research on inner-loop effects and passivity examines why stable interaction depends on the implemented loop, not just positive gains.
Low stiffness doesn't cap impact force, and an actuator limit breaks the requested force law. If a command saturates, the observed robot no longer follows the equation used for the equilibrium calculation. Use impedance when yielding is part of the task; an accurate force setpoint or a verified protective function needs its own controller and evidence. See physical AI reliability.
Code
Check the equilibrium and the analytic critical-damping response by substituting displacement, velocity and acceleration back into the force balance.
from math import exp, sqrt
def critical_response(t: float) -> tuple[float, float, float]: mass, stiffness, force = 2.0, 200.0, 12.0 omega = sqrt(stiffness / mass) final = force / stiffness decay = exp(-omega * t) e = final * (1 - (1 + omega * t) * decay) v = final * omega**2 * t * decay a = final * omega**2 * (1 - omega * t) * decay return e, v, a
for t in (0.0, 0.1, 0.5, 1.0): e, v, a = critical_response(t) assert abs(2 * a + 40 * v + 200 * e - 12) < 1e-10assert 12 / 200 == 0.06assert 12 / 400 == 0.03print([round(critical_response(t)[0], 6) for t in (0.1, 0.5)])print(f"stiffer critical damping: {2 * sqrt(2 * 400):.4f} N s/m")Output: [0.015854, 0.057574] and stiffer critical damping: 56.5685 N s/m.
No contact impact or sampled controller is simulated here.
Watch Out For
The error sign turns the spring into a push away
After a positive displacement, commanded force also becomes positive. With , restoring force is . A convention using requires the opposite sign in the controller expression. Check a one-axis displaced state and verify that the restoring term opposes displacement before involving a full arm model.
Low stiffness is mistaken for a force limit
The robot yields under a slow push yet produces a large transient load during contact. Inertia, approach velocity, reference motion and actuator behavior still contribute. Measure the contact transient and active limits; don't infer a force ceiling or protective guarantee from a stiffness value.
The Quick Version
- Impedance control shapes a force-motion relationship instead of enforcing exact position under contact.
- Static deflection under a constant push is force divided by stiffness, when the stable unsaturated model applies.
- Damping and inertia govern the transient; damping doesn't change that static equilibrium.
- Cartesian force laws reach joint torques through a compatible Jacobian transpose and model compensation.
- Compliance, force regulation and protective safety functions need different evidence.