Power swings are translations of oscillations in generator rotors, when the power system is subjected to severe disturbances. They can be categorised as stable swings, for which, the system itself can recover and the unstable swings, where system cannot recover itself but need some remedial action to gain the stability. An unstable power swing condition or out-of-step (OOS) event cannot be tolerable for a prolonged period of time due to its negative impact on the power system equipment and integrity. These oscillations might trigger protection relays, removing key transmission elements leading to widespread outages and even blackouts. Controlled islanding of the system is one of the solutions to isolate the systems operating asynchronously during OOS events. Therefore, identification of generator coherency would come in handy in the process of controlled islanding, where the generators with similar rotor dynamic characteristics swing together forming separate clusters in transmission network. Also, it is important that the coherency identification to become online based, as coherent groups may differ in response to various events and operating conditions. This paper proposes a generalized methodology to identify coherent groups of generators as an online decision-making approach based on real-time data. The accuracy of the proposed methodology is demonstrated using Sri Lanka power system as a case study.