Novel algorithms for rotor angle security assessment in power systems