This document discusses the design, modeling, and simulation of a DSTATCOM (distribution static synchronous compensator) to improve power quality on distribution lines. It presents a study on modeling a STATCOM used for reactive power compensation. A three-phase IGBT-based voltage source inverter known as a DSTATCOM is used for power factor correction, harmonic compensation, and providing reactive power to loads. A model of a DSTATCOM connected to a distribution system feeding linear and non-linear loads is developed in MATLAB to analyze system behavior under transient conditions. The performance of the DSTATCOM is investigated under various fault conditions.