Identification of coherent groups of generators for out-of-step protection using online measurements

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 unstable swings, where the system cannot recover itself but need some remedial action to gain 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 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 the transmission network. Also, it is important that the coherency identification become online-based, as coherent groups may differ in response to various events and operating conditions. This paper proposes a generalised methodology to identify coherent groups of generators as an online decision-making approach based on real-time data. The accuracy of the proposed methodology was demonstrated using Sri Lanka power system as a case study.


INTRODUCTION
Necessity and awareness for a secure, reliable and quality power supply is escalating day by day as interruption of power supply may adversely affect on socio-economic aspects. Expansion of the power system should be done considering the demand to be met in years to come and required margin of stability to preserve the reliable operation of the system. Failure to do so timely will make troubles in meeting the demand and also the power system will become vulnerable to cascading failures throughout the system.
Power grid is a sophisticated dynamic system which delivers power from generation to load through a series of transmission lines. A balance between generated and consumed active/reactive power is essential during steady-state operations. Any change in power generated, load demanded or the network topology will lead the power flow to change across the system until new equilibrium is reached. These changes are very common when operating a power system and automatically compensated with the aid of a control system. Power swings originate in response to events such as faults, line switching, disconnection of generators and loss or addition of large loads. During these disturbances, mechanical power supplied to the generators remains relatively constant due to slow governor action, while electrical power that can be delivered changes depending on the disturbance (McDonald et al., 2005). This unbalance between the input power and the power delivered causes oscillations in machine rotor angles and can result in severe power swings across the network. This phenomenon becomes more significant when the power system is operated under a tight stability margin.

March 2021
Journal of the National Science Foundation of Sri Lanka 49 (1) For a stable power swing, system may remain stable and come to a new equilibrium over time, depending on the severity of the disturbance and post control actions taken to overcome the instability. On the other hand, severe system disturbances can cause large separation of generator rotor angles leading to asynchronous operation of generators. Large fluctuations of voltages and currents are possible even beyond their nominal values in these cases. Large power swings, whether being stable or unstable, can trigger protection functions of relays causing unwanted relay operations, which can worsen disturbance leading to partial or total blackouts.
Out-of-Step (OOS) event are ideally an unstable power swing condition, which cannot be tolerable for a prolonged period of time due to its negative impact on power system equipment and integrity. OOS and pole slipping are similar designations for the condition where impedance trajectory as seen by protection relay, lies across generator impedance characteristics during a fault (Redfem & Checksfield, 1996). If the impedance trajectory goes through the characteristics of transmission line, then that is identified as an unstable power swing condition in the network (Apostolov et al., 1997).
Tendency of a group of generators to swing together subsequent to disturbances is identified as their coherency. Two generators are said to be coherent, if their rotor angle deviation does not exceed a given threshold value (Molina et al., 2012).
Power grid is a sophisticated dynamic system which delivers power from generation to load through a series of transmission lines. A balance between generated and consumed active/reactive power is essential during steady-state operations. Any change in power generated, load demanded or the network topology will lead the power flow to change across the system until new equilibrium is reached. These changes are very common when operating a power system and automatically compensated with the aid of a control system. Power swings originate in response to events such as faults, line switching, disconnection of generators and loss or addition of large loads. During these disturbances, mechanical power supplied to the generators remains relatively constant due to slow governor action, while electrical power that can be delivered changes depending on the disturbance (McDonald et al., 2005). This unbalance between the input power and the power delivered causes oscillations in machine rotor angles and can result in severe power swings across the network.
This phenomenon becomes more significant when the power system is operated under a tight stability margin.
For a stable power swing, system may remain stable and come to a new equilibrium over time, depending on the severity of the disturbance and post control actions taken to overcome the instability. On the other hand, severe system disturbances can cause large separation of generator rotor angles leading to asynchronous operation of generators. Large fluctuations of voltages and currents are possible even beyond their nominal values in these cases. Large power swings, whether being stable or unstable, can trigger protection functions of relays causing unwanted relay operations, which can worsen disturbance leading to partial or total blackouts.
Out-of-Step (OOS) event are ideally an unstable power swing condition, which cannot be tolerable for a prolonged period of time due to its negative impact on power system equipment and integrity. OOS and pole slipping are similar designations for the condition where impedance trajectory as seen by protection relay, lies across generator impedance characteristics during a fault (Redfem & Checksfield, 1996). If the impedance trajectory goes through the characteristics of transmission line, then that is identified as an unstable power swing condition in the network (Apostolov et al., 1997).
Tendency of a group of generators to swing together subsequent to disturbances is identified as their coherency. Two generators are said to be coherent, if their rotor angle deviation does not exceed a given threshold value (Molina et al., 2012).
Generators swinging together, will try to dominate over a certain part of the power system, which is a probable island under the OOS condition in the network. Further, generator coherency is not fixed and varies time to time depending on the network topology and the operating conditions. Thus, online generator coherency identification of a power system will be very useful when system separation is imminent due to ... (1) where Power grid is a sophisticated dynamic system which delivers power from generation to load through a series of transmission lines. A balance between generated and consumed active/reactive power is essential during steady-state operations. Any change in power generated, load demanded or the network topology will lead the power flow to change across the system until new equilibrium is reached. These changes are very common when operating a power system and automatically compensated with the aid of a control system. Power swings originate in response to events such as faults, line switching, disconnection of generators and loss or addition of large loads. During these disturbances, mechanical power supplied to the generators remains relatively constant due to slow governor action, while electrical power that can be delivered changes depending on the disturbance (McDonald et al., 2005). This unbalance between the input power and the power delivered causes oscillations in machine rotor angles and can result in severe power swings across the network.
This phenomenon becomes more significant when the power system is operated under a tight stability margin.
For a stable power swing, system may remain stable and come to a new equilibrium over time, depending on the severity of the disturbance and post control actions taken to overcome the instability. On the other hand, severe system disturbances can cause large separation of generator rotor angles leading to asynchronous operation of generators. Large fluctuations of voltages and currents are possible even beyond their nominal values in these cases. Large power swings, whether being stable or unstable, can trigger protection functions of relays causing unwanted relay operations, which can worsen disturbance leading to partial or total blackouts.
Out-of-Step (OOS) event are ideally an unstable power swing condition, which cannot be tolerable for a prolonged period of time due to its negative impact on power system equipment and integrity. OOS and pole slipping are similar designations for the condition where impedance trajectory as seen by protection relay, lies across generator impedance characteristics during a fault (Redfem & Checksfield, 1996). If the impedance trajectory goes through the characteristics of transmission line, then that is identified as an unstable power swing condition in the network (Apostolov et al., 1997).
Tendency of a group of generators to swing together subsequent to disturbances is identified as their coherency. Two generators are said to be coherent, if their rotor angle deviation does not exceed a given threshold value (Molina et al., 2012).
Generators swinging together, will try to dominate over a certain part of the power system, which is a probable island under the OOS condition in the network. Further, generator coherency is not fixed and varies time to time depending on the network topology and the operating conditions. Thus, online generator coherency identification of a power system will be very useful when system separation is imminent due to and Power grid is a sophisticated dynamic system which delivers power from generation to load through a series of transmission lines. A balance between generated and consumed active/reactive power is essential during steady-state operations. Any change in power generated, load demanded or the network topology will lead the power flow to change across the system until new equilibrium is reached. These changes are very common when operating a power system and automatically compensated with the aid of a control system. Power swings originate in response to events such as faults, line switching, disconnection of generators and loss or addition of large loads. During these disturbances, mechanical power supplied to the generators remains relatively constant due to slow governor action, while electrical power that can be delivered changes depending on the disturbance (McDonald et al., 2005). This unbalance between the input power and the power delivered causes oscillations in machine rotor angles and can result in severe power swings across the network.
This phenomenon becomes more significant when the power system is operated under a tight stability margin.
For a stable power swing, system may remain stable and come to a new equilibrium over time, depending on the severity of the disturbance and post control actions taken to overcome the instability. On the other hand, severe system disturbances can cause large separation of generator rotor angles leading to asynchronous operation of generators. Large fluctuations of voltages and currents are possible even beyond their nominal values in these cases. Large power swings, whether being stable or unstable, can trigger protection functions of relays causing unwanted relay operations, which can worsen disturbance leading to partial or total blackouts.
Out-of-Step (OOS) event are ideally an unstable power swing condition, which cannot be tolerable for a prolonged period of time due to its negative impact on power system equipment and integrity. OOS and pole slipping are similar designations for the condition where impedance trajectory as seen by protection relay, lies across generator impedance characteristics during a fault (Redfem & Checksfield, 1996). If the impedance trajectory goes through the characteristics of transmission line, then that is identified as an unstable power swing condition in the network (Apostolov et al., 1997).
Tendency of a group of generators to swing together subsequent to disturbances is identified as their coherency. Two generators are said to be coherent, if their rotor angle deviation does not exceed a given threshold value (Molina et al., 2012).
Generators swinging together, will try to dominate over a certain part of the power system, which is a probable island under the OOS condition in the network. Further, generator coherency is not fixed and varies time to time depending on the network topology and the operating conditions. Thus, online generator coherency identification of a power system will be very useful when system separation is imminent due to are rotor angles of i and j generators at time t, and € is the given threshold for angle deviation (Song et al., 2014).
Generators swinging together, will try to dominate over a certain part of the power system, which is a probable island under the OOS condition in the network. Further, generator coherency is not fixed and varies time to time depending on the network topology and the operating conditions. Thus, online generator coherency identification of a power system will be very useful when system separation is imminent due to OOS condition. The online monitoring of the power system providing greater observability over the entire system is facilitated by the availability of Synchrophasor data through phasor measurement units (PMUs) (Sauhats et al., 2017).

