In a magnetic disk drive having a head disk assembly (HDA) including a base, a rotating disk that carries position information in a plurality of servo wedges that are distributed around the disk, a rotary actuator that pivots relative to the base and carries a transducer that periodically reads the position information from the servo wedges on the rotating disk, a VCM circuit that includes a voice coil motor (VCM) that responds to a control effort signal that is periodically adjusted by a servo control system such that the transducer tends to follow a track that is defined by the position information during a track-following operation, a method of adaptively reducing an effect of vibration during the track following operation comprising:
- mounting a sensor within the magnetic disk drive to produce a sensor signal in response to a vibration that tends to cause the rotary actuator to move off-track;
- reading the position information from a presently active servo wedge;
- producing a position error signal based on a difference between an indicated position signal and a target position signal;
- calculating a nominal control effort signal based on the position error signal;
- reading the sensor signal to produce a sensor value associated with the presently active servo wedge;
- modifying the sensor value based on a sensor gain value to produce a control effort adjustment signal;
- adjusting the nominal control effort signal with the control effort adjustment signal to produce an adjusted control effort signal;
- outputting the adjusted control effort signal to the VCM circuit;
- and
- altering the sensor gain value via an adaptive gain filter having multiple coefficients wherein the altering is based on the position error signal and the sensor value associated with the presently active servo wedge for use during a next active servo wedge.