Numerical control of impact dynamics of inverted pendulum through optimal feedback strategies