A method includes providing electrical energy to a transducer for sealing avessel,where a frequency of the electrical energy is in an ultrasound range,controlling the electricalenergy to achieve a predetermined velocity of an end effector coupled to thetransducer, whenthe end effector is grasping the vessel, sensing parameters of the electricalenergy when theend effector achieves the predetermined velocity, calculating power of theelectrical energybased on the sensed parameters and estimating a size range of the vessel basedon the power,and controlling the electrical energy to achieve a target velocity, which isdetermined basedon the estimated size range of the vessel, to seal the vessel.