Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added boxcar averaging functionality #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

itsonlyaudio
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant