High precision control of direct-drive permanent magnet linear motor with adaptive friction compensation