# Development and Calibration of a PLC Simulation Model for UPA-Compliant Networks

Ievgenii Anatolijovuch Tsokalo, Stanislav Mudriievskyi, Ralf J. Lehnert

► To cite this version:

Ievgenii Anatolijovuch Tsokalo, Stanislav Mudriievskyi, Ralf J. Lehnert. Development and Calibration of a PLC Simulation Model for UPA-Compliant Networks. 19th Open European Summer School (EU-NICE), Aug 2013, Chemnitz, Germany. pp.197-208, 10.1007/978-3-642-40552-5_18. http-01497016

HAL Id: hal-01497016

https://inria.hal.science/hal-01497016

Submitted on 28 Mar 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Development and calibration of a PLC
simulation model for UPA-compliant networks

Ievgenii Tsokalo, Stanislav Mudriievskyi, and Ralf Lehnert

Chair for Telecommunications,
Technische Universität Dresden, 01062 Dresden, Germany
{ievgenii.tsokalo,stanislav.mudriievskyi,ralf.lehnert}@tu-dresden.de
http://ifn.et.tu-dresden.de/tk

**Abstract.** Communication network of the Smart Grid is intended to serve a numerous amount of applications of different types. Its complicated structure often requires a utilization of several communication technologies: wireless, cable, etc. Power line communication (PLC) also remains a challenging solution for usage in this area. The present paper is targeted to explore the communication protocol of UPA (Universal Powerline Association) technology - one of Broadband PLC (BB-PLC) solutions, which are used today in the Smart Grid. In the paper the test field measurements of this technology are summarized and the development of the UPA simulation model is described. Among this description one of the most important stages of the simulation model design, i.e. calibration with the measurement results, is explained. The obtained simulation model is intended be used as a part of the PLC network planning tool.

**Keywords:** Broadband Power line communication, UPA, TDMA, simulation model, test-field, ns3

# 1 Introduction

This paper presents the measurement results and the simulation model, which were obtained and built within the PLC4SG project [1]. This project is targeted to investigate two powerline technologies: UPA [2] and G.hn [4] for Smart Grid applications in access networks. The former one, UPA, is considered in this paper. It was developed within the OPERA 1, 2 projects [3]. It is a broadband PLC solution with up to 200 Mbps data rate on physical layer. It maintains TCP/UDP IPv4 data transmissions and has a master-slave structure. The architecture of the measurement system is depicted in fig. 1. Hereinafter a master is referred to as a Measurement Computer (MC) and a slave — Terminal Device (TD). The PLC network can be managed either with the remote computer or with the remote desktop, connected though internet with the remote computer. The MC uses UMTS to get connected with the remote computer. Each device in the PLC network, MC and TDs, consist mainly of two parts: the actual PLC modem and the device, which runs the measurement software. We have selected GuruPlug computer for this purpose, which runs Debian as operating system [11].
<figure><img src="image_2.png" /><figcaption>Fig. 1. Architecture of the measurement system</figcaption></figure>

The paper is based on already published measurement results and description of the measurement tool in [6, 7]. The test field measurement consists of three test sites: urban, rural and industrial, located in Hanoi, Vietnam. Each of the test sites has up to 15 TDs and one MC. The network performance is estimated with the measurement of the network goodput under greedy traffic and the round trip time with a tool, described in [7]. The measurement of the traffic is executed with several routines: uplink and downlink point-to-multipoint and point-to-point measurements. In each point-to-point measurement the traffic between MC and one selected TD is transferred. The parallel measurement corresponds to starting the point-to-point ones with all TDs at a time. The packet length on TCP layer is kept constant throughout one measurement with one routine. The traffic with two packet lengths was tested: 100 and 1000 bytes. The developed tool calculates one data rate measurement value each second. The duration of each routine for each length of packet comprised several weeks. Alongside with the data rate measurement on the TCP layer, the physical layer data rates were measured with a special tool of the UPA chip manufacturer Marvell.

The conclusions on the obtained information from the measurement results are given in sect. 2. The description of the UPA simulation model is presented in sect. 3. The steps for the simulation model calibration with the measurement results are introduced in sect. 4. The last section describes the possibility of
the available flexible channel model usage within the developed UPA simulation model.

## 2 Measurement Results

