Patent ID: 8665551

Claim:
A disk drive comprising: a disk; a head; a voice coil motor (VCM) operable to actuate the head over the disk, wherein the VCM generates a back electromotive force (BEMF) voltage; and control circuitry operable to: write at least one reference track on the disk; position the head near a first diameter of the disk; while moving the head from the first diameter toward a second diameter of the disk, read the reference track and measure a first estimated state error; while moving the head from the second diameter of the disk toward the first diameter of the disk, read the reference track and measure a second estimated state error; adjust a gain and an offset of a velocity sensor in response to the first and second estimated state errors, wherein the velocity sensor estimates a velocity of the head in response to the BEMF voltage; generate a compensated voltage from the BEMF voltage; and adjust the gain of the velocity sensor by adjusting a scalar for scaling the compensated voltage, wherein the velocity sensor is operable to subtract an offset value from the scaled compensated voltage, and the control circuitry is further operable to adjust the offset of the velocity sensor by adjusting the offset value in response to the first and second estimated state errors.