Increasing the penetration of grid-connected inverters and integration of single-phase microgrids (MG) and unbalanced loads into three-phase MGs result in power quality issues such as voltage harmonics and unbalance at the point of common coupling (PCC) under nonideal grid conditions. In addition, the grid impedance increase in a weak grid influences the system\'s stability. A novel PCC voltage feed-forward control method is proposed using selective virtual impedance loops (SVIL) based on multiple dual second order generalized integrators (MDSOGI) for unbalanced MGs in the distorted, weak grid. SVIL improves voltage harmonics and regulates the unbalanced voltage at the PCC terminal. The effectiveness of the proposed SVIL has been validated using control hardware-in-the-loop (CHIL) for an unbalanced MG in the distorted and weak grid.