This paper presents an algorithm of a compensation of the grid current distortion caused by the grid voltage unbalance and distortion in 3-phase bi-directional DC to AC inverter. Usually 3-phase grid system has unbalance and distortion because of connecting 1-phase and non-linear load with 3-phase load using same input node. Controlling 3-phase inverter by general method under the unbalanced and distorted grid voltage, the grid current has distortion. This distortion of the grid current cause the grid voltage distortion again. So, it need to control the grid current balanced and non-distorted, even the grid voltage gets unbalanced and distorted. There are some complex method to compensate the gird current distortion. it suggest simple method to solve the problem. Simulation and experiment is used to validate the proposed algorithm.