An approach to real-time transient stability assessment and control