News for hackers. Stuff that matters.
Re:Show HN: 2D PID controller simulation by sjtrny on Saturday May 02, 2015 @08:16AM (#9476787)
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.

Re:Show HN: 2D PID controller simulation by sz4kerto on Saturday May 02, 2015 @11:33AM (#9477418)
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

Re:Show HN: 2D PID controller simulation by watmough on Saturday May 02, 2015 @08:18AM (#9476795)
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.