From cc54887f9b52234d533f6fe408609c407ee3d314 Mon Sep 17 00:00:00 2001 From: jens Date: Tue, 22 Dec 2020 13:32:14 +0100 Subject: [PATCH] - TC: HOLD controller doesn't use Smith Predictor --- components/pid/temp_controller_smith.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/pid/temp_controller_smith.py b/components/pid/temp_controller_smith.py index 8fd8f43..b6f7eaa 100644 --- a/components/pid/temp_controller_smith.py +++ b/components/pid/temp_controller_smith.py @@ -74,7 +74,11 @@ class TempController(AttributeChange): self.theta_ist = theta_ist_plant self.heatrate_ist = heatrate_ist_plant - theta_err = self.theta_soll_set - (theta_ist_plant - self.theta_ist_delay_model.get() + theta_ist_model) + if 0: + theta_err = self.theta_soll_set - (theta_ist_plant - self.theta_ist_delay_model.get() + theta_ist_model) + else: + theta_err = self.theta_soll_set - theta_ist_plant + heatrate_err = self.heatrate_soll - (heatrate_ist_plant - self.dtheta_ist_delay_model.get() + heatrate_ist_model) # Process state