- refactored temp controllers
This commit is contained in:
@@ -169,7 +169,7 @@ if __name__ == '__main__':
|
||||
hold_counter -= 1
|
||||
ctrl.process()
|
||||
plant.process()
|
||||
temp_ist = plant.get_temperature_delayed() + 0.0 * np.random.randn()
|
||||
temp_ist = plant.get_temperature() + 0.0 * np.random.randn()
|
||||
ctrl.set_theta_ist(temp_ist)
|
||||
|
||||
y = 3500*ctrl.get_power()
|
||||
|
||||
@@ -52,7 +52,7 @@ class TempController(AttributeChange):
|
||||
|
||||
def process(self):
|
||||
# Process Kalman of Model
|
||||
Z_model = self.kalman_model.process_measurement((self.model.get_temperature(), 0), 0.0)
|
||||
Z_model = self.kalman_model.process_measurement((self.model.get_temperature_intermediate(), 0), 0.0)
|
||||
xp_model = self.kalman_model.process(Z_model)
|
||||
theta_ist_model = xp_model[0, 0]
|
||||
heatrate_ist_model = xp_model[1, 0] * 60
|
||||
@@ -195,7 +195,7 @@ if __name__ == '__main__':
|
||||
hold_counter -= 1
|
||||
ctrl.process()
|
||||
plant.process()
|
||||
temp_ist = plant.get_temperature_delayed()
|
||||
temp_ist = plant.get_temperature()
|
||||
ctrl.set_theta_ist(temp_ist)
|
||||
|
||||
y = 3500*ctrl.get_power()
|
||||
|
||||
Reference in New Issue
Block a user