Objectives of the study
The main objective of this paper is to introduce a generalised methodology to identify coherent groups of generators as an online decision-making approach based on real-time data. This methodology will identify generators which tend to swing similarly at the initiation of OOS events based on real-time rotor angle trajectories and aid to identify possible clusters within the transmission network. Simulation results of a selected OOS event in Sri Lankan power system are used for coherency identification using the proposed methodology. This case study considers the identification of the occurrence of OOS event in Sri Lankan power system, as well as the formation of coherent groups of generators.

Background study
An OOS event is considered to be one of the most disastrous situations in a power system which leads the power system towards partial or total power outages. Initiation of such events is due to tripping of key elements in the network, making inter-area loadgeneration imbalances. Number of OOS events had taken place in past decades, leading to total or partial blackouts all around the world. In 1965In , 1994In , 1996In and 2003, different parts of the United States power system suffered severe power outages lead by OOS conditions with uncontrolled separation of the system (Allen et al., 2007). Power systems of Italy in 2003, Malaysia in 2005, Colombia in 2007 and India in 2012 had faced similar crises where formations of unstable islands were observed (Allen et al., 2007).
OOS protection schemes can be found under two categories, namely, local-based and Wide Area Measurement System (WAMS)-based protection (Sauhats et al., 2017). Localised schemes normally monitor the variation of apparent impedance for detection of power swings and OOS only on a particular transmission element. WAMS-based schemes deal with online measured voltage and current phasors from phasor measurement units (PMUs) installed at critical locations of the network. Data are fed to real-time operating and decision-making computer via a fast and reliable communication system. The central computer identifies the contingency, decides what actions to be made and sends the instructions to relevant protection/ control elements in the network. With the availability of PMUs, measurement-based techniques have become more dominant and popular. This is because of the lack of dependency on accurate linearised models and system parameters (Ariff & Pal, 2013). Also, relying on real-time measured data gives a greater outcome irrespective of the contingency that the power system faces (Frimpong, 2015). A few algorithms available in the literature are summarised below.
The rationale behind a popular set of measurementbased algorithms available in literature to identify the generator coherency is to process the measured data of the network subsequent to contingencies using a transform such as discrete Fourier transform (DFT), Hilbert-Huang transform (HHT), and wavelet transform (WT). In Senroy (2008), coherency is examined by studying the instantaneous phase differences of oscillations in generator angles by using HHT. Swing curves are decomposed and the most dominant vector is extracted. Application of HHT provides the instantaneous phase of above dominant vectors. Evaluation of phase angle difference can be used to reveal the coherency information. Jonsson et al. (2004) have adopted DFT on generator rotor speeds for coherency identification. Based on post disturbance data of generator parameter, frequency spectrum is analysed for each generator and the most dominant vector is identified by phase angle and its magnitude. After comparing the phase angle of the dominant vector of all the generators, the coherency is determined. The work given in Vahidnia et al. (2012) shows that the generator coherency can also be identified using spectral analysis of generator velocities using DFT. Similarly, a wavelet phase difference (WPD) approach derived from the wavelet power transform applied on the generator rotor oscillations to identify coherent generator groups is presented in Avdakovic et al. (2014) Use of the machine learning-based techniques together with the synchronised phasor measurements for different power system applications such as transient, small-signal, voltage stability prediction, generator coherency identification, etc. is popular in power systems literature. In Verma et al. (2012), authors have adopted Radial Basis Function (RBF) based Artificial Neural Network (ANN) technique for coherency identification of the generators. Authors have used 2 RBF networks in which, one network determines the status of synchronism while the other figures out the coherent group number. Active and reactive power flows of generator and load buses are considered as inputs for the determination of coherency. Another algorithm using RBF neural network for coherency identification is proposed in Siddiqui et al. (2018). Similarly, an algorithm using Support Vector Clustering which is inspired by support vector machines is proposed in Agrawal and Thukaram (2013). The algorithm uses generator rotor measurements as input data and the applicability of the method has been demonstrated using simulations on test power systems. A trained classifier using decision tree technique is proposed in Koochi et al. (2017) for coherency identification. The applicability is demonstrated using the simulations on a real Iranian power system.
It is also shown in literature that generator coherency can be identified by processing the power system measurements using different signal processing techniques. For example, correlation coefficients are used in Aghamohammadi and Tabandeh (2012). This approach is based on correlation characteristics of generator rotor angle oscillation. Correlation coefficients are calculated for each pair of generators. Correlation coefficient being close to 1 indicates a better relationship between two generators. Therefore, coherent groups of generators are identified when the correlation coefficient is higher than the given threshold. Independent component analysis (ICA) based coherency identification technique is adopted in Ariff and Pal (2013), where generator speed and bus angle data are used as the inputs. Authors have used spectral ICA technique which identifies single peak independent components (ICs). By means of this spectral ICA, a spectrum can be extracted into a combination of single peak ICs. A mixing ratio is defined for ICs and is extracted for clustering generators and buses considering common features of measured signals. Graph theory has also been used in different power system applications. A generator clustering algorithm based on the same approach is presented in Gomez and Rios (2015) in which the coherency is identified using three criteria: electrical distance to the group of generators, topology and operational constraints. Further, Rios and Gómez (2011) suggest that the mutual influence of network topology and dynamic behaviour related to coherency phenomenon can be easily understood by converting the generating system into an equivalent graph with vertices and edges. Further, coherency is determined by evaluating the synchronising power between generators. Generally, a process of partitioning a given graph of generator system is done by finding the edges that will split the initial graph into desired number of sub groups, when removed. For graph partitioning Rios and Gómez (2011) have proposed Recursive Spectral Bisection, Maximum Spanning Tree Clustering and Minimum Cut Tree Clustering algorithms. The Quantile Regression-based algorithm (Mazhari et al.2019), Projection Pursuit algorithm (Jiang, 2016), Spectral Clustering algorithm (Lin, 2018), Lyapunov Exponents-

