m-lundberg / simple-pid

A simple and easy to use PID controller in Python
MIT License
799 stars 217 forks source link

add separate windup limits #16

Closed aseelye closed 4 years ago

aseelye commented 4 years ago

One's carried integral value doesn't necessarily need to limit at the output value, but rather could be higher or lower. Separating these from one another can allow for quicker convergence to the set point.

aseelye commented 4 years ago

Answered most of this in the other PR. I'll have to play with the math to see the differences. I know the separation led to a lot easier understanding on my side, and tuning was much easier as well.

aseelye commented 4 years ago

Agreed on the other PR being closed. Doing some modeling in my head yesterday, I still think separate windup limits are important, but if you don't like the complexity, I'm perfectly fine with my fork.

m-lundberg commented 4 years ago

Hello,

Sorry for the slow response, I've been quite busy. I will hold off on merging this PR for now since I need to think through a bit more how I want to do this.

m-lundberg commented 4 years ago

Sorry for the delay. I have thought about this a bit and decided not to include separate windup limits at this time since I feel it would make the API too complex. I've also seen that Simulink for example uses the output limits to clamp the integral, not to mention the Arduino PID library that this library was inspired by. I hope you are fine with this decision.