Bifurcations and Singularities for Coupled Oscillators with Inertia and Frustration.