March 2021
Journal of the National Science Foundation of Sri Lanka 49 (1) based algorithm (Khaitan & McCalley, 2013), Singular Value Decomposition algorithm (Zhu et al., 2016), and Prony analysis (Chamorro et al.2016), are few more measurement-based algorithms proposed in literature for identification of generator coherency in the power system.
The measurement-based coherency identification algorithms summarised in this section have their inherent advantage of the model independence. Since these measurements are available through phasor measurement units in modern systems, such methods can be applied into any power system without worrying about the order of the dynamic system. However, these measurementbased methods may have limitations. For example, the machine learning-based techniques require number of offline training. The accuracy of the spectral methods depends on the size of the data window over which the spectral analysis is performed. This paper also presents a measurement-based generator coherency identification algorithm which does not require any offline training and is not using spectral analysis. The accuracy of the method is demonstrated using case studies on a real power system. However, the presented algorithm in the paper may also have limitations such as the accuracy under loss of data and the measurement noise in a realtime measurement system. However, these limitations are related with the infrastructure used for obtaining data in a measurement system and are common to any such algorithms available in the literature as well.

Proposed methodology for generator coherency identification
A measurement-based technique which uses wide area measurements provides greater independency, observability and situational awareness of the power system. To identify the coherency, the data should be clustered based on their similarities and deficiencies. Data clustering algorithms like K-means clustering is ideal for this particular purpose. K-means clustering is a popular scheme of data clustering due to its simplicity and its guaranteed convergence of the solution (Trevino, 2016).
The methodology proposed in this paper for generator coherency identification consists of two major steps. The first step is the process of fetching data / monitoring and the second step is the clustering operation of fetched data. All aspects of the proposed methodology are discussed in details below.
The methodology proposed in this paper for generator coherency identification consists of two major steps.
The first step is the process of fetching data / monitoring and the second step is the clustering operation of fetched data. All aspects of the proposed methodology are discussed in details below.

Process of monitoring and fetching data
The proposed algorithm uses generator rotor angles to identify coherent groups. However, rotor angle of a generator is not directly measurable by PMU. Thus, rotor angle should be derived from the electrical measurements obtained by PMU. Generator terminal voltage ∠ and output current ∠ phasors are used for the calculation of generator rotor angle, which can be measured by PMU in real-time. Figure 1 and the related equations explain the process of calculating generator rotor angle from the measured data by PMU (Heidary et. Al, 2014).
where, δ ' is rotor angle of the generator with respect to its local terminal voltage is magnitude of generator terminal voltage measured by PMU is magnitude of generator output current measured by PMU is phase angle of generator output current with respect to its terminal voltage measured by PMU , are transient reactances of the generator's direct and quadrature axes, respectively Calculated rotor angles as above are to be processed further for generator coherency identification as explained below.

Centre of Inertia based rotor angle (δCOI)
Synchronism in a power system is a relative phenomenon of rotor angle positions and actually it is determined by the relative motions among the machines. Power system synchronism related studies considering the absolute rotor angles is immaterial, since there is no true meaning of it. Therefore, rotor angles should be addressed relative to a common reference frame. Figure 1: Generator voltage-current phasor diagram

Process of monitoring and fetching data
The proposed algorithm uses generator rotor angles to identify coherent groups. However, rotor angle of a generator is not directly measurable by PMU. Thus, rotor angle should be derived from the electrical measurements obtained by PMU. Generator terminal voltage The methodology proposed in this paper for generator coherency identification consist The first step is the process of fetching data / monitoring and the second step is the c fetched data. All aspects of the proposed methodology are discussed in details below.

Process of monitoring and fetching data
The proposed algorithm uses generator rotor angles to identify coherent groups. How generator is not directly measurable by PMU. Thus, rotor angle should be derive measurements obtained by PMU. Generator terminal voltage ∠ and output current ∠ the calculation of generator rotor angle, which can be measured by PMU in real-time. Fi equations explain the process of calculating generator rotor angle from the measured dat Al, 2014).
where, δ ' is rotor angle of the generator with respect to its local terminal voltage is magnitude of generator terminal voltage measured by PMU is magnitude of generator output current measured by PMU is phase angle of generator output current with respect to its terminal voltage measured , are transient reactances of the generator's direct and quadrature axes, respectively Calculated rotor angles as above are to be processed further for generator cohere explained below.

Centre of Inertia based rotor angle (δCOI)
Synchronism in a power system is a relative phenomenon of rotor angle positions and ac by the relative motions among the machines. Power system synchronism related st absolute rotor angles is immaterial, since there is no true meaning of it. Therefore, ro addressed relative to a common reference frame.

and output current
The methodology proposed in this paper for generator coherency identification consists of two major steps.
The first step is the process of fetching data / monitoring and the second step is the clustering operation of fetched data. All aspects of the proposed methodology are discussed in details below.

Process of monitoring and fetching data
The proposed algorithm uses generator rotor angles to identify coherent groups. However, rotor angle of a generator is not directly measurable by PMU. Thus, rotor angle should be derived from the electrical measurements obtained by PMU. Generator terminal voltage ∠ and output current ∠ phasors are used for the calculation of generator rotor angle, which can be measured by PMU in real-time. Figure 1 and the related equations explain the process of calculating generator rotor angle from the measured data by PMU (Heidary et. Al, 2014).
where, δ ' is rotor angle of the generator with respect to its local terminal voltage is magnitude of generator terminal voltage measured by PMU is magnitude of generator output current measured by PMU is phase angle of generator output current with respect to its terminal voltage measured by PMU , are transient reactances of the generator's direct and quadrature axes, respectively Calculated rotor angles as above are to be processed further for generator coherency identification as explained below.

