Image Number 6 for United States Patent #5995317.
A method and apparatus for real-time filtering of a position error signal in a servo system of a disk drive. Pre-calculated periodic components of the position error signal (PES) are used as future values in a real-time filter, preferably a real-time recursive median filter. This minimizes the amount of time-lag between obtaining the raw PES measurement from the disk surface and the providing the corresponding filtered PES output. This reduced time-lag minimizes the effect on the phase margin (PM) and results in improved servo stability. The invention can be used not only in servo systems in disk drives, but also in servo systems of other mechanical moving storage devices and in servo systems of rotating mechanical machinery in general, where the signal to be filtered may be a position error, velocity error, acceleration error, and the like.