a method for controlling a motor driving a pump using a microcomputer includes repeatedly sampling a parameter representative of motor torque over one cycle of operation of the pump , determining at least one point of maximum motor torque during said one cycle of operation of the pump ; applying speed commands to the motor from a table of stored speed values in memory , said values being selected to provide relatively greater speed commands at points of lower motor torque and relatively lesser speed commands at points of higher pump pressure corresponding to higher motor torque , while maintaining at least a base speed command to prevent stalling ; and synchronizing the first value in the table of stored values to the point of maximum motor torque .