HN Debrief

Proportional-Integral-Derivative (PID) controllers

  • Programming
  • Infrastructure
  • Hardware
  • Developer Tools
  • AI

The post was just the Wikipedia page for PID controllers, a classic control-system method that adjusts an output using three signals: present error, accumulated error over time, and how fast the error is changing. That sounds academic until you map it to concrete jobs people described here: keeping a flywheel speed steady under load, holding a GPU near a target temperature, smoothing autoscaling across message queues, or controlling BLDC motors. The recurring point was that PID survives because it hits a rare sweet spot. It is easy to implement, understandable enough to debug, and good enough for a huge range of physical and software systems.

If you ship systems that adapt to noisy real-world inputs, PID is still the default control tool worth understanding even outside traditional engineering. Use it first for simple, observable loops, but expect tuning pain and be ready to switch to other controllers when conditions change too much or stability guarantees really matter.

Discussion mood

Positive and pragmatic. People treated PID as a foundational tool that is elegant, widely useful, and fun to apply, while also being very clear that tuning is where the real work starts and that simpler variants or alternative controllers are often better fits than a textbook full PID.

Key insights

  1. 01

    Autoscaling with PID works surprisingly well

    Using PID for queue-driven autoscaling reframes control theory as an infrastructure problem, not just a robotics or hardware one. The useful part was not clever math. It was that PID let one team smooth scale decisions across thousands of clusters while storing very little state between polling cycles, which is exactly where hand-built threshold logic tends to thrash.

    If your scaling logic is mostly heuristics and cooldown timers, try modeling backlog or latency as an error signal and compare it against a PID-style controller. This is especially worth testing when you operate many similar queues and want less oscillation without more orchestration state.

      Attribution:
    • zbentley #1
  2. 02

    ADRC can beat PID on messy motor control

    For BLDC motor velocity control, ADRC was reported to hold up better under changing real-world conditions than a heavily tuned PID. The key nuance is that this was not a blanket replacement. PID still handled the predictable inner current loop, while position control only needed proportional control for now. That split is a good reminder that different layers of the same system can want different controller types.

    Do not assume one controller should run every loop in a stacked control system. Keep PID where the plant is predictable, but benchmark ADRC or other disturbance-tolerant methods on the outer loop if field conditions keep breaking your tuning.

      Attribution:
    • chrisb #1 #2
  3. 03

    Most control problems are easier than the theory suggests

    A controls practitioner made the strongest practical point in the whole conversation. PID often works because many systems are built to be easy to control in the first place. Large inertia, natural damping, stable default behavior, and fast digital feedback all widen the margin for sloppy tuning. That is why so many deployed controllers can be minimally tuned or even left near defaults without disaster.

    When deciding whether to fund a more advanced control design, first ask whether the plant is already forgiving. If the system is naturally stable and performance requirements are modest, spending weeks on optimal control may buy very little over a plain PI or PID loop.

      Attribution:
    • pinkmuffinere #1 #2
    • keithnz #1
  4. 04

    Fan curves and thermal control are different problems

    A fixed fan curve is only a rough proportional response to temperature. It does not account for how fast temperature is moving or how long the system has been off target. The practical consequence is noise. A good thermal controller should smooth short bursts, exploit the heat capacity of the cooler, and avoid constantly changing RPM because fluctuating sound is more annoying than a slightly higher steady speed.

    If you are tuning thermal management for a device people sit next to, optimize for acoustic stability as well as peak temperature. Add averaging or control logic that respects thermal inertia instead of mapping temperature directly to fan speed.

      Attribution:
    • sz4kerto #1
    • crote #1
  5. 05

    PID is old industrial craft, not software novelty

    Several comments grounded PID in its pre-software history. These controllers existed in pneumatic and analog form long before modern programming, with the integral and derivative terms historically called reset and rate. That context explains both why programmers find PID newly delightful and why control engineers find the fascination funny. The idea is deeper and older than most software people realize.

    If you are learning PID from software examples alone, spend a little time with classical control material too. It will give you better intuition for why these loops behave the way they do and why tuning language differs across industries.

      Attribution:
    • Animats #1
    • _kulang #1
    • fcatalan #1

Against the grain

  1. 01

    Neural nets are not the obvious successor

    The claim that small neural networks will replace most industrial PID loops did not survive contact with practitioners. The objection was not conservatism. It was engineering economics. PID offers stability guarantees, debuggability, low compute cost, and simple maintenance. A neural net gives up a lot of that before it solves a problem most plants do not actually have.

    Be skeptical when someone proposes machine learning for a control loop that a simple controller can already handle. Ask what concrete failure mode of PID it fixes, and what you lose in verification, debugging, and operations.

      Attribution:
    • glitchc #1
  2. 02

    Wikipedia links can still produce high-signal threads

    Complaints about posting a Wikipedia page missed the point. Introductory links are often just prompts that pull in working engineers, useful references, and war stories from people who would never submit a polished essay on the topic themselves. For readers outside the field, that can be more valuable than a denser primary source.

    Do not dismiss a basic explainer link if the topic is broad and the comments are likely to attract practitioners. For team learning, a simple shared entry point can produce better discussion than assigning the most advanced source first.

      Attribution:
    • boguscoder #1
    • nairboon #1
    • dang #1

In plain english

ADRC
Active Disturbance Rejection Control, a control method designed to estimate and counteract disturbances and modeling errors while controlling a system.
BLDC
Brushless Direct Current, a type of electric motor commonly used in drones, robots, and fans.
LQR
Linear Quadratic Regulator, a control method that computes an optimal feedback law to balance performance and control effort.
PD
Proportional-Derivative, a simplified controller that uses only the proportional and derivative parts of PID.
PI
Proportional-Integral, a simplified controller that uses only the proportional and integral parts of PID.
PID
Proportional-Integral-Derivative, a feedback control method that adjusts an output based on current error, accumulated past error, and the rate at which the error is changing.
RPM
Revolutions Per Minute, a measure of how fast something is rotating.

Reference links

Practical PID guides

  • PID Without a PhD
    A practical introductory guide offered as the go-to reference for learning PID without heavy theory.
  • Pneumatic PID Controllers
    Shows the pre-digital industrial history of PID using pneumatic hardware.

Related control methods and tuning

Teaching and demonstration resources