A method for providing a harmonic current reference, in particular for controlling force ripples of a generator, the method comprising: - obtaining a first input signal indicative for a radial force ripple of a generator, - obtaining a second input signal indicative for a reference of the harmonic generator radial force, - obtaining a third input signal indicative for a tangential force ripple of the generator, - obtaining a fourth input signal indicative for a reference of the harmonic generator tangential force, - obtaining a fifth input signal indicative for an electrical angle of the generator, - determining a first internal signal, by filtering the first input signal with taking into account the fifth input signal, the first internal signal being indicative for a radial force ripple comprising only a first harmonic component at a certain harmonic of a generator current, - determining a second internal signal by filtering the third input signal with taking into account the fifth input signal, the second internal signal being indicative for a tangential force ripple comprising only a second harmonic component at the certain harmonic of the generator current, - determining a first output signal, by a first transformation procedure making use of the second input signal and the first internal signal, the first output signal being indicative for a certain harmonic current reference for a first axle of an synchronous rotating frame, and - determining a second output signal by a second transformation procedure making use of the fourth input signal and the second internal signal, the second output signal being indicative for a certain harmonic current reference for a second axle of the synchronous rotating frame. - obtaining a first input signal indicative for a radial force ripple of a generator, - obtaining a second input signal indicative for a reference of the harmonic generator radial force, - obtaining a third input signal indicative for a tangential force ripple of the generator, - obtaining a fourth input signal indicative for a reference of the harmonic generator tangential force, - obtaining a fifth input signal indicative for an electrical angle of the generator, - determining a first internal signal, by filtering the first input signal with taking into account the fifth input signal, the first internal signal being indicative for a radial force ripple comprising only a first harmonic component at a certain harmonic of a generator current, - determining a second internal signal by filtering the third input signal with taking into account the fifth input signal, the second internal signal being indicative for a tangential force ripple comprising only a second harmonic component at the certain harmonic of the generator current, - determining a first output signal, by a first transformation procedure making use of the second input signal and the first internal signal, the first output signal being indicative for a certain harmonic current reference for a first axle of an synchronous rotating frame, and - determining a second output signal by a second transformation procedure making use of the fourth input signal and the second internal signal, the second output signal being indicative for a certain harmonic current reference for a second axle of the synchronous rotating frame.