This paper proposes new analytical and optimal design procedures of the proportional‐resonant (PR) controller and its harmonic compensators (HCs) for three‐phase grid‐connected voltage source inverters (VSIs) powered by renewable energy resources. The modeling and analysis based on stationary reference frame are performed for VSIs collaborated with an L‐type filter. The theoretical verification and simulation validation of the proposed design guidelines are done to approve its effectiveness and robustness. Particle swarm, grey wolf and Harris hawks' optimization techniques are applied and compared for a proper selection of the parameters of the proposed PR controller and its HCs. To accomplish this study, multi‐objective error functions are employed and compared to minimize the total harmonic distortion of the grid output current. The proposed PR controller and its HCs are tested, using MATLAB/Simulink, along with the allowable changes of inverter output active and reactive powers, and also under the grid voltage distortion. Moreover, their performance is evaluated according to IEEE and IEC harmonics standards, and compared with the conventional PI controller based on reference frame. Furthermore, the experimental validation for the proposed controllers is done based on the hardware‐in‐the‐loop real‐time simulator using C2000TM‐microcontroller‐LaunchPadXL‐TMS320F28377S kit. |