An Analysis of The Effect of Heterogeneously Distributed Inertia Constant in Generation Mix Power System by Using the Graph Theory and Dijkstra’s Algorithm

A modern power system with a generation mix of conventional and renewable energy sources (RES) creates stability issues. This requires a detailed analysis of the system with an exact share of active power through the generating sources according to nature, location, and control. The interconnected network with a large number of rotating machines at the generation side works coherently with each other. As the share of RES increases, it leads to reduce rotational inertia in the power system. The most important factor affected by inertia is the rate of change of frequency (RoCoF). The higher RoCoF leads the system more vulnerable to small disturbances in the power system. In a large power system network with numerous generating sources and transmission lines, it is difficult to determine the availability of inertia in the system. This paper incorporates the concept of graph theory in the IEEE 30 bus system to analyze the impact of heterogenous inertia distribution on frequency stability. The graph theory network gives the idea about the distance between the nodes and it is helpful to find the share of power from the generating sources. In this paper, we calculate the shortest path between the nodes or substations by using Dijkstra’s algorithm. The betweenness centrality of the node detects the vulnerable nodes in the system from the frequency response point of view.


INTRODUCTION MOTIVATION
The worldwide share of renewable energy sources (RES) in the power system networks increases as a shortage of conventional resources like fossil fuels (Harun et al. 2022).
Future power systems with generation mixes of conventional and non-conventional energy sources such as Thermal, Hydro, Nuclear, biomass, wind, solar, etc (Basri et al. 2021).The RESs have different generation and operational characteristics than conventional energy sources.These RESs are intermittent in nature and feed power into the system through power electronic devices.Due to the absence of rotating parts in the RES generation system, we can call them non-synchronous generators.
These non-synchronous generators do not contain inertia, while the addition of RES in the existing network reduces the overall inertia of the system.The low inertia power networks are responsible for high RoCoF and result in maximum frequency nadir during power system operation and this may lead to cascade failure in contingency events.Frequency nadir is an important metric for the power system operator to respond to the step change in load or generation side.In this paper, the impact of the share of RES on RoCoF and frequency nadir is discussed in detail on IEEE 30 bus system.
The power generation mixes vary from one to another country according to local resource availability, national policies, and global markets.Indian power grid frequency is 50Hz and a permissible band of frequency range is between 49.5 Hz -50.2 Hz according to Indian Electricity Grid Code (IEGC).
India is committed to achieving a 40% share of RES generation by 2030, while considering the significant growth in renewable energy the Power System Operation and Control (POSOCO) explores the inertia estimation for the Indian power grid (POSOCO and IITB 2022).

