A method is disclosed for defining tracks on a rotating magnetic disk medium
of
a disk drive. Reference tracks are followed using a servo control loop while writing
servo patterns defining a first target servo track. The servo control loop includes
a two-dimensional digital state compensator having a first input that receives
timing error signals, a first output that generates control signals for a controlled
oscillator, a second output that generates timing state variables, and a second
input that receives stored timing state variables. The first target track is followed
using the servo control loop while servo patterns are written, and while the stored
timing state variables corresponding to the servo patterns defining the first target
track are applied to the second input.