As of now, phosphor-pid-control only provides a PI loop. It's not technically a PID loop. However, thanks to feed-forward support, it gets the job done.
It might be nice to enhance the algorithms, to truly become a PID loop. Add support for including the Derivative in the loop calculations, and add whatever new parameters are necessary to the thermal zone configuration structure.
I'm not sufficiently well-versed in control theory to add such a feature myself. I'm documenting this as a feature request, though, because it regularly comes up in conversation.
Why do you think the derivative term important for thermal control? The derivative term is quite important in things like motion control, where the physical model has some amount of "momentum" that needs to be countered, and the loops are tuned for bidirectional stability, but in most server thermals, there isn't really generally any "momentum" that needs to be countered, and in general, most servers are tuned for unstable positive error feedback loops, and stable negative error feedback loops (because overheating is worse than overcooling).
I wouldn't' be against someone having a patch adding a D term, but I suspect it would only serve so that this question doesn't get asked so often, rather than making thermal loops more stable.
Implementation wise, it's not trivial to add, because the way our sensor loops work, there isn't a fixed sample rate, given that sensors can go unavailable at times, or have imprecise time between samples. The I term is pretty easy to calculate because it's just (time since last reading) (error) (I coefficient), but D is generally based on the sample rate, measuring the difference between subsequent, well spaced samples, so you'd have to invent in software some way to generate an analog for that.
So, here it is, as a feature request, if anybody who is really good at control theory wants to tackle it.
As of now, phosphor-pid-control only provides a PI loop. It's not technically a PID loop. However, thanks to feed-forward support, it gets the job done.
It might be nice to enhance the algorithms, to truly become a PID loop. Add support for including the Derivative in the loop calculations, and add whatever new parameters are necessary to the thermal zone configuration structure.
I'm not sufficiently well-versed in control theory to add such a feature myself. I'm documenting this as a feature request, though, because it regularly comes up in conversation.
Ed Tanous writes, on the Discord:
So, here it is, as a feature request, if anybody who is really good at control theory wants to tackle it.