Drop model_params from base, enable Smith predictor delay correction
TempControllerBase no longer threads model_params through (only the Smith subclass needs it, for its own Pot model and Kalman filters). Enable the Smith predictor's actual delay-compensated error term (theta_err now uses theta_ist_plant - theta_ist_model_delay + theta_ist_model instead of the plain plant reading), which is the correction this controller is named for. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ from components.pid.tc_constants import States, THRESH_HOLD_IDLE, THRESH_HOLD_HE
|
||||
|
||||
|
||||
class TempControllerBase(APid):
|
||||
def __init__(self, dt, params, model_params=None):
|
||||
def __init__(self, dt, params):
|
||||
APid.__init__(self)
|
||||
self.pid_hold = Pid(dt)
|
||||
self.pid_rate = Pid(dt)
|
||||
@@ -17,7 +17,6 @@ class TempControllerBase(APid):
|
||||
self.theta_ist = 0
|
||||
self.heatrate_ist = 0
|
||||
self.params = params
|
||||
self.model_params = model_params
|
||||
self.y = -1
|
||||
self.state = States.INIT
|
||||
self.use_kalman = True
|
||||
|
||||
Reference in New Issue
Block a user