PidIndustrial does not limit iTerm fix #1599

This commit is contained in:
rusefi 2020-07-11 15:30:40 -04:00
parent 2a45055289
commit 2b32bc8c16
3 changed files with 2 additions and 6 deletions

View File

@ -269,8 +269,7 @@ float PidIndustrial::getOutput(float target, float input, float dTime) {
// (error - previousError) = (target-input) - (target-prevousInput) = -(input - prevousInput) // (error - previousError) = (target-input) - (target-prevousInput) = -(input - prevousInput)
dTerm = dTerm * ad + (error - previousError) * bd; dTerm = dTerm * ad + (error - previousError) * bd;
// update the I-term updateITerm(parameters->iFactor * dTime * error);
iTerm += parameters->iFactor * dTime * error;
// calculate output and apply the limits // calculate output and apply the limits
float output = pTerm + iTerm + dTerm + getOffset(); float output = pTerm + iTerm + dTerm + getOffset();

View File

@ -73,8 +73,6 @@ public:
float iTermMax = 1000000.0; float iTermMax = 1000000.0;
protected: protected:
pid_s *parameters; pid_s *parameters;
private:
virtual void updateITerm(float value); virtual void updateITerm(float value);
}; };

View File

@ -101,8 +101,7 @@ TEST(util, industrialPidLimits) {
commonPidTestParameters(&pidS); commonPidTestParameters(&pidS);
PidIndustrial pid(&pidS); PidIndustrial pid(&pidS);
// todo: #1599 commonPidTest(&pid);
// commonPidTest(&pid);
} }
TEST(util, pidIndustrial) { TEST(util, pidIndustrial) {