{'fraction_non_alphanumeric': 0.0307800202602665, 'fraction_numerical': 0.010831450167536819, 'mean_word_length': 4.757738896366083, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Assessing Electrical Distances-A Small Step Toward Online Dynamic Security Assessment

Impedances are one of the key parameters for various phenomena in electric power systems. In the propagation of electromechanical oscillations, electrical distances—which are usually calculated from inverse admittance matrix—are the key parameter. In this paper, an existing rapid method for obtaining diagonal elements of inverse matrix was successfully applied for the calculation of electrical distances in the ENTSO-E network of continental Europe. This method was proved to be 4 to 22 times faster than the classical procedure of admittance matrix inversion. A computer software—which uses the presented method—was developed for the calculation and presentation of electrical distances in the ENTSO-E network. It is based on an interactive map and it gives clearer information on the electrical distances in the ENTSO-E network.


I. Introduction
In the propagation of electromechanical oscillations through the electric power system (EPS), the impedances of the network-besides the generator inertiahave the main role. With the application of the Wide-Area Monitoring System (WAMS), the speed of propagation can be analyzed. Considering network impedances, generator inertia and the speed of propagation, the location of fault could be searchedthis is the main goal of our research. However, the first step in this research is to analyze the impedances of the network; this step is presented within this paper.
Besides the impedances of individual network elements, the electrical distance between two nodes (i.e., the impedance of all possible parallel ways from one node to anotherincluding load impedances through a neutral node) can also be calculated from inverse admittance matrix. However, in large networks, the calculation of the inverse admittance matrix can be time consuming as it includes about 10.000 nodes. In this paper, a method used for the rapid calculation of electrical distances is presented. The method is based on the theory for fast calculation of diagonal elements of inverse matrix [3]. The results show that this calculation is 4 to 22 times faster than the classical inversion of admittance matrix.
Section II of this paper presents the data of the ENTSO-E network of continental Europe used for the calculation of electrical distances. Section III analyzes the principle of electrical distance calculation and mathematically describes the method for the fast calculation of diagonal elements of inverse admittance matrix; this method is later in this section applied to the calculation of electrical distances in the ENTSO-E network. Section IV presents the computer application used for the visualization of electrical distances in the ENTSO-E network of continental Europe on an interactive map. Section V draws conclusions.

II. Network data
The European Network of Transmission System Operators for Electricity (ENTSO-E) association was established in 2009 in order to enable the further liberalization of electricity markets in the European Union (EU). The ENTSO-E contains five permanent regional groups (RG), based on synchronous areas. The largest synchronous area is continental Europe, which is also the largest synchronous area in the world, formerly coordinated by the Union for the Coordination of the Transmission of Electricity (UCTE). The regional groups of the ENTSO-E network are presented in Fig. 1.
The electrical distances considered in this paper are calculated for the synchronous grid of continental Europe. Besides the countries coloured in blue in Fig. 1, also Albania, Turkey, part of northern Africa and part of Ukraine operate in synchronism with continental Europe. The EPS considered consists of nearly 10.000 nodes on 220 kV or higher voltages.
In order to provide the data exchange between the transmission system operators (TSO), the basic data of network elements are stored in ASCII files (*.uct) with strictly defined structure for nodes, lines, transformers, transformer control, and other optional data. The data included are sufficient for load-flow and partly for short-circuit calculations (the generator data in the vicinity of the fault should be provided additionally).
These ASCII files provide the followings for lines: resistance R, reactance X, and parallel susceptance B; consequently, lines can be modeled as Π equivalent circuit with parallel susceptance B/2 on each side of the line. The data for transformers contain series resistance R and reactance X as well as parallel susceptance B and conductance G-pertaining to the rated voltage of the firstly defined node-that can be applied to the Γ equivalent circuit. Loads are defined as apparent powers S L (taking the active and the reactive power separately) consumed directly at nodes on 220 kV or higher. When calculating electrical distances, loads are considered as constant admittances. In order to calculate the admittance Y L of the load, apparent power S L and nominal voltage of the node U n , the following equation is used: Generators are defined the same way as loads, i.e., only the active and the reactive power is given. Contrary to the loads, the admittances of generators cannot be only defined from powers, thus generators are neglected in the calculation of electrical distances.
In order to properly consider various voltage levels, all impedances should be converted to the same voltage level -in our calculations, we use a per-unit system.

III. Matrix manipulation
The electrical distance is in fact the Thevenin equivalent impedance between two nodes. In general, it is calculated so that all voltage sources are shortcircuited, while current sources are replaced by open circuits.
A classical way to obtain the electrical distances from the i-th node to all the other nodes is by inverting the admittance matrix, where the following steps are needed: • The construction of the admittance matrix • The elimination of the i-th row and the i-th column • The calculation of the inverse admittance matrix (i.e., impedance matrix) • An n-th diagonal value of impedance matrix presents the electrical distance from the n-th node to the i-th node If shunt admittances are to be considered, an additional node (i.e., a neutral node) should be added to the admittance matrix.
However, when large networks are considered, inverting a matrix can be a time consuming task. The running time for matrix inversion depends on the matrix dimension. According to [1], the number of mathematical operations (and consequently the running time) depends on the algorithm used; it equals to n 3 for the Gauss-Jordan elimination, n 2.807 for the Strassen algorithm, n 2.376 for the Coppersmith-Winograd algorithm and n 2.373 for the Optimized CW-like algorithms, where n is the matrix dimension. According to [2], this number can in some cases be reduced to n 2 . However, in real calculations, the running time increases faster than n 2 , especially if complex numbers are considered. This means that it is better to split the matrix into smaller sub-matrices and invert each of them separately. This is especially true for sparse matrices like the admittance matrix of the EPS.
In Fig. 2, the appearance of the admittance matrix of the ENTSO-E network of continental Europe is presented. It has 8,999 nodes. Each admittance is presented with a blue dot.

A. The Domain Decomposition Method
In [3], the authors propose the Domain Decomposition (DD) method for finding the diagonal elements of an inverse matrix. According to this method, the matrix is decomposed into many seemingly independent matrices that are solved separately and corrections are eventually performed because of the existing dependency.
The main idea of the DD method in [3] is to do a permutation of the nonsingular and complex matrix ∈ ℂ in order to obtain the following form: where: Taking the inverse of (2) yields: The vector of the diagonal elements of the inverse matrix (3) is: In extended form, (5) can be rewritten as:

B. The application of the DD method on the ENTSO-E network
The first step in the DD method is to do a permutation (i.e., to rearrange) admittance matrix in order to obtain the same matrix form as in (2). With this operation, the structure of the network does not change; only the order of the matrix rows and columns changes. Fig. 3 presents the appearance of the resulting admittance matrix of the ENTSO-E network from Fig. 2 after the permutation. As we can see, all interconnections are now in the last rows/columns. According to the notation in (2)-(9), the resulting matrix has 21 sub-matrices Bj (i.e., p = 21) where the sum of their dimensions is The dimension of the sub-matrix G is 289 (i.e., ng = 289). From this permutated admittance matrix, we can create 21 sub-matrices Bj, 21 sub-matrices Hj and a sub-matrix G as inputs for (7), (8), and (9). The creation of the permutated admittance matrix of the ENTSO_E network is not complicated because each country has its unique character at the beginning of each node's name and in the same way interconnections are also clearly marked.

Fig. 3. The appearance of the rearranged admittance matrix
Now we can compare the time needed for the calculation of the diagonal elements of the inverse admittance matrix obtained through the DD method to the time needed by the direct inversion of the whole matrix. We used a personal computer with Intel Core i5-2410M 2.3 GHz processor with 8 GB RAM, 64 bit Windows 8.1 operation system and 64 bit version of MATLAB R2013a. We made 10 repetitions for real admittances ( ∈ ℝ × ) and 10 repetitions for complex admittances ( ∈ ℂ × ). Table I presents the running times for each repetition and median value of all repetitions for real and complex admittances, respectively. Results show that the DD method is over four times faster than the direct inversion of the real admittance matrix, while for the complex admittance matrix, this ratio is even higherthe DD method is 22-times faster.

IV. Application for the visualization of electrical distances
Due to the diverse density of the network in continental Europe, electrical distances are different from geographical distances. In order to present the electrical distances of the ENTSO-E network, we developed a computer software which shows the network on an interactive map and which calculates the electrical distances from a selected reference node to all the other nodes. Fig.  4 presents the ENTSO-E network and the electrical distances of continental Europe as they are presented by the computer software. The electrical distance is presented by various colours of nodes. The colour scale is presented on the right border of the map and goes from red (0 ) to magenta (17 ), blue (33), cyan (50 ), green (67 ) and yellow (83 ), then back to red (100 ). The scale can be manually changed according to the values of impedances currently presented on the map. When the mouse cursor goes over a specific node, the exact electrical distance form the reference node to the node under the cursor is shown on the scale on the right border.
Based on the results presented on the interactive map, some interesting conclusions can be outlined: • Electrical distances (from reference, the node in Slovenia) to substations with many lines from various directions (e.g., Madrid, Lyon, Belgrade, Istanbul) are shorter then electrical distances to the surrounding areas of these substations which are geographically closer to Slovenia.
• Due to the strong and dense network in Germany and France, as well as the limited lines over the Alps, the electrical distances to larger substations in the whole of Germany, eastern France, Belgium, the Netherlands, Switzerland and northern Italy, are almost the same (between 32  and 38 ). The electrical distance form Slovenia to the Netherlands is the same as form Slovenia to, for instance, München in southern Germany. • The electrical distances to substations on 220 kV are much longer (from 20  to 60 ) due to the impedances of 400/220 kV transformers.

V. Conclusions
Aiming to research the propagation of electromechanical oscillations in EPSs, this paper analyzed the network impedances and the faster ways to calculate electrical distances in the ENTSO_E network.
We proved that the DD method [3] can be successfully applied on the ENTSO-E network admittance matrix in order to obtain electrical distances from a reference node to all other nodes in the network. The DD method is over than four times faster than the direct inversion of the real admittance matrix, while for the complex admittance matrix, this ratio is even higherthe DD method is 22 times faster.
When presented graphically on an interactive map, electrical distances can give clearer information on the impedances of the ENTSO-E network.