Design and control of a three degree-of-freedom permanent magnet spherical actuator