Periodic solutions and bifurcations in an impact inverted pendulum under impulsive excitation