In the PLC4SG project the execution of the test field measurements had two main targets: estimation of the possible data rates in a real scenario and also the use of the statistical data for the calibration of the simulation model. Afterwards such model can be used within a network planning tool, helping to predict the network behavior in realistic scenarios. The measurements to allow investigate the following factors that can help in the analysis of the UPA protocol behavior:

<figure><img src="image_3.png" /></figure>

dependence of the data rate on the number of repeating hops between MC and TD;

<figure><img src="image_4.png" /></figure>

dependence of the data rate on the distance between MC and TD;

<figure><img src="image_5.png" /></figure>

point-to-point link quality with varying channel conditions;

<figure><img src="image_6.png" /></figure>

sharing the channel resources;

<figure><img src="image_7.png" /></figure>

system warm-up time;

<figure><img src="image_8.png" /></figure>

routing strategy.

We observed that the data rates of the point-to-point connections varied with the time of the day. This variation is caused by the channel conditions changing. It is clear that the PLC signal transfer function is not static and depends on impedances and noise of all electrical appliances, connected to the power grid. Our tests confirm the significant influence of electricity consumers on the PLC signal quality. The tool of the UPA chip manufacture Marvell for physical data rates measurement also allows read-out of the logical network structure, i.e. identification of the repeaters in the network. This structure was also changing depending on the time of the day.

The most noticeable time variation concerns the urban test field scenario.

Also the measurements have shown that the PLC channel is highly asymmetric, so that the logical network structures in downlink and uplink are often different.

The accuracy of the measurement results is given by calculating the confidence intervals.

The detailed description of the test fields and measurement results can be found in [7].

## 3 Simulation Model

The ns-3 simulator [9] has been selected for implementation of the UPA simulation model, which layer structure is described in fig. 2.

Each layer implementation specialitites one can find in the following subsections.
<figure><img src="image_9.png" /><figcaption>Fig. 2. Structure of the UPA simulation model</figcaption></figure>

## 3.1 Physical Layer

Usually physical layer and channel simulation models consume much computing capacity. Therefore in the present work the detailed modeling of this simulation blocks is not introduced, but the physical layer and the channel are denoted with the empirically derived statistical model. For this purpose the measurement results of the physical data rates are transformed into the physical data rate table of point-to-point connections, which entries vary over time. Here we have introduced two levels of time variation: hours long and minutes long variation periods. Each hour long period is characterized with a table of statistical values: mean and standard deviation of the point-to-point data rates for each connection in down- and uplink. The example of one point-to-point test field measurement is shown in fig. 3. It explains the calculation of the time variant point-to-point data rate for one pair of nodes. We can distinctly observe the periodic variation of the data rate.

From this result we choose 6 intervals:

[23 : 30 – 04 : 30], [04 : 30 – 11 : 45], [11 : 45 – 16 : 30],
[16 : 30 – 18 : 30], [18 : 30 – 21 : 00], [21 : 00 – 23 : 30],

where the mean value of the data rate remains approximately constant without regard of that we take the values from all interval or from the half of it. It enables us to calculate the confidence interval for each period. We perform such division into period for each point-to-point connection separately for up- and downlink. The periods for different connections do not coincide.

The number of the measured values in a selected period depends on its length. The measured values of the physical data rates are gathered each 15 minutes.
<figure><img src="image_10.png" /><figcaption>**Fig. 3.** Physical data rate of one point-to-point connection in one direction for 9 days of measurement</figcaption></figure>

<table><caption>**Table 1.** Table example of the statistical values for the physical layer and channel modeling</caption><thead><tr><th>Source ID</th><th>Destination ID</th><th>Mean data rate</th><th>Standard deviation</th></tr></thead><tbody><tr><td>⟨value⟩</td><td>⟨value⟩</td><td>⟨value⟩</td><td>⟨value⟩</td></tr></tbody></table>

Each period can include up to (N · T<sub>P</sub> / 15) values, where N is the number of days, when the measurement was executed and T<sub>P</sub> - length of the period in minutes. The presented in fig. 3 measurement lasted 9 days.

Each bunch of the measurement points in the selected time intervals we additionally divide into 20 groups with equal number of points. The groups are chosen in such a way that each one contains the points of the different time subintervals. These groups are called subruns, which we use for confidence interval calculation. The mean value and the standard deviation of the subrun mean values we save in the table for corresponding source and destination ID entry (Table 1¹).

Such table is created for each of the selected periods, covering all the time of the day. The simulation model uses different tables one after another. How the actual point-to-point data rate values are calculated is described in the following.