Centre of Inertia based rotor angle (δCOI)
Synchronism in a power system is a relative phenomenon of rotor angle positions and actually it is determined by the relative motions among the machines. Power system synchronism related studies considering the absolute rotor angles is immaterial, since there is no true meaning of it. Therefore, rotor angles should be addressed relative to a common reference frame.
phasors are used for the calculation of generator rotor angle, which can be measured by PMU in real-time. Figure 1 and the related equations explain the process of calculating generator rotor angle from the measured data by PMU (Heidary et al, 2014).
The methodology proposed in this paper for generator coherency identificatio The first step is the process of fetching data / monitoring and the second step fetched data. All aspects of the proposed methodology are discussed in details b

Process of monitoring and fetching data
The proposed algorithm uses generator rotor angles to identify coherent grou generator is not directly measurable by PMU. Thus, rotor angle should b measurements obtained by PMU. Generator terminal voltage ∠ and output cu the calculation of generator rotor angle, which can be measured by PMU in rea equations explain the process of calculating generator rotor angle from the meas Al, 2014).
where, δ ' is rotor angle of the generator with respect to its local terminal voltage is magnitude of generator terminal voltage measured by PMU is magnitude of generator output current measured by PMU is phase angle of generator output current with respect to its terminal voltage , are transient reactances of the generator's direct and quadrature axes, res Calculated rotor angles as above are to be processed further for generato explained below.

Centre of Inertia based rotor angle (δCOI)
Synchronism in a power system is a relative phenomenon of rotor angle position by the relative motions among the machines. Power system synchronism r absolute rotor angles is immaterial, since there is no true meaning of it. The addressed relative to a common reference frame.
The methodology proposed in this paper for generator coherency identificatio The first step is the process of fetching data / monitoring and the second step fetched data. All aspects of the proposed methodology are discussed in details b Process of monitoring and fetching data The proposed algorithm uses generator rotor angles to identify coherent grou generator is not directly measurable by PMU. Thus, rotor angle should b measurements obtained by PMU. Generator terminal voltage ∠ and output cu the calculation of generator rotor angle, which can be measured by PMU in rea equations explain the process of calculating generator rotor angle from the meas Al, 2014). where, δ ' is rotor angle of the generator with respect to its local terminal voltage is magnitude of generator terminal voltage measured by PMU is magnitude of generator output current measured by PMU is phase angle of generator output current with respect to its terminal voltage , are transient reactances of the generator's direct and quadrature axes, res Calculated rotor angles as above are to be processed further for generato explained below.

Centre of Inertia based rotor angle (δCOI)
Synchronism in a power system is a relative phenomenon of rotor angle position by the relative motions among the machines. Power system synchronism r absolute rotor angles is immaterial, since there is no true meaning of it. The addressed relative to a common reference frame.
The methodology proposed in this paper for generator coherency identificatio The first step is the process of fetching data / monitoring and the second step fetched data. All aspects of the proposed methodology are discussed in details b Process of monitoring and fetching data The proposed algorithm uses generator rotor angles to identify coherent grou generator is not directly measurable by PMU. Thus, rotor angle should b measurements obtained by PMU. Generator terminal voltage ∠ and output cu the calculation of generator rotor angle, which can be measured by PMU in rea equations explain the process of calculating generator rotor angle from the meas Al, 2014). where, δ ' is rotor angle of the generator with respect to its local terminal voltage is magnitude of generator terminal voltage measured by PMU is magnitude of generator output current measured by PMU is phase angle of generator output current with respect to its terminal voltage , are transient reactances of the generator's direct and quadrature axes, res Calculated rotor angles as above are to be processed further for generato explained below.

Centre of Inertia based rotor angle (δCOI)
Synchronism in a power system is a relative phenomenon of rotor angle position by the relative motions among the machines. Power system synchronism r absolute rotor angles is immaterial, since there is no true meaning of it. The addressed relative to a common reference frame.
The methodology proposed in this paper for generator coherency identificatio The first step is the process of fetching data / monitoring and the second step fetched data. All aspects of the proposed methodology are discussed in details b Process of monitoring and fetching data The proposed algorithm uses generator rotor angles to identify coherent grou  where, δ ' is rotor angle of the generator with respect to its local terminal voltage is magnitude of generator terminal voltage measured by PMU is magnitude of generator output current measured by PMU is phase angle of generator output current with respect to its terminal voltage , are transient reactances of the generator's direct and quadrature axes, res Calculated rotor angles as above are to be processed further for generato explained below.

Centre of Inertia based rotor angle (δCOI)
Synchronism in a power system is a relative phenomenon of rotor angle position by the relative motions among the machines. Power system synchronism r absolute rotor angles is immaterial, since there is no true meaning of it. The addressed relative to a common reference frame. where, The methodology proposed in this paper for generator coherency identificatio The first step is the process of fetching data / monitoring and the second step fetched data. All aspects of the proposed methodology are discussed in details b

Process of monitoring and fetching data
The proposed algorithm uses generator rotor angles to identify coherent grou  where, δ ' is rotor angle of the generator with respect to its local terminal voltage is magnitude of generator terminal voltage measured by PMU is magnitude of generator output current measured by PMU is phase angle of generator output current with respect to its terminal voltage , are transient reactances of the generator's direct and quadrature axes, res Calculated rotor angles as above are to be processed further for generato explained below.

Centre of Inertia based rotor angle (δCOI)
Synchronism in a power system is a relative phenomenon of rotor angle position by the relative motions among the machines. Power system synchronism r absolute rotor angles is immaterial, since there is no true meaning of it. The addressed relative to a common reference frame.
is rotor angle of the generator with respect to its local terminal voltage The methodology proposed in this paper for generator coherency identificatio The first step is the process of fetching data / monitoring and the second step fetched data. All aspects of the proposed methodology are discussed in details b

Process of monitoring and fetching data
The proposed algorithm uses generator rotor angles to identify coherent grou  where, δ ' is rotor angle of the generator with respect to its local terminal voltage is magnitude of generator terminal voltage measured by PMU is magnitude of generator output current measured by PMU is phase angle of generator output current with respect to its terminal voltage , are transient reactances of the generator's direct and quadrature axes, res Calculated rotor angles as above are to be processed further for generato explained below.

Centre of Inertia based rotor angle (δCOI)
Synchronism in a power system is a relative phenomenon of rotor angle position by the relative motions among the machines. Power system synchronism r absolute rotor angles is immaterial, since there is no true meaning of it. The addressed relative to a common reference frame.
is magnitude of generator terminal voltage measured by PMU The methodology proposed in this paper for generator coherency identificatio The first step is the process of fetching data / monitoring and the second step fetched data. All aspects of the proposed methodology are discussed in details b Process of monitoring and fetching data  where, δ ' is rotor angle of the generator with respect to its local terminal voltage is magnitude of generator terminal voltage measured by PMU is magnitude of generator output current measured by PMU is phase angle of generator output current with respect to its terminal voltage , are transient reactances of the generator's direct and quadrature axes, res Calculated rotor angles as above are to be processed further for generato explained below.

