This document describes a study that designed and simulated a distribution static compensator (DSTATCOM) using a fuzzy logic controller (FLC) to improve power quality in an electrical network with balanced and unbalanced non-linear loads. The DSTATCOM was modeled in MATLAB/Simulink. It injects real and reactive power to regulate the load voltage and correct the power factor. Simulation results showed that the DSTATCOM maintained balanced load voltages and currents even when an unbalanced load was connected, and it performed better than a DSTATCOM using a proportional integral controller in compensating for voltage sags and power quality issues caused by the non-linear loads.