The invention discloses a method for controlling the rotation direction of a mechanical device by using an
electromagnetic field. The method comprises the following steps: placing a plurality of electromagnets at adjacent positions; the on-off of a circuit of each
electromagnet is controlled through an
electronic switch; adjusting the duty ratio of the
control signal, and controlling the current of each
electromagnet to a specified value; detecting a
voltage signal of each
electromagnet control circuit to obtain a current value, and carrying out filtering
processing on the
voltage signal to enable the current value to be relatively smooth; the electromagnetic force generated by the electromagnet is adjusted by controlling the current of the electromagnet; adjusting the duty ratio of the
control signal to output an electromagnetic
resultant force with controllable magnitude and direction; the pointing direction and the output torque of the magnetic object are controlled through electromagnetic
resultant force. The rotation direction of a mechanical device is controlled through an
electromagnetic field, controllable electromagnetic
resultant force is generated by adjusting the current of an electromagnet and the duty ratio of a
control signal, and accurate direction and torque control over a magnetic object is achieved. Through the PID
algorithm and mechanical structure adjustment, the precision and the response speed of the
system are improved, the hardware cost is reduced in a table look-up mode, and the
system is suitable for high-precision
grinding, drilling and other applications and has the advantages of being efficient, flexible and economical.