Kp in Fahrenheit

Continuing the discussion from Brewblox release 2020/12/02:

@Bob_Steers the list of default settings for the various PIDs is very helpful.
I would love a sanity check here…
I live in a Fahrenheit world. For every Kp value listed in 1/*C, I need to divide that value by 1.8 to get the corresponding Kp value in 1/*F, right?

Also, I remember reading a post somewhere about how some fundamental math in the software remains *C.
If I have configured my software to *F units, then the Kp should be input in *F, right?

Thanks in advance.


Yes, with a single exception.

We convert all incoming temperatures to their Celsius values in the service before sending them to the controller.

There is one exception: the Setpoint Driver. Because it can target either a PWM (%) or a Setpoint (temp), the service is unable to convert its values.

This is relevant for only two input fields: the min/max constraints you can set on the Setpoint Driver.

Thank you for the info, sir.

So that exception…
If a Setpoint Driver is targeting a PWM, the min/max constraints values are interpreted as %?
If a Setpoint Driver is targeting a Setpoint, the min/max constraints values are interpreted as *C?

I struggled with that last scenario a while ago and gave up, thinking it was percentage and could not make heads or tails of the math.

Correct. The %/*C split is also relevant for PIDs controlling a Setpoint Driver.

The output from a PID always is a unitless number. When driving a PWM, this number becomes % ON time.

When driving a Setpoint Driver, the number is forwarded to the block driven by the Setpoint Driver.

  • If the driven block is a PWM, the number becomes % offset from reference.
  • If the driven block is a Setpoint, the number becomes *C offset from reference.

For example, if the reference Setpoint (usually MT Setpoint) has a value of 50*C, and the MT PID calculated an output of 10, then desired offset in the Setpoint Driver is 10.

If not constrained, the driven Setpoint (HLT Setpoint) setting will then be set to 50+10=60*C.

When using *F, this will show the following values in the UI:

  • MT Setpoint value = 122*F
  • PID output = 10
  • Setpoint Driver desired offset = 10
  • HLT Setpoint setting = 140*F

Constraints such as min/max come after the desired offset step.
If you have a max constraint of 5, and desired offset is 10, then constrained offset will be 5, and HLT Setpoint setting will be 50+5=55*C (131*F).

1 Like