Inferensys

Glossary

State Estimation

State estimation is the algorithmic process of fusing noisy, incomplete sensor data to compute a best-guess estimate of a dynamic system's internal state, such as a robot's position, orientation, velocity, and contact conditions.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
EMBODIED INTELLIGENCE SYSTEMS

What is State Estimation?

In legged and mobile robotics, state estimation is the critical process of fusing noisy, incomplete sensor data to compute a real-time, best-guess of the robot's physical state.

State estimation is the algorithmic process of determining the internal, time-varying state of a dynamic system from a sequence of noisy sensor measurements. For a legged robot, this state typically includes the base pose (position and orientation), linear and angular velocity, and the contact state of each foot with the ground. It is a fundamental sensor fusion problem, combining data from inertial measurement units (IMUs), joint encoders, and sometimes cameras or LiDAR to produce a coherent estimate where direct measurement is impossible.

High-performance locomotion relies on accurate, low-latency state estimates. Algorithms like the Kalman filter and its non-linear variants (e.g., Extended Kalman Filter) are core to this process, recursively predicting the state via a dynamic model and correcting it with incoming sensor data. This estimate feeds directly into balance control, motion planning, and whole-body control loops, enabling the robot to react to disturbances and traverse complex terrain. Poor estimation can lead to instability, making it a cornerstone of real-time robotic control systems.

LEGGED ROBOT LOCOMOTION

Core Components of a State Estimator

For a legged robot, state estimation is the real-time fusion of noisy sensor data to compute a best estimate of its base pose, velocity, and contact states. This is foundational for balance and locomotion in unstructured terrain.

01

Sensor Suite

A legged robot's state estimator ingests data from a suite of proprioceptive sensors. Key sensors include:

  • Inertial Measurement Unit (IMU): Provides body-frame angular velocity and linear acceleration.
  • Joint Encoders: Measure motor positions and, via differentiation, velocities.
  • Force/Torque Sensors: Located in the feet or joints to measure Ground Reaction Forces (GRF).
  • Joint Current Sensors: Provide an indirect measure of applied torque. This raw, asynchronous, and noisy data is the primary input for any estimation algorithm.
02

Kinematic & Dynamic Models

The estimator uses models of the robot's physical structure and motion to predict state evolution and interpret sensor data.

  • Kinematic Model: Defines the geometric relationship between joint angles and the pose of links (like the base and feet). It's used for forward kinematics to predict foot positions.
  • Dynamic Model: Describes how forces and torques cause motion. A floating base dynamics model is essential, as the robot's base is not fixed to the world. These models allow the estimator to predict how the state should change between measurements.
03

Contact State Detection

Determining which feet are in stable contact with the ground is critical. Misclassifying a swing foot as in stance introduces catastrophic error. Detection methods fuse:

  • Thresholded Force/Torque Readings: A direct measurement if available.
  • Expected Foot Velocity: From the kinematic model; a foot predicted to be moving but with near-zero measured velocity indicates contact.
  • Acceleration Consistency: Checking if IMU acceleration is consistent with the assumption of a stationary contact point. Accurate contact state is a prerequisite for correct pose and velocity estimation.
04

Estimation Algorithm Core

This is the mathematical engine that fuses sensor data with model predictions. For real-time robotics, two families dominate:

  • Kalman Filter Variants (EKF, UKF): Maintain a Gaussian belief over the state (mean and covariance). They perform a predict-update cycle: predict using the model, then update (correct) with the latest sensor data, weighting each by its estimated uncertainty.
  • Complementary Filter: A simpler, highly efficient filter that fuses high-frequency data (like gyroscopes for orientation) with low-frequency, drift-free data (like accelerometers for gravity direction). It's less optimal but computationally lightweight. The choice depends on required accuracy, model linearity, and available compute.
05

Observability & Drift Mitigation

Not all state variables can be directly inferred from sensors; some are unobservable. For example, a robot's global x-y position drifts without an external reference like GPS or vision (absolute positioning). Estimators manage this by:

  • Prioritizing Observable States: Focusing estimation bandwidth on velocity and orientation, which are more directly observable from IMU and kinematics.
  • Zero-Velocity Updates (ZUPTs): When a foot is detected to be stationary on the ground, its velocity is known to be zero. This observation is injected to correct drift in velocity and orientation.
  • Loop Closure: In systems with exteroceptive sensors (e.g., LiDAR, cameras), detecting a previously visited location provides a strong correction to eliminate accumulated position drift.
06

Output State Vector

The final, time-synchronized estimate produced at the control loop rate (typically 100-1000 Hz). For a legged robot, this minimally includes:

  • Base Pose: 3D position and 3D orientation (often as a quaternion) of the robot's trunk relative to a world frame.
  • Base Velocity: 3D linear and 3D angular velocity.
  • Contact States: Boolean flags for each foot.
  • Estimated Sensor Biases: Online calibration of IMU gyroscope and accelerometer biases. This state vector is the definitive input to the robot's balance controller and motion planner, closing the perception-action loop.
COMMON ALGORITHMS AND APPROACHES

State Estimation

State estimation is the algorithmic core that enables a robot to understand its own motion and orientation in the world by fusing noisy, incomplete sensor data into a coherent and accurate belief about its state.

State estimation is the process of determining the internal state of a dynamic system—such as a robot's position, orientation, velocity, and contact status—from a sequence of noisy sensor observations and a system model. For legged robots, this is a critical sensor fusion problem, combining data from inertial measurement units (IMUs), joint encoders, and sometimes cameras or LiDAR to compute a best estimate in real-time, despite sensor drift, impacts, and slippery terrain. Accurate state estimation is the foundational input for stable locomotion control and planning.

