The expanding trend of wind power technology motivates scholars to pursue more investigation on optimising energy extraction from the wind and integrating high-quality power into the utility grid. This paper is aimed at introducing a novel application of the sine cosine algorithm (SCA) which attempts to find the optimal gains of proportional-integral (PI) controllers used to control the power electronic converter (PEC) equipped with the Variable speed Wind turbine (VSWT) such that a maximum power extraction and performance enhancement can be realized. The PEC equipped with the VSWT combines a machine side converter (MSC) and a grid-side inverter (GSI). Both the MSC and GSI are controlled by the proposed SCA-based PI controllers through cascaded vector control schemes. The MSC is responsible for controlling the wind generator's rotational speed, active power, and reactive power. The GSI is used to regulate the dc-link voltage and to keep the terminal voltage at the desired frame set by the operator. To obtain the optimum PI gains, the SCA is applied to minimize the sum of the integral squared error (ISE) of twelve PI controllers error inputs in the control schemes simultaneously. Performances of the proposed SCA-PI control schemes are assessed under severe grid disturbance and random wind speed variation to mimic more realistic conditions. The effectiveness of the proposed SCA-PI is verified in the MATLAB/Simulink environment, and the results are compared to those obtained using a grey wolf optimizer and particle swarm algorithm-based optimal PI controller. The simulation findings confirm the SCA-PI can be regarded as an efficacious way to enhance the performance of the VSWT.INDEX TERMS Wind turbine control, power electronic converter, MPPT, PMSG, PI controller, sine cosine algorithm.