Engineering Guides · Module 14
Balance basics: the zero moment point and the inverted pendulum
A walking robot is an inverted pendulum that must keep its pivot under, or ahead of, the centre of mass. Two numbers tell you how fast it falls and where to step.
Assumptions: Numbers in the examples are illustrative and the code is executed by the site’s tests. Facts taken from a cited source are marked; other statements are general engineering knowledge and must be confirmed on the datasheet of the part you use.
1. Engineering problem
A biped or quadruped stays upright only if its contact forces can balance the effect of gravity and inertia. The zero moment point (ZMP) says where the ground reaction acts; the linear inverted pendulum model (LIPM) says how quickly the centre of mass falls away from the pivot. Together they give simple balance tests and the idea of a capture point.
2. When is this needed?
- Starting to work with a humanoid or legged robot.
- Choosing foot size, centre-of-mass height and step timing.
- Reading the balance part of a locomotion paper.
3. Selection and design decisions
From the Wikipedia article (read 2026-11-06): the zero moment point is the point with respect to which the reaction forces at the contacts between the feet and the ground do not produce any moment in the horizontal direction, that is, where the sum of horizontal inertia and gravity forces is zero; the concept assumes a planar contact area with sufficient friction to avoid sliding; stability is quantified by the distance of the ZMP from the boundary of a predefined stability region; and the problem is compared with balancing an inverted pendulum. For a point mass at constant height zc above a pivot p, the linear inverted pendulum model gives x″ = (g/zc)(x − p): the centre of mass accelerates away from the pivot with natural frequency ω = √(g/zc). The capture point x + ẋ/ω is where the pivot must be so that the centre of mass comes to rest over it (derived from the model; the formula is not taken from the cited article).
| Quantity | Meaning | Design consequence |
|---|---|---|
| ZMP | Point where the horizontal moment of the contact forces is zero | Must stay inside the support region for flat-foot balance |
| Centre-of-mass height zc | Sets ω = √(g/zc) | Taller robots fall more slowly |
| Time constant 1/ω | How fast an error grows (e-folding time) | Sets the reaction time budget |
| Capture point | Where to put the pivot to stop falling | If it lies outside the support region, take a step |
| Support polygon | Convex hull of the contact points | Larger feet give more margin |
4. Advantages and disadvantages
- Flat-foot ZMP walking is simple and slow; dynamic walking (stepping to the capture point) is faster and needs fast state estimation.
- Lower centre of mass speeds the dynamics and increases the required control rate.
- Larger feet help balance and restrict terrain and add mass.
5. Requirements and constraints
- The model is a simplification: constant height, point mass, no angular momentum.
- State estimation (centre-of-mass position and velocity) is fast and accurate enough for the time constant.
- Actuator limits (ankle torque, step reach) bound what the model suggests.
6. Architecture
state estimator (CoM x, ẋ) ─▶ LIPM: ω, capture point ─▶ foot placement / ZMP reference ─▶ whole-body controller ─▶ joints7. Implementation
- Estimate the centre-of-mass position and velocity.
- Compute ω and the capture point (below).
- Compare the capture point with the support region.
- If outside, plan a step to it; if inside, regulate the ZMP.
- Check that the estimator and loop rates are fast compared with 1/ω.
import math
g, zc = 9.81, 0.9 # gravity and constant centre-of-mass height (linear inverted pendulum model)
w = math.sqrt(g / zc)
print(f"natural frequency w = sqrt(g/z_c) = {w:.2f} rad/s, time constant 1/w = {1 / w * 1000:.0f} ms")
def simulate(x, v, p, t_end, dt=0.001):
for _ in range(int(t_end / dt)): # x'' = w^2 (x - p): the centre of mass diverges from the pivot point p
a = w * w * (x - p); v += a * dt; x += v * dt
return x, v
x, v = 0.0, 0.3
print(f"standing still on a pivot at 0: after 0.5 s the CoM is at {simulate(x, v, 0.0, 0.5)[0]:.3f} m and moving at {simulate(x, v, 0.0, 0.5)[1]:.2f} m/s (it falls away)")
cp = x + v / w # capture point: where the pivot must be so the CoM comes to rest over it
print(f"capture point {cp * 100:.1f} cm ahead of the CoM; stepping there:", [round(c, 3) for c in simulate(x, v, cp, 1.0)])
print(f"with a 10 cm foot length the support region is about 0.10 m: a capture point outside the support region means the robot has to take a step")Printed (checked by the site’s tests):
natural frequency w = sqrt(g/z_c) = 3.30 rad/s, time constant 1/w = 303 ms
standing still on a pivot at 0: after 0.5 s the CoM is at 0.228 m and moving at 0.81 m/s (it falls away)
capture point 9.1 cm ahead of the CoM; stepping there: [0.085, 0.004]
with a 10 cm foot length the support region is about 0.10 m: a capture point outside the support region means the robot has to take a stepReading it: with the centre of mass 0.9 m high, ω = 3.30 rad/s (time constant 303 ms). A robot moving at 0.3 m/s over a fixed pivot falls away: after 0.5 s the centre of mass is 0.228 m ahead and moving at 0.81 m/s. The capture point is 9.1 cm ahead; placing the pivot there brings the centre of mass to rest (final velocity 0.004 m/s). With an illustrative 10 cm support region the 9.1 cm capture point is inside it. The model is idealised, and the numbers are illustrative.
8. Real examples
- Humanoid walking on flat ground: ZMP regulation inside the foot, with stepping when the capture point leaves the foot.
9. Failure scenarios
- Using a model for a robot whose centre-of-mass height changes a lot.
- State estimation too slow for a 300 ms time constant.
- Assuming the foot can hold a ZMP at its edge.
10. Troubleshooting
- Check the estimator rate and delay against 1/ω.
- Check that contact is flat with enough friction (the ZMP assumption).
- Plot the capture point against the support region during a fall.
11. Validation
- The simulation prints the lines shown (executed by the site tests).
- In simulation the robot recovers from pushes up to a stated size without stepping, and with stepping beyond it.
12. Engineering checklist
13. Further references
- Wikipedia, Zero moment point, read 2026-11-06 (secondary source; the original work is Vukobratović and Juričić, 1968, which was not read).
- This page is an introduction. The inverted-pendulum equations are standard mechanics; gait generators and balance controllers are research-level designs: read the literature and documentation of the controller you choose.