A
motion control servo loop apparatus, comprising: a feed-forward control module, and a proportional-integral-derivative (PID) control loop and a compensation
adder. The feed-forward control module is capable of generating a feed-forward compensation. The PID control loop further comprises: a
proportional control module, an integral control module and a derivative control module. The
proportional control module is capable of generating a proportional compensation. The derivative control module is capable of generating a derivative compensation. The integral control module uses a digital differential analyzer (DDA)
algorithm to perform integration for accumulated errors with respect to each sampling
clock at each DDA pulse and thus output an accumulated error, which is then processed to generate an integral compensation. Thereafter, the compensation
adder receives the feed-forward compensation, the proportional compensation, the integral compensation and the derivative compensation to calculate a
position error compensation for a motor driver.