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.
- 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
If the goal is to teach about PID controllers, then the demo could use a graph showing the parameters through time.
- A program controls the ball only via two thrusters (x/y), force represented as orange bars
- Program's goal is to deliver the ball to a given point (last click position)
There is a link in the footer: https://en.wikipedia.org/wiki/PID_controller which explains what's a PID controller in this case.
There are limitations of PID and what it can and cant be used for. There are also other ways of controlling systems (like state feedback).
I might have made some errors in the above statements because I haven't done control theory in a long time, but any control theory course at a university would cover PID control.
In relation to what the post is about, it seems like they've tuned a PID control loop to perform PID error calculations based on where you click and where the circle currently is, then move the circle to that position with a force (/acceleration) determined by the controller.
I've got an intake valve at work that we're controlling with P-only control, It basically iterates based on incremental voltage being proportional to current error in valve position.
Just trying to brush up on my lingo.
While that's true, it's surprisingly effective and as a result is very widely used.
http://en.m.wikipedia.org/wiki/Linear-quadratic_regulator
Switching the output from 100% to -100% is another viable approach, known as bang-bang control, but it is not necessarily optimal
All this to say, did you ever consider writing a test sequence of various position and rate changes, and then analyze the actual vs commanded data offline to get an equation for the response? I've had some success doing that for a similar control problem.
Edit: Done.
Also, some friction would be nice.
Click x to the right of its standstill position. When it is halfway there click x below its current position.
git clone https://github.com/pjkundert/ownercredit.git
PYTHONPATH=$PWD python ./ownercredit/pid.py