LITERATURE SURVEY
Inertia is a needful property of a moving system that depends on the energy stored in the wheel of a bicycle or the rotor of synchronous generators.The presence of inertia allows the bicycle to be in motion without pedaling for some time.Similarly in the case of a synchronous grid comprise of generators rotating with the same frequency, the presence of an inertia constant prevents the system from unstable operation during disturbance for a few seconds (Denholm et al. 2020).The large and complex network of power systems comprised of various generating sources has heterogeneous inertia constant (Nouti et al. 2021).The power system inertia constant is determined as the time required for the synchronous generators to respond to the deviation in system frequency.The power frequency deviation depends on the generation and demand imbalance.The conventional energy sources in the power system feed power through synchronous generators which are worked coherently.The synchronization during the operation of the power system is smooth due to the similar topology of the connected generators.It is difficult to synchronize conventional generating sources with RES because of different generation characteristics.Due to the stochastic nature of the RES, the inertia constant will become a time-varying quantity (Makolo et al. 2021).During disturbances in the power system, the converterbased generators are unable to ride through for a few seconds also.The system with low inertia constant has a higher Rate of Change of Frequency (RoCoF) which increases the vulnerability to disturbances in the power system (Entsoe 2020).The RoCoF is based on the variation of inertia constant in a power system with RES and dependent on the generation patterns and load demand (Wilson et al. 2019), (Prabhakar et al. 2022).The rate of change of frequency is measured by the difference between two successive frequency values concerning time (Pentayya et al. 2012).The analysis of the percentage-wise share of the RES in the power system gives the idea about the minimum requirement of inertia according to system frequency nadir and RoCoF value during the contingency event (Nerkar et al. 2023).The virtual inertial power is fed by various control topologies to mitigate this deficit of inertial power in low inertia systems (Nerkar et al. 2021), (Kerdphol et al. 2018), (Mandal et al. 2021).The exact detection of the power system frequency is necessary to estimate the spatial-temporal inertia value for the compensation of the lack of inertia value in a particular area/zone (Tan et al. 2022), (Phurailatpam et al. 2021), (Su, Y et al. 2020), (Rezkalla et al. 2018).In the case study of Rwanda's power system, the author estimates the inertia value for the different scenarios and it justifies the rise in share of RES lowers the system inertia and requirement to enhance the frequency regulation technique (Mudaheranwa et al.2022).The frequency detection at the local level determines the active power deficit at a particular point and it is easy to take corrective action (Azizi et al. 2020).The rating of the generators also affects the inertia constant of the system, the generators with lower ratings have higher inertia constant as compared to high-rated generators (Qaid et al. 2021).To keep the system balance throughout the operation of the power system, it is necessary to maintain the required system inertia (Wu et al. 2021).It is essential to know the minimum inertia value of the particular power system for further addition of the RES in the existing network (Mehigan et al. 2020).It is difficult to determine the inertia constant in a large and complex network with mixed generations.It is dependent on the stored kinetic energy in the rotor of the machine and the time taken to respond to the changes in the synchronous power system (Rampokanyo et al. 2019).To study the large network of power system with high number of transmission lines and spatially distributed generators and load, the spectral graph theory approach is utilized for the analysis purpose (Retiére et al. 2019), (Dwivedi et al. 2009).The Laplacian matrices are derived from the graph theory of network for the stability analysis of inverter connected microgrids (Iyer et al. 2010), (Garg et al. 2006).The graph theoretical methodology is developed for selecting the suitability index of the power plant by forming attribute matrices of the system (Garg et al. 2006).In a mixed-generation system, the location of low inertia areas affects the dynamics of the power system (Tamrakar, et al. 2017), (Alahmad et al. 2021).The inertial index terminology is introduced by (Brahma et al. 2021), which determines the locational capability of the system to resist a frequency changes.Organization paper, focuses on the impact of mixed generation on power system frequency response in IEEE 30 bus system.This is achieved by implementing the Dijkstra's pathfinding algorithm on graph theory of 30-bus system to find the distance between the buses with low inertia bus for further action.

ORGANIZATION OF PAPER
Section 1 is comprised of the motivation for the research work and the respective literature survey.The problem identification is implemented on IEEE 30 bus system by using MATLAB software and is described in section 2. Section 3 gives the idea of Dijkstra's pathfinding algorithm and its implementation in graph theory of 30 bus system.The node centrality and its analysis are elaborated in section 4, to check the vulnerable nodes in 30-bus system with heterogenous inertia constant.The verification of this approach is analyzed at disturbance conditions in the power system in section 5. BACKGROUND An electrical power system is a large and complex network comprised of generators, busbars, transmission lines, etc.For analysis purposes, the power system network is converted into graph theory.The IEEE standard 30 bus system (Shahidehpour et al. 2004), shown in figure 1 is considered for further analysis of the effect of inertia constant variation through the graph theory approach.In IEEE 30 -bus system there are 30 vertices and 41 edges in the graph as shown in figure 2, the blue spheres are buses and red one denotes the generator connected to the spheres.The vertices or node represents the bus number and edges are depicting the connection between two vertices i.e., transmission lines in a network.There could be more than one path for power flow but it would travel along the shortest path or lines with less reactance and it is determined as the geodesic path.The adjacency matrix given in equation ( 1) is used for further analysis and, it is based on the connection diagram of the 30-bus system.E 1 3

G4 G5
Graph theory of 30 bus system

IMPLEMENTATION OF GRAPH THEORY APPROACH ON IEEE 30 BUS SYSTEM
The graph of the 30-bus system is shown in Figure 2 which is considered for the matrix formation according to connectivity.The adjunct matrix from the graph network is given in equation (1),   1,1  1,2  1,3  1,4  1,   2,1  2,2  2,3  2,4  2,   3 Where A ij is the connection between two vertices i and j.
(2) At the same time, we consider the reactance of the transmission line as a weighting factor.As the focus of this paper is the impact of the low inertia constant which requires the implementation of a swing equation in a 30-bus system.
The swing equation of the power system is (3) Where δ denotes the rotor angle Where, J is the total moment of inertia kg-m 2 and m ω is rotor angular speed, D is the damping constant, P m and P e are mechanical and electrical power respectively.
For stability studies the machine data supplied is in terms of inertia constant H; The inertia constant H is given as The relationship between M and H, ( ) The final swing equation for further analysis in terms of H is as follows Where the RoCoF is derivative of the change in frequency.While applying the swing equation to the system with multiple generators and lines, the network topology must be considered and it is expressed by the graph Laplacian matrix (L).

