A controller comprises a first input that receives a signal indicating an energy consumption value of a compressor, a second input that receives a signal indicating an energy consumption value of a variable speed condenser fan, and an output that provides a control signal to the variable speed condenser fan. The controller also comprises a memory that stores a condenser set point, and a processor in communication with the input, output and memory and that modulates the condenser set-point to minimize energy consumption and controls the variable speed condenser fan based on the condenser set-point.