A method of operating a wind farm including a plurality of wind turbines (T), the method comprising: a step of imparting (S1) a perturbation to a control setting of each of the wind turbines (T) to be optimized; a step of, after imparting the perturbation, obtaining (S2, S2') an evaluation value including at least a total output of the wind turbines (T) to be optimized; and a step of updating (S3) the control setting for each of the wind turbines (T) to be optimized on the basis of a gradient of the evaluation value, wherein the step of obtaining (S2, S2') an evaluation value includes performing filtering of information obtained from each of the wind turbines (T) subjected to the perturbation, so as to acquire, as effective data, the evaluation value including the total output of the wind turbines (T) which satisfy a first condition which is required to be met by the wind turbines (T) to be optimized at least in relation to wind direction, wherein the step of imparting (S1) a perturbation includes imparting (S101) a perturbation of '+Δ' over different points of time to the control setting of each of the wind turbines (T) to be optimized, wherein the step of obtaining (S2, S2') the evaluation value includes determining (S204) whether the number of the effective data corresponding to the perturbation of '+Δ' is not smaller than a first threshold, or whether a change of the evaluation value corresponding to the perturbation of '+Δ' is not greater than a second threshold, and wherein, if the number of the effective data corresponding to the perturbation of '+Δ' is not smaller than the first threshold, or the change of the evaluation value corresponding to the perturbation of '+Δ' is not greater than the second threshold, the step of imparting (S102) the perturbation is performed such that a perturbation of '-Δ' is imparted to the control setting of each of the wind turbine (T) to be optimized over different points of time. a step of imparting (S1) a perturbation to a control setting of each of the wind turbines (T) to be optimized; a step of, after imparting the perturbation, obtaining (S2, S2') an evaluation value including at least a total output of the wind turbines (T) to be optimized; and a step of updating (S3) the control setting for each of the wind turbines (T) to be optimized on the basis of a gradient of the evaluation value, wherein the step of obtaining (S2, S2') an evaluation value includes performing filtering of information obtained from each of the wind turbines (T) subjected to the perturbation, so as to acquire, as effective data, the evaluation value including the total output of the wind turbines (T) which satisfy a first condition which is required to be met by the wind turbines (T) to be optimized at least in relation to wind direction, wherein the step of imparting (S1) a perturbation includes imparting (S101) a perturbation of '+Δ' over different points of time to the control setting of each of the wind turbines (T) to be optimized, wherein the step of obtaining (S2, S2') the evaluation value includes determining (S204) whether the number of the effective data corresponding to the perturbation of '+Δ' is not smaller than a first threshold, or whether a change of the evaluation value corresponding to the perturbation of '+Δ' is not greater than a second threshold, and wherein, if the number of the effective data corresponding to the perturbation of '+Δ' is not smaller than the first threshold, or the change of the evaluation value corresponding to the perturbation of '+Δ' is not greater than the second threshold, the step of imparting (S102) the perturbation is performed such that a perturbation of '-Δ' is imparted to the control setting of each of the wind turbine (T) to be optimized over different points of time. <EOS>