From 132081eeb1bb231a4d9303565018de6380f4592c Mon Sep 17 00:00:00 2001 From: jens Date: Mon, 11 Oct 2021 16:54:58 +0100 Subject: [PATCH] - added debig --- components/pid/temp_controller_smith.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) mode change 100644 => 100755 components/pid/temp_controller_smith.py diff --git a/components/pid/temp_controller_smith.py b/components/pid/temp_controller_smith.py old mode 100644 new mode 100755 index 7f275c9..7dd0a23 --- a/components/pid/temp_controller_smith.py +++ b/components/pid/temp_controller_smith.py @@ -95,12 +95,17 @@ class TempController(APid): self.theta_ist = theta_ist_plant self.heatrate_ist = heatrate_ist_plant + theta_ist_model_delay = self.theta_ist_delay_model.get() + dtheta_ist_model_delay = self.dtheta_ist_delay_model.get() + print ("Model : T_ist={:2.2f}, dT_ist={:2.2f}".format(theta_ist_model, heatrate_ist_model)) + print ("Model*z-1: T_ist={:2.2f}, dT_ist={:2.2f}".format(theta_ist_model_delay, dtheta_ist_model_delay)) + print ("Plant : T_ist={:2.2f}, dT_ist={:2.2f}".format(theta_ist_plant, heatrate_ist_plant)) if 0: - theta_err = self.theta_soll_set - (theta_ist_plant - self.theta_ist_delay_model.get() + theta_ist_model) + theta_err = self.theta_soll_set - (theta_ist_plant - theta_ist_model_delay + 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) + heatrate_err = self.heatrate_soll - (heatrate_ist_plant - dtheta_ist_model_delay + heatrate_ist_model) diff = self.theta_soll_set - self.theta_ist self.process_fsm(diff)