>-----Original Message----- >From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] >Sent: 28 April 2006 20:07 >To: Microcontroller discussion list - Public. >Subject: [OT] PID source code > > >I'm hoping someone can shed some light on code I'm doing for work. > >We make temperature controllers, and I'm doing the code for a >new board. > >However, our "standard" PID code looks like nothing I've ever >seen before. > >I've googled for PID code, and haven't found anything that >looks like our algorithm. And, of course, I can't let someone >else see our "trade secret" code. > >The comments say that it's a "textbook PID algorithm" with >"rate and reset in seconds". But it never says which >textbook, and the original programmer (1994) is long gone... > >Can anyone point me to PID source code so that I could figure >out what is going on? Anything that looks like the standard: > error = value - set_value; > p = kp * error; > i += ki * error; > d = kd * (error - last_error); > pid = p + i + d; >need not apply. There are several variants on the classic PID, the above is the "parallel" algorithm. There is also a "series" and the "Ideal" http://www.expertune.com/artCE87.html should help you decide which one you have! Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist