Temperature_fan PID Tuning

I have only just setup my first temperature_fan instance and I am wondering what is the best method for PID tuning a temperature_fan? There doesn’t seem to be a way to use PID_CALIBRATE on a temperature_fan? Is there a way to change temperature_fan PID values while printing?

The only way I have found is to change the printer.cfg, save and restart, then start the temperature_fan controller again.

I’ve used a few examples I’ve found online but they make my fans spin up and down a lot at resting temperatures… I too would love some guidance on how to tune these pids…

In principle, the process characterisation method that I described for the heaters can be used to derive PID parameters for any control process, including fans:

Manual heater PID constant derivation by example - Configs - Klipper

The issue with using PID fan control is that the “process” must be deterministic and the fan must have the required authority to close loop on temperature. In other words, let’s say you are trying to cool a Raspberry PI and set your target temperature to 40 deg.C. When the Pi load increases, rising the CPU temperature rapidly above 40 deg.C, the fan must be able to bring the temperature down to below 40 deg.C once it’s commanded to run faster by the MCU. If the fan is unable to do so, it will simply go to max speed and sit there. Similarly, as the CPU load changes rapidly so will its temperature. This will cause the fan speed to fluctuate wildly.

In most use cases using a PID fan speed control is not the optimal solution. What specifically are you trying to cool?