A method for damping vibrations in a wind power system comprising a wind turbine, a generator, and a frequency converter arranged to control the torque of the generator, the method comprising the steps of: (i) obtaining a signal of at least one entity as measured in the wind power system, the entity being affected by vibrations in the wind power system, (ii) performing a frequency analysis of the obtained signal, (iii) identifying unwanted frequency components of the obtained signal having amplitudes above predefined respective thresholds, and (iv) compensating for the unwanted frequency components by adjusting the torque of the generator at the frequencies of the unwanted frequency components, wherein the compensating for each of the unwanted frequency components comprises: - inputting into a compensating unit the obtained signal and the frequency of the unwanted frequency component, - determining an output signal based on the obtained signal and the frequency of the unwanted frequency component, - measuring the phase shift between the output signal and the obtained signal, - modifying the output signal based on the measured phase shift between the output signal and the obtained signal to compensate for the measured phase shift, and - using the output signal for adjusting the torque of the generator, wherein - the step of determining an output signal comprises high-pass filtering the obtained signal by a high-pass filter, transforming the filtered signal by a Park transformation unit, low-pass filtering the transformed signal by a low-pass filter, regulating the low-pass filtered signal by a regulator, and transforming back the regulated signal by an inverse Park transformation unit, and wherein the frequency of the unwanted frequency component is integrated and input to the Park transformation unit and the inverse Park transformation unit. (i) obtaining a signal of at least one entity as measured in the wind power system, the entity being affected by vibrations in the wind power system, (ii) performing a frequency analysis of the obtained signal, (iii) identifying unwanted frequency components of the obtained signal having amplitudes above predefined respective thresholds, and (iv) compensating for the unwanted frequency components by adjusting the torque of the generator at the frequencies of the unwanted frequency components, wherein the compensating for each of the unwanted frequency components comprises: - inputting into a compensating unit the obtained signal and the frequency of the unwanted frequency component, - determining an output signal based on the obtained signal and the frequency of the unwanted frequency component, - measuring the phase shift between the output signal and the obtained signal, - modifying the output signal based on the measured phase shift between the output signal and the obtained signal to compensate for the measured phase shift, and - using the output signal for adjusting the torque of the generator, wherein - the step of determining an output signal comprises high-pass filtering the obtained signal by a high-pass filter, transforming the filtered signal by a Park transformation unit, low-pass filtering the transformed signal by a low-pass filter, regulating the low-pass filtered signal by a regulator, and transforming back the regulated signal by an inverse Park transformation unit, and wherein the frequency of the unwanted frequency component is integrated and input to the Park transformation unit and the inverse Park transformation unit. - inputting into a compensating unit the obtained signal and the frequency of the unwanted frequency component, - determining an output signal based on the obtained signal and the frequency of the unwanted frequency component, - measuring the phase shift between the output signal and the obtained signal, - modifying the output signal based on the measured phase shift between the output signal and the obtained signal to compensate for the measured phase shift, and - using the output signal for adjusting the torque of the generator, wherein - the step of determining an output signal comprises high-pass filtering the obtained signal by a high-pass filter, transforming the filtered signal by a Park transformation unit, low-pass filtering the transformed signal by a low-pass filter, regulating the low-pass filtered signal by a regulator, and transforming back the regulated signal by an inverse Park transformation unit, and wherein the frequency of the unwanted frequency component is integrated and input to the Park transformation unit and the inverse Park transformation unit.