Arduino PID Library

I hate to resurrect this old thread, but it is a good one, and the PID software looks really good.

Before finding this thread, I wrote my own. I was particularly interested to see how wind-up was handled. I saw that the Integral term was not incremented when the output was maxed.

This seems like a great idea, but doesn't it cause a bit of a glitch when the output drops down from max? Maybe the integral term is well below the value resulting in maximum output due to some other factor such as the differential.

Is this really going to make much of a glitch under these circumstances? I suspect that a "properly" tuned loop will not have such odd behaviour that the differential can push the output that far up/down.

I attempted to limit wind-up by not allowing the integral term to exceed the value that results in full output on its own. Is this not good enough?

-Tony