Formation control in the port-Hamiltonian framework