Periodic adaptive compensation of state-dependent disturbance in a digital servo motor system