Selection of the Optimal Smart Meter to Act as a Data Concentrator with the Use of Graph Theory

Changing the construction of mart Meter (SM) devices, more specifically equipping them with more than one communication module, facilitates the elimination of a Transformer Station Data Concentrator (TSC) module, moving its function to one of the SMs. The opportunity to equip a chosen device in an additional communication module makes it possible to use it as an acquisition node. The introduction of this solution creates a problem with the optimum selection of the above-mentioned node out of all the nodes of the analyzed network. This paper suggests the criterion of its location and, as per the criterion, the way of conduct using the elements of the graph theory. The discussion is illustrated with the examples of the possibility to use the method for the optimization of the architecture of the network. The described method makes it possible to choose the location of a backup acquisition node as well as locate intermediary nodes (signal repeaters) in case of a failure (removal) of some SM devices. In the era of the common introduction of dispersed telemetric systems requiring an adequate level of performance and reliability of information transmission, the offered method can be used for the optimization of the structures of Smart Grids.


Introduction
Currently, a rapid growth of technologies based on computers with increasingly good parameters, a progressing miniaturization of electronic systems and the development of professional software and methods of information transfer are being observed. Wireless transmission technologies are becoming more and more important thanks to their low cost and quick deployment. Amongst them are wireless sensor networks (WSNs) [1]. They feature low transmitting power, very low energy consumption, are operated with the most recent monolithic transceivers, and their nodes cooperate directly with sensors of various measurable parameters.
The networks are widely used, for example, in municipal buildings as early warning systems for terrorist attacks or environmental contamination [2], for monitoring the environment (temperature, humidity, pollution level) [3], for industrial surveillance (providing information about the overall condition of machines used in the production process, e.g., vibration, fluid level, temperature of components, etc., received from sensors placed in hard-to-reach or inaccessible places) [4], for the control of traffic [5], and in medicine (allowing higher effectiveness of diagnosing and monitoring patients' health without the need to connect them to medical devices with limited mobility, e.g.,wireless body sensor networks (WBSNs)) [6,7]. WSNs areused for the creation of smart cities, professionally known as Cyberville, Digital City, or Electronic Communities. Their most important features are digital and computerized management of energy production and distribution;, automatic smart security systems; lighting and heating control; management of car parks; fast data transmission using the latest wireless technologies in the 5G network; municipal serviceless meters and usage sensors with digital water, electricity, and gas distribution management systems; smart medical care systems remote life quality management and improvement

Research Method
For the analysis of telemetric networks, parts of the graph theory were used [22]. The topology of such networks can be defined by a formula describing geometrical random graphs [9]: where V is a set of vertices, E is a set of edges, and R is set of radii determining the transmission range.
Each v i vertex of the G graph represents a single network node. Each node is surrounded by a circle of radius r i depicting the range of the signal emitted by a node's transmitter. All nodes in the circle surrounding the node (assuming omnidirectional antennas are used) can freely communicate with the surrounded node bidirectionally and are considered directly adjacent, as it is shown in Figure 1.

Research Method
For the analysis of telemetric networks, parts of the graph theory were used [22]. Th topology of such networks can be defined by a formula describing geometrical rando graphs [9]: where V is a set of vertices, E is a set of edges, and R is set of radii determining the tran mission range. Each vi vertex of the G graph represents a single network node. Each node is su rounded by a circle of radius ri depicting the range of the signal emitted by a node's tran mitter. All nodes in the circle surrounding the node (assuming omnidirectional antenn are used) can freely communicate with the surrounded node bidirectionally and are co sidered directly adjacent, as it is shown in Figure 1. The below formula [23] defines a set of nodes in the transmission range of a give node: is a set of nodes within the transmission range, x and y are the localization the nodes, and ri is the radius of the signal range.
The edge set E contains all edges of the G graph and represents direct paths connec ing any chosen vertices and all their adjacent items within the circle, representing the com munication range of each node.
It is assumed that the edges do not have to represent bidirectional connections, whic means that the presence of edges (x,y) does not mean that edges (y,x) exist. The assigne measurable value between two vertices of a graph, such as distance, angle, and amou of energy in the node or probability, can be assigned to the edge as its weight, provide that it can have different values for edges (x,y) and (y,x). The definition of asymmetr edges is expressed with the Formula (3): ( where E is a set of asymmetric edges and d is the measure of the asymmetry of weights A graph obtained this way, describing the whole connection topology of the networ is called a maximum power graph (in real-life conditions when first determining the co nection topology, the transmitters work with maximum power). The structure of th graph has to be reduced because of the presence of many redundant connections, whic are undesirable due to their transmitting of identical information, leading to collision unnecessary power consumption, and the increase in the final network emissivity. Th reduction in these connections leads to the creation of a minimum spanning tree who The below formula [23] defines a set of nodes in the transmission range of a given node: where Br(x) is a set of nodes within the transmission range, x and y are the localization of the nodes, and r i is the radius of the signal range. The edge set E contains all edges of the G graph and represents direct paths connecting any chosen vertices and all their adjacent items within the circle, representing the communication range of each node.
It is assumed that the edges do not have to represent bidirectional connections, which means that the presence of edges (x,y) does not mean that edges (y,x) exist. The assigned measurable value between two vertices of a graph, such as distance, angle, and amount of energy in the node or probability, can be assigned to the edge as its weight, provided that it can have different values for edges (x,y) and (y,x). The definition of asymmetric edges is expressed with the Formula (3): where E is a set of asymmetric edges and d is the measure of the asymmetry of weights. A graph obtained this way, describing the whole connection topology of the network, is called a maximum power graph (in real-life conditions when first determining the connection topology, the transmitters work with maximum power). The structure of this graph has to be reduced because of the presence of many redundant connections, which are undesirable due to their transmitting of identical information, leading to collisions, unnecessary power consumption, and the increase in the final network emissivity. The reduction in these connections leads to the creation of a minimum spanning tree whose root is an acquisition node in which all the information consistent with the network's function are collected.
The configuration of the discussed network can be presented with a graph with an adjacency matrix [24]. To explain the way of conduct, a graph describing an example of a virtual network is shown in Figure 2. The edges of the graph correspond to the links connecting its nodes-that is, the nodes intermediary to the transmission and acting commutatively.
Entropy 2021, 23, x FOR PEER REVIEW 4 of root is an acquisition node in which all the information consistent with the network function are collected. The configuration of the discussed network can be presented with a graph with a adjacency matrix [24]. To explain the way of conduct, a graph describing an example of virtual network is shown in Figure 2. The edges of the graph correspond to the links co necting its nodes-that is, the nodes intermediary to the transmission and acting commu tatively. By exponentiating the (Ms) matrix, we obtain a set of paths created by the edges co necting the graph nodes, whose length corresponds to the power of the matrix. The pr cess is carried on until it is confirmed that all the nodes are interconnected and the max mum power of the (Ms) matrix is the diameter of the analyzed graph. By the analysis the obtained components of the matrix, minimum lengths of the paths connecting chose nodes (created by the smallest number of edges) are determined, and their number is ca culated, as well. Table 1 includes the calculated lengths of minimum paths connecting the nodes the analyzed graph, and Table 2 shows the numbers of these paths. The network shown in Figure 2 is described by an adjacency matrix (Ms): By exponentiating the (Ms) matrix, we obtain a set of paths created by the edges connecting the graph nodes, whose length corresponds to the power of the matrix. The process is carried on until it is confirmed that all the nodes are interconnected and the maximum power of the (Ms) matrix is the diameter of the analyzed graph. By the analysis of the obtained components of the matrix, minimum lengths of the paths connecting chosen nodes (created by the smallest number of edges) are determined, and their number is calculated, as well. Table 1 includes the calculated lengths of minimum paths connecting the nodes of the analyzed graph, and Table 2 shows the numbers of these paths.
For example, there are four minimum paths connecting node 4 with node 9, which consist of three edges.
However, on the basis of the obtained results, it is not possible to determine which edges of the set create individual paths. To define a configuration of every path, each edge is given a name, presented in Table 3 and in Figure 3.   Table 3. Adopted edge marking.
While reviewing the components in Table 4, it is clearly visible that the numbers and the lengths of the minimum paths connecting the nodes are consistent with the calculation results presented in Tables 1 and 2. By performing the exponentiation of the sign matrix according to the rule of matrix exponentiation, sets of minimum paths are obtained together with their structure. It is shown in Table 4.

Determining the Optimal Position for the Acquisition Node of a Telemetry Network
So far, the analysis was made with the assumption that the probability of realization of a correct transmission by each node is 1, which is in contradiction to reality, and the parameter is especially important for radio networks.
It is known that radio links are less resistant to external interference than fiber-optic or cable links, and a radio wave carrying information is subject to suppression depending on the distance between a transmitter and a receiver. The dependency is partially described by the free space signal suppression value formula FSL (Free Space Loss): where f is the transmission frequency in MHz and d is the distance between a transmitter and a receiver in km [25]. By assuming the same level of radio signal emission, e.g., 0 dBm, the same sensitivity of the receivers and the use of omnidirectional antennas (which causes the increase in the suppression value by 40 dBm of the signal reaching the receiver), the parameter RSSI (Received Signal Strength Indicator) was determined on the basis of the dependency shown in Figure 4, taken from paper [26], and PER (Packet Error Ratio) parameter values were found (it was assumed that 433 MHz radio frequency was used).
In the analyzed case, assuming the distances between the nodes are as shown in Table 5 (they are correlated with the data presented in Figure 1), the RSSI and PER values were determined. Table 5 includes the RSSI values resulting from the distance between the network nodes linearly. The possibility that suppressing signals for a given link can vary for individual directions of information transmission was not taken into consideration.
To check the construction of the structure after including different signal suppression depending on the information transfer direction, it was assumed that the values of the probability of a return transmission from the target nodes to the source nodes reaches the values given in Table 6 (the '←' sign means the change of the information transfer direction).  In the analyzed case, assuming the distances between the nodes are as shown in Table  5 (they are correlated with the data presented in Figure 1), the RSSI and PER values were determined.  Table 5 includes the RSSI values resulting from the distance between the network nodes linearly. The possibility that suppressing signals for a given link can vary for individual directions of information transmission was not taken into consideration.
To check the construction of the structure after including different signal suppression depending on the information transfer direction, it was assumed that the values of the probability of a return transmission from the target nodes to the source nodes reaches the values given in Table 6 (the '←' sign means the change of the information transfer direction).  By using the data from Table 6 and assuming that the data of the information transfer direction from the source nodes to the target nodes are above the diagonal of the table, and from the target nodes to the source nodes are below the diagonal, the probability values were calculated and are presented in Figure 5.     By using the data from Table 6 and assuming that the data of the information transfer direction from the source nodes to the target nodes are above the diagonal of the table, and from the target nodes to the source nodes are below the diagonal, the probability values were calculated and are presented in Figure 5.
The way of conduct described in the previous part of the paper was used for the determination of the optimal position of the acquisition node of the network, i.e., the node whose average probability of the realization of a correct transmission is the highest in comparison with the other nodes. For this purpose, the probability values for both transmission values were multiplied. They corresponded to individual paths connecting the nodes of the graph (for example, nodes 0 and 5) and the obtained values were averaged. It is shown in Table 7. The way of conduct described in the previous part of the paper was used for the determination of the optimal position of the acquisition node of the network, i.e., the node whose average probability of the realization of a correct transmission is the highest in comparison with the other nodes. For this purpose, the probability values for both transmission values were multiplied. They corresponded to individual paths connecting the nodes of the graph (for example, nodes 0 and 5) and the obtained values were averaged. It is shown in Table 7.  On the basis of the data presented in the table above, it was concluded that the optimal localization for an acquisition node was node 4. Table 8 includes the set of minimum length paths, taking into consideration the presence of parallel, internodal paths (the parallel paths are the paths consisting of the same number of edges connecting the same nodes-source and target).   On the basis of the data presented in the table above, it was concluded that the optimal localization for an acquisition node was node 4. Table 8 includes the set of minimum length paths, taking into consideration the presence of parallel, internodal paths (the parallel paths are the paths consisting of the same number of edges connecting the same nodes-source and target). Table 8. The set of minimum length paths obtained with the assumption that the acquisition node is node 4. In Figure 6, the image of the obtained graph describing the network created by the minimum length paths is shown. In Figure 6, the image of the obtained graph describing the network created by the minimum length paths is shown. Thanks to the analysis of the elements in Table 8, a minimum spanning tree was created; its root is node 4, so by removing the redundant connections, paths were chosen that ensured the highest probability of a correct transmission. The set of paths creating the minimum spanning tree is included in Table 9.  In Figure 7,the obtained minimum spanning tree is shown.  Thanks to the analysis of the elements in Table 8, a minimum spanning tree was created; its root is node 4, so by removing the redundant connections, paths were chosen that ensured the highest probability of a correct transmission. The set of paths creating the minimum spanning tree is included in Table 9. Table 9. The set of paths creating the minimum spanning tree. Where: C min , the configuration of a minimum path; P pathtree , the probability of the realization of transmission.
In Figure 7,the obtained minimum spanning tree is shown. In Figure 6, the image of the obtained graph describing the network created by the minimum length paths is shown. Thanks to the analysis of the elements in Table 8, a minimum spanning tree was created; its root is node 4, so by removing the redundant connections, paths were chosen that ensured the highest probability of a correct transmission. The set of paths creating the minimum spanning tree is included in Table 9. Table 9. The set of paths creating the minimum spanning tree. In Figure 7,the obtained minimum spanning tree is shown.  The described way of conduct can be used for the analysis of a situation caused by a failure of individual links due to which the graph describing the obtained tree becomes a disconnected graph resulting in isolated nodes. When there are two parallel paths connecting chosen nodes created by various combinations of edges (in the examples 4-0, 4-8, and 4-9), the graph stays connected. Thanks to the proposed method, that is, the analysis of the matrix powers (Ms), it is possible to determine a set of emergency connections and avoid a connection shortage. The set of paths used in case of a link failure is included in Table 10. The determined set of paths can be saved in routing memories of individual nodes and used to support transmission in case of a failure of certain links.

The Analysis of the Possibility to Ensure the Operation of a Network after Node Removal
In practice, due to changes in networks (for example, by replacing the energy meters with devices working in a different technology), 'holes' appear, which causes the graphs describing these networks to be disconnected. In such cases, a signal repeater is often installed in place of one of the nodes. Its task is only to mediate in the transmission of signals between sensors and an acquisition node. Using such a solution is led by the use of an already existing infrastructure enabling the supply of power to the repeater. There is also a case of choosing a location for the repeater. In this case, the proposed method of network analysis can work as well.
To explain the accepted way of conduct, the analysis of a more complex network was used. The network is shown in Figure 8.  8, and 4-9), the graph stays connected. Thanks to the proposed method, that is, the analysis of the matrix powers (Ms), it is possible to determine a set of emergency connections and avoid a connection shortage. The set of paths used in case of a link failure is included in Table 10. The determined set of paths can be saved in routing memories of individual nodes and used to support transmission in case of a failure of certain links.

The Analysis of the Possibility to Ensure the Operation of a Network after Node Removal
In practice, due to changes in networks (for example, by replacing the energy meters with devices working in a different technology), 'holes' appear, which causes the graphs describing these networks to be disconnected. In such cases, a signal repeater is often installed in place of one of the nodes. Its task is only to mediate in the transmission of signals between sensors and an acquisition node. Using such a solution is led by the use of an already existing infrastructure enabling the supply of power to the repeater. There is also a case of choosing a location for the repeater. In this case, the proposed method of network analysis can work as well.
To explain the accepted way of conduct, the analysis of a more complex network was used. The network is shown in Figure 8. By following the rules described above, the optimum location of the acquisition node was determined to be node 17. By following the rules described above, the optimum location of the acquisition node was determined to be node 17.
It was assumed that for some reasons, nodes 2, 6, 7, and 10 had been excluded which caused nodes 0,1, 3, and 5 to lose the possibility to contact the acquisition node. This is shown in Figure 9.
It was assumed that for some reasons, nodes 2, 6, 7, and 10 had been excluded which caused nodes 0,1, 3, and 5 to lose the possibility to contact the acquisition node. This is shown in Figure 9. By analyzing the changed structure of the network, it was divided into two parts. One related to the fifth node ( Figure 10a) and one associated with the remaining nodes 0, 1, and 3 ( Figure 10b). The sets of virtual shortest paths connecting the isolated nodes are given in Table 11. The data in Table 11 show that when it comes to node 5, it is clear for a signal repeater to be installed in node 10.
The situation presented in Figure 10b is more difficult to analyze. In that case, it should be verified which of the edges creating the paths ensure obtaining the maximum probability of a correct transmission.
Even a superficial scan of the network scheme shows that placing a repeater in node 9 is futile, so the focus was moved towards node 6 or 7. The set of minimum length paths for nodes 0, 1, and 3 is presented in Table 12. By analyzing the changed structure of the network, it was divided into two parts. One related to the fifth node ( Figure 10a) and one associated with the remaining nodes 0, 1, and 3 ( Figure 10b).
It was assumed that for some reasons, nodes 2, 6, 7, and 10 had been excluded which caused nodes 0,1, 3, and 5 to lose the possibility to contact the acquisition node. This is shown in Figure 9. By analyzing the changed structure of the network, it was divided into two parts. One related to the fifth node ( Figure 10a) and one associated with the remaining nodes 0, 1, and 3 ( Figure 10b). The sets of virtual shortest paths connecting the isolated nodes are given in Table 11. The data in Table 11 show that when it comes to node 5, it is clear for a signal repeater to be installed in node 10.
The situation presented in Figure 10b is more difficult to analyze. In that case, it should be verified which of the edges creating the paths ensure obtaining the maximum probability of a correct transmission.
Even a superficial scan of the network scheme shows that placing a repeater in node 9 is futile, so the focus was moved towards node 6 or 7. The set of minimum length paths for nodes 0, 1, and 3 is presented in Table 12. The sets of virtual shortest paths connecting the isolated nodes are given in Table 11. The data in Table 11 show that when it comes to node 5, it is clear for a signal repeater to be installed in node 10.
The situation presented in Figure 10b is more difficult to analyze. In that case, it should be verified which of the edges creating the paths ensure obtaining the maximum probability of a correct transmission.
Even a superficial scan of the network scheme shows that placing a repeater in node 9 is futile, so the focus was moved towards node 6 or 7. The set of minimum length paths for nodes 0, 1, and 3 is presented in Table 12. The configurations of paths connecting individual nodes with the acquisition node ensuring the highest probability of a successful transmission were analyzed: from node 0-e1, e15, e27; from node 1-e2, e9, e15, e27; from node 3-e9, e15, e27. Each of the above-mentioned paths is connected with node 6, so it is therefore the location of an intermediary node.

Discussion
The proposed method allows for the determination of the best location ofan SM device for an additional role as a concentrator, thanks to which it is possible to eliminate a TSC module as well as redundant connections between the TSC and its adjacent SM modules. The absence of need for the installation of TSC lowers the cost of the network construction and its location maintenance (that is a transformer station MV/LV). It leads to the avoidance of time-consuming, complex, and expensive procedures. The removal of unreliable links between the TSC and the SM modules, resulting from a long distance between them, causes the improvement of the reliability and traffic parameters of the network. Improvement of the traffic parameters allows for more frequent reading, which is crucial in energy consumption forecasting. One additional benefit is the possibility to perform more frequent reading of the meters, which is particularly crucial, for example, in Smart Grid systems, with distributed generation, increase in the number of SMs in a last-mile network, and therefore the extension of the operating area of the network.
Sometimes, in order to improve the traffic parameters of a network, it is necessary to divide it into several subnetworks. The division of networks within the structure using TSC was possible only if the main network was extended with a new transformer. The proposed method makes it possible to determine the best location for the SMs, which are also supposed to work as concentrators in particular subnetworks. The paper also proves that the proposed method can be used for finding a place for backup concentrators and repeaters.

Conclusions
All the presented solutions referred to last-mile networks using the RF technology. Thanks to the introduction of the ITU-T recommendations defining the PLC interfaces for Smart Metering [27][28][29], the technology can be used in many areas of a Smart Grid [30]. Currently, the author is working on the adaptation of the proposed method for networks based on the G3 PLC [28] and PRIME [29] interfaces. In this case, it is necessary to develop a method for the calculation of the PER values for the links using PLC (not only RSSI, but also Signal to Noise Ratio (SNR) and a way to describe the topology of a network (in case of a three-phase mains, the installed SM devices for transmission can use three common media or only one of them).