

PID Theory Explained (2011) - striking
http://www.ni.com/white-paper/3782/en/

======
YZF
A few tips for people using PIDs:

The best way (tm :-) to tune PIDs is by looking at the open loop response of
the system. This isn't terribly hard to measure in a live system but
unfortunately very few PID implementations actually support this. You can do
this with some commercial controllers. Once you do that (and assuming a close
to linear system) you can _see_ your stability margin and actually see the
impact of changing the loop parameters on those. (
[http://www.mathworks.com/help/slcontrol/ug/open-loop-
respons...](http://www.mathworks.com/help/slcontrol/ug/open-loop-response-of-
control-system-for-stability-margin-analysis.html) ) Without this it is very
difficult to figure out the limiting factor.

A lot of systems need additional filters over the PID. Expensive commercial
motion controllers implement those in their control loops. Without those
additional filters the performance you can get using PID in those systems will
be very limited.

Lastly feed-forward can really help closed loop systems. The closer you can
get the system to follow your command using feed-forward the less your closed
loop controller needs to deal with. The simplest example is acceleration feed-
forward in motion control.

------
n_plus_one
This was a pretty good article for helping to learn about PID.
[http://m.eet.com/media/1112634/f-wescot.pdf](http://m.eet.com/media/1112634/f-wescot.pdf)

It's about 15 years old, but still a pretty good intro to basic control
systems for people without a background in the field.

~~~
kqr2
If you like the article, the author Tim Wescott went on to write an entire
book on applied control theory for embedded systems:

[http://smile.amazon.com/Applied-Control-Embedded-Systems-
Tec...](http://smile.amazon.com/Applied-Control-Embedded-Systems-
Technology/dp/0750678399)

------
liyanage
I started reading the O'Reilly book "Feedback Control for Computer Systems" by
Philipp K. Janert about applying feedback control to software systems, and I
liked what I read so far a lot:
[http://shop.oreilly.com/product/0636920028970.do](http://shop.oreilly.com/product/0636920028970.do)

PID is in there, along with lots of other techniques.

~~~
gballan
There is an on-line example from the book (about feedback control of on-line
advertising) here: [http://toyproblem.github.io/ad-feedback-
control/](http://toyproblem.github.io/ad-feedback-control/)

------
kietdlam
I think this is a good introduction to PID for people who don't want to have
to dive into the nitty gritty. Linear feedback controls is a complex but
complete theory and it would take at least a semester at a university to
understand the theory behind time and frequency domain design and the effects
of discretization.

------
elliott34
The ideas of PID theory are really useful in a lot of operational/automation
contexts.

For example, if your business is using any sort of machine learning model to
govern a process, and you have some sort of idea of how you want this process
to run throughout the day, you can build a PID system to change the model
thresholds automatically to govern that plan.

An example might be any sort of retention/marketing strategy where you want to
reach out to customers based on some factors X, and have a certain
quota/capacity to do so during a day, and the expected number of customers
with the best factors X can change throughout the day/week or is just erratic.

~~~
sebastianavina
I have a master on automation & contorl, and never thought of using it outside
the industry

~~~
LukeShu
Last Fall my roommate was taking a class on computer networks, he ended up
inventing PID as a flow-control algorithm, though he didn't know to call it
PID.

~~~
TacoSundae
Oddly enough I too unknowingly implemented a PID controller without prior
exposure to the theory. I was trying to make a stable hovering platform using
only thrusters in Garry's Mod. I remember once I tweaked the parameters just
right it was amazingly responsive and stable. I only realized what I had
actually done years later.

------
hippich
I dealt with PID in my 3d printer and quadcopter. While researching what this
(PID) is, I also stumbled upon this page -
[http://www.gperco.com/2014/05/quadcopter-stability-and-
neura...](http://www.gperco.com/2014/05/quadcopter-stability-and-neural-
networks.html) . Make sure to checkout interactive part - it is pretty
awesome!

------
probdist
MIT's OCW offering offers more on the subject of automatic control:
[http://ocw.mit.edu/courses/aeronautics-and-
astronautics/16-0...](http://ocw.mit.edu/courses/aeronautics-and-
astronautics/16-06-principles-of-automatic-control-fall-2012/lecture-notes/)

