A Novel Routing Algorithm for Power Line Communication over a Low-voltage Distribution Network in a Smart Grid

A novel artificial cobweb routing algorithm (ACRA) for routing the tree-type physical topology of a low-voltage distribution network in a smart grid is proposed and analyzed in this paper. The establishment, maintenance and reconstruction of the route are presented. The artificial cobweb routing algorithm is shown to have broad general applicability for power line communication. To provide a theoretical foundation for further research, the communication delay of the network is calculated accurately. Simulation analysis of the communication delay and throughputs, which were based on Opnet14.5, demonstrate the accuracy of the theoretical calculation. For the performance evaluation of ACRA, a test-bed that includes PLC nodes with the ACRA is set up in a noisy environment. Experimental results show the feasibility of the ACRA algorithm. These indicate that ACRA is effective for guaranteeing Quality of Service (QoS) and reliability in power line communication.


Introduction
Recently, the State Grid Cooperation Company of China, which is a state-owned company, decided to construct new grids based on Smart Grid technology across China.Power-line communication (PLC) over the low-voltage (LV) distribution networks has become one of the potential technologies to OPEN ACCESS communicate information between end users and power providers, and thus, recent research in China has focused on PLC [1].
At present, research on PLC focuses primarily on the aspect such as input impedance and attenuation characteristics of the channel [2], channel noise characteristics [3,4], channel models [5,6], impedance matching and coupling circuit design [7], power line noise suppression technology [8,9], the application of orthogonal frequency division multiplexing (OFDM) in PLC, frequency hopping modulation and demodulation techniques [10].An effective method to improve the reliability of PLC systems from network level is through the establishment of network routing or relay techniques [11,12].An artificial cobweb routing algorithm for routing the tree-type physical topology of a low-voltage distribution network is analysed in this paper based on the artificial cobweb routing of the bus-type data communications layer of a low-voltage distribution network proposed in [13].The artificial cobweb routing algorithm is further improved.To provide a theoretical foundation for further research, the network parameters after networking are accurately calculated.The simulation results demonstrate the accuracy of the theoretical calculation.The results indicate that the artificial cobweb routing algorithm is effective for guaranteeing QoS and reliability in power line communication.

Topology of Low-Voltage PLC
For a three phase power distribution grid, the signal attenuation between phases on the secondary side of a transformer is very large.Without phase coupling, each phase can be regarded as parallel and relatively independent; thus, the topology of any one phase can be the focus of research.On the basis of the physical topology of a low-voltage distribution network proposed in reference [14], this paper establishes a single-phase power distribution network, as shown in Figure 1.The base station (BS) is responsible for the collection and coordination of the data from each terminal node in the network; the BS is connected with a wide area network (WAN) for external information exchange.In practice, the signal is attenuated as a result of the transmission distance [15]; therefore, only the terminal nodes with a short physical distance from the BS are able to ensure reliable communication.Over long transmission distances, traditional polling methods cannot guarantee the direct communication between the BS and the nodes far away from the BS, so the success rate of communication may be very low [14].To solve this problem, a novel method called the artificial cobweb routing algorithm is proposed.In this method, a communication route is first established between the BS and some of the nodes.The nodes are then regarded as relays to expand the communication distance, and gradually, all the nodes are connected to the communication system.Finally, the route between the BS and all the nodes is completed.Consequently, it is necessary to select the relay nodes and establish, maintain and reconstruct the route.

Artificial Cobweb Routing Algorithm
A novel routing algorithm based on the single-layer artificial cobweb structure presented in reference [13] is proposed.In a single-layer artificial cobweb structure as shown in Figure 2, the central nodes (such as node I in Figure 2) are responsible for coordinating and dealing with the information from the peripheral nodes (such as node 1, 2, 3, …, h in Figure 2) within a subnet.In addition, central nodes are relays for communication between the central nodes and BS of other associated subnets.The communication route of a BS to any one terminal node is exclusive in a network with an artificial cobweb structure.Assuming that the physical link is connected as shown in Figure 1, we stipulate that: 1.All nodes in the networking process are responsible for recording the physical signal strength β of the received information; 2. Any node within the network can communicate with at least one other node; 3.Each node attempts to find the possible number of nodes in a maximum physical range; 4. The logical ID of the BS is 0, and the nodes which have been assigned logical ID is no longer involved in the new logical ID allocation process; 5.After completing the networking, the central node will not become a bad node (The nodes that cannot communicate with other nodes as a result of changes to the channel condition).

