Skip to main content
. Author manuscript; available in PMC: 2016 Jan 1.
Published in final edited form as: Med Eng Phys. 2014 Oct 31;37(1):145–150. doi: 10.1016/j.medengphy.2014.10.005
Algorithm 1 (Transducer alignment control during the scan).

while fcfref-c do
if fs > fref then
  moveup()
else
  movedown()
end if
end while
{Starting the scan with N steps}
for i = 0 : N do
while fc < fref-ca or fref-c + a < fc do
  ve = Kf (fsfref) {End-effector velocity is defined by the force error}
   q˙ = Jve {Transform end-effector velocities to joint velocities}
  SendVelocityCommand( q˙) {send the velocity commands to the robot}
end while
 GetUltrasoundImage() {Save the ultrasound image}
 GetTransducerPose() {Save the transducer pose}
 MoveTransducer(StepSize) {move the transducer in the scan direction}
end for