[ ] [ ] [ ]
Where, D is the diagonal matrix given in equation ( 12) which depicts the node degree i.e., the number of nodes connected to respective nodes, and A is an adjunct matrix.
The swing equation describes the rotor dynamics of the synchronous generators and determines the power system stability at various operating conditions.For the frequency stability analysis of the 30-bus system with different generator mixes, the swing equation on each bus is implemented by using the Laplacian matrix (L).The approximated power flow in the network is given in equation ( 13) and the first term shows the network topology (Farmer et al. 2022).
It is clear that the network topology and location of buses affects the RoCoF with respect to bus inertial response time.To calculate the rate of change in frequency the swing equation given in (3) and is rearranged as When we consider the network topology the RoCoF become Where, and Where, H is the inertia constant of the respective bus.The first term in equation ( 16) considers the power flow together with the inertia locations through the network Laplacian.The network Laplacian contains topological information which describes the power flow path in the network.The disturbance size and location are represented by the vector P c .

ANALYSIS OF THE EFFECT OF GENERATION MIXES AND THEIR LOCATION ON INERTIA CONSTANT IN POWER SYSTEM
The location of vertices in the graph and the type of generator connected to it are responsible for the RoCoF performance at other nodes of the network.This is demonstrated by varying the location of the generator type connected to the node or vertices.The different cases considered for this analysis are elaborated in table 1.In IEEE 30 bus system, the generator connected nodes are 1,2,5,8,11, and 13 respectively.Case 1 -case 4 represents the diverse combination of the generation mixes in the 30-bus system.RES especially solar PV generators connected node contains lesser inertia as compared to other nodes.The low inertia nodes with a higher degree of connection can be catastrophic in the system for any small disturbances.
This paper explores, the pathfinding algorithm for graph theory implemented on the IEEE 30-bus system.The pathfinding algorithm investigates the shortest path between the nodes.
From this information on the path length from the source node, it is possible to find the impact of the low inertia node on the system.The placement of the RES must not affect the stable operation of the power grid while considering this the different cases are shown in Table 1 are analyzed in figures 3 and 4 respectively.
In case 1, the thermal generator is placed at the node 1 and 2, and the solar generation system with very least inertia constant is placed at 8 and 13.As nodes 1 and 2 are connected to the maximum number of nodes and they contains higher a inertia constant among all so the system is more stable in nature in case 1, according to the RoCoF value of the nodes depicted in figure 3. The placement of solar generation at both dominating nodes 1 and 2 in case number 4 is showing the worst performance of RoCoF as compared with other cases.In case 4 almost all nodes violate the tolerance limit of RoCoF and Frequency nadir.This comparison of the cases is clearly given in table 2.  ... cont.
According to the above investigation on power system networks with RES by varying their contribution and location, the inertia constant quantity becomes heterogeneous in nature.The 30-bus system with heterogenous inertia constant affects the systems RoCoF and frequency nadir, as the detailed comparison is manifested in table 3. It is clear that case 2 shares 51.28% share of RES without affecting the nodes in the network.Because of this, case 2 is considered for further analysis of the application of the pathfinding algorithm in power systems.The power system network is converted into graph theory for finding the impact of contingency events in a low inertia grid.As per the discussion in the above section, the location of the generating resources plays an important role to determine the inertia value in the power system.According to this, the network topology offers the impact of inertia value in the system with a share of renewable energy sources.The Laplacian matrices of the system depict the network topology and its connectivity.The nodes are connected through many paths between them, but the power flow follows the path with the least reactance between the nodes.The shortest path between the nodes is determined by the minimum total weight between the two nodes.Here, in the graph theory approach for the power systems, the reactance of the transmission line is considered as the weight of the edges connected between nodes.This section discusses the methodology to determine the vulnerable nodes in a mixed generation power system by using the Dijkstra algorithm.
The nodes which are connected to the generators through the shortest path follow the inertia constant value of the generator connected to the adjacent node.The Dijkstra path-finding algorithm finds the shortest path by calculating the distance between a source node and a target node.The distance between the two nodes is determined by the total weight of the edges connected to the nodes.The algorithm forms a spanning tree as an intermediate step to find the shortest path.The exact elaboration of Dijkstra's algorithm with illustration is given in figure 5.An illustration of the graph with 5 nodes is considered to elaborate the flow of Dijkstra's algorithm.Here, we assume node 1 as the source node and node 4 as the target node.There are total three paths from node 1 to node 4. All three paths with their visited nodes and total weight is shown in figure 5, and out of all three paths the algorithm follows the route with least weight.Though path 1 visited maximum nodes than path 2 and 3, the Dijestra's algorithm gives path 1 as a shortest path because of total edge weight is lesser than other possible paths.This is implemented in IEEE 30 bus system to investigate the vulnerable nodes in the system with the maximum possible contribution of RES.The aforementioned results analysis in table 3 states that case 2 contains the highest share of RES without affecting the RoCoF and frequency nadir limits.Therefore case 2 is considered for the implementation of Dijkstra's algorithm for further analysis.For an example, the disturbance is created at node number 17 and it is counted as the target node.The path followed by Dijkstra's algorithm from the source to the target node is compared with all possible paths in Table 4.
According to the directed graph of the 30-bus system given in Figure 2, the power feed to node 17 is from generator-connected nodes 1 and 2. It is clear from Table 4, the route between connected nodes 2-7 is the shortest with a 0.5788 cost value in comparison with path 1-17.The thermal generator is connected to node number 2 as we know thermal contains a higher inertia value therefore node number 17 can be considered a stable node.Figure 7 depicts the implementation of path finding Dijkstra's algorithm in a connected graph of 30 bus systems.The red edges denote the possible paths from the source to the target node and the green one shows the geodesic path calculated by Dijkstra's algorithm.From this analysis, it is noticed that edge weight and connectivity are playing an important role in graph theory.The common edge in all shortest paths between two nodes shows the betweenness index of the graph.

