Aiming at the obstacle avoidance problem of multiple unmanned underwater vehicles (UUV) formation in different obstacle avoidance scenarios, the collaborative collision avoidance algorithm of multiple UUV formation was studied. In terms of obstacle avoidance algorithm, an algorithm combining artificial potential field method and consistent formation control algorithm is proposed. A variety of obstacle scenes are set by using the information of forward looking sonar, and different weights are set for the fusion of control instructions of the two algorithms. The problems of formation recovery time and formation error caused by formation "grouping" in the course of UUV obstacle avoidance are solved. Finally, in the underwater simulation platform, the effectiveness and advantages of the collaborative obstacle avoidance algorithm in multiple scenes are verified by experiments.