A rotary machine is provided which may include a rotor and a stator within a housing. The stator may be for generating a rotating magnetic field for applying a torque to the rotor. A commutator circuit may provide a plurality of phase voltages to the stator, and a controller may adjust the plurality of phase voltages provided by the commutator circuit to modify an attractive force of the stator on the rotor to move the rotor in an axial direction.