home-climate-control/dz

Propagate error signal further in process control pipeline

Closed this issue · 0 comments

Existing Behavior

Current implementation shortcuts an incoming error signal and emits a magic number of Double.NaN to downstream process control pipeline consumers to indicate an error condition.

Desired Behavior

Error signal is handled as such by all the downstream signal processors in process control pipeline.

Special Considerations

  • PID controller must correctly calculate output signal taking its integral and derivative components into account. Currently it may appear "stuck" (need to verify this assumption and correct it if it is so; this may have been the root cause of #320).
  • Need to decide whether the hysteresis controller should revert to its "safe state" (which should be introduced to begin with), or we need to let it propagate the error signal to downstream consumers and let them handle it (preferred approach).
  • Both hysteresis and PID controllers will emit an error signal with a value; status needs to be checked by downstream consumers.