Skip to content

docs: explain PID from scratch, and how to tune it by watching - #111

Merged
jimsynz merged 1 commit into
mainfrom
docs/understanding-pid
Sep 30, 2026
Merged

jimsynz merged 1 commit into
mainfrom
docs/understanding-pid

Conversation

@jimsynz

@jimsynz jimsynz commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

BB.PID.Kernel documents the control law well, including the two places it departs from the textbook form. What's missing is the layer underneath: what P, I and D actually do, and how to tell from a misbehaving machine which one to reach for.

Adds an Explanation page covering:

  • error, and the three terms from first principles
  • which subsets are worth using, and why PD-without-I is a deliberate choice rather than an oversight
  • the case where the stubborn error is in the setpoint rather than the output — so the integrator goes on the output and corrects the target, slowly, with a limit
  • a symptom-to-gain table, including why buzzing is a D problem and why rocking and twitching are the same family
  • the argument for binary-searching a gain rather than nudging it, and for declaring gains as BB parameters so you can

Reworked from the Goatmire 2026 balance bot workshop, with the robot-specific numbers left behind. Stops at the conceptual level and points at BB.PID.Kernel for the implementation.

Also adds the Explanation group to groups_for_extras, which the package didn't have.

Depends on beam-bots/bb#280 for the robotics-vocabulary link to resolve — it's an absolute hexdocs URL, so it'll 404 until bb next publishes.

`BB.PID.Kernel` documents the control law and the two places it departs
from the textbook form, but nothing here says what P, I and D actually
do, or how to tell from a misbehaving machine which one to reach for.

Adds an Explanation page covering the three terms, which subsets are
worth using and why, a symptom-to-gain table, and the argument for
binary-searching a gain rather than nudging it. Also covers the case
where the stubborn error is in the setpoint rather than the output, so
the integrator belongs on the output and corrects the target instead.

Reworked from the Goatmire 2026 balance bot workshop, with the
robot-specific numbers left behind.
@jimsynz
jimsynz force-pushed the docs/understanding-pid branch from 40fecaa to cf995cd Compare September 30, 2026 04:17
@jimsynz
jimsynz merged commit 6e7fa09 into main Sep 30, 2026
15 of 17 checks passed
@jimsynz
jimsynz deleted the docs/understanding-pid branch September 30, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant