A first sensor of the device for compensating magnetic and/or
electromagnetic disturbance fields in a predetermined volume range is
provided beyond the predetermined volume range for producing a signal
that is determined by the magnetic and/or electromagnetic field at the
location of the sensor. A second sensor is provided within the
predetermined volume range for producing a signal which is determined by
the magnetic and/or electromagnetic field at the location of the sensor.
The signals from the first and second sensors are used as an input signal
for directing a regulator amplifier belonging to a Helmholtz coil. After
executing an empirically determined transmission function, the signal
from the second sensor is applied to the regulator input of the digital
regulator amplifier and the output signal of the digital regulator
amplifier controls the current through the Helmholtz coil such that the
magnetic and/or electromagnetic field in the predetermined volume range
is at least partially compensated.