Stefan Sczekalla-Waldschmidt wrote: > > Hi, > > Tjaart van der Walt wrote: > > > > 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. > > looks like a good Idea - BTW did you try to optimize your PID-paramters > according to Ziegler-Nichols ? I optimised them according to Tjaart-Experiment! The resetting of I compensates (among other things) for the digital nature of the calculations. Running 16 bit PID values in a PIC is not feasible, so I pulled a few tricks out of the hat. Another, is to only accumulate the I value every 10-50 (settable) samples. Effectively this divides the I term which is always much smaller than the P or D terms. -- 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 | |--------------------------------------------------|