This document discusses the design and testing of a STATCOM (shunt Flexible AC Transmission System device) to improve power quality on transmission lines. It describes how STATCOMs use voltage source converters to inject controllable current and regulate transmission line voltage. The paper presents the modeling of a STATCOM using SPWM control and a PID controller in Matlab/Simulink simulations on a 3-machine 9-bus test system. Simulation results show the STATCOM significantly improves power quality by reducing voltage fluctuations and increasing transmission capacity.