Common algorithms include the Kalman filter and its nonlinear variants like the Extended Kalman Filter (EKF) and Unscented Kalman Filter (UKF), which recursively predict the state using a dynamics model and correct it with incoming measurements. For complex, high-dimensional systems, factor graph-based approaches and optimization-based estimators (like those in simultaneous localization and mapping) provide greater accuracy by considering a history of measurements, but at increased computational cost. The choice of estimator balances latency, accuracy, and robustness to modeling errors.

STATE ESTIMATION

Primary Sensors and Data Inputs

For a legged robot, state estimation is the real-time process of fusing raw, noisy sensor data to compute a best estimate of the robot's physical state—its position, orientation, velocity, and contact conditions—which is the foundational input for all balance and locomotion controllers.

01

Inertial Measurement Unit (IMU)

The Inertial Measurement Unit (IMU) is the core proprioceptive sensor, providing high-frequency measurements of the robot's rotational and linear motion. It typically contains:

  • Gyroscopes: Measure angular velocity (ω) about the robot's body axes.
  • Accelerometers: Measure proper acceleration (a), which is the sum of kinematic acceleration and gravity.

An IMU provides fast, drift-free orientation changes via the gyro but suffers from long-term drift. The accelerometer gives an absolute gravity vector for tilt estimation but is corrupted by robot motion. Sensor fusion algorithms, like complementary filters or Kalman filters, are required to combine these signals into a stable orientation estimate (attitude).

02

Joint Encoders & Motor Current

Joint encoders (absolute or incremental) provide precise measurements of each joint's angle (position) and, by differentiation, its velocity. This kinematic data is crucial for:

  • Computing the robot's forward kinematics to estimate where its feet are relative to its body.
  • Performing leg odometry, which estimates base motion by assuming fixed foot contacts with the ground.

Motor current sensors measure the electrical current drawn by each joint actuator. This current is proportional to the motor's output torque, providing a direct measurement of joint torque. This is a key input for estimating external contact forces and for whole-body controllers that manage internal forces.

03

Force/Torque Sensors

Six-axis force/torque (F/T) sensors are often mounted in a robot's feet or between the leg linkage and the foot. They directly measure the three-dimensional Ground Reaction Force (GRF) vector and the moment (torque) acting at the foot.

These measurements are critical for:

  • Contact State Detection: Determining if a foot is in firm contact, slipping, or in the air.
  • Center of Pressure (CoP) Calculation: The point where the net GRF acts, fundamental for stability analysis.
  • Momentum Observers: Estimating external disturbances and the robot's centroidal momentum by comparing expected dynamics (from commanded torques) with measured reaction forces.
04

Leg Odometry & Kinematic-Inertial Fusion

Leg odometry is a velocity estimation technique that uses joint encoder data and a model of the robot's kinematics. When a foot is judged to be in stationary contact with the ground, the motion of the robot's base is inferred from the reverse motion of the leg joints.

The core challenge is that leg odometry is accurate only during perfect, non-slipping contact and accumulates error over time. Therefore, it is fused with IMU data in a kinematic-inertial estimator (often an Extended Kalman Filter). The IMU provides a high-frequency, short-term accurate velocity estimate that corrects for slip, while the leg odometry provides a low-drift position estimate during good contact, creating a robust velocity and position state.

05

Contact State Estimation

Accurate contact state estimation—knowing which feet are firmly on the ground, slipping, or in swing phase—is not a given; it must be inferred from sensor data. Incorrect contact assumptions are a primary source of state estimation failure.

Methods for detecting contact include:

  • Thresholding Force/Torque Sensor Data: A measured normal force above a threshold indicates contact.
  • Current-Based Detection: A spike in motor current when a foot touches down.
  • Kinematic Consistency Checks: Comparing the expected foot velocity (from leg kinematics) with a near-zero velocity assumption. A significant discrepancy suggests slip.
  • Model-Based Observers: Using the full-body dynamics model to predict contact forces and comparing them to measurements.
06

Exteroceptive Sensors (Vision, LiDAR)

While proprioceptive sensors (IMU, encoders) are primary for high-frequency state estimation, exteroceptive sensors like cameras and LiDAR provide absolute, drift-correction. They are used in a hierarchical or tightly-coupled manner:

  • Hierarchical Correction: A separate Visual-Inertial Odometry (VIO) or LiDAR-Inertial Odometry (LIO) module runs in parallel, providing a slow-updating, globally-referenced pose estimate. This is fused at a lower frequency to correct the drift in the proprioceptive estimator.
  • Tightly-Coupled Fusion: Visual features or LiDAR points are incorporated directly into the same filter as the IMU and joint data, providing a single, optimal estimate. This is more complex but robust.

For dynamic legged locomotion, exteroceptive data is often downweighted or used intermittently due to motion blur, high dynamics, and the critical need for low-latency estimates from proprioception.

STATE ESTIMATION

Frequently Asked Questions

State estimation is the core process that allows a legged robot to understand its own motion and orientation in the world by fusing noisy sensor data. These FAQs address the key concepts, algorithms, and challenges specific to estimating the state of a dynamic, multi-legged system.

State estimation for a legged robot is the real-time computational process of fusing data from proprioceptive sensors—like Inertial Measurement Units (IMUs), joint encoders, and force/torque sensors—to compute a best estimate of the robot's base pose (position and orientation), linear and angular velocity, and contact states with the ground. Unlike a car on fixed wheels, a legged robot's base is a floating base with six unactuated degrees of freedom, and its state changes abruptly with each impact and liftoff, making estimation uniquely challenging. The primary goal is to provide a consistent and accurate state vector to the robot's balance controller and motion planner, enabling stable locomotion over uneven terrain.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.