The time delay in the current control loop of a grid-connected voltage-source converter (VSC) may cause destabilization of electrical resonances in the grid or in the VSC's input filter. Instability is prevented if the input admittance of the VSC can be made passive. This paper presents an analytical controller design method for obtaining passivity. The method is equally applicable to single-and three-phase systems, i.e., in the latter case, for both stationary-and synchronous-frame control. Simulations and experiments verify the theoretical results.