Centre of Inertia based rotor angle (δCOI)
Synchronism in a power system is a relative phenomenon of rotor angle position by the relative motions among the machines. Power system synchronism r absolute rotor angles is immaterial, since there is no true meaning of it. The addressed relative to a common reference frame.
is magnitude of generator output current measured by PMU The methodology proposed in this paper for generator coherency identificatio The first step is the process of fetching data / monitoring and the second step  where, δ ' is rotor angle of the generator with respect to its local terminal voltage is magnitude of generator terminal voltage measured by PMU is magnitude of generator output current measured by PMU is phase angle of generator output current with respect to its terminal voltage , are transient reactances of the generator's direct and quadrature axes, res Calculated rotor angles as above are to be processed further for generato explained below.

Centre of Inertia based rotor angle (δCOI)
Synchronism in a power system is a relative phenomenon of rotor angle position by the relative motions among the machines. Power system synchronism r absolute rotor angles is immaterial, since there is no true meaning of it. The addressed relative to a common reference frame.
is phase angle of generator output current with respect to its terminal voltage measured by PMU The methodology proposed in this paper for generator coherency identificatio The first step is the process of fetching data / monitoring and the second step fetched data. All aspects of the proposed methodology are discussed in details b

Process of monitoring and fetching data
The proposed algorithm uses generator rotor angles to identify coherent grou  where, δ ' is rotor angle of the generator with respect to its local terminal voltage is magnitude of generator terminal voltage measured by PMU is magnitude of generator output current measured by PMU is phase angle of generator output current with respect to its terminal voltage , are transient reactances of the generator's direct and quadrature axes, res Calculated rotor angles as above are to be processed further for generato explained below.

Centre of Inertia based rotor angle (δCOI)
Synchronism in a power system is a relative phenomenon of rotor angle position by the relative motions among the machines. Power system synchronism r absolute rotor angles is immaterial, since there is no true meaning of it. The addressed relative to a common reference frame.

Centre of Inertia based rotor angle (δ COI )
Synchronism in a power system is a relative phenomenon of rotor angle positions and actually it is determined by the relative motions among the machines. Power system synchronism related studies considering the absolute rotor angles is immaterial, since there is no true meaning of it. Therefore, rotor angles should be addressed relative to a common reference frame.
Centre of Inertia (COI) based rotor angle is a better reference for rotor angle studies, since it represents the mean motion of the power system and it has the advantage of being symmetrical. Therefore, a better understanding and a clear observation can be achieved regarding how the inter-generator rotor angle movements happen. Thus, COI based rotor angle is used as the reference for all plots and for data to be processed (Hashim et al., 2010;Wahab & Mohamed, 2012).
Centre of Inertia (COI) based rotor angle is a better reference for rotor angle studies, since it represents the mean motion of the power system and it has the advantage of being symmetrical. Therefore, a better understanding and a clear observation can be achieved regarding how the inter-generator rotor angle movements happen. Thus, COI based rotor angle is used as the reference for all plots and for data to be processed (Hashim et al., 2010;Wahab & Mohamed, 2012).
where, is the inertia constant and δ is the rotor angle of k th machine of the system. Therefore, rotor angle of k th machine relative to COI will be = − (7)

Out-of-step (OOS) detection criteria
Positions of generator rotors change during a fault due to the disturbed power flow. After the clearance of the disturbance, the rotor angles try to regain a new equilibrium following an oscillatory behaviour because of the inertia characteristics of the prime mover. While doing so, it is possible for some generators to be pulled away largely from each other, which endangers the synchronism of the generators. In order to illustrate this feature, contingency simulations were done on a 16-generator, 68-bus test system using detailed generator models in PSS ® E software. This system is a reduced order equivalent of the interconnected New England Test System (NETS) and the New York Power System (NYPS). Figure 2 shows the variations of the rotor angles of the system subsequent to a contingency. It shows the detection of OOS followed by a dataset within the time window T. ... (6) where, Centre of Inertia (COI) based rotor angle is a better reference for rotor angle studies, since it represents the mean motion of the power system and it has the advantage of being symmetrical. Therefore, a better understanding and a clear observation can be achieved regarding how the inter-generator rotor angle movements happen. Thus, COI based rotor angle is used as the reference for all plots and for data to be processed (Hashim et al., 2010;Wahab & Mohamed, 2012).
where, is the inertia constant and δ is the rotor angle of k th machine of the system. Therefore, rotor angle of k th machine relative to COI will be = − (7)

Out-of-step (OOS) detection criteria
Positions of generator rotors change during a fault due to the disturbed power flow. After the clearance of the disturbance, the rotor angles try to regain a new equilibrium following an oscillatory behaviour because of the inertia characteristics of the prime mover. While doing so, it is possible for some generators to be pulled away largely from each other, which endangers the synchronism of the generators. In order to illustrate this feature, contingency simulations were done on a 16-generator, 68-bus test system using detailed generator models in PSS ® E software. This system is a reduced order equivalent of the interconnected New England Test System (NETS) and the New York Power System (NYPS). Figure 2 shows the variations of the rotor angles of the system subsequent to a contingency. It shows the detection of OOS followed by a dataset within the time window T. After clearance of the disturbance, OOS detection criteria is checked at each data sample, in real-time. As shown in Figure 2, whenever the deviation of the rotor angle of any two generators exceeds the given threshold ( ), clustering operation starts. At the point of OOS detection, latest data sample within the is the inertia constant and Centre of Inertia (COI) based rotor angle is a better reference for rotor angle studies, since it represents the mean motion of the power system and it has the advantage of being symmetrical. Therefore, a better understanding and a clear observation can be achieved regarding how the inter-generator rotor angle movements happen. Thus, COI based rotor angle is used as the reference for all plots and for data to be processed (Hashim et al., 2010;Wahab & Mohamed, 2012).
where, is the inertia constant and δ is the rotor angle of k th machine of the system. Therefore, rotor angle of k th machine relative to COI will be = − (7)

Out-of-step (OOS) detection criteria
Positions of generator rotors change during a fault due to the disturbed power flow. After the clearance of the disturbance, the rotor angles try to regain a new equilibrium following an oscillatory behaviour because of the inertia characteristics of the prime mover. While doing so, it is possible for some generators to be pulled away largely from each other, which endangers the synchronism of the generators. In order to illustrate this feature, contingency simulations were done on a 16-generator, 68-bus test system using detailed generator models in PSS ® E software. This system is a reduced order equivalent of the interconnected New England Test System (NETS) and the New York Power System (NYPS). Figure 2 shows the variations of the rotor angles of the system subsequent to a contingency. It shows the detection of OOS followed by a dataset within the time window T. After clearance of the disturbance, OOS detection criteria is checked at each data sample, in real-time. As shown in Figure 2, whenever the deviation of the rotor angle of any two generators exceeds the given threshold ( ), clustering operation starts. At the point of OOS detection, latest data sample within the is the rotor angle of k th machine of the system. Therefore, rotor angle of k th machine relative to COI will be movements happen. Thus, COI based rotor angle is used as the reference processed (Hashim et al., 2010;Wahab & Mohamed, 2012).
where, is the inertia constant and δ is the rotor angle of k th machine of of k th machine relative to COI will be = −

