Lawrence Lile wrote: > > Yes, I've done some PID controllers. There are a few basic questions: > > 1. Do you have on-off or proportional control of your Peltier junction? > 2. How fast can your system respond - tenths of seconds, seconds, or tens of > seconds? > 3. YUou might set your loop time - how often you measure, to be something > less than the amount of time your system can respond, but not too much less. > Way longer ansd the system gyrates wildly, way shorter and you'll be going > 100% one way and 100% the other way in no time. > > Here's a basic approach to PID: > > 1. Measure your input variable (temperature) and decide if it is too hot or > too cold (via the reflection technique) > > 2. Subtract your measured variable from your desired variable. Call this > DIFFERENCE > > 3. P = DIFFERENCE * Pconstant. Pconstant is the first critical thing > you'll have to tune in. Start by trying 1/4 to 1/10. > > 4. I = DIFFERENCE * Iconstant + OLD I keep a running tab of how far you > are from the setpoint. Start with a small number, 1/100. > > 5. D = (NEW DIFFERENCE - OLD DIFFERENCE) * Dconstant. Once again, Dconstant > should be small. Good advice. I have noticed another thing that can make your system much more immune to the low-frequency I-oscillations : Reset the I-value to zero whenever P=0. -- Friendly Regards /"\ \ / Tjaart van der Walt X ASCII RIBBON CAMPAIGN mailto:tjaart@wasp.co.za / \ AGAINST HTML MAIL |--------------------------------------------------| | Cellpoint Systems SA | | http://www.cellpt.com | |--------------------------------------------------| | http://www.wasp.co.za/~tjaart/index.html | |Voice: +27-(0)11-622-8686 Fax: +27-(0)11-622-8973| | WGS-84 : 26¡10.52'S 28¡06.19'E | |--------------------------------------------------|