Adaptive position control of a PMSM drive