omen-fan icon indicating copy to clipboard operation
omen-fan copied to clipboard

added boxcar averaging functionality

Open itsonlyaudio opened this issue 9 months ago • 0 comments

When running the original code, I often encountered one fluke temperature value sent the fans spinning like crazy, only to come back down really quickly. The time behaviour of the fan speed adaptation was much faster than the thermal mass of the system could absorb heat, so it appears instantaneous adaptation was too volatile.

Therefore I implemented a simple form of low-pass filtering where we simply average the last n temperature measurements, known as boxcar averaging. In the settings you can indicate how many temperature measurements are averaged. Together with the interval parameter, you can now express the temporal behaviour of the fan speed adaptation. The reaction speed to a step in temperature is now (interval * Nboxcar) so with the default values, the system now ramps up or down in 5 seconds. I've played with values as large as 30 seconds to really smooth out the fan speed modulation and it worked fine. The value of 5 I consider to be an absolutely safe value together with the default temp curve.

itsonlyaudio avatar May 21 '24 23:05 itsonlyaudio