In this paper, we study the problems of consensus and obstacle avoidance of multi-agent system with limited energy and communication faults. Based on algebraic Riccati equations, a distributed energy-optimal collision-free controller is proposed under communication faults. Compared with common controllers that can achieve consensus asymptotically, this controller not only makes each agent avoid neighboring agents, but also minimizes the energy consumed by each agent. Through analysis, the range of energy consumption is obtained, and the maximum energy consumption is optimized. Finally, some simulation results also verify the validity of the theoretical results.INDEX TERMS Optimal control, consensus control, communication faults, obstacle avoidance.