Out-of-step (OOS) detection criteria
Positions of generator rotors change during a fault due to the disturbed pow disturbance, the rotor angles try to regain a new equilibrium following an os inertia characteristics of the prime mover. While doing so, it is possible for s largely from each other, which endangers the synchronism of the generators contingency simulations were done on a 16-generator, 68-bus test system u PSS ® E software. This system is a reduced order equivalent of the intercon (NETS) and the New York Power System (NYPS). Figure

Out-of-step (OOS) detection criteria
Positions of generator rotors change during a fault due to the disturbed power flow. After the clearance of the disturbance, the rotor angles try to regain a new equilibrium following an oscillatory behaviour because of the inertia characteristics of the prime mover. While doing so, it is possible for some generators to be pulled away largely from each other, which endangers the synchronism of the generators. In order to illustrate this feature, contingency simulations were done on a 16-generator, 68-bus test system using detailed generator models in PSS ® E software. This system is a reduced order equivalent of the interconnected New England Test System (NETS) and the New York Power System (NYPS). Figure 2 shows the variations of the rotor angles of the system subsequent to a contingency. It shows the detection of OOS followed by a dataset within the time window T.
Centre of Inertia (COI) based rotor angle is a better reference for rotor angle studies, since it represents the mean motion of the power system and it has the advantage of being symmetrical. Therefore, a better understanding and a clear observation can be achieved regarding how the inter-generator rotor angle movements happen. Thus, COI based rotor angle is used as the reference for all plots and for data to be processed (Hashim et al., 2010;Wahab & Mohamed, 2012).
where, is the inertia constant and δ is the rotor angle of k th machine of the system. Therefore, rotor angle of k th machine relative to COI will be = − (7) Out-of-step (OOS) detection criteria Positions of generator rotors change during a fault due to the disturbed power flow. After the clearance of the disturbance, the rotor angles try to regain a new equilibrium following an oscillatory behaviour because of the inertia characteristics of the prime mover. While doing so, it is possible for some generators to be pulled away largely from each other, which endangers the synchronism of the generators. In order to illustrate this feature, contingency simulations were done on a 16-generator, 68-bus test system using detailed generator models in PSS ® E software. This system is a reduced order equivalent of the interconnected New England Test System (NETS) and the New York Power System (NYPS). Figure 2 shows the variations of the rotor angles of the system subsequent to a contingency. It shows the detection of OOS followed by a dataset within the time window T. After clearance of the disturbance, OOS detection criteria is checked at each data sample, in real-time. As shown in Figure 2, whenever the deviation of the rotor angle of any two generators exceeds the given threshold clustering operation starts. At the point of OOS detection, latest data sample within the predefined time window T is only considered for generator clustering.
Centre of Inertia (COI) based rotor angle is a better reference for rotor angle studies, since it represents the mean motion of the power system and it has the advantage of being symmetrical. Therefore, a better understanding and a clear observation can be achieved regarding how the inter-generator rotor angle movements happen. Thus, COI based rotor angle is used as the reference for all plots and for data to be processed (Hashim et al., 2010;Wahab & Mohamed, 2012).
where, is the inertia constant and δ is the rotor angle of k th machine of the system. Therefore, rotor angle of k th machine relative to COI will be = − (7)

Out-of-step (OOS) detection criteria
Positions of generator rotors change during a fault due to the disturbed power flow. After the clearance of the disturbance, the rotor angles try to regain a new equilibrium following an oscillatory behaviour because of the inertia characteristics of the prime mover. While doing so, it is possible for some generators to be pulled away largely from each other, which endangers the synchronism of the generators. In order to illustrate this feature, contingency simulations were done on a 16-generator, 68-bus test system using detailed generator models in PSS ® E software. This system is a reduced order equivalent of the interconnected New England Test System (NETS) and the New York Power System (NYPS). Figure 2 shows the variations of the rotor angles of the system subsequent to a contingency. It shows the detection of OOS followed by a dataset within the time window T.

Data fetching
This section explains the data fetching process which is illustrated in Figure 3.

Data fetching
This section explains the data fetching process which is illustrated Latest N number of data samples are considered at th ... (9) A disturbance is initiated at random time in the power system. Let's say that this time > (9)

Data fetching
This section explains the data fetching process which is illustrated in Figure 3.  (1) is cleared at Figure 3 -Process of data fetching of proposed methodology A disturbance is initiated at random time in the power system. Let's say that this time = 0 . When the fault is cleared at = , storing the generator rotor angle data is triggered. As the time proceeds, predefined set of latest past data is kept in a buffer for processing. Detection of OOS occurs at = and latest number of data samples within the time window are considered for the clustering of generators.
Time window T: Latest rotor angle data at the point of OOS detection carry the finest coherency information of the generators since the deviation of the rotor angle are furthest from each other. A lengthy time window adds more past data with less deviation from each other introducing difficulties in differentiation of data.
Similarly, sufficient amount of data should be considered in order to ensure that trajectory of the rotor angle is considered and the solidity of the rotor angle data is maintained per each generator. Considering the above facts, a time window of 100 ms is selected which occupies 10 rotor angle data samples at 10 ms sampling steps.

Clustering operation
Clustering is a process of organising objects into different groups such that those within a group have similar features and are distinct from those in other groups. K-means clustering, Fuzzy-c-means clustering, support vector clustering are few examples of such methods. In this paper, K-means clustering algorithm is used to identify generator coherent groups.
K-means clustering is a simple, unsupervised learning algorithm, which follows a simple procedure to classify a given dataset into defined number of groups. The algorithm aims to partition n number of data points into k number of clusters using an iterative process, where each data point is correctly assigned to relevant group iteratively. It tries to keep inter-cluster data points as close as possible while making clusters as distant as , storing the generator rotor angle data is triggered. As the time proceeds, predefined set of latest past data is kept in a buffer for processing. Detection the criterion of, minimizing squared Euclidean distances between the data points and the corresponding cluster centroid (Trevino, 2016).
A common limitation associated with a clustering technique is the user involvement in pre-detecting the expected number of clusters within the initial raw dataset. Therefore, the clustering process needs to be automated before using that for real-time application. This paper uses Silhouette Criterion together with K-means clustering on this regard.

