A method of operating a wind farm including a plurality of wind turbines, the method comprising: a step of imparting a perturbation to a control setting of each of the wind turbines 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 to be optimized; and a step of updating the control setting for each of the wind turbines 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 subjected to the perturbation, so as to acquire, as effective data, the evaluation value including the total output of the wind turbines which satisfy a first condition which is required to be met by the wind turbines to be optimized at least in relation to wind direction, wherein the step of imparting a perturbation includes imparting a perturbation of '+Δ' over different points of time to the control setting of each of the wind turbines to be optimized, wherein the step of obtaining (S2, S2') the evaluation value includes determining 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 the perturbation is performed such that a perturbation of '-Δ' is imparted to the control setting of each of the wind turbine to be optimized over different points of time. a step of imparting a perturbation to a control setting of each of the wind turbines 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 to be optimized; and a step of updating the control setting for each of the wind turbines 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 subjected to the perturbation, so as to acquire, as effective data, the evaluation value including the total output of the wind turbines which satisfy a first condition which is required to be met by the wind turbines to be optimized at least in relation to wind direction, wherein the step of imparting a perturbation includes imparting a perturbation of '+Δ' over different points of time to the control setting of each of the wind turbines to be optimized, wherein the step of obtaining (S2, S2') the evaluation value includes determining 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 the perturbation is performed such that a perturbation of '-Δ' is imparted to the control setting of each of the wind turbine to be optimized over different points of time.