In accordance to the definition of the confidence interval the mean values of each subrun are independent random variables and can be described with the

<footnote n="1">¹ Source and Destination ID values run through all possible combinations</footnote>
normal distribution. As mentioned before the introduced statistical model of the
physical layer and channel has also short time variation of the data rates. Within
each chosen period of the Table 1 the used in the simulation physical data rate
vary with 1 minute interval. Each interval the actually used data rate value for
every connection is calculated with the normal distribution taking the mean and
the standard deviation values from the corresponding table.

We also assume that the transmission between a pair of nodes is always
possible if the physical data rate between these nodes is more than the minimal
one, provided by the UPA specification.

Of course the data transmission in real systems is characterized not only with
a special data rate but also with the level of signal deterioration due to channel
effects and the packet is considered to be received from physical layer if it is
successfully decoded with redundancy codes. The simulation model simplifies
this effect and the packet is considered to be successfully decoded if the table
value of the data rate between the receiver and the transmitter is equal or higher
than the data rate, with which the packet is actually sent.

## 3.2 MAC Layer

The scheduling algorithm defines the channel share depending on available in-
formation of demands - the values of data amount to transmit downlink to each
destination and of each priority and uplink from each slave and of each priority.
The master is the only modem that can initiate any transmission. It periodi-
cally asks the slaves to send the information about the length of their queues
on all layers to all destinations and of all priorities. Keeping such information in
memory the master runs a special algorithm to schedule the channel resources.
OPERA simulation model uses fair share algorithm for traffic scheduling [8] and
therefore this one is implemented in UPA model.

## 3.3 Logical Link Layer (LLC)

The data unit of the LLC level is called the burst. It is measured in a number
of OFDM symbols and the symbols have constant time duration. The number
of bits that can be packed in one symbol depends on the PLC channel quality.

LLC layer calculates the routing tables, which is also based on the current
speed of physical connections. The UPA specification uses Spanning Tree Proto-
col for detection of the best routes. This protocol is described in the IEEE 802.1D
standard. The best route selection is done first of all depending on data rates of
physical connections, then on modems' IDs and other options, that define the
privileges of one modems over others. We regard all modems "equal in rights"
and concern only the first criteria. The calculation of the best route we explain
with the example in fig. 4. This test scenario is not based on the measurement
results and we have used it just to check the LLC layer functionality.

The picture describes the test scenario with 3 TDs. TD3 has different route
in down- and uplink:
<figure><img src="image_11.png" /><figcaption>Fig. 4. Test simulation scenario</figcaption></figure>

☐ Link MC → TD3 (downlink): $150 > 1/(1/150 + 1/150)) \Rightarrow$ Choosing direct route: MC → TD3.

☐ Link TD3 → MC (uplink): $64 < 1(1/150 + 1/150) \Rightarrow$ Choosing route with repeating: TD3 → TD2 → MC.

## 3.4 Layer Management Block

On MAC layer a special queue is created to store the MAC packet data units, that contain information from this block. This queue is served at the first priority level. Layer Management Block contains a number of services:

☐ Adaptive bit loading;

☐ Access Protocol;

☐ Polling Protocol;

☐ Port Solver Protocol;

☐ Cluster Discovery Protocol;

☐ Connection Admission Control Protocol;

☐ Spanning tree protocol.

All these services work to exchange the information between the modems about the neighbors, about the PLC connections quality and so on. The simulation model is constructed in such a way that all such information is already known by all the network members. It was not the aim to investigate the performance of these services. Therefore there is no necessity to implement them with their full functionality. Nevertheless such services are used by real modems and consume certain amount of the channel capacity. This amount can be calculated basing on OPERA specifications. Most of the services are periodic and the services' data
<table><caption>**Table 2.** The overhead of the UPA protocol layers</caption><thead><tr><th>Layer</th><th>Overhead Downlink</th><th>Overhead Uplink</th></tr></thead><tbody><tr><td>IPv4</td><td>1,2%</td><td>1,48%</td></tr><tr><td>Convergence</td><td>1,5%</td><td>1,9%</td></tr><tr><td>LLC</td><td>0,3%</td><td>0,26%</td></tr><tr><td>MAC access time</td><td>20,53%</td><td>21,31%</td></tr><tr><td>MAC headers</td><td>0,05%</td><td>0,05%</td></tr><tr><td>PHY</td><td>21,5%</td><td>22,0%</td></tr><tr><td>Layer Management</td><td>0,3%</td><td>0,3%</td></tr><tr><td><strong>Total</strong></td><td><strong>45,42%</strong></td><td><strong>47,29%</strong></td></tr></tbody></table>

