An electromagnetic harmonic motor with continuous control of position and torque