Analysis of a power grid using a Kuramoto-like model