PidIndustrial does not limit iTerm fix #1599
This commit is contained in:
parent
84ebfe301a
commit
7735758ec5
|
@ -269,8 +269,7 @@ float PidIndustrial::getOutput(float target, float input, float dTime) {
|
|||
// (error - previousError) = (target-input) - (target-prevousInput) = -(input - prevousInput)
|
||||
dTerm = dTerm * ad + (error - previousError) * bd;
|
||||
|
||||
// update the I-term
|
||||
iTerm += parameters->iFactor * dTime * error;
|
||||
updateITerm(parameters->iFactor * dTime * error);
|
||||
|
||||
// calculate output and apply the limits
|
||||
float output = pTerm + iTerm + dTerm + getOffset();
|
||||
|
|
|
@ -73,8 +73,6 @@ public:
|
|||
float iTermMax = 1000000.0;
|
||||
protected:
|
||||
pid_s *parameters;
|
||||
|
||||
private:
|
||||
virtual void updateITerm(float value);
|
||||
};
|
||||
|
||||
|
|
|
@ -101,8 +101,7 @@ TEST(util, industrialPidLimits) {
|
|||
commonPidTestParameters(&pidS);
|
||||
|
||||
PidIndustrial pid(&pidS);
|
||||
// todo: #1599
|
||||
// commonPidTest(&pid);
|
||||
commonPidTest(&pid);
|
||||
}
|
||||
|
||||
TEST(util, pidIndustrial) {
|
||||
|
|
Loading…
Reference in New Issue