Local energy function methods for power system transient stability