This document presents a study on using a multi-level inverter based DSTATCOM (distributed static synchronous compensator) and DVR (dynamic voltage restorer) with a neuro-fuzzy controller to improve power quality by mitigating voltage sags. It proposes a cascaded multilevel inverter topology with isolated DC energy storage and reduced switches. Simulation results show the MLI-based DSTATCOM and DVR can compensate voltage sags by injecting current and voltage respectively to regulate the bus voltage. The output with compensation has 1500V voltage compared to 1000V without compensation during a 500V sag.