GRAPH CENTRALITY INDEX
It is observed from the analysis of the application of pathfinding Dijkstra's algorithm, the occurrence of the edge in every possible shortest path is considered as the edge betweenness of the graph.The betweenness centrality is described as the total number of shortest paths going through the particular edge or node.The basic philosophy of the electric circuit always follows the low reactance path and here, edge weight is considered as a transmission line reactance.While considering this, the edge with the least reactance values transfers more power and is treated as the edge with high betweenness index.1. Degree Centrality is the ranking of the nodes with more connections, for a directed graph the degree centrality is given as Node numbers 6,10,12 have a high degree centrality as shown in figure 9.The connectivity of these nodes is higher than other nodes and if these are low inertia nodes then it can affect the system's maximum nodes with a higher RoCoF rate.
2. Betweeness centrality is the maximum occurrence of the node in the shortest paths between the source and remaining nodes of the graph.Where, P ij is the shortest path between node i and j, and k is the maximum occurrence of the node.The pathfinding algorithm given by Dijkstra mentioned in section 3 is used to determine the shortest path to detect the betweenness centrality of the node.The difference between degree and betweenness centrality is clearly observed in figures 9 and 10.In the case of degree centrality value node 6, 10, and 12 have higher centrality, and in the case of betweenness centrality node 6 have higher centrality among all.Further analysis is to verify the centrality of a graph in the next section.The verification is done by varying the load connected (or creating the disturbance) to the respective bus to check which centrality value is useful to find the vulnerable nodes in a low inertia power system.The aforementioned analysis of the 30-bus system with a contribution of renewable energy sources on frequency response is studied in section 2. The maximum possible RES integration (51.28%) in 30 bus system without violating the RoCoF limit is demonstrated in case 2. Therefore, it is taken to examine the effect of load variation and vulnerable nodes in the 30-bus system connected with the maximum possible RES.The other cases described in section 2.2 are avoided because they have reached the lower frequency nadir at some nodes due to low inertia and the unsuitable location of RES in view of the dynamic stability of the system.

FREQUENCY RESPONSE ANALYSIS BY PERTURBING NODE WITH HIGH ROCOF
The nodes with maximum frequency nadir are 1, 3, 11,6,9,14, and 27 (refer to case 2 in table 2) respectively out of these nodes 3 and 14 are perturbed with a step change in the load of 0.1 pu.
In figures 11 and 12, the perturbed node with higher RoCoF shows the maximum deviation in frequency nadir.According to their higher RoCoF value, these nodes contain lower inertia and violets an acceptable range of frequency.The other nodes are not affected because their centrality value is almost zero.From the RoCoF point of view, these nodes can be considered vulnerable and require inertial power for the occurrence of any small variation of power.
From the above figures 11 and 12, the perturbed node with higher RoCoF shows the maximum deviation in frequency nadir.According to their higher RoCoF value, these nodes contain lower inertia and violets an acceptable range of frequency.The other nodes are not affected due to the centrality value of these nodes being almost zero.From the RoCoF point of view, these nodes can be considered vulnerable and require inertial power for the occurrence of any small variation of power.

