A PID-feedforward controller and Robust Internal-loop Compensator (RIC) based on reinforcement learning using random variable sequences are provided to auto-tune parameters for each controller in the high-precision position control of PMLSM (Permanent Magnet Linear Synchronous Motor). Experiments prove the well-tuned controller could be reduced up to one-fifth level of tracking errors before learning by reinforcement learning. The RIC compared to the PIDfeedforward controller showed approximately twice the performance in reducing tracking error and disturbance rejection.