This document presents an analysis of a Synchronous Reference Frame (SRF) theory-based STATCOM for compensating reactive power and harmonics in electrical systems. It discusses the detrimental effects of harmonics due to non-linear loads and how the STATCOM can mitigate these issues, improving power quality through a MATLAB/Simulink model. The results demonstrate successful compensation for both linear and non-linear loads, achieving a power factor of unity and reducing total harmonic distortion significantly.