Artificial Cobweb Routing Initialization Algorithm
The flow chart of artificial cobweb routing algorithm is shown in Figure 3.In what follows, we illustrate the artificial cobweb routing initialization algorithm combined with Figure 1 and Figure 3:  This paper assumes that a broadcast from h 2 is not received by nodes 17~24, which are located in another branch, and h 3 is selected as the central node to form a new cobweb network.It is stipulated that the logical layer of the new cobweb network is layer 2. h 2 and h 3 send the routing table to the BS by selecting h 1 as a relay.β = s × η l , where s is the characterisation value of the physical signal strength, l is the layer number of the subnet to which the information sources belong, and η is the successful probability of communication between different nodes.η can be obtained from practical statistical values.A higher value for η indicates higher reliability of communication between layers.Conversely, a lower value for η indicates lower reliability.4. h 2 and h 3 send a broadcast again, assuming that nodes 25~36 receive the broadcast from h 2 , repeat step 3, and select central nodes h 4 and h 5 to form new cobweb networks in different branches.When there are no nodes without a logical ID response to broadcast from h 3 and an empty response is obtained, then stop networking. 5. h 4 and h 5 send a broadcast and repeat step (3).When there are no longer nodes without logical ID response to broadcast from h 4 and h 5 and an empty response is obtained, and then stop networking.Stipulate that layer 3 is the spider web logical layer that h 4 and h 5 locate.h 4 and h 5 send the route table to the BS by selecting h 2 and h 1 as relays.Finally, the initialization is completed.
If the central nodes h 4 and h 5 of the third layer still receive nodes without a logical ID, then they repeat the networking process until all nodes have a logical ID and are connected to the network.The communication route of all nodes within the network will then be established.

Example of the Routing Algorithm
The single-phase power distribution network in Figure 1 consists of one BS and 36 terminal nodes.After the artificial cobweb initialization algorithm, the MAC layer of the network reflects the network structure shown in Figure 4.One radio broadcast of the BS is intercepted by nine nodes, and these nine nodes will then respond to the BS one by one to receive a logical ID.The BS selects the node, we assume the logical ID 5, to be the central node of layer 1, and then, these nodes compose a cobweb in the MAC layer based on the steps 1, 2. The node with the logical ID 5 continues to broadcast and is intercepted by 15 nodes from different physical branches, which are then assigned logical IDs 10~24.The node with the logical ID 13 is selected as the central node for networking.In case the broadcast of this central node is not intercepted by a node with a logical ID assigned in another branch, this node will send a message to node 5. Node 5 will then reselect node 19 as the central node to complete the network of layer 2. According to the actual environment and redundant calculation of time delay, we stipulate that node 5 wait 10 s to collect all the replies before establishing central nodes for layer 2.
Central nodes 13 and 19 search with the same algorithm until the rest of the nodes obtain logical IDs to complete the network in layer 3.After completing the cobweb route initialization, each central node records the logical ID and layer of the nodes in the same subnet.The peripheral nodes record the logical IDs and layers of their own nodes and the central nodes.The complexity and length of the routing table is determined by the number of the nodes and the layers in the network.

Routing Maintenance Principle
Because of the openness and time variability of the low-voltage power line network, bad nodes will appear during the operation of the network.Two principles to maintain the route are proposed to ensure the success rate of the data collection for the BS: 1 when bad nodes caused by routing interrupt the operation of the completed network, a process to reconstruct the local routing of the bad nodes begins (in Section 3.2). 2 during the idle periods of the network, the BS initiates the routing detection instructions.If a bad node is found, principle (1) is implemented to establish new communication routes.
In the secondary side of a 100 m × 100 m tree-type grid, we set 39 end-user nodes and a base station node (Node 1) in Figure 5.The results for the artificial cobweb routing algorithm (ACRA) are shown in Figure 6.Each node in a grid with tree topology only has a single point-to-point link shown in Figure 5.If one communication link (such as links 21-31) is interrupted, unless the entire network is reconstructed, the interrupted communication link cannot be restored.In the ACRA network shown in Figure 6, the nodes in the same layer (such as nodes 23, 28, 33, 36) can communicate with other nodes.A peripheral node may continue to communicate with central node owing to the additional tangential connections when one communication link is interrupted.For example, when the links 28-33 are interrupted, peripheral node 28 can communicate with central node 33 by choosing peripheral node 23 as a relay.After networking, the BS can communicate with any node in the networking via the central node, which acts as a relay node.An example is shown in Table 1.It is obvious that the communication quality is more effective using the ACRA than using tree topology.The ACRA can effectively reduce the network reconfiguration frequency.

