- refactored dt

This commit is contained in:
jens
2020-12-22 10:26:56 +01:00
parent b5a0e6a7ac
commit d777a955a4
7 changed files with 29 additions and 29 deletions
+5 -6
View File
@@ -13,9 +13,8 @@ class States(Enum):
class TempController(AttributeChange):
def __init__(self, params):
def __init__(self, dt, params):
AttributeChange.__init__(self)
dt = params['dt']
self.pid_hold = Pid(dt)
self.pid_rate = Pid(dt)
self.theta_ist_set = 20
@@ -108,8 +107,9 @@ class TempController(AttributeChange):
if __name__ == '__main__':
dt = 1.0
tc_params = {
"dt": 1.0,
"Kalman": {
"var_P" : 1.0,
"var_Q" : 0.0001,
@@ -130,7 +130,6 @@ if __name__ == '__main__':
}
pot_params = {
"dt" : 1.0,
"theta" : 20,
"C" : 4190,
"M" : 20,
@@ -141,8 +140,8 @@ if __name__ == '__main__':
temp_ist = 0
temp_soll = 20
ctrl = TempController(tc_params)
plant = Pot(pot_params)
ctrl = TempController(dt, tc_params)
plant = Pot(dt, pot_params)
_temp_ist = np.empty(0)
_temp_soll = np.empty(0)
_y = np.empty(0)