Minimum-time swing-up of a rotary inverted pendulum by iterative impulsive control