Distributed Cooperative Control and Communication for Multi-agent Systems