Silhouette criterion
As discussed in the previous section, the number of clusters k will be a user input. This is not the expected outcome, since the optimum number of generator clusters should be decided based on the rotor angle data distribution. In order to overcome this gap, Silhouette criterion is applied.
Main objective of this algorithm is to define optimum number of clusters for the given dataset. Silhouette value is a measure of similarity of a datum to its own cluster compared to foreign clusters.
Assume a set of data has already been clustered into k groups using K-means clustering. Silhouette value can be calculated as per the following [MathWorks, 2019; Silhouette (clustering), 2019].
possible from each other. The algorithm runs based on the criterion o distances between the data points and the corresponding cluster centroid (Tre A common limitation associated with a clustering technique is the user expected number of clusters within the initial raw dataset. Therefore, th automated before using that for real-time application. This paper uses Silh means clustering on this regard.

Silhouette criterion
As discussed in the previous section, the number of clusters k will be a us outcome, since the optimum number of generator clusters should be decid distribution. In order to overcome this gap, Silhouette criterion is applied.
Main objective of this algorithm is to define optimum number of clusters value is a measure of similarity of a datum to its own cluster compared to for Assume a set of data has already been clustered into k groups using K-mea be calculated as per the following [MathWorks, 2019; Silhouette (clustering) where, is the average distance between ℎ and all other data within its own clus ( ) is the smallest average distance of to all points in any other cluster, in As per the above equation, Silhouette value ranges from -1 to 1.

Data fetching
This section explains the data fetching process which is illustrated in Figure 3. Similarly, sufficient amount of data should be considered in order to ensure that trajectory of the rotor angle is considered and the solidity of the rotor angle data is maintained per each generator. Considering the above facts, a time window of 100 ms is selected which occupies 10 rotor angle data samples at 10 ms sampling steps.

Clustering operation
Clustering is a process of organising objects into different groups such that those within a group have similar features and are distinct from those in other groups. K-means clustering, Fuzzy-c-means clustering, support vector clustering are few examples of such methods. In this paper, K-means clustering algorithm is used to identify generator coherent groups.
K-means clustering is a simple, unsupervised learning algorithm, which follows a simple procedure to classify a given dataset into defined number of groups. The algorithm aims to partition n number of data points into k number of clusters using an iterative process, where each data point is correctly assigned to relevant group iteratively. It tries to keep inter-cluster data points as close as possible while making clusters as distant as A disturbance is initiated at random time in the power system. Let's say that this time = 0 . When the fault is cleared at = , storing the generator rotor angle data is triggered. As the time proceeds, predefined set of latest past data is kept in a buffer for processing. Detection of OOS occurs at = and latest number of data samples within the time window are considered for the clustering of generators.
Time window T: Latest rotor angle data at the point of OOS detection carry the finest coherency information of the generators since the deviation of the rotor angle are furthest from each other. A lengthy time window adds more past data with less deviation from each other introducing difficulties in differentiation of data.
Similarly, sufficient amount of data should be considered in order to ensure that trajectory of the rotor angle is considered and the solidity of the rotor angle data is maintained per each generator. Considering the above facts, a time window of 100 ms is selected which occupies 10 rotor angle data samples at 10 ms sampling steps.

Clustering operation
Clustering is a process of organising objects into different groups such that those within a group have similar features and are distinct from those in other groups. K-means clustering, Fuzzy-c-means clustering, support vector clustering are few examples of such methods. In this paper, K-means clustering algorithm is used to identify generator coherent groups.
K-means clustering is a simple, unsupervised learning algorithm, which follows a simple procedure to classify a given dataset into defined number of groups. The algorithm aims to partition n number of data points into k number of clusters using an iterative process, where each data point is correctly assigned to relevant group iteratively. It tries to keep inter-cluster data points as close as possible while making clusters as distant as and latest N number of data samples within the time window T are considered for the clustering of generators.

Time window T
Latest rotor angle data at the point of OOS detection carry the finest coherency information of the generators since the deviation of the rotor angle are furthest from each other. A lengthy time window adds more past data with less deviation from each other introducing difficulties in differentiation of data. Similarly, sufficient amount of data should be considered in order to ensure that trajectory of the rotor angle is considered and the solidity of the rotor angle data is maintained per each generator. Considering the above facts, a time window of 100 ms is selected which occupies 10 rotor angle data samples at 10 ms sampling steps.

Clustering operation
Clustering is a process of organising objects into different groups such that those within a group have similar features and are distinct from those in other groups. K-means clustering, Fuzzy-c-means clustering, support vector clustering are few examples of such methods. In this paper, K-means clustering algorithm is used to identify generator coherent groups.
K-means clustering is a simple, unsupervised learning algorithm, which follows a simple procedure to classify a given dataset into defined number of groups. The algorithm aims to partition n number of data points into k number of clusters using an iterative process, where each data point is correctly assigned to relevant group iteratively. It tries to keep inter-cluster data points as close as possible while making clusters as distant as possible from each other. The algorithm runs based on where, is the average distance between ℎ and all other data within its own cluster, for each datum i, ( ) is the smallest average distance of to all points in any other cluster, in which is not a member, As per the above equation, Silhouette value ranges from -1 to 1.

Implementation of proposed methodology
The proposed methodology was developed in MATLAB and can be understood as per the flow chart shown in where, is the average distance between ℎ and all other data within its own cluster, for each datum i, ( ) is the smallest average distance of to all points in any other cluster, in which is not a member, As per the above equation, Silhouette value ranges from -1 to 1.

Implementation of proposed methodology
The proposed methodology was developed in MATLAB and can be understood as per the flow chart shown in and all other data within its own cluster, for each datum i, be calculated as per the following [MathWorks, 2019;Silhouette (clustering), 2019].
where, is the average distance between ℎ and all other data within its own cluster, for each datum i, ( ) is the smallest average distance of to all points in any other cluster, in which is not a member, As per the above equation, Silhouette value ranges from -1 to 1.

Implementation of proposed methodology
The proposed methodology was developed in MATLAB and can be understood as per the flow chart shown in Figure 4. Each step of the aforementioned methodology is explained in detail below: is the smallest average distance of i to all points in any other cluster, in which is not a member, As per the above equation, Silhouette value ranges from -1 to 1.
where, is the average distance between ℎ and all other data within i ( ) is the smallest average distance of to all points in any other As per the above equation, Silhouette value ranges from -1 to 1.

Implementation of proposed methodology
The proposed methodology was developed in MATLAB and can Optimum number of clusters are selected, when average silhouette value closes to 1 (Wikipedia, 2019b).

Implementation of proposed methodology
The proposed methodology was developed in MATLAB and can be understood as per the flow chart shown in Figure 4. Each step of the aforementioned methodology is explained in detail below: STEP (1) After achieving rotor angle data of all the generators, those data are reoriented based on centre of inertia (COI) of the system. COI based rotor angle is calculated as per equation (6) and COI based relative rotor angle is derived for each generator according to equation (7). STEP (2) Deviation of rotor angles are calculated among all the generators. STEP (3) Rotor angle deviations from previous step is compared with the threshold value D for any violation of the condition to determine an OOS condition. If the condition is not violated, next set of data sample is assessed. STEP (4) Calculation of centroids of rotor angle data for each generator is initiated after the determination of the condition to be OOS. Calculation of the centroid is done by applying K-means clustering algorithm to each generator separately with input k (number of groups) =1. Therefore, algorithm clusters all the rotor angle data of a generator into a single group; thus, one centroid (C i ) per generator will be the output. STEP (5) Output from previous step is an (n×1) array C containing centroids of rotor angle data of all the generators. In this step, the array C undergoes an iterative process for the generator clustering. Initially, number of generator cluster m is set to 2. Rotor angle centroids representing each generator are clustered into groups by K-means algorithm as defined by m. STEP (6) Array C containing centroids of rotor angle data of all generators are clustered into groups as defined by m, in the previous step. After the clustering, average silhouette value is calculated for the given m. Value of indicates how well the generators are clustered into groups as defined by m. The clustering operation is better if the value of is closer to unity.

STEP (7)
Step 7 and Step 8 undergo an iterative process until . Value of M is greater than 2 and should be decided based on practically possible maximum number of generator clusters within the power system. The knowledge of power system operators and the past experiences can be used to determine a practical value for M. During this iterative process, the array C containing centroids of rotor angle data is clustered into groups ranging from 2 to M. At every iteration, average silhouette value is calculated for values for m ranging from 2 to M. At the end of iterative process, an [(M-1) × 1] array S containing average silhouette values is created. STEP (8) Maximum value of average silhouette values is obtained and corresponding value of m is selected as the optimum number of generator clusters STEP (9) Once the optimum number of generator clusters is found, clustering operation is done for by applying K-means algorithm and each generator is assigned to the relevant cluster as per the output of the algorithm. STEP (10) Display the warning message "OUT OF STEP !!!" with the assignment of generators in relevant clusters.

Model validation:
As per the investigation report on the above event (Ministry of Power and Energy, 2016), the power system had separated into different clusters prior to the total failure. This section shows that the coherent group identification algorithm presented in this paper accurately identifies the same clusters. However, due to the unavailability of the practical recorded rotor angle measurements required as the input data of the algorithm, the performance was demonstrated using simulated trajectories. On this regard, the Sri Lankan power system (Ceylon Electricity Board, 2018a) was modelled using detailed generator models in PSS ® E software and the same incident was simulated. In order to verify the accuracy of the dynamic data used for the simulation, the frequency responses obtained using the simulation were compared against that of actual recorded data at a particular bus bar (Colombo substation C 132 kV bus) in the system. Figure 5 shows the comparison between the two plots. As per Figure 5, the simulated response and the actual recorded data have good agreement. Therefore, it was concluded that the dynamic data used for modelling the system accurately represents the system dynamics during the incident.
The simulated rotor angle trajectories of all the generators connected to 220 kV and 132 kV networks were  initiation of large power swings between 220 kV and 132 kV networks, mostly dominated by LVPP machines as their electrical output being lowered. Result was the isolation of Ukuwela-Naula and Ukuwela-Habarana 132 kV lines due to excessive power swings as distance relays had seen them as zone 1 disturbances. End result was the separation of the system into two islands which were electrically unstable. The aforementioned sequence of events, the timings and actions initiated in the system are summarised in Table 1.

Model validation
As per the investigation report on the above event (Ministry of Power and Energy, 2016), the power system had separated into different clusters prior to the total failure. This section shows that the coherent group identification algorithm presented in this paper accurately identifies the same clusters. However, due to  Generators connected to 220 kV network and in close electrical vicinity, which are circled in red came under the unavailability of the practical recorded rotor angle measurements required as the input data of the algorithm, the performance was demonstrated using simulated trajectories. On this regard, the Sri Lankan power system (Ceylon Electricity Board, 2018a) was modelled using detailed generator models in PSS ® E software and the same incident was simulated. In order to verify the accuracy of the dynamic data used for the simulation, the frequency responses obtained using the simulation were compared against that of actual recorded data at a particular bus bar (Colombo substation C 132 kV bus) in the system. Figure 5 shows the comparison between the two plots.
As per Figure 5, the simulated response and the actual recorded data have good agreement. Therefore, it was concluded that the dynamic data used for modelling the system accurately represents the system dynamics during the incident.
The simulated rotor angle trajectories of all the generators connected to 220 kV and 132 kV networks were then processed using the developed methodology. The waveforms are shown in Figure 6. Threshold for deviation of rotor angles D for OOS detection was selected as 150 0 . This value was decided after doing a number of off-line simulations in PSS ® E. As per the simulation, Figure 6 shows the separation of the total system into two sub-systems. Seemingly, generators connected to 220 kV network had advanced relative to the generators connected to 132 kV network.
Journal of the National Science Foundation of Sri Lanka 49 (1) March 2021 eographic locations of coherent generator groups in Sri Lankan power system (Ceylon Electricity Board, 2018b) rise due to advancement of one set of machines relative to another in the same system.
power swing may lead to loss of synchronism or OOS condition. In such cases, the affected eparated in a controlled manner to avoid damages to personnel, equipment and to maintain e supply. As per the above case, it is quite evident that the separation of the network is such cases, asynchronously operating areas must be separated to ensure the safety of the uipment and it should be done in a controlled manner to maintain the continuity of the supply.   to 220 kV network and in close electrical vicinity, which are circled in red came under ost of the generators connected to 132 kV network, which are circled in blue formed .
E simulation results of Sri Lankan power system on February 2016 blackout Rotor angle data was fed into the proposed methodology developed in MATLAB software for identification of coherent generator groups. The proposed methodology correctly identified the generators in relevant clusters as can be observed in PSS ® E simulations as well in Figure 7 and Table 2. stations. Generators connected to 220 kV network and in close electrical vicinity, which are circled in red came under one coherent group. Most of the generators connected to 132 kV network, which are circled in blue formed another coherent group.
Power swings arise due to advancement of one set of machines relative to another in the same system. Propagation of a power swing may lead to loss of synchronism or OOS condition. In such cases, the affected areas must be separated in a controlled manner to avoid damages to personnel, equipment and to maintain continuity of the supply. As per the above case, it is quite evident that the separation of the network is imminent. In such cases, asynchronously operating areas must be separated to ensure the safety of the personnel and equipment and it should be done in a controlled manner to maintain the continuity of the supply.

CONCLUSIONS
This paper presented a generalised methodology which can be used to identify coherent generator groups subsequent to contingencies, using online measurements. The proposed methodology is empowered by a data clustering algorithm; K-means clustering, which is simple, efficient and guaranteed to converge into a realistic solution. If the deviation of rotor angles of any two generators exceeds the given threshold at a time, OOS condition is declared. Clustering operation of rotor angle data starts at the point of detection of OOS. For the clustering operation, latest N data samples within time window T is used at the point of OOS detection. Silhouette criterion is applied on top of K-means clustering in order to achieve the optimum number of generator clusters. Output of the proposed methodology is the identification of optimum number of generator clusters with assignment of generators in the groups based on the coherency related to rotor angle dynamics. The accuracy of the proposed approach was demonstrated using a blackout happened in Sri Lankan power system. As per the results of the case study, geographic positioning of the generators is immaterial when it comes to the process of controlled islanding. For generators to be under the same coherent group, electrical distance between the generators plays a vital role than the geographic remoteness.