Hacker News new | past | comments | ask | show | jobs | submit login
PID Theory Explained (2011) (ni.com)
80 points by striking on May 22, 2015 | hide | past | favorite | 14 comments



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... ) 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.


This was a pretty good article for helping to learn about PID. 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.


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...


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

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


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


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.


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.


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


You're using it every time you buy airline tickets. The vast majority of Dynamic Pricing algorithms are just PID algorithms that are designed to maintain sales rates such that the last ticket is sold at flight time.


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.


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.


The PID loop may even have potential in the development of wealth-backed currencies: https://github.com/pjkundert/ownercredit.

Imagine a currency that supports the creation of 'K' units of currency upon the presentation of any form of wealth with a market-determined price, and then uses a PID loop to automatically adjusts 'K' to guarantee no inflation or deflation.

Perhaps a path toward the removal of "Usury" as the foundation of the monetary system?

Experimenting with these concepts required a robust Python PID loop implementation, which was (surprisingly) difficult to find. A useful Python PID implementation is available in ownercredit.pid (get it with: pip install ownercredit).


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... . Make sure to checkout interactive part - it is pretty awesome!


MIT's OCW offering offers more on the subject of automatic control: http://ocw.mit.edu/courses/aeronautics-and-astronautics/16-0...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: