A centre-manifold analysis of variable speed machining