A Novel Optimal Power Flow Formulation Based on the Lyapunov Theory