In this work, a linear quadratic regulator controller is utilized to optimize the gains of the machine-side converter and grid-side converter controllers. The DC-link voltage and the rotational speed of the doubly-fed induction generator are optimally regulated by these controls. Additionally, the small-signal stability of the proposed system has been evaluated using the linearized model of the system. The small-signal stability analysis of the designed system has been accomplished through the application of the eigenvalues and participation factors technique. The suggested controller has been tested in a variety of operating conditions under small disturbances. MATLAB/SIMULINK simulation simulations have been used to evaluate the efficacy of the suggested optimal control system. Additionally, the generator-angular speed and DC-link voltage dynamic performances demonstrate the efficacy of the proposed controller. Finally, the robustness of the proposed controller has also been tested and validated using OPAL-RT technology under large perturbations at stator terminal voltage.