jens and Claude Sonnet 4.6
1bf3929b60
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 >
2026-06-18 21:06:35 +02:00
jens and Claude Sonnet 4.6
78ee80f96d
Deduplicate TempController/TempController_smith into a shared base
...
Both controllers had nearly identical process_fsm(), process_pid(),
and all getters/setters; only Kalman/model setup and process()
genuinely differed, and the duplication had already drifted (the
Smith variant resets model state on entering HEAT, the plain one
didn't).
Add TempControllerBase with the shared logic and three small hooks
(init_kalman, on_state_entered, post_pid) subclasses use to plug in
their own Kalman/model behavior. Each subclass now contains only what
makes it different.
Also fixes a latent crash: TempController's constructor only accepted
(dt, params), but PidFactory/brewpi.py always call it with a third
model_params arg, so pid_type "Normal" would have raised TypeError.
The shared base's model_params=None default fixes this. Also
initializes the Smith controller's trace attributes in __init__
instead of leaving them undefined until the first process() call.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-18 20:50:01 +02:00
jens
879fa77ed3
- improved plot
2022-06-28 20:19:38 +02:00
jens
fd99c548e1
- improved tempsensor exception
2021-10-19 11:50:27 +02:00
jens
04d93e0f98
- improved tempsensor exception
2021-10-19 11:48:34 +02:00
jens
3a5278c6b5
- improved tempsensor exception
2021-10-19 11:43:47 +02:00
jens
a267e4004e
- improved tempsensor exception
2021-10-19 11:42:52 +02:00
jens
e07f9b4802
- preinitialize digits
2021-10-19 11:36:09 +02:00
jens
6e7f8c2c59
- removed AtemperatureSensor::process
...
- task is AttributeChange
- hareden against Tempsensor exceptions
2021-10-19 11:29:11 +02:00
jens
bd63f2648c
- refactored hendi_ctrl
...
- fixed hend_heater
- added workaround for typedDict and Python < v3.8
2021-10-19 06:32:45 +01:00
jens
b8ed02eb3a
- put calculated power from heater into tc model
2021-10-18 21:32:37 +02:00
jens
7f66084082
- removed debug log
2021-10-18 17:58:36 +02:00
jens
54f2322c07
- added generic tracer class
...
- create tracer for TC
- tracer task runs TC-Tracer
2021-10-18 17:57:40 +02:00
jens
9b997b8348
- generalized heaters
2021-10-18 14:32:56 +02:00
jens
4a26e84c6e
- TC export some vars
...
- cleaned up test
- added model vars to test
2021-10-13 18:29:33 +02:00
jens
e8fa90e753
- PID/TC goes Idle state on first theat_ist measurement
2021-10-12 17:13:19 +02:00
jens
bf7ec2beaf
- PID: introduced INIT State
...
- refactored
2021-10-12 16:47:05 +02:00
jens
55315e268e
- TempratureSensor: Sim ignores temp_offset
2021-10-12 16:36:53 +02:00
jens
7eb9d16f4d
- updatd constants
2021-10-12 16:19:21 +02:00
jens
3c010d7bfd
- updatd constants
2021-10-12 13:24:19 +02:00
jens
b4a6c70591
- init kalman_model_delay
2021-10-12 12:07:36 +02:00
jens
16cb3d3b3c
- use heat diffusion for water model instead of delay line
2021-10-12 12:01:40 +02:00
jens
89ac2b8ea8
- updated tc params for test
2021-10-12 10:20:55 +02:00
jens
425567f3db
- refactored
...
- increased Hold.Pid.kp
- decrease state change HEAT TO HOLD windows to 1°C
2021-10-12 09:11:07 +02:00
jens
ff90c6d90c
- added initial for filling Delay line
...
- added gain parameter for Pot sim
- from state change to heat init model temp with plant temp
- updated config template
2021-10-11 19:54:03 +02:00
jens
20b0363e26
- reset kalman on change to HEAT state
2021-10-11 19:04:32 +02:00
jens
9b20276012
- fixed setting model correct power in idle
2021-10-11 18:28:25 +02:00
jens
132081eeb1
- added debig
2021-10-11 16:54:58 +01:00
jens
c5c39732cf
- do data signal wiring at one central place
...
- fixed initializations
2021-10-11 13:05:18 +02:00
jens
80fa983c96
- fixed kalman test for different dt
2021-10-10 13:56:48 +02:00
jens
dce3caa1eb
- refactored
2021-10-09 12:27:36 +02:00
jens
f6394e9e7a
- refactored
2021-10-09 10:52:35 +02:00
jens
b83ec71346
- refactored
2021-10-09 10:07:45 +02:00
jens
5923212055
- refactored
2021-10-09 09:46:52 +02:00
jens
529ae7ad2f
- adjusted params for TC tests
2021-10-02 13:10:10 +02:00
jens
f085e74c53
- stirrer: removed status logs
2021-10-02 12:36:48 +02:00
jens
2e143ee03f
- implemented APid
...
- choose Tempcontroller impl. from config
2021-10-02 12:24:42 +02:00
jens
f7745f9814
- reactored
2021-10-02 11:05:07 +01:00
jens
a05e460f73
- refactored
2021-10-02 11:01:12 +01:00
jens
cf40a49af4
- changed import
...
- changed shebang
2021-10-02 10:12:54 +01:00
jens
bf019733b2
- added abstarct PID APid
...
- added PidFactory
- use variable args for factory
2021-10-02 11:10:43 +02:00
jens
0843f1d87a
- Pololu1376: take enums as variable id
...
- stirrerPololu1376: Make for robust against motor cable plug
2021-08-12 20:13:47 +01:00
jens
ebd5d4cd5e
- added dignostic vars
...
- make print_vars a method
2021-08-12 09:48:06 +02:00
jens
a95f5195d1
- made on-methods private
...
- added AStirrer::_on_process() for monitoring
2021-08-12 09:32:02 +02:00
jens
71b5ac848f
- refactored
2021-08-11 18:00:35 +02:00
jens
4cb8089c06
- fixed stirrerpololu1376.py
2021-08-11 17:59:07 +02:00
jens
6196f944c6
- use new Pololu driver
2021-08-11 17:49:37 +02:00
jens
a291c654c8
- formatted
2021-08-11 17:36:47 +02:00
jens
593b003cd9
- added separation line
2021-08-11 16:34:02 +01:00
jens
89112777e3
- fixed variable display
2021-08-11 16:24:42 +01:00