This paper suggested a methodology for controlling a wind turbine, which is branched to a doubly-fed induction generator (DFIG) via a gearbox. The DFIG stator is immediately connected to the power system, whereas the rotor is linked to the grid through the AC/DC/AC converters. The objective is to manage the powers extracted from a fluctuating wind turbine system. A maximum power point tracking (MPPT) technique is also employed to acquire the highest power of the fluctuating wind speed. The control of the rotor side converter based on stator field-oriented vector is designed using a traditional Proportional-Integral (PI) and with a smart PI whose gains are optimized using the particle swarm optimization approach. The integral square error (ISE) is used as a cost function to minimize the error. Through Matlab/Simulink, the performances and outcomes achieved by classical PI are studied and compared to those obtained by PSO tuned PI controller. The PSO ensures the tracking system’s stability and reduces response time to 1.7 (ms) with a neglected static error.