units have almost not changeable size. Therefore it is possible to implement each service as a traffic consumer only, which sends packet of certain length with a certain period. The total amount of the channel utilization by the management block is estimated in the section 3.6.

## 3.5 Application Block

This block contains the source of simple and the greedy traffic. A simple traffic generator creates a fixed amount of packets at the simulation start-up. Greedy traffic generator cares about new packets generation each time, when the length of the convergence layer queues reach certain threshold value. The possibility to add other traffic generators is forseen.

## 3.6 Analysis of the Channel Resource Consumption

On the example of the test scenario fig. 4 we analyzed the overhead that is created by each protocol layer, when running the Parallel Down- and Uplink routines with a packet size of 1000 bytes. The summary is given in the Table 2.

Hereafter one can see that the Layer Management Block creates very little part of the total network traffic. MAC layer overhead consists of two parts: additional headers and the time, which is used to transfer the channel sharing information. The comparable with MAC part of capacity is consumed by physical layer. Therefore the total overhead takes about a half of the channel capacity.

# 4 Calibration of the simulation model

We have also designed the simulation scenario, which is analog to the real urban test case. Table 3 gives a characteristic of hop distances between the slaves and the master. The total number of modems in the test site is 15. From this table one can see how many slaves locate at distance of 1, 2, ... 6 hops from the master.
<table><caption>**Table 3.** Hop distances in the real test case scenario</caption><thead><tr><td>Number of hops</td><td>Number of modems in Downlink</td><td>Number of modems in Uplink</td></tr></thead><tbody><tr><td>1</td><td>4</td><td>4</td></tr><tr><td>2</td><td>5</td><td>3</td></tr><tr><td>3</td><td>1</td><td>4</td></tr><tr><td>4</td><td>2</td><td>1</td></tr><tr><td>5</td><td>2</td><td>1</td></tr><tr><td>6</td><td>0</td><td>1</td></tr></tbody></table>

The distance between directly (one hop) connected modems varies from 30 to 80 meters.

As mentioned above during the test field two types of measurement data was gathered: data rates on physical and application layers. The calibration of the simulation model is done with the following principle: using the created statistical model of the physical layer model we should adapt the mechanisms of the Datalink layer in such a way, that on application layer we receive the data rates, which were received during the testfield measurements.

The calibration is proposed to be done in several steps, which are described below. This sequence of steps is chosen in such a way, that different protocol constants and algorithms can be calibrated independently from each other. For example, first of all we decided to compare the measurement and simulation results for a case, when the logical mechanisms of the communication protocol create the least overhead. In such a way we can consider only the calibration of the constants in the simulation (Subsections 4.1 and 4.2).

## 4.1 Round Trip Time without Traffic

The MAC scheduler updates periodically the information about the length of the slaves' queues. For this purpose it sends the special service MAC data units (SMPDUs). If there is no traffic present, the update period is constant. This constant is not provided by specification but we can estimate it with this routine. It should be directly proportional to the round trip time.

With presence of other traffic this period can be extended because of two effects. At first, when the slaves send the MAC data units (MPDUs), they also write to the MPDU header the information, which is normally requested by SMPDUs. Therefore the master does not need to send SMPDUs itself so often as without uplink traffic. At second, when the time for the SMPUD sending comes the channel can be busy. In such case the SMPDU sending is delayed till the end of current transmissions. The extended value of the update period can be measured with round trip time during the network full load with traffic. This extended value of the period defines the maximal time that can be granted for one point-to-point transmission. This routine is described in subsection 4.6.
## 4.2 Point-to-point in downlink with 1 hop distance

With this routine we check the amount of headers of all protocol layers. We can do it only with this routine as far as with others the protocol creates much MAC overhead, that changes very dynamically. It originates because of the channel resource scheduling. For the selected routine it is also present but it does not change much and can be approximately calculated.

## 4.3 Point-to-point for multiple hop transmissions

During this routine it should be possible to see what is the priority of packets in repeating queues<fnref n="2" /> in comparison to the application queues <fnref n="3" />.

