#PID Controller

4 messages · Page 1 of 1 (latest)

craggy stag
#

Hello guys, I am trying to use this pid controller: https://www.github.com/soloam/ha-pid-controller

I’ve set the configuration to the values shown in the first image below.

My question is I have some doubts, I feel like the PID output is not correct at most of the time, or maybe it doesn’t update right away. I’m not sure if I misunderstand something about it maybe?

If you look at the second image, the state is: 199.93, but the setpoint is 23 and the room temp is 20.9 so shouldn’t the PID value be like this:

(23-20.9) * 33.33 + (23-20.9) * 0.01 + 0 = around 70?

What am I missing?

GitHub

PID Controller to Home Assistant. Contribute to soloam/ha-pid-controller development by creating an account on GitHub.

red galleon
#

P = proportional - this is the bit that gets multiplied by the difference between the set point and the value (the error)
I - integral - this is multiplied by the error over time, so if your set point has just changed from 20.9 (0 error) to 22, the I value would still basically be 0, but if it changed 2 hours ago, then it would be huge
D - differential - although it's currently set to 0 this takes into account how fast the error is changing, so if it's reducing by 1/s it'll be high (and normally negative, to reduce overshoot) vs 1/hr when it'll be basically 0

craggy stag
#

So the state value is correct you are saying

#

What about the sample_time?