The gradient coil (G) is connected to a controllable gradient amplifier (GV) via the first diagonal of a bridge circuit. The bridge circuit includes four switches (T1 to T4) and parallel-switched free-wheeling diodes (D1 to D4). A capacitor (C) is switched in the second diagonal of the bridge circuit. The capacitor forms a resonant circuit together with the gradient coil. A sinusoidal current flows through the gradient coil. An offset current (Ioff) is applied to the sinusoidal current (Ig) by partial discharge if the capacitor at every second half-wave.