FREQUENCY RESPONSE ANALYSIS OF PERTURBING THE NODE WITH THE HIGHEST CENTRALITY VALUE
The higher degree centrality nodes are 6,10,12 with values of 0.14 respectively, and node 6 with the highest betweenness centrality value is 0.5517.After perturbing nodes 6 and 10 the affected nodes are depicted in figures 13 and 14.It clarifies that node number 6 with high betweenness index affects more nodes.According to this observation, it can be concluded that the betweenness centrality plays an important role to find vulnerable nodes from the highest connectivity point of view.The pathfinding algorithm given by Dijkstra is used to determine the betweenness centrality of the node.The critical analysis of the graph theory approach to find the effect of low inertia on the system is given in table 5.The node with low inertia than usual and also have high a betweenness index that can be considered as the most vulnerable nodes of the system.The node connected to source node with a higher inertia constant through the shortest path and also with less centrality is counted as a stable node in the system (for eg.Node 17 given in Table 5).
An effect of node centrality is described in section 4, the higher centrality value (figures 9 and 10) maximum node will get affected after perturbing respective nodes (figures 13 and 14).The number of nodes affected are more in figure 13 because it follows the occurrence of node in the shortest path from the source node.Node number 6 has the highest degree and betweenness centrality too but node number 10 has only higher degree centrality.Figure 13 and 14 clarifies that betweenness centrality must be considered for the effect of heterogenous inertia in the mixed generation systems.Table number 5 gives the numerical analysis of frequency at nodes with inertia constant value and from this, we can predict the requirement of inertial power at a particular node (bus).The nodes highlighted with orange color violate the maximum permissible limit of the acceptable frequency band at small perturbations.It needs more inertial power, to maintain the frequency during normal power system operation.The nodes highlighted with yellow color have frequency deviation on the verge of an acceptable limit but still, it requires inertial power to maintain the frequency at large disturbances.

CONCLUSION
In real power system operation, the RoCoF relays disconnect the generators when its violets the RoCoF limits.The future power network with a maximum contribution of RES will create low inertia in the grid and it is responsible to limit high RoCoF after the first few seconds of disturbance.The investigation of the impact of heterogenous inertia on the system is done in this paper.
The graph theory approach is used to determine the affected or vulnerable nodes due to the impact of low inertia on the system.The network topology plays an important role to determine the effect of location and share of RES on the frequency response of the system.It is justified in an analysis of 30 bus system graph theory by applying the pathfinding algorithm and node centrality index.It is difficult to manage frequency regulation in the network with heterogeneously distributed inertia constant.This issue can be resolved by investigating node-wise RoCoF value at various power system operating conditions.Dijkstra's algorithm is used to find the shortest path between the nodes and also used to find the betweenness centrality of the node.It is concluded that the betweenness centrality plays an important role to find the vulnerable and affected nodes.It is demonstrated by creating the disturbance at node number 6 and node number 10, both nodes have the same degree centrality but node number 6 has higher betweenness centrality and it affects more nodes in the system.If the disturbance occurs at a vulnerable node with a very low inertia constant, then it can be a catastrophic phenomenon in the power system.It is concluded that the geodesic distance between generating and destination nodes as well as the betweenness centrality of a node can be used to find the impact of low inertia in future power system planning.
FIGURE 1. IEEE 30 bus system P c is the change in power flow and 0 L δ ⋅ is the initial steady-state power flow

FIGURE 3 .
FIGURE 3. Rate of change of frequency at nodes of 30 bus system during generation mixes FIGURE 5. Process flow and Illustration of Dijkstra's Algorithm FIGURE 6. Performance of RoCoF (a) and Frequency Nadir (b) at disturbance that occurred on node 17

FIGURE 11
FIGURE 11 Frequency at node 3 after perturbation

FIGURE 13 .
FIGURE 13.Affected nodes due to perturbation at node 6 FIGURE14.Affected nodes due to perturbation at node 10

TABLE 1 .
Case 1 -4 are a combination of the generating resources in the IEEE 30 bus system

TABLE 2 .
Frequency response analysis of the impact of generation mixes and their location in the network

TABLE 3 .
Affected nodes due to percentage-wise share of the RES and its location in 30 bus system

TABLE 4 .
Application of Dijkstra's algorithm and comparison with other possible paths continue ...

TABLE 5 .
Detailed analysis of frequency response at various scenarios in 30-bus system