Gravity Compensation
- Also called: gravity balancing, zero-gravity mode
- Category: Control › Force & interaction control
- Tags: manipulator-control, robot-dynamics, feedforward, physical-interaction, hand-guiding
Canceling the effect of gravity on a robot, either by adding the model-predicted gravity torques to the joint commands or mechanically with counterweights or springs.
Definition
Gravity compensation means supplying the forces or torques needed to hold a robot's links, and any payload it carries, against gravity, so that the rest of the controller works with a system that behaves as if it were weightless. In software it uses the gravity term of the rigid-body dynamics, M(q)q̈ + C(q, q̇)q̇ + g(q) = τ: the controller computes g(q), the joint torques that gravity produces at the current configuration q, and adds them to its command. The gravity vector depends only on the configuration and on the masses and center-of-mass locations of the links, so it can be computed cheaply from a URDF-style model with the recursive Newton-Euler algorithm or similar methods.
Gravity compensation is a building block in many controllers. PD control plus gravity compensation, τ = Kp(q_d − q) − Kd q̇ + g(q), is a classic set-point regulator whose stability for rigid manipulators was shown by Takegaki and Arimoto in 1981. Impedance and operational-space controllers include the gravity term so that the commanded stiffness is not spent holding up the arm. When a controller outputs only g(q), the arm floats in place and can be pushed by hand, which is how many torque-controlled and collaborative arms implement hand-guiding and kinesthetic teaching. Without compensation, a compliant controller sags under the arm's own weight and a stiff one hides large steady-state torques in its error terms.
Mechanical gravity compensation does the same job passively. Counterweights, springs arranged to balance a link over its range of motion, and parallelogram linkages reduce the torque the motors must hold, which saves energy, allows smaller actuators and keeps working when power is lost. Software compensation is only as good as its model: errors in link masses, an unmodeled tool or cable bundle, or a payload that changes mid-task leave a residual that makes the arm drift up or down. Joint friction is a separate effect that gravity compensation does not remove, and in arms with high-ratio, non-backdrivable gearboxes friction can be large enough that a gravity-compensated arm still cannot be moved by hand without joint torque or wrist force sensing.
Why it matters
Almost every arm controller other than stiff position control needs gravity compensation, and it is the step that makes compliant control, safe physical interaction and hand-guiding practical. Its quality shows up immediately on hardware: a well-identified model lets an arm hold still at low gains, while a poor one produces drift that is easily mistaken for a control bug.
Key applications
- Hand-guiding and kinesthetic teaching on collaborative arms
- Impedance, admittance and operational-space control
- Haptic devices and teleoperation master arms that must feel weightless
- Exoskeletons and assistive devices that support the user's limbs
- Spring-balanced and counterweighted arms that hold position without power
- Payload estimation from residual joint torques
In practice
An engineer setting up a torque-controlled seven-joint arm for kinesthetic teaching starts from the vendor's URDF and adds the gripper and wrist camera as an extra rigid body with measured mass and center of mass. With the controller outputting only g(q), they move the arm to several poses and watch whether it holds position: a slow downward drift at the wrist points to an underestimated tool mass, and drift that changes direction with pose points to a wrong center-of-mass offset. They refine the parameters with a short identification run that records joint torques at many static poses and fits the mass and first-moment terms by least squares, since the gravity torques are linear in those parameters, and add friction compensation as a separate term. When the robot later picks up a heavy object, the controller updates its payload model so that the arm neither drops nor rises when the operator lets go.
Common misconceptions
- Gravity compensation makes the arm massless — it cancels only the static weight; the arm's inertia still resists acceleration, so it feels heavy when moved quickly
- Gravity compensation also removes friction — friction is a separate effect, and on geared arms it often dominates what the operator feels
- The vendor model is always enough — tools, cables and payloads change the masses, and uncorrected errors cause visible drift at low gains
- Gravity compensation is a controller in its own right — it is a feedforward term used inside many controllers; a gravity compensation mode is simply a controller with every other term set to zero
Who should know this
- Manipulator control engineers
- Collaborative robot integrators
- Haptics and exoskeleton designers
- Researchers in physical human-robot interaction
Related technologies
- Recursive Newton-Euler Algorithm
- Pinocchio
- Joint Torque Sensors
- Spring Counterbalance Mechanisms
- Friction Compensation
- Payload Identification