Routing Reconstruction Algorithm
As shown in Figure 4, we assume that the central node 13 in logical layer 2 has not received any information sent by node 11, after a data processing delay t proc , confirming that node 11 is a bad node.Node 13 then initiates the following process to reconstruct the local routing: 1. Central node 13 sends a reconstruction broadcast to the nodes in its same subnet.2. Nodes that intercept the instructions for routing reconstruction forward the instructions in turns and add their own logical ID into the data packet.3. Node 11 records the physical strength of the reconstruction broadcast signals; calculates and selects the node with max β, the composite index of the signal strength, as a relay node (node 12 in this paper); and sends a response to node 12. Node 11 establishes a communication route to central node 13 with node 12 as relay.4. Node 12 sends information to node 13, and node 13 updates the routing table.5. Node 13 sends the information layer by layer up to the BS of the corresponding node to update the routing table.Then, the reconstruction process for routing a bad node is completed.
When bad nodes appear in a network, it is not necessary for all nodes to reconstruct their routing.Only the nodes in the same subnet as the bad nodes are involved, which dramatically shortens the route reconstruction and maintenance time and improves the efficiency of the system.

Algorithm Timing
PLC only allows one node to send data at any given time, so it is necessary to present a reasonable timing strategy.Otherwise, a channel conflict will seriously affect the performance of the system.Using the data transmission timing of the nodes in a subnet, the artificial cobweb routing algorithm (ACRA) is compared with the clustered simple polling (CSP, developed from the general polling method used to solve the "silent node" problem in the PLC-access network) algorithm mentioned in reference [12] through simulation.The interval time of communication between two peripheral nodes T WT in the ACRA is defined as (1).T P represents the manage processing delay of one peripheral node; T T is the signal transmission time among nodes; T R indicates the communication redundancy time.Generally, the signal transmission time T T in a power line is fast enough to be ignored: Based on the protocol and the experimental results [16,17], T WT is assumed to be 150 ms in this paper.Finally, the communication effectiveness of a cobweb structure is confirmed using data collision and the channel utilisation percentage.Figure 7a shows the timing of the ACRA, in which the horizontal axis is time, the single-layer cobweb consists of n nodes, node n is the central node, the rest of the nodes are peripheral nodes, and every node sends a data message in turn, according to the smallest to largest logical ID, to central node of its subnet with an interval time T WT .After receiving messages from all nodes, the central node then sends the messages to the central node or BS.This process avoids the channel data collision caused by the occupation of a channel by several nodes at the same time.Figure 7b shows the timing of CSP using five nodes.A node of medium distance will communicate with the BS through a closer node as a relay.Without constant relay nodes and strict timing, the five nodes will find the close node by sending random messages, resulting in a large amount of data collision in the channel.The corresponding simulation result is described in detail in the fourth part of this paper.

