- remove HeatDiffusion
- use delay line for heat propagation modeling

[Temp Controller]
- remove Kalman
This commit is contained in:
2026-06-19 14:21:23 +02:00
parent 81e66dbcd1
commit 5c7cffa3a7
4 changed files with 84 additions and 49 deletions
+7 -14
View File
@@ -1,25 +1,18 @@
from components.pid import Kalman
from components.pid.temp_controller_base import TempControllerBase
class TempController(TempControllerBase):
def __init__(self, dt, params):
TempControllerBase.__init__(self, dt, params)
self.kalman = Kalman(dt, params['Kalman'])
def init_kalman(self, value):
self.kalman.initial((value, 0))
self.dt = dt
self.last_theta_ist = 20
self.heatrate_ist = 0
def process(self):
# Process Kalman
if self.use_kalman:
Z = self.kalman.process_measurement((self.theta_ist_set, 0), 0.0)
xp = self.kalman.process(Z)
self.theta_ist = xp[0, 0]
self.heatrate_ist = xp[1, 0] * 60
else:
self.theta_ist = self.theta_ist_set
self.heatrate_ist = self.heatrate_ist_set
self.theta_ist = self.theta_ist_set
heatrate = (self.theta_ist - self.last_theta_ist)/self.dt*60
self.heatrate_ist = heatrate
self.last_theta_ist = self.theta_ist
# Compensate for max heat rate to reduce overshoot
if self.heatrate_soll_set > 0: