A system and method for controlling a fan is disclosed. In one embodiment, a fan controller is integrated in silicon and uses an embedded microcontroller to implement a digital fan control algorithm. The microcontroller may continually monitor temperature and sample the speed of the controlled fan. The speed of the fan may be compared to RPM values fitted on a desired curve that is representative of the Temperature-versus-RPM function for the given controlled fan. The fan control algorithm may be based on a PID compensator or a Ramp Rate Closed-loop controller (RRCC), which may be operated to drive the fan to the desired speed. The fan may also provide a Fan ID feedback signal to the microcontroller, which may use the Fan ID feedback signal upon system start-up to initialize the PID compensator gain settings or the RRCC parameter settings, and select the appropriate Temperature-versus-RPM function curve based on pre-determined values for the given fan. Thus, fans from different vendors may be changed at the factory without having to perform configuration programming. The need for a PWM command may be obviated, thereby facilitating the removal of any associated circuitry from the given fan, and thus reducing the cost of the fan.