A method of controlling motor velocity in a surgical instrument is disclosed. The surgical instrument includes a displacement member, a motor coupled to the displacement member, a control circuit coupled to the motor, a position sensor coupled to the control circuit, and a timer coupled to the control circuit. The method includes receiving a first position of a displacement member from a position sensor, starting a timer, advancing the displacement member to a second position by setting a motor velocity to a first velocity, receiving the second positon from the position sensor, stopping the timer when the displacement member reaches the second position, receiving elapsed time from the timer, wherein the elapsed time is the time taken by the displacement to move from the first position to the second positon, and controlling, by the control circuit, velocity of the motor based on the elapsed time.