# SysID 101 for Robot Algorithm Engineers

This note is intentionally short. It is meant to give RL, WBC, simulation, and planning engineers enough vocabulary to reason about real robot plants without turning everyone into a system identification specialist.

## 1. Plant, state, observation, and model

A **plant** is the real or simulated system being controlled. A generic state-space model is

\[
\dot x = f(x,u;\theta), \qquad y = h(x;\theta) + v.
\]

- `x`: internal state
- `u`: command or control input
- `y`: measured observation
- `theta`: unknown or uncertain parameters

The model may be physical, empirical, or simulator-native. SysID is the process of choosing a useful model class and fitting its unknown quantities from experiments.

## 2. Model structure versus parameters

These are different problems.

- **Model structure selection** asks whether the plant should be represented as ideal torque control, Coulomb friction, Stribeck friction, a flexible two-mass transmission, a delay system, etc.
- **Parameter estimation** asks for the best values inside a fixed structure.

If the structure is wrong, optimization produces the **best wrong model**. Parameters may compensate for missing physics.

Example: if the real actuator has gearbox compliance but the student model is rigid, extra armature, damping, or delay may reduce trajectory error without representing the true physical quantities.

## 3. Common actuator terms

| Term | Practical meaning |
|---|---|
| inertia | resistance to acceleration |
| reflected inertia | motor/rotor inertia mapped through the transmission |
| damping | velocity-dependent energy dissipation |
| friction | resistive torque; may be Coulomb, viscous, Stribeck, load dependent, etc. |
| stiction | static friction near zero motion |
| compliance | deformation under load; inverse of stiffness |
| backlash | dead zone or gear play during direction reversal |
| resonance | frequency where a dynamic mode is strongly amplified |
| saturation | current/torque/voltage/velocity limits |
| delay | command-to-response or measurement latency |
| bandwidth | frequency range over which the actuator tracks commands well |

## 4. Excitation and identifiability

A parameter cannot be recovered simply because it exists in the model. The experiment must make it observable in the data.

Examples:

- slow quasi-static motion reveals gravity and low-speed friction well but gives little information about inertia;
- high-acceleration motion helps reveal inertia;
- direction reversals help expose backlash and asymmetric friction;
- chirps and multisines expose frequency-dependent effects and resonance.

This is why SysID includes **experiment design**, not just optimization.

## 5. Train versus validation

Never judge a model only on the data used to fit it.

A practical split is:

- **fit set**: trajectories used by the optimizer;
- **validation set**: different trajectories, loads, frequencies, directions, temperatures, or voltages.

A model that fits the training trajectory but fails under a held-out condition is not yet a useful plant model.

## 6. Residuals are diagnostic signals

Let

\[
e(t)=y_{real}(t)-y_{model}(t).
\]

L0/L1 reports use the opposite sign, `model - observed`; check the definition
before interpreting a curve. These correlations suggest hypotheses that need
controlled experiments to distinguish. For example, velocity correlation can
also be caused by delay.

Residual structure often points to missing physics:

- residual correlated with velocity -> friction model issue;
- residual correlated with torque/load -> torque scale or load-dependent friction;
- residual concentrated in a frequency band -> missing resonance/flexible mode;
- residual changes with temperature -> thermal dependence;
- residual changes after direction reversal -> backlash/hysteresis;
- residual shifts with voltage -> actuator voltage/current limit effects.

## 7. Physical parameters versus effective simulator parameters

A fitted simulator parameter may be useful without being physically literal.

For example, a MuJoCo `armature` value found by whole-robot trajectory matching can behave like an **effective inertia term**. It should not automatically be reported as the measured rotor inertia unless independently validated.

## 8. Calibration, SysID, and domain randomization

- **Calibration** removes deterministic errors such as joint zero, direction, scale, and offsets.
- **SysID** estimates dynamic behavior.
- **Domain randomization** trains robustness around uncertainty.

A strong sim-to-real workflow often uses:

```text
calibrated hardware
  -> identified nominal model
  -> narrow uncertainty ranges
  -> robust policy/control
```

rather than using very wide randomization to hide an unmodeled plant.

## 9. A minimal engineering loop

1. Define the actuator/system boundary.
2. Choose a simple model class.
3. Design excitation that reveals the relevant dynamics.
4. Fit parameters.
5. Validate on held-out conditions.
6. Inspect residuals and frequency response.
7. Increase model complexity only when the evidence demands it.
8. Repeat at a larger subsystem level.
