This paper presents the use of a static synchronous compensators (STATCOM) device to improve the low voltage ride through (LVRT) ability of an electrical network consisting of wind farms that produce 9 MW and 1 MW PV stations during grid faults. A hybrid energy model is connected with 100 MVAR STATCOM at the point of common coupling (PCC) through line to line fault occurs on the grid. STATCOM control is used to detect the voltage at the PCC bus through occurring line to line (LL) faults by compensating reactive energy. A method of particle swarm optimization (PSO) is utilized for adjusting the optimum value of proportional—integral—derivative (PID) STATCOM control. STATCOM is controlled by (PID) and is compared with STATCOM controlled by fuzzy logic control (FLC). The proposed system has been performed utilizing Matlab/Simulink. Results of the simulation clear effectiveness and the ability of …