## 4.4 Point-to-point up- and downlink routines

In comparison of up- and downlink routines it is possible to discover the algorithm with which the channel resources are shared between these types of traffic.

## 4.5 Point-to-multipoint routines

These routines reveal the information about the sharing the channel resources between different users. The relation between the queues of all types<fnref n="4" /> can be estimated.

## 4.6 Duplex routines

This routine mainly serves as a verification of the previously obtained conclusions, i.e. the verification of the scheduling algorithm. Additionally as mentioned in subsection 4.1 this routine can be used for setting up the maximal time, which can be reserved for each point-to-point transmission.

# 5 Accurate channel model

As it was mentioned before we have used the statistical model of the physical layer and the channel, which is based on the measurement results. We considered it as the most accurate physical layer and channel model for the simulation model calibration. But its usage also has a significant drawback. We cannot simulate other scenarios, but only the ones, that were used during the test field

<footnote n="2">² Repeater queue contains the packets, that are received by the modem from other modems and have to be repeated</footnote>

<footnote n="3">³ Application queue contains the packet that were generated by the modem itself</footnote>

<footnote n="4">⁴ In the convergence layer of each node there are two kinds of queues: repeaters and application. This layer has queues for all destinations and all priorities separately for both queue kinds</footnote>
measurements. Therefore after the calibration we replace this statistical model with another one, which allows the setup-up of arbitrary scenarios. This model was implemented in the network simulator 3 (ns-3) by the group [10]. It uses another way to model the PLC channel - the deterministic approach with the usage of transmission line theory. For details, please, refer to [10].

In order to use the channel model provided by this ns-3 module it is necessary to set up the parameters of the transmission medium. For this the impedances of the point (called outlet) where the PLC modems are connected to the line should be given. Furthermore the nodes in the network must be fixed with the coordinates and the connection cable type must be specified. In the provided module authors already included several types of cable. Afterwards the transmit power spectral density and noise floor is set and the channel transfer functions are calculated. Now the physical and higher layers can be connected to the channel and complete network can be simulated. With the given module it is also possible to change the impedances during the simulation what will cause the immediate recalculation of the transfer functions for the channel. Therefore the influence of the time-varying channel on the network performance can be produced. The test results with arbitrary simulation scenarios, which can be realized with a help of this channel model, are left for further study.

## Conclusions

During the test field measurements the UPA technology has proved its stability in the work conditions of strong and fast PLC channel variation. All the PLC modems were reachable all the time, while the network logical structure was considerably changing.

The observation of the physical data rates of the point-to-point connections allowed the design of the simulation test scenario, which can be considered analog to the real test case. The obtained results of mutliple measurement routines on application layer give a possibility for accurate calibration of the developed UPA simulation model.

After the calibration phase the model can be connected with the accurate PLC channel model and can be used as a part of the network planning tool.

**Acknowledgments.** The authors thank the following people: Marco Dietrich and Hendrik Schwuchow, Elcon Systemtechnik for providing the PLC modems.

## References

1. PLC4SG project, http://www.pt-it.pt-dlr.de/de/2711.php

2. UPA model description, http://www.ipcf.org/company/upa/

3. OPERA Technology Specification. Part 1 and Part 2

4. G.hn. physical layer specification, http://www.itu.int/rec/T-REC-G.9960/en

5. G.hn. Datalink layer specification, http://www.itu.int/rec/T-REC-G.9961/en
6. Tsokalo, I.A., Bernstein, R., Lehnert, R.: Investigation of Powerline Communication Modems for Energy Management Systems. In: Workshop on Powerline Communication 2012. Italy, Rome (2012)

7. Tsokalo, I.A., Bernstein, R., Lehnert, R.: Measurement Software For Power Line Communication Network Traffic Analysis. In: Workshop on Powerline Communication 2012. Italy, Rome (2012)

8. Le Phu Do, Lehnert, R.: Scheduling Strategies for Adaptive Resource Sharing System-Application to the OPERA System. In: Workshop on Network Design and Protocol Engineering for Powerline Communications Dresden. Germany, Dresden (2007)

9. ns-3 simulator, http://www.nsnam.org/

10. Model of the PLC channel, http://www.ece.ubc.ca/~faribaa/ns3_plc_software.htm

11. GuruPlug product, http://www.globalscaletechnologies.com/t-guruplugdetails.aspx