[brewpi]
- log data - log raw temp git-svn-id: http://moon:8086/svn/projects/HendiControl@240 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
@@ -25,6 +25,7 @@ class Controller():
|
||||
self.timer_ist = 0
|
||||
self.theta = 0
|
||||
self.heatrate = 0
|
||||
self.theta_raw_v = np.empty(0)
|
||||
self.theta_v = np.empty(0)
|
||||
self.theta_k_v = np.empty(0)
|
||||
self.heatrate_v = np.empty(0)
|
||||
@@ -160,10 +161,11 @@ class Controller():
|
||||
self.stirrer.process()
|
||||
self.plant.process()
|
||||
|
||||
theta = self.plant.getTemperature()
|
||||
theta_raw = self.plant.getTemperature()
|
||||
self.theta_raw_v = np.append(self.theta_raw_v, theta_raw)
|
||||
|
||||
# Process Kalman
|
||||
Z = self.kalman.process_measurement((theta, 0))
|
||||
Z = self.kalman.process_measurement((theta_raw, 0))
|
||||
xp = self.kalman.process(Z)
|
||||
theta_ist_k = xp[0, 0]
|
||||
dtheta_ist_k = xp[1, 0]
|
||||
@@ -171,7 +173,7 @@ class Controller():
|
||||
self.heatrate_k_v = np.append(self.heatrate_k_v, dtheta_ist_k * 60 / self.dt)
|
||||
|
||||
# Process conventional
|
||||
theta_ist = self.theta_sm.process(theta)
|
||||
theta_ist = self.theta_sm.process(theta_raw)
|
||||
dtheta_ist = self.heatrate_sm.process(theta_ist - self.theta)
|
||||
self.theta_v = np.append(self.theta_v, theta_ist)
|
||||
self.heatrate_v = np.append(self.heatrate_v, dtheta_ist * 60/self.dt)
|
||||
|
||||
Reference in New Issue
Block a user