Abstract-This paper adresses the high precision positioning issue of permanent magnet (PM) linear motors, in presence of spatially periodic forces, also known as cogging. Using an internal model representation of this perturbation, an observerbased controller only relying on position measurements is derived. The observation error is not autonomous, and the stability analysis of the resulting closed loop system is regarded as the stability of two interconnected systems. For the motor to quickly track a desired trajectory, while being robust to large magnitude cogging forces, a small-gain like theorem is derived and used to tune the gains of the control law in an explicit way. The experimental results obtained through this method are then showed and compared with those of a PID controller.