Motor speed control of pumps