Method for controlling a wind turbine, said wind turbine comprising a rotor to which is fixed at least one blade, and an electrical machine linked to said rotor, wherein an angle of inclination θ of said blade and an electrical harvesting torque T e of said electrical machine are known, characterized in that it comprises the following steps: a) a dynamic model of said rotor is constructed by applying the fundamental principle of dynamics to said rotor, said model linking the speed of the incident wind on said wind turbine V w to a speed of rotation of said rotor Ω r, to said angle of inclination θ of said blade and to said electrical torque T e and said dynamic model of the rotor is expressed by a formula of the type: J r d Ω r dt = T aero − T l Ω r − NT e with J r the inertia of said rotor, T aero the aerodynamic torque applied to said rotor which depends on said incident wind speed V w, on said speed of rotation of said rotor Ω r, and on said angle of inclination θ, T t (Ω r) the friction and load torque on the rotor which depends on said speed of rotation of said rotor Ω r, N the transmission ratio between said rotor and said electrical machine; wherein said aerodynamic torque applied to said rotor is expressed by a formula of the form: T aero = 0.5 ⁢ ρ ⁢ Π R b 3 c q θ R b Ω r V w V w 2 with R b the radius of said rotor, ρ the density of the air, c q is a parameter determined by means of a mapping of the rotor as a function of said angle of inclination θ and of the ratio R b Ω r V w, b) said speed of rotation of said rotor Ω r is measured; c) said incident wind speed V w is determined by means of said dynamic model of the rotor, of said measured speed of rotation of said rotor Ω r and of said angle of inclination θ of said blade and of said electrical torque T e; said incident wind speed V w being considered as a harmonic disturbance, said incident wind speed V w being able to be expressed by a formula of the type: V w t = ∑ k = − p p c k e iω k t with p the number of harmonics considered, ω k is the frequency of the harmonic k determined preferably by means of a formula of the type: ω k = 3 k p, c k the coefficient of the harmonic k, said incident wind speed V w is determined by determining the parameters ω k and c k by means of said dynamic model of the rotor, then said incident wind speed V w is deduced therefrom; and d) said angle of inclination θ of said blade and/or said electrical harvesting torque T e are controlled as a function of said incident wind speed V w to optimize the production of energy from said wind turbine. a) a dynamic model of said rotor is constructed by applying the fundamental principle of dynamics to said rotor, said model linking the speed of the incident wind on said wind turbine V w to a speed of rotation of said rotor Ω r, to said angle of inclination θ of said blade and to said electrical torque T e and said dynamic model of the rotor is expressed by a formula of the type: J r d Ω r dt = T aero − T l Ω r − NT e with J r the inertia of said rotor, T aero the aerodynamic torque applied to said rotor which depends on said incident wind speed V w, on said speed of rotation of said rotor Ω r, and on said angle of inclination θ, T t (Ω r) the friction and load torque on the rotor which depends on said speed of rotation of said rotor Ω r, N the transmission ratio between said rotor and said electrical machine; wherein said aerodynamic torque applied to said rotor is expressed by a formula of the form: T aero = 0.5 ⁢ ρ ⁢ Π R b 3 c q θ R b Ω r V w V w 2 with R b the radius of said rotor, ρ the density of the air, c q is a parameter determined by means of a mapping of the rotor as a function of said angle of inclination θ and of the ratio R b Ω r V w, b) said speed of rotation of said rotor Ω r is measured; c) said incident wind speed V w is determined by means of said dynamic model of the rotor, of said measured speed of rotation of said rotor Ω r and of said angle of inclination θ of said blade and of said electrical torque T e; said incident wind speed V w being considered as a harmonic disturbance, said incident wind speed V w being able to be expressed by a formula of the type: V w t = ∑ k = − p p c k e iω k t with p the number of harmonics considered, ω k is the frequency of the harmonic k determined preferably by means of a formula of the type: ω k = 3 k p, c k the coefficient of the harmonic k, said incident wind speed V w is determined by determining the parameters ω k and c k by means of said dynamic model of the rotor, then said incident wind speed V w is deduced therefrom; and d) said angle of inclination θ of said blade and/or said electrical harvesting torque T e are controlled as a function of said incident wind speed V w to optimize the production of energy from said wind turbine.