integral windup limit
This commit is contained in:
parent
be7060bc16
commit
d1ee6baccf
1 changed files with 5 additions and 0 deletions
|
@ -125,6 +125,11 @@ protected:
|
|||
|
||||
sumError += error;
|
||||
|
||||
float maxSumError = maxEffort/Ki;
|
||||
|
||||
sumError = max(sumError, -maxSumError);
|
||||
sumError = min(sumError, maxSumError);
|
||||
|
||||
float errorDiff = error - prevError;
|
||||
|
||||
prevError = error;
|
||||
|
|
Loading…
Reference in a new issue