Due to the shortage and environmental pollution of fossil fuel sources, conventional generating units are substituted with renewable energy sources. Thus, the total inertia decreases while the rate of change of frequency (ROCOF) increases, affecting the system frequency and stability. In this paper, a supplementary control, washout filter, is added to the primary frequency control of a doubly-fed induction generator (DFIG)based wind turbine for better frequency regulation. In order to achieve the best performance (lowest frequency deviation with keeping the system stable), a new optimization technique called Mayfly Algorithm (MA) is used to find the optimum values of the washout filter's parameters. Compared with the traditional method, a great improvement has been presented in the system frequency response under different load perturbations. Also, the results show that the washout filter's parameters have an adverse impact on the frequency response and system stability if they aren't determined accurately. MATLAB/SIMULINK program is used to test the performance of the improved method under different scenarios.INDEX TERMS Primary frequency control, DFIG wind turbine, washout filter, mayfly algorithm (MA), stability.