Modulation of ion beams in two-component plasmas: Three-dimensional particle-in-cell simulation