Low voltage ride-trough (LVRT) feature is compulsory for each grid-connected inverter to support the grid by injecting reactive power in low voltage conditions. It is well known that the operation of an inverter in a normal grid condition is different from its operation in a faulty one. One of the detrimental effects of working in a faulty grid is ripples in the DC bus voltage due to the active power oscillation caused by unbalance voltages. Here, a new control system based on unbalance current injection is proposed to eliminate these ripples. For the analysis, a four-leg inverter is considered in a transformerless microgrid. Then, instantaneous power constraints, which are imposed by the capacity of the inverter, and low voltage ride-through necessities are considered to achieve the required reference currents. In addition, constant power strategy is used as a power control method and essential reference currents for this condition are presented. Moreover, the required reference currents are achieved to eliminate the ripples in the DC bus voltage when the constant power strategy cannot be performed because of current limitation restriction. Finally, simulation results are presented to prove the effectiveness of the proposed controller in different conditions.