A method for controlling total power consumption of a system by setting controller parameters based on a temperature difference, which is applied to a system at least comprising a heat-generating element, a fan, and a controller, the heat-generating element having a setpoint temperature Tsp, wherein the method comprises:
- setting the controller with a first control parameter and a second control parameter;
- reading, by the controller, a current temperature T(i) of the heat-generating element;
- and
- comparing, by the controller, the current temperature T(i) and the setpoint temperature Tsp to determine whether a feedback control is provided to the fan by the controller based on the first control parameter or based on the second control parameter such that the total power consumption of the system is controlled.