This paper presents a fuzzy based flocking system. To maintain the distance between agents, we use fuzzy logic controller to design a "force function" which is related to the relative distance between neighbours. And the "force function" is used to control the velocity of agent. To prove the stability of flocking system, we build a Hamilton function which is the kinetic energy of flocking system. Utilizing the LaSalle's invariance principle, we prove that the system is stable. Specially, we developed a local form flocking controller which is derived from the global flocking algorithm. By using the local controller, agents in the flocking system only need to know the local information (relative distances and relative angles between neighbours). To evaluate the performance, we simulate the flocking system with 200 agents under the control of distributed flocking algorithm.Index Terms-Multiple robot, sensor network, distributed system.