A method for measuring the impedance of an energy supply system at a rated frequency by impressing a testing current into the system and measuring the resulting changes in the system current and the system voltage, comprising the steps of measuring said system current and said system voltage during a first preselected time interval (T1) without the impressing of said testing current and during a second preselected time interval (T2) with the impressing of said testing current, composing said testing current of at least one periodic signal with at least one testing frequency (f1, f2) that deviates from said rated frequency, using, based on said measured system currents and system voltages, a Fourier analysis to determine a resulting impedance for said testing frequency (f1, f2) and deriving said impedance of said energy supply system at the rated frequency from said impedance obtained for said testing frequency (f1, f2).