Skip to content

pid/terms

A scenario of the PID controller, from tools/trace/scenarios/pid/terms.hpp.

✓ pass

  • The clang run (clang 18.1 optimized) matches the committed trace.
  • The gcc run (gcc 13.3 optimized) matches the committed trace.

Shown on

These players show the same trace, with panels chosen to explain it:

Every channel

pid/terms: every channel 1× real time
height [m] [0] [1] [2]
command [m/s²] [0] [1] [2]
integral [m/s²] integral
t = 0.000 s / 10.000 s

Keys (with the player focused): Space play/pause · ← → one sample (Shift: ten) · Home/End · [ ] speed

10 s of the control/pid scenario terms.hpp, 501 samples every 0.02 s. The panels plot every channel that changes: height, command, integral. 1 events are marked. Pass criteria: BB-V1 pd_height_error_vs_closed_form_offset <= 0.001 m; BB-T1 pid_steady_state_error <= 0.001 m.

  1. setpoint 1 m; the vehicle is 3 m/s² heavier than the controller believes
  • ✓ passBB-V1 pd_height_error_vs_closed_form_offset = 1.22e-14 m (<= 0.001), computed by the scenario harness
  • ✓ passBB-T1 pid_steady_state_error = 2.22e-4 m (<= 0.001), computed by the scenario harness

Constant over the run

  • setpoint = 1 m
  • pd_offset_prediction = 0.8125 m
  • weight_offset = 3 m/s²

All scenarios