> 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. > > I used this trick for the PID controler I wrote a few months back. I don't understand what you mean when you say running 16 bit values is not feasable. Most the the variables I used were 16 bit integers. Admittedly I was using a 10bit ADC and DAC though. It seems to me that you can spend all the time in the world with Bode plots and pages of enormous calculations, but at the end of the day, you can't beat sitting down and tuning control loops by experimentation. Regards Mike Rigby-Jones