This paper presents the load compensation by diesel generator. In this compensation reactive power, harmonics and unbalanced load current generates because of linear or nonlinear loads. The control of Distribution Static Synchronous Compensator (DSTATCOM) is used for reactive power, harmonics and unbalanced load current compensation. Proportional – Integral (PI) controller is used to maintain a constant voltage at the dc – bus of a voltage – source converter (VSC) working as a DSTATCOM. Switching of ThreeLevel VSC is achieved by controlling load current using Sinusoidal Pulse Width Modulation (SPWM) control. This scheme is simulated under MATLAB environment using simulink toolboxes for feeding linear and nonlinear loads. The modeling is performed for a three – phase, three – wire star – connected synchronous generator coupled to a diesel engine, along with the three level inverter based VSC working as a DSTATCOM.