regulation framework
Objective: to have a generic regulation framework usable with all type of controller (temperature current, voltage, etc. )
The temperature framework provides 3 main objects:
- Input
- Output
- Control Loops
This is pretty generic, I think we should rename the temperature framework to something that indicates better to what it corresponds.
todo and related issues:
-
rename 'temperature' to 'regulation' - #715 (closed)
- #712 (closed) #576 (closed) #575
- #359 (closed)
NOTES about regulation (from discussion with Y.W.)
https://en.wikipedia.org/wiki/PID_controller
ramps are good to obtain a better regulation
take time to ask users wishes.
There must be a link between "setpoint set" and "set ramp rate"
- to avoid a bad rate (too high or too low)
- automatic correction or error ?
- error if ramp rate if not set at least once before setpoint set ?
Features to think about:
- regulation: PID or P or PI or ??
- +1 for #715 (closed) : make setpoints scanable
- timeout / callbacks
- failure treatment (what if setpoint cannot be reached ?) (can be done by hardware ?)
- output levels scales and offsets
- example: usually 0-10 but can be 4-20
- def with 4 parameters
- regulation loop soft or delegated to hardware.
- multi PID definition
- there can be 2 PID: one used when value is over the setpointm, the other used when under.
- ex: nanoDAC
usable for :
- temperature
- encoder
- BPM
- current
- voltage
- pressure
- humidity
- light
- magnetic field (gauss-meter?)
config: P I D Freq Delta
setpoint---> REGULATOR <------ probe---┑
| |
V |
controller---> ENVIRONMENT
Real cases of usage:
- ID16B : slow feedback BPM -> pico