Text this: Stabilizing a Rotary Inverted Pendulum Based on Logarithmic Lyapunov Function