In these days, the multi-robot system has been attactive to many researchers because of its high efficiency for some tasks. When we want to use the system, a method for moving the robots to a desired point on an environment which has obstacles or narrow space is needed. In this study, we prpose an algorithm for the passage of a group consisting of many robots through a narrow space. For the purpose, each robot has a phase oscillator, and they make the phase gradient. Then, they decide their heading direction using information of the phase of the oscillator. We can switch the property of the group of the robots to adapt to the environment by changing leader robot's frequency. We considered the condition for making phase gradient, and demonstrated the effectiveness of the proposed system by simulations and experiments.