-added anti windup

This commit is contained in:
jens
2020-12-11 15:17:52 +01:00
parent e5139c5695
commit 8d57299d83
2 changed files with 14 additions and 9 deletions
+4 -4
View File
@@ -75,7 +75,7 @@ class TempController(AttributeChange):
self.pid_rate.reset()
elif diff > -THRESH_IDLE_HOLD:
state_next = States.HOLD
self.pid_hold.reset()
self.pid_rate.reset()
elif self.state == States.HOLD:
if diff > THRESH_HEAT:
state_next = States.HEAT
@@ -109,14 +109,14 @@ if __name__ == '__main__':
"kp": 0.5,
"ki": 0.0,
"kd": 0.0,
"rho": 1.0
"kt": 0.0
},
"Heat": {
"dt": 1.0,
"kp": 0.1,
"ki": 0.01,
"kd": 0.0,
"rho": 1.0
"kt": 1.0
}
}
@@ -159,7 +159,7 @@ if __name__ == '__main__':
hold_counter = temp['Duration']
hold = False
ctrl.set_theta_soll(temp_soll)
ctrl.set_heatrate_soll(2.0)
ctrl.set_heatrate_soll(2.5)
while True:
if hold: