Spacecraft with thrusters or instruments with large magnetic dipole will experience torques in a planetary magnetic field. U.S. Patent 10,752,385, just granted to Princeton Satellite Systems, uses a current loop to cancel the magnetic field of the onboard dipole. The patent text is:
“A dipole cancellation system and method may include a plurality of magnetometers for measuring a device magnetic field associated with a plurality of device coils generating a device magnetic field having a primary magnetic dipole moment. A compensating coil carrying a compensating current running a first direction that generates a compensating magnetic field having a compensating magnetic dipole moment. The compensating coil may be positioned and the first current may be selected so that the compensating magnetic dipole moment completely cancels the primary magnetic dipole moment. A method may use the system to stabilize a spacecraft by calculating an estimated torque of the spacecraft, receiving a value for an external magnetic field, receiving a value for a device magnetic field, and calculating and applying a compensating current may be then applied to the compensating coil to cancel the primary magnetic dipole moment, wherein the spacecraft is stabilized.”
For more information go to the U.S. Patent Site.