Delay Analysis without Bad Nodes
Communication delay is an important measure of QoS, so it is necessary to calculate the communication delay of the artificial cobweb network accurately.In the tree topology, there is only one link connectivity between any two nodes, node communication failure due to channel noise and other uncertainties, which lead to the time of recovery communication cannot be accurately calculated, the delay time may be temporary or permanent.So the time of tree topology is not calculated in this paper.The transmission time of the packet tx t is available from Equation (2): where p is the packet size and Baud is the communication rate.This paper sets the data processing delay t proc = 0.5 s.After networking, the only factor that affects the communication delay is the subnet that the nodes come from.The communication delay is the same for different subnets that select the same central node as the relay node.Therefore, we select subnet 1, subnet 3, and subnet 4 from layer 1, layer 2, and layer 3, respectively, in Figure 4 to calculate the delay.First, we calculate the delay of peripheral node s, and all the nodes in subnets without bad nodes communicate with the BS.
The steps of the transmission of data from a peripheral node in subnet 1 to the BS shown in Figure 8 are as follows: (a) The BS sends a data acquisition command to the central node h 1 of subnet 1.(b) A peripheral node in subnet 1 sends its data to h 1 .(c) After the data processing time t proc , node h 1 sends the data of a peripheral node to the BS.The delay t d1 in the transmission of data from a peripheral node in subnet 1 to the BS is shown in (3): The steps of the transmission of data from a peripheral node in subnet 3 to the BS are as follows: (a) The central node h 1 sends a data acquisition command to the central node h 3 of subnet 3, and a peripheral node in subnet 3 sends its data to h 3 .
(b) After the data processing time t proc , node h 3 sends the data of a peripheral node to h 1 .
(c) After the data processing time t proc , node h 1 sends the data to the BS.The delay t d2 in the transmission of data from a peripheral node in subnet 3 to the BS is shown in Equation ( 4): The process is similar for the nodes in subnet 1 and subnet 3. The delay in the transmission of data from a peripheral node in subnet 4 to BS t d3 is shown in Equation ( 5): Similarly, the delay in the transmission of data from a peripheral node in subnet m of layer n to BS t dn is shown in Equation ( 6): (6) We assume that subnet 1 contains 1 p nodes: the steps of the transmission of data from all the nodes in subnet 1 the BS are as follows: (a) BS sends the data acquisition command to the central node h 1 of subnet 1.
(b) The p 1 − 1 peripheral nodes send data to h 1 in turns.
(c) After the data processing time t proc , node h 1 sends all the data of p 1 nodes (include the data of node h 1 itself) to the BS.
According to the calculative steps, the delay in the transmission of data from all the nodes in subnet 1 to BS T d1 is shown in Equation ( 7): We assume that subnet 3 contains p 2 nodes and that subnet 4 contains p 3 nodes.Similar to the calculation processing of T d1 , the delay in the transmission of data from all the nodes in subnet 3 and subnet 4 to BS T d2 and T d3 are shown in Equations ( 8) and ( 9 Similarly, the delay in the transmission of data from all the nodes in subnet m of layer n, which contains p n nodes, to BS T dn is shown in Equation (10): (10) In summary, assuming that each layer contains only one subnet, after networking, the delay in the transmission of data from all the nodes to BS T dALL is shown in Equation ( 11):

Delay Analysis with Bad Nodes
According to the routing reconstruction algorithm proposed in this paper, the delay in the transmission of data from one bad node in subnet 1, subnet 3 and subnet 4 to BS t ' d1 , t ' d2 , and t ' d3 is shown in Equations ( 12), (13), and ( 14), respectively.The process of transmission delay is shown in Figure 9.
Figure 9. Process of transmission delay with bad node.(15) According to the rerouting algorithm, there is one bad node each in subnet 1, subnet 3 and subnet 4, respectively.The delay in the transmission of data from all the nodes to BS T ' d1 , T ' d2 , and T ' d3 is described by Equations ( 16), ( 17) and ( 18), respectively.
  Similarly, if subnet m in layer n contains w-1 good nodes and one bad node, then the delay in the transmission of data from all the nodes in subnet m to BS T '  dn is described in Equation ( 19): In summary, when each subnet contains one bad node, the delay in the transmission of data from all the nodes to the BS based on the rerouting algorithm T '  dAll is described in Equation (20): Figure 10 shows the calculated results based on the Equations proposed above, where each subnet contains seven nodes and the subnet layer n is from 1 to 10.It shows that when n = 10 and each subnet contains 1 bad node, T '  dAll is about 68 s.With an automatic meter reading system, which is less demanding on the timing, the delay can fully guarantee the QoS of system.Though this method costs some time, it guarantees the data collection success rate of the BS, and has the desirable practicability.These results demonstrate that even though the method is time consuming, the ACRA is effective for guaranteeing QoS in PLC.

Simulation Environment and Parameter
To simulate the distribution environment of an actual low-voltage distribution network, we set 21 terminal nodes and one BS node within 50 meters range radius and used a PC as the simulation platform, with Opnet14.5 as the compilation and simulation environment.We assume that all nodes form three artificial cobwebs and that this structure remains unchanged throughout the simulation period.Figure 11 shows the topology structure after networking, in which subnet_0 represents the BS node, subnet_1_0, subnet_2_0 and subnet_3_0 are the central nodes of the subnets, and the other nodes are terminal nodes.Based on the Konnex standard [18], we set the channel transmission rate to 2.4 kbps and the packet size to 24 bits.

Simulation Results and Analysis
With the 24 bits/s generating rate of each node, the calculated throughput of link subnet_3_0-subnet_2_0 is 168 bits/s.The throughput of link subnet_2_0-subnet_1_0, including the data of subnet 3 and subnet 2, is 336 bits/s.The throughput of link subnet_1_0-subnet_0, which includes the data of all the 21 nodes, is 504 bits/s.The throughput simulation results of links subnet_3_0-subnet_2_0, subnet_2_0-subnet_1_0 and subnet_1_0-subnet_0 are shown in Figure 12a.The figure shows that the throughput simulation results of every link are identical to the theoretical calculations.According to Equation ( 2), the calculated transmission delay of each link is 0.07 s, 0.14 s, and 0.21 s.The simulation results of the data transmission delay between each link are shown in Figure 12b.The delay simulation results are also identical to the theoretical calculation.The simulation results indicate that with a throughput and transmission delay, the networking structure can guarantee QoS in power line communication.According to the simulation model shown in Figure 11, the parameters of Equations ( 6), (11), (15), and (20) are n = 3, j = 7, k = 7 and l = 7, and the corresponding delays are t d3 = 1.55 s, t ' d3 = 5.15 s, T dAll = 3.63 s, and T ' dAll = 14.43 s.The simulation result of the delay in the transmission of data from node subnet_3_2 to the BS is shown in Figure 13a.It shows that the delay is between 1.55 s and 1.56 s; this result corresponds with the theoretical calculation.In the simulation model, we select that subnet_3_2 cannot communicate with subnet_3_0, which is the central node of subnet 3. The rerouting algorithm is used, and subnet_3_3 is the relay.The simulation result of the delay in the transmission of data from node subnet_3_2 to the BS is shown in Figure 13b.The delay is between 5.14 s and 5.16 s; this result corresponds with the theoretical calculations.The simulation result of the delay in the transmission of data from all the nodes to the BS is shown in Figure 13c.The delay is between 3.62 s and 3.63 s; this result is consistent with the theoretical calculations.The simulation result of the delay in the transmission of data from all the nodes to the BS when subnet_1_2, subnet_2_2 and subnet_3_2 have bad nodes and they select adjacent nodes as a relay is shown in Figure 13d.The result is consistent with the theoretical calculations.The simulation results shown in Figure 13 demonstrate the accuracy of the delay theoretical calculation previously mentioned.The simulation also shows that although the rerouting algorithm is time consuming, it increases the data collection success rate of the BS, guarantees QoS in power line communication, improves the reliability of the system and is practical.
Figure 14a shows a comparison of the simulation results related to channel conflict between ACRA and CSP.Vertical lines represent the occurrence of channel conflict at a specific time.The figure shows that within the simulation time, conflict caused by ACRA (blue line) is far less than that caused by CSP (green line).ACRA divides the whole large network into several small networks, in which the nodes of each network send messages to a central node within a certain time.This process reduces the nodes in the channel at any one moment, which considerably reduces the conflict and improves the channel utilisation, as shown in Figure 14b.

Experiment and Analysis
In order to evaluate the performance of the ACRA, we designed a test-bed in our laboratory of which the environment is similar to office or home environments.The terminal node is shown in Figure 15.The node basically has four parts: serial communication part, control core, power line communication core, and coupling circuit part.The serial communication part supports downloading, debugging the program, and connecting with PC.The control core has a Mega8 processor which controls the operative mode of the PLC core.The PLC core has a ST7538 which supports for multi-carrier modulation.The coupling circuit part is responsible for coupling the carrier signal to 220 V power line.The topology of test-bed is shown in Figure 16.It contains 10 terminal nodes.Among them, node 1 is the BS, which connects with PC via serial communication part to record the data from the other terminal nodes.The test-bed also contains computers, air-conditioner, motor and some other devices which are commonly used in the laboratory (e.g., lamps, scanner, printer, etc.) as noise sources.The ACRA is compared with CSP.The accuracy rate of receiving data is used as performance measure.
In order to calculate and observe the experimental results conveniently, we set that node2-node10 send character data "a" to "n", or hex 0x61 to 0x6E to BS.The PC connected with BS is responsible for displaying and recording the data from these nodes.In ACRA, noe2-node10 constitutes a single artificial web network, and the node6 is the central node.In the process of experimental, ACRA and CSP continuous work 5 hours before and after the adding of the same noise sources respectively.We record the data and do some statistical analysis.The results of statistical analysis are shown in Figure 17.When there are no noise sources in the network, the accuracy rate of CSP and ACRA is 89.87% and 99.83%, respectively.When there are similar noise sources in the network, the accuracy rate of CSP and ACRA is 97.67% and 49.61%, respectively.Subject to the effects of noise, the accuracy rate of CSP and ACRA are a certain degree of reduction, but the ACRA is less affected.These indicate that because of the terminal nodes of CSP send data disorderly, the utilization and conflict of channel are undesirability which result in the high bit error rate and low accuracy rate, low anti-interference ability and low reliability of PLC.The terminal nodes of ACRA send data to the central node according to the timing in Figure 7a and Figure 14a, which avoids the conflict, improves the utilization rate of channel, reduces the bit error rate, ensures the accuracy rate of data.Because of choosing the proper relay node (node 6), ACRA reduce the influence of noise on PLC effectively, improve the reliability of PLC.

Conclusions
An artificial cobweb routing algorithm for routing the tree-type physical topology of a low-voltage distribution network in a smart grid is analysed in this paper.The artificial cobweb routing algorithm is further improved.Communication delay and throughput are calculated and simulated.The conclusions are as follows: 1.The novel routing algorithm solves the problem in which some nodes cannot access the PLC system as a result of limited data connectivity and improves the reliability of communication.
Using the algorithm, the process of route maintenance after networking is simple and efficient.A routing reconstruction algorithm reroutes bad nodes at the local network level, avoiding the need to reroute all the nodes in the system and thus improving the efficiency of the communication system and enhancing the anti-destroying ability of the PLC system.2. QoS in PLC is guaranteed by the communication delay and data throughput of the artificial cobweb networking structure in terms of the data processing capacity of nodes.This routing algorithm has the characteristics of practicability and manoeuvrability.3.Each node sends data according to a strict time series, which reduces the channel collision rate considerably and improves the channel utilisation.Therefore, the algorithm improves the communication reliability of the system.The results of this study prove that the cobweb structure is an effective routing method for improving the reliability of LVPLC and guaranteeing QoS in PLC.This routing algorithm may also provide a novel routing method for other networks, such as wireless sensor networks and ad hoc networks.

Figure 3 .
Flow chart of algorithm.

Figure 7 .
Figure 7. Timing of the algorithms.(a) Timing of the ACRA; (b) Timing of CSP.

Figure 8 .
Figure 8. Process of transmission delay without bad node.

Figure 12 .
Figure 12.Simulation results of links between centre nodes.(a) Throughput between central nodes; (b) Delay between central nodes.

Figure 13 .
Figure 13.Simulation results of delay.(a) Simulation results of t d3 ; (b) Simulation results of t ' d3 ; (c) Simulation results of T dALL ; (d) Simulation results of T ' dALL .

Figure 14 .
Figure 14.Simulation results of channel status.(a) Simulation results of channel conflict; (b) Simulation results of channel utilisation.

Figure 16 .
Figure 16.Topology of the test-bed.

Figure 17 .
Figure 17.Statistical results of the experimental data.
If β h1 < β h2 , then the composite index of signal strength from h 1 recorded by nodes 10~16 is less than that from h 2 , step 2 is repeated, h 2 is selected as the central node to form a new network.If β h1 > β h2 or a broadcast from h 2 is not received, then nodes 17~24 send a message to h 1 and repeat step (1), and h 1 selects a new central node h 3 from these nodes to form a new cobweb network.
End1.When a networking broadcast is sent by the BS, in order to explain the process of algorithm conveniently, we assume that it can only be intercepted by nodes 1 to 9, which have a

Table 1 .
Example of routing.