A system and method of controlling the operation of a pump system includes modulating the speed of the pump and calculating a system condition parameter having a value related to the area of a hysteresis loop generated by a system operating parameter that varies in response to pump speed. The condition of the system is determined in response to the value of the system condition parameter.