A conventional ground fault interrupter in an arrangement with a frequency converter and electrical machines may be accidentally tripped due to operation-related leakage currents. This can be prevented by operating a ground fault interrupter for a frequency converter receiving a mains current in the following manner: receiving switching information about switching operations in the frequency converter, measuring a signal associated with a common mode current in a power line device which conducts the mains current to the frequency converter, determining, based on the switching information, an expected signal expected for the common mode current produced by the switching operations, identifying, based on the measured signal and the expected signal, a fault current, and interrupting the mains power depending on the identified fault current. A ground fault interrupter is hereby provided with an evaluation unit configured to carry out the method.