Interview questions / Robotics (State Estimation)

Robotics (State Estimation) interview questions

These are questions Robotics (State Estimation) candidates often hear, with a short note on what a strong answer covers. Reading them helps; saying your answers out loud helps more.

  1. Derive the Kalman filter predict and update equations. When is it optimal?

    Predict: x̂⁻ = F x̂ + B u, P⁻ = F P Fᵀ + Q. Update: K = P⁻Hᵀ(H P⁻ Hᵀ + R)⁻¹, x̂ = x̂⁻ + K(z − H x̂⁻), P = (I − K H) P⁻. It is the minimum-mean-square-error estimator for linear models with Gaussian, white, uncorrelated noise; otherwise it is the best linear unbiased estimator.

  2. Explain the Kalman gain without equations.

    It weighs prediction against measurement by their uncertainty. As R → 0 you trust the sensor (K → H⁻¹ in the scalar case); as P⁻ → 0 you trust the model (K → 0).

  3. How does the EKF differ from the KF, and when does it break?

    It propagates the nonlinear model and linearises with Jacobians at the current estimate. It breaks with strong nonlinearity, a poor initial guess or large uncertainty, and tends to become overconfident (inconsistent). Mention the iterated EKF and UKF as fixes.

  4. EKF, UKF or particle filter: how do you choose?

    UKF: sigma points capture mean and covariance to second order with no Jacobians, at similar O(n³) cost. Particle filter: handles multimodal, non-Gaussian beliefs (e.g. global localisation) but needs particles that grow fast with state dimension; watch degeneracy, track effective sample size and use systematic resampling.

  5. How do you tune Q and R?

    R from sensor specs or the variance of static logs (Allan variance for IMUs). Q from how wrong the motion model is per step. Then check consistency: innovations should be zero-mean and white, and NIS should sit inside chi-square bounds.

  6. How can you tell a filter is working without ground truth?

    Look at the innovation sequence: zero mean, white, NIS within chi-square bounds for its degrees of freedom. Watch for covariance collapsing or growing without bound. With ground truth, use NEES.

  7. Design a filter that fuses IMU, wheel odometry and GPS for a ground robot.

    State: position, velocity, orientation, IMU biases. The IMU drives prediction at high rate; wheel odometry and GPS are updates. Handle frames (ENU vs body), GPS antenna lever arm, GPS latency, and gate wheel-odometry updates during slip.

  8. What is an error-state (indirect) Kalman filter and why use it for attitude?

    Track a nominal state with the full nonlinear model and estimate a small error around it. Attitude error is a minimal 3-vector, so you avoid the quaternion's unit-norm constraint and a singular 4×4 covariance; errors stay near zero so linearisation holds. Inject the error into the nominal state, then reset.

  9. Euler angles, quaternions or rotation matrices in a filter?

    Euler angles hit gimbal lock. Quaternions are compact and smooth but have 4 parameters for 3 DOF, so normalise and keep the covariance 3×3 in an error-state form. Rotation matrices are 9 parameters with orthogonality constraints. Mention working on SO(3) with exp/log maps.

  10. Explain observability with a real example.

    Can the states be determined from the outputs over time? Examples: yaw is unobservable from IMU + GPS while stationary; gyro bias needs a heading reference; monocular visual-inertial odometry needs acceleration to recover scale, and global position and yaw stay unobservable (4 DOF).

  11. A measurement arrives 150 ms late. What do you do?

    Timestamp at the sensor, not on arrival. Options: keep a buffer of past states and covariances and re-propagate from the measurement time, or augment the state (stochastic cloning). Fix the root cause with time sync: hardware triggers or PTP.

  12. How do you reject outliers in a filter?

    Mahalanobis gating: compute the innovation and its covariance S, and reject if νᵀS⁻¹ν exceeds a chi-square threshold. In optimisation use robust losses (Huber, Cauchy); for feature matches use RANSAC.

  13. Filtering versus smoothing and factor graphs: what are the trade-offs?

    A filter marginalises the past and fixes linearisation points, which causes inconsistency. A factor graph (GTSAM, iSAM2) keeps more states, re-linearises and exploits sparsity, so it's more accurate and handles loop closures, at higher compute. A fixed-lag smoother sits in between.

  14. Describe an IMU error model and how you calibrate it.

    Bias (and bias random walk), white noise (angle/velocity random walk), scale factor, axis misalignment, temperature effects. Use Allan variance on a long static log for noise terms, static or turntable tests for scale and misalignment, and estimate bias online in the filter.

  15. Build a complementary filter for pitch from an accelerometer and gyro.

    High-pass the integrated gyro, low-pass the accelerometer tilt: θ = α(θ + ω·dt) + (1 − α)θ_acc, with α = τ/(τ + dt). The accelerometer only measures gravity when not accelerating. A Kalman filter is the time-varying, uncertainty-weighted version of the same idea.

  16. Why can P lose symmetry or positive-definiteness, and how do you prevent it?

    Floating-point error and the short (I − KH)P form with a suboptimal gain. Use the Joseph form P = (I − KH)P⁻(I − KH)ᵀ + K R Kᵀ, force symmetry, or use square-root or UD filters.

Try a free practice question · Create a free account

Practise Robotics (State Estimation) interview problems