Hacker News new | ask | show | jobs
by sjtrny 4068 days ago
Proportional-integral-derivative (PID) controller is a feedback loop algorithm for control. You give some desired goal (in this case is to reach a position) and it moves to that goal by iteratively attempting to minimise the error (in this case distance).

A real life example is the stabilisation of quadcopters ("drones" eugh I hate that word). Where instead of attempting to reach a location the target is to maintain a specific angle relative to the ground.

As always wikipedia is your friend http://en.wikipedia.org/wiki/PID_controller.

2 comments

In short, you're pushing the ball around, and the force you use depends on three things:

- how far the ball is from the target (P, proportional)

- how far the ball has been from the target over time (I, integrator), so if you are very far even after a long time you try to push harder

- how quickly is the ball approaching the target (D, derivator), i.e. if you're approaching quickly then you decrease the force, if you're approaching too slow then you increase the force

The article links the Wikipedia page: https://en.wikipedia.org/wiki/PID_controller

If the goal is to teach about PID controllers, then the demo could use a graph showing the parameters through time.