This document presents a new control scheme for a static compensator (STATCOM) integrated with a battery energy storage system (BESS) aimed at improving power quality in wind farms. It addresses issues such as voltage variation, harmonics, and reactive power management caused by the intermittent nature of wind energy production. The proposed system effectively enhances voltage regulation and stabilizes the grid by mitigating power quality problems through advanced current injection techniques.