Skip to content
AI360XpertBeta

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.

The same steady push displaces a softer virtual spring farther.
The same steady push displaces a softer virtual spring farther.

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 mm on a horizontal frictionless rail, with position xx increasing to the right. Its reference xdx_d is fixed. Define displacement error e=x−xde=x-x_d, so positive error means the mass is to the right of its reference. Let uu be motor force and FextF_{ext} the environment's force on the mass, both positive rightward. Newton's law is mx¨=u+Fextm\ddot x=u+F_{ext}.

Choose the motor law u=−ke−de˙u=-ke-d\dot e, where k>0k>0 is stiffness in N/m and d>0d>0 damping in N s/m. Substitution gives

me¨+de˙+ke=Fext.m\ddot e+d\dot e+ke=F_{ext}.

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 m=2m=2 kg with reference xd=0x_d=0. Apply a constant Fext=12F_{ext}=12 N to the right. At equilibrium velocity and acceleration vanish, leaving ke∞=12ke_\infty=12, where e∞e_\infty is the settled displacement.

For k=200k=200 N/m, e∞=12/200=0.06e_\infty=12/200=0.06 m, or 6 cm. Motor force is −12-12 N; it balances the external +12+12 N. For k=400k=400 N/m, displacement is 0.030.03 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 200(0.06)=12200(0.06)=12 N and 400(0.06)=24400(0.06)=24 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 ωn=k/m\omega_n=\sqrt{k/m} in inverse seconds and damping ratio is ζ=d/(2mk)\zeta=d/(2\sqrt{mk}). With m=2m=2, k=200k=200 and d=40d=40, ωn=10\omega_n=10 s⁻¹ and ζ=1\zeta=1: critical damping. Starting at rest, the displacement under the step push is

e(t)=0.06[1−(1+10t)exp⁡(−10t)] m,t≥0.e(t)=0.06\left[1-(1+10t)\exp(-10t)\right]\ \mathrm m,\quad t\geq0.

At t=0.1t=0.1 s, displacement is approximately 0.0158540.015854 m; at 0.50.5 s it is 0.0575740.057574 m. Initial acceleration is 12/2=612/2=6 m/s². Damping changes the transient, while the constant-force equilibrium remains 6 cm. Keeping d=40d=40 while doubling kk makes ζ=1/2\zeta=1/\sqrt2, rather than preserving critical damping. To preserve it in the stiffer ideal system, choose d=22(400)≈56.5685d=2\sqrt{2(400)}\approx56.5685 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 ee, a virtual wrench can contain Fcmd=−Ke−De˙F_{cmd}=-Ke-D\dot e, with stiffness matrix KK and damping matrix DD. The Jacobian transpose maps the commanded wrench into joint torque. Estimated gravity support and other compensation terms may be added. A positive diagonal KK 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 e=x−xde=x-x_d, restoring force is −ke-ke. A convention using xd−xx_d-x 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.