Inverted pendulum control system simulation