Comprehensive practical evaluation of wired and wireless internet base smart grid communication

Internet ‐ based communications is a key solution for enabling low ‐ cost and scalable communication infrastructure for different applications of the smart grid. However, the performance of this network needs to be evaluated practically in the context of smart grid applications based on key metrics such as latency and reliability. This article is a comprehensive evaluation of the United Kingdom Internet network characteristics which will allow the smart grid systems designer to consider the essential parameters for communication applications. This article will focus not only on three smart grid applications, but also the outcome of this research which is relevant to a wider range of Internet of Things (IoT) applications. Different combinations of off ‐ the ‐ shelf wired and wireless last ‐ mile communication technologies are evaluated using real ‐ world transport protocols such as the Transport Control Protocol (TCP)and the User Datagram Protocol (UDP). The performance of TCP/UDP has been tested in a realistic client ‐ server communication test ‐ bed. The results from extensive evaluations show that typical latency values are between 200 and 600 ms for data packets and 50 bytes and kbytes for short control packets. Moreover by applying data compression techniques ,the results can be improved about 5%–20% for different last mile communications.


| INTRODUCTION
The smart grid has been deployed during the last decade to the existing power grid by enabling the exchange of information between different parties contributing to the grid including consumers, energy producers and control centres.Emerging smart grid applications, such as Demand Response (DR), Vehicle to Grid (V2G) and Wide-Area Monitoring System (WAMS) rely on the exchange of information between stakeholders of the power grid.To support fast and reliable data transfer in the power grid, a communication infrastructure with the capability of providing near real-time data delivery needs to be utilised [1].It should handle the large volume of data produced by the massive number of devices in the grid to enable precise and highly accurate control of the power system.The smart grid concept involves applying the concept of Internet of Things (IoT) to the power network [2].
Based on the description mentioned above, the most economical solution for such a communication system would be the Internet backbone infrastructure in each country including both the Internet service providers and home or office networks.For a better understanding of Internet network performance, different parameters such as robustness, reliability and security need to be assessed for smart grid applications.Due to the increasing demand of using wired and wireless Internet networks for a range of applications in IoT, providing convenient metrics to indicate the suitability of these technologies is a necessary requirement.These include latency, availability, reliability and average data rate.Among these metrics, latency and reliability are particularly important parameters which have to be evaluated against required expectations for smart grid applications.Two latency definitions have to be distinguished.It is common to use 'ping latency' for very short packets to measure the latency value and this definition for different last-mile communication technologies has been assessed previously in some studies, for example [3,4].The second definition is to measure the latency for larger Transport Control Protocol/User Datagram Protocol (TCP/UDP) data packets which provide more realistic results for actual data transmission and will be discussed in this research article.
As Internet-based communications over last-mile communication technologies have been used in this work to implement the test-bed, and the performance of Internet protocols such as such as TCP and UDP should be evaluated.Previously, there has been simulation-based research on this area, such as [5,6],where the results show much lower latency values than those encountered in real world networks.Also, the lack of accurate end-to-end time synchronization is another issue that has not been widely considered in the previous work.The most common solution for time synchronizations is using Network Time Protocol (NTP) or Global Positioning System (GPS).NTP in comparison with GPS shows lower efficiency with a limited accuracy of tens of milliseconds, while GPS can offer an accuracy of few microseconds [7].
Previously, the required latency for different smart grid applications was simulated and modelled with NS2 software in [1].The results suggested that UDP operating over a dedicated communication network can meet a latency requirement of 100 ms and it was suggested not to use TCP in that work.That study did not provide any indication on the error performance of TCP and UDP.In addition, the latency of different last-mile communication technologies has been assessed previously in some studies [3] or has been simulated for large-scale heterogeneous smart grid IoT networks in [8].This article provides a more detailed evaluation than the study in [9], which described initial findings and the hardware test-bed in detail.The experimental findings from that article showed that the latency was less than 600 ms for typical TCP/UDP short control packets, while UDP packets experience four times higher packet loss than that of TCP packets.
Another important technique which theoretically can have a significant impact on the latency in the communication link is to use data compression techniques [10].In this research, lossless compression techniques are implemented on the test-bed to study the reduction of latency value by reducing the data packets size over the communication link.
This article builds on results in [9] to carry out a more detailed evaluation of the network performance.This involved a major data collection and processing exercise with the following aims: � carry out an extensive data collection process over a period of 6 weeks for five different types of wired and wireless Internet connections.This provides a more detailed statistical information about latency and reliability than was provided in [9].
Here,it is shown that the results collected for one sensor can be extended to the case of multiple sensors reporting an event to the data centre.Also, simultaneous packet transmissions on different Internet connections have been studied to observe if there are significant similarities in packet delays.� The performance of data compression techniques for information packets has been evaluated to determine their impact on the latency performance of different links.
The major contribution of this article is to provide a statistical comparison of the latency and reliability of TCP and UDP for smart grid applications using different communications technologies.This article is organised as follows.Section 2 will describe the problem and introduce the expected communication scenario with the hardware description of test-bed and a brief explanation of applied techniques to build the test-bed has been discussed.In Section 3, results of the tests and measurements will be explained in detail.Finally, conclusions of the paper are presented in Section 4.

| PROBLEM STATEMENT, KEY PARAMETERS AND TEST-BED STRUCTURE
Figure 1 shows a large-scale Demand Side Response, V2G and WAMS communication scenario deployment, which should connect end-user devices and premises to energy stakeholder control centre.The procedure of the communication scenario is shown in Figure 2 in more details.As an example, in DR applications,the control centre detects a signal from the national grid to react on any changes in the power grid, and starts to generate commands data packets and send them to the loads, energy producers and also other actuators connected to the grid, to maintain it in a balanced mode.All these data transferring across the power grid, will make it smarter and more flexible to changes that can happen through the Internet network infrastructure which connects all parts of the grid through low cost off-the-shelf last-mile connectivity, shown in the Figure 1.Using last-miles communication technologies such as Asymmetric digital subscriber line (ADSL), Cable modem Internet (Fibre), University Network (Ethernet to Fibre Broadband) (UN), Third Generation (3G) and Fourth Generation (4G) Mobile Communications systems avoid deploying dedicated communication networks for smart grid applications.At the same time, it will remain scalable and very cost-effective by using the existing Internet infrastructure.In the remainder of this section, the key parameters, test-bed structure and the hardware and software will be explained briefly.

| Different smart grid applications
As illustrated in Figure 1, the basic network layout can serve many different smart grid applications including DR, electric vehicle charging and wide area system monitoring.Table 1 shows the size of typical packets of data produced for these different applications.Access to the public Internet for smart grid applications can be very cost effective, as energy service providers do not need to deploy their own communications infrastructure [11,12]. 1) DR: It is expected that DR reduces the cost of energy by shifting demand from periods of peak load with high prices to periods of low demand with lower prices.DR also tries to balance between generation and consumption of electricity and prevents high cost for generation when there is no high demand for electricity [13,14].2) WAMS: The traditional power grid has been upgraded and become smarter by using WAMS technology.One of the most important parts of the WAMS setup is the communication network which permits data on the power network from Phasor Measurement Units (PMUs) to be shared with the control centre.Recently, different control methods for the power grid have been investigated based on a PMU monitoring system for the grid.In [15], the authors proposed a communication resource allocation method for the PMU network to maximise the overall power grid observability redundancy.A key assumption is that there will be a proper communication network, which will fulfil the requirement for timely and reliable sharing of PMU data [16].3) V2G: In power grid operations, ancillary services are critical as market operators are responsible for matching the supply with the demand in real-time within tight tolerance bounds.
Traditionally, dedicated fast-response diesel generators are employed to respond to grid signals within seconds to minutes.In recent years, the participation of plug-in electrical vehicle (PEV) batteries in the ancillary services market, also known as V2G, has gained popularity as the use of PEVs enhance system efficiency, while providing monetary benefits to PEV owners [5].In a V2G application, each PEV battery is charged and discharged within a time window according to real-time automatic generation control signals [17].Regarding wireless networks such as 3G and 4G, the latency assessment has been compared in [19], which reports an average latency value of 35 ms for 4G and a latency of 45 ms for 3G.These latency results are usually for very short 'ping' packets, as used in [4].These figures are typically much lower than the actual latency times required to transmit even the modest data packet sizes, such as the results presented in [9].Two primary metrics for our evaluation, latency and reliability are defined.Latency is the most important metric that has to be defined for evaluation of last-mile communication technologies that have been studied in the test-bed.A typical latency definition is the time taken for a packet of data to travel across the network from the source to destination and return, which could be called as round trip time latency.In this article, the one-way latency (OWL) is measured.The OWL is visualised in Figure 2, which shows the key steps in creating, transmitting and receiving a data packet.

| Different last-mile technologies specifications and definition of latency
In Equation ( 1), t OWL is the one-way latency, t 2 is the time when the data packet transmission is received and t 1 is the transmission time of the data packet.The OWL is practically important in this analysis as it indicates the delay caused by the communication network in conveying data or command packets from the source to the destination.Another related parameter is the packet loss ratio, which can be defined as follows: where P LR is packet loss ratio, P NR is the number of data packets not received and P tot is the total number of data packets transmitted to the receiver.In the experimental evaluations, some packets were dropped in the network and never received.Results for P LR give an impression of the overall reliability of the network connection.Additionally, in the reliability figures, 90% latency will be used as the performance measurement.This ensures that at least 90% of end-users receive the transmitted command from the control centre within the specified delay time.In cellular communication networks tested for this article, such as 3G and 4G, an additional delay transmission has to be considered due to the cellular modem switching from sleep or idle mode to an active mode to be able to transmit the data packets.This extra delay is significantly higher for the 3G modem in comparison with a 4G modem, which is typically in the active mode, and this delay could be considered negligible.
In the reliability figures, 90% latency will be indicated as performance measurements to be sure that at least 90% of end-users receive the transmitted command from the control centre within a certain delay time.
Other factors that could impact networks latency are processing, buffering, transmission time interval, scheduling policy of data packets, transmission protocols and retransmission schemes.

| Transmission protocols and VPN used in the test-bed
In this research work, a virtual private networks (VPN) is used to provide an encrypted end-to-end communication link [20].
A free and open-source VPN software called SoftEther [21] was used which can support a cross platform and multiprotocol connection between the server and the clients.In the next step, standard internet-based transport protocols are used for emulating smart grid communications.The most common protocol in the Internet network is the TCP.Due to the specification of TCP, it can establish a highly reliable connection for exchanging information and data packets across the network.It supports a handshaking mechanism to verify reliable exchange information along with the re-transmission mechanism.Another transport protocol which is very popular for transmitting data in Internet networks is UDP.In contrast to TCP, UDP is not a connection-oriented protocol.So, UDP works without a handshaking mechanism.It is an unreliable protocol where packets can be dropped during its route to the destination because of the lower priority.Due to this specification, UDP can be faster than TCP, which sacrifices speed to achieve reliability.

| Latency measurements using accurate timing protocols
To implement the project and measure the latency values using Equation (1) with high accuracy, a proper reference time is required at both ends of the connection link in the communication infrastructure.There are two options for achieving high accuracy: use of the GPS or the NTP [22].The NTP standard as a reference time allows a very accurate synchronization for local systems or very small networks.NTP can provide an accuracy of 1 ms, but in larger networks such as the UK Internet infrastructure, the timing offset could be up to tens of ms.An alternative solution for reference time is by using a GPS receiver.Besides providing location information, it can be used for estimation of the time offset between the atomic clock in the GPS satellites and the internal clock source of the GPS receiver.This is based on receiving a very accurate Pulse Per Second (PPS) signal [23].Experiments in [9] showed that the GPS PPS signal allows our client and server hardware to be time synchronized with the precision of less than 1 ms [24].

| Prediction of latency for higher number of users using order statistic
As discussed in [4], in order to support DR applications, several sensors and monitoring systems may be deployed in consumer premises or a part of the distribution network of the power grid.This question can be addressed by extending the measured results for a single sensor OWL with different last-mile technologies described in the last section.In this section, the achievable minimum OWL is predicted in the communication network for deploying several sensors in the power grid using a theoretical approach based on order statistics.For example, the Nth order statistic of independently identical variables such as L 1 , L 2 , L 3 , …, L N which they can be arranged in increasing order as follows: where the cumulative distribution function (CDF) F (1) of the shortest delay L (1) can be defined as where F(L) is the CDF for a single link, such as the CDF results shown in Figure 4 of the results section.This equation holds if the latency on one communication link is statistically independent of any other link.This calculation gives insight into how quickly information about an event, for example a fault in the network, can be communicated to the Control Centre from multiple distributed sensors in an area.

| Data compression techniques
Compression algorithms can be used for reducing the size of the existing data based on removing the redundant information from the original data and encoding it more effectively.This approach is mainly useful when routine data is exchanged between clients and the server.It is less likely to be effective for control packets which are specifically designed to communicate an instruction in a concise but secure manner.This data size reduction will allow storing of information in less memory and requires less bandwidth for data transmission.In this article, two lossless compression techniques Lempel-Ziv-Welch (LZW) and Adaptive Huffman coding have been used to ensure data fidelity.Space saving is a key metric to evaluate the performance of compression algorithms by calculating the percentage of data reduction as follows: where S SR is the space-saving ratio, C D is the compressed data size in bits and UC D is the un-compressed data size in bits.The LZW and Huffman coding techniques were applied to different data packets with varying sizes to measure their performance.Previous simulation studies suggest that the Huffman technique is a fast compression technique and can achieve almost 75% space saving for a wide range of different data packet sizes [10].In contrast, the LZW space-saving results vary depending on the size of the data packet, and for larger data packet sizes it achieves a higher percentage of space saving up to 87% [10].However, LZW requires higher complexity to compress data packets in comparison with the Huffman method.Selecting a proper compression algorithm can vary depending on the hardware capabilities, the space-saving percentage required, compression and decompression time according to the needs of the smart grid application.

| Hardware and test-bed set-up description
Figure 1 shows the emulation setup consisting of a personal PC emulated control centre, running a python-language server programme.Low-cost Raspberry Pi (RPi) platforms run a second python-language script to play the role of the clients in the network.The complete hardware specification, both for server and client platform, is described in Table 3.
In the first scenario, the test-bed is run with just one client (emulating smart grid use case devices such as DR, V2G and WAMS) connected to the server (emulating power grid control centre).In the second scenario, more clients (multiple devices) are connected to the server (control centre) to evaluate the correlation between latency values for different last-mile technologies.The multiple-client case is also used to measure the latency of reporting real-time events to the control centre.Different last-mile communication technologies connect with the Internet network to provide the required communication infrastructure to exchange information between the server and the clients through a safe and secure VPN connection.The proposed communication scenario performance has been evaluated by exchanging different data packet sizes from 50 bytes to 10 kbytes using the TCP and UDP.The service designer can consider the choice of TCP or UDP for different applications based on the performance of the proposed model.For example, TCP can be used to transmit longer data packets with higher reliability and without packet loss.On the other hand, UDP could be suitable for short control messages that require lower latency with a tolerable packet loss in the networks.The RPi platforms (clients) can be connected to one of the wired and wireless last-mile technologies seen in Table 2 and Figure 1, while a fibre broadband connection with a speed of 40 Mbps was provided for the host server PC to connect to the Internet network.

| MEASUREMENTS, RESULTS AND DISCUSSION
In this section, long-term data collected from the platform described in Section 2 over a period of around 6 weeks in Edinburgh during August and September 2019 will be analysed and discussed.Multiple clients were deployed simultaneously using different communications technologies to assess the performance of multiple last-mile link types.The clients communicated with a server, which used a fibre broadband connection, as explained in Section 2, and shown in Figure 1.Data transmissions of different data packet sizes from 50 bytes-10 kbytes were transmitted regularly using both TCP and UDP and the results were recorded.These are intended to represent typical short messages that are sent in smart grid applications.A system designer may exploit one's results to evaluate the overall latency, using their knowledge of the profile of data packet sizes that are used.Average results and statistical distributions for the latency and packet loss of the evaluated data packet sizes will be presented in the figures below.Experiments were also conducted to investigate the following issues: � Data packets of size 50, 100, 500 bytes and 1 kbyte were transmitted three times consecutively to study the slow start behaviour of the TCP and UDP; � The correlation between the latency results for different clients and communications technologies in the multi-user scenario has been investigated; � Data compression techniques applied to the data packets have been tested on the test-bed to assess their impact on latency performance.

| Main data analysis
Figure 3 shows the median latency value that has been measured for different data packet sizes with different last-mile communication technology solutions.This figure shows that 4G connectivity has much better performance than 3G connections with a 242 ms one-way latency for 50 byte packets with the TCP.There is a slow increase to 391 ms for the larger 10 kbyte data packets.For the UDP with 4G, a slightly lower latency is observed for results of 200 and 324 ms for 50 bytes and 10 kbytes, respectively.The subfigure inside Figure 3 shows that 3G performance for TCP and UDP is much worse for smart grid applications, with an average latency of 593 ms for 50 byte data packets increasing to around 1560 msfor 10 kbyte sizes in UDP data packets.Figure 3 also shows that wired connections achieve much better performance for TCP.For short control packets of 50 bytes, latency results of 152, 97 and 254 ms are observed for UN, Fibre and ADSL connections, respectively.In wireless connections, as the packet size increases the latency value increases slowly, so that for the largest data packets of 10 kbytes, a latency result of around 315 ms is observed.The corresponding results show that median value for the UDP latency is lower than TCP latency for wired connections.The UDP results show more fluctuations for different data packet sizes, but the latency generally increases with large packet sizes.The worst UDP results were observed for the UN with latencies of 173-314 ms for 50 byte-10 kbyte packets, which may be connected with the traffic policies adopted there.
CDF plots have been obtained from all the collected data from the five last-mile communication solutions that were studied.The results obtained include TCP and UDP latencies calculated using Equation (1) for different packet sizes and the measured packet loss ratio computed using Equation (2).For Figure 4, the plots are shown as follows.The top plots are for the CDF of TCP latency, the middle plots show the corresponding CDF of UDP latency and the bottom plots show the percentage of lost data packets, respectively.
To begin with, Figure 4 shows the results collected for the wired and wireless connections and the colour legend on the ADSL plots (Figures 4c) is the same for all other plots.As it can be seen, Figures 4a,b show wireless connection results, while Figures 4c-e measure the wired Internet connection performance.By following the plotted red line in the CDF plot, the 90% confidence latency value can be found for each CDF.For the ADSL link in Figure 4c, the 90% latency value is around 300 ms for 50 or 100 byte packets, but increases to 400 ms for larger packet sizes.For UDP, the latency results are slightly improved for 50 byte packets where the 90% latency is 180 ms.
However, for other packet sizes much higher latency results of up to 1.2 s are observed.In general, when comparing the TCP and UDP CDF plots in Figure 4a-e, the 90% confidence latency for TCP can usually be achieved in a shorter time window, often below 500 ms.In contrast, the UDP CDF results for 90% confidence require longer time window, which often exceeds 1 s.
The UDP packet loss ratio is typically in the range from 5% to 8% except for 3G which can increase up to 15%-20%.For TCP data packets, the packet loss ratio in all tests is less than 0.3% of the transmitted data packetswhich is a much lower percentage.
As shown in Table 1, each smart grid application has a unique requirement in terms of latency and reliability.The testbed results show that the wired Internet connection can guarantee the minimum required latency with TCP and UDP for smart grid applications.TCP supports smart grid applications with fewer packet delivery errors from the reliability point of view.For WAMS, as it is not easy to deploy wired Internet connections, the 4G wireless cellular network can be used for reliable and low cost internet-based communication deployment solutions using TCPs.The 4 G cellular network has been evaluated in [25] for strong, medium and poor signal coverage conditions in a V2G application.
Table 4 summarises the 90% confidence latency values for both TCP and UDP data packets for all packet sizes and for all five last-mile technologies.It can be observed from the table that Fibre and UNs have the lowest 90% TCP latency results in the range of 270-430 ms, followed by ADSL which achieves slightly higher latency results of 300-460 ms.The 4 G wireless latency results are typically around 25% higher than the wired latency results, but the performance is still reasonable with latency values of 450-630 ms.The TCP performance of the 3G network is much poor at 1.5-2.5 s.The latency results for UDP involve significantly more variability and many 90% latency results for both wired and wireless connections exceed 1 s.It is observed that the highest UDP latency values in this case are for the wired UN and the 3G wireless network.The latency for different days of the week and different times of the day were also tested and measured to evaluate the performance of the investigated networks.It is desirable to know when one can expect higher or lower latency results.Figure 5 compares the performance of 4G as the best wireless network and Fibre as the best wired solution for performance in different days of the week (Figure 5a) and different times of the day (Figure 5b).The days of the week are categorised into weekdays (Mondays-Thursdays), Fridays and the weekend.Three different time periods each day for every 8 h from midnight-8:00 AM, working hours in the day (8:00 AM-4:00 PM) and evening times (4:00 PM-midnight) were considered.
As observed in Figure 5a for a 4G connection, there is a fluctuation in the mean value of the latency for different days with the highest latency results at weekends.On the other hand, for a Fibre connection, the latency at the weekend  increased by 100 ms compared with the average results as home users have more activity at this time leading to increased data traffic.Conversely, during weekdays and Fridays with lower data traffic on the Fibre connection, the network latency drops by 50 ms from the mean latency value.In Figure 5b, where latency results are compared for different 8 h periods it can be seen that latency for times between midnight until 8:00 AM are lower than the average of both 4G and Fibre due to lower data traffic activity in both networks during night.For 4 G, the remaining hours of the day are almost the same as the mean latency value, while a client on the Fibre network experiences around 50 ms higher than average latency value during the evening time.

| Prediction of Nth order one-way latency
In the previous section, the CDF function of the OWL values have been plotted for one user or sensor different last-mile technologies.These results are extended to consider the latency for N sensors or devices that try to communicate important information to the control centre simultaneously.
Communications via N sensors are likely to reach the control centre more rapidly than in the case of a single sensor.Then, the CDF plot of the OWL can be calculated according to Equation ( 4).
The results are shown in Figures 6 and 7 for a 1 KB data packet size of TCP and UDP, respectively for 4G (wireless), Fibre (Wired) along with users using both wired and wireless communications for redundancy.It can be easily seen from the figures that by deploying a larger number of sensors or devices, a lower OWL for demandside response applications can be expected and the control centre can receive the required signal in a shorter time than in the case of one sensor only.Based on the calculations for up to 64 sensors or users, there is no significant additional improvement for more than 16 devices.Because of that, figures have only been plotted for up to 16 users.Increasing the number of sensors that communicate to the Control Centre will improve latency significantly compared to the one user scenario, and the improvement for UDP is greater than TCP.For example, in TCP, 90% of packets can be received for 16 users in 140, 75 and 85 ms, respectively for 4G, fibre and dual communication whereas for one user, the latency values for the same last-mile technologies are 465, 285 and 255 ms, respectively.In the case of UDP, 90% of packets arrive for one user case with 4G, Fibre and dual communication are received within 526, 573 and 235 ms, respectively.These OWL values can be improved significantly by increasing the number of sensors to 16, yielding 90% latency values of 80, 35 and 30 ms, respectively as shown in Figure 6.

| Correlation evaluation
Another important point is to study if there is any correlation between latency values for different last-mile technologies.All latency results for data packets,which arrived simultaneously from all the clients to the server in any threeminute interval, were analysed.Then, the correlation values between each pair of the last-mile technologies were collected to compute the correlation between them.The results of the calculated pair-wise average correlation are given in Table 5.
The results in the table show very low correlation results with a maximum value of 0.1418 for the TCP correlation between Fibre and UN.Based on the interpretation in [25], the correlation is typically negligible, and thus no significant interactions between latency results on different link types has been observed in these measurements.

| Data compression
The compression techniques used in this work have been described in Section 2.5 of this article.Data compression cannot be meaningfully applied to control commands at these will be carefully designed to balance small data packet size with data encryption and other security measures.Data compression can be considered for other use cases especially when then the client or server needs to transmit a larger volume of data.The results of using combinations of different protocols such as TCP and UDP jointly with alternating methods of compression such as LZW and Huffman coding has been analysed and the impact on latency and reliability has been studied.First, it is necessary to understand that adding compression techniques will require more processing at the test-bed platform for compression and also more processing for decompressing the data that arrives at the PC server.This will add extra time for compression and decompression while these techniques are applied to reduce the size of the data packets.It is expectedthat by reducing the packet size can reduce the network latency for smaller compressed data packets.The combined latency can be calculated as: where L C is the total latency when compression techniques are applied, L Ct is time required for compressing data, L T is the latency time for the data packet to travel in the network and L Dt is the time required for decompressing data packet in the destination.
As seen in Equation ( 5), the time for compression and decompression has to be added to the latency value.Figure 8 plots two important pieces of information regarding compression techniques.Figure 8a shows the compression and decompression times for each data packets both on the RPi client and the PC server.It can easily be seen that applying LZW on the RPi will add a very high compression time to the overall latency of about 100-110 ms for 10 kbyte data packets.At the same time, Huffman coding has very low compression time of 20-40 ms.On the other hand, the PC server with a much faster hardware can reduce the time of compression and decompression both for LZW and Huffman coding.Figure 8b presented the percentage of data reduction which represents the space-saving ratio for all data packets.Huffman coding can maintain a space-saving ratio around 70% ofdifferent information data packets depending on the data type.At the same time, LZW can actually increase the size of small packets, which means that the data volume actually increases rather than reducing.Figures 9 and 10 illustrate the results of mean latency value using compression techniques.As an example, the comparison of the compression techniques' impact on latency with mean latency values given for both UDP and TCP for two data packet sizes of 1 KB and 10 KB can be considered.The compressed data result shows that the latency has reduced for data compression in comparison withthe uncompressed case.The results, in general, show only the modest reductions in latency of around 5%-20% of the original value for the TCP in all last-mile technologies, except 3G with LZW compression technique.This observation matches the relatively shallow slopes of the average latency results shown in Figure 3, where large changes in packet size often result in relatively small changes in latency.Data compression appears to provide more improvements for UDP, but this effect may be related to the higher packet loss rates observed for this protocol.The best improvement can be seen for 3G, where the UDP data packets are compressed by LZW, leading to a latency reduction of 500-700 ms.However, the latency results are still higher than those of other networks.Even when the additional compression/ decompression time in Figure 8a is taken into account, it is clear that data compression offers only modest improvements in reducing communications latency.

| Network slicing and local computing
Table 6 shows the path that the signals typically follow for different connection types, using the trace route facility to check the Internet path.It is clear that in order to move from one Internet service provider to another, the packets are typically routed from Scotland to London and back, an approximate round trip distance of 800 miles or 1300 km.Even if both clients and server are in the same city, the data packets need to travel across the country which obviously increases the latency time for each data packet.It is possible that future wired and wireless Internet networks will implement socalled network slicing configurations [26].This may allow particular services, such as smart grid applications, to be handled independently of other Internet packets.One consequence may be more intelligent routing of data packets in order to reduce the latency results that have been observed in this article.One-way latency for control centre-remote client connections have neen investigated.This is important for data and control packets sent over the Internet in the emerging smart grid applications.Typical average latencies range from 200 to 600 ms for 50 bytes to 10 kbyte in short control packets.
Results suggest that UDP packets experience much higher losses (5%-7% except 3G which suffered a higher packet loss of 15%-20%) than TCP packets (less than 0.5%) for wired and wireless connections and have higher 90% latency results.The TCP mechanism is preferred for sending sensor measurements and other data that has critical reliability and latency requirements.The latency measurements vary significantly on different days of week and at different times of the day, according to the overall data traffic in the network.For example, we observed a higher latency at the weekend in wired fibre links when more home customers are making use of their network.Any significant correlations for the latency behaviour between different types of communication links were not found .Order statistics has been used to predict the OWL for deploying larger number of sensors to look out for network problems such as voltage or frequency deviations.By sending packets from several sensors simultaneously, a significant improvement on 90% confidence OWL can be expected in this scenario.Data compression techniques have been studied and modest improvements in latency performance were shown at the cost of extra processing times at the client and server.It isalso noted that due to the current Internet topology of the UK, increased latencies arising as data packets are routed across the country in order to move from one Internet service provider to another.

F I G U R 3
Abbreviations: CPU, central processing unit; RAM, random access memory

5 F I G U R E 6 F I G U R E 7
TCP average one-way latency measurements in different days of week (a) and different hours of the day (b) for 4G (wireless example) and fibre (wired example).4G,fourth generation; TCP, Transport Control Protocol Prediction of one-way latency for deploying larger number of sensors using HOS for 4G, fibre and dual communication for 1 KB Transport Control Protocol data packet size.4G, fourth generation; CDF, cumulative distribution function; HOS, higher order statistics Prediction of one-way latency for deploying larger number of sensors using HOS for 4G, fibre and dual communication for 1 KB User Datagram Protocol data packet size.4G, fourth generation; CDF, cumulative distribution function; HOS, higher order statistics 530 -ZEINALI AND THOMPSON

T A B L E 5
Abbreviations: 3G, third generation; 4G, fourth generation; ADSL, asymmetric digital subscriber line; TCP, Transport Control Protocol; UDP, User Datagram Protocol; UN, Universal Network

8
(a) Compression and decompression time on the RPi and the server, (b) percentage of space saving for LZW and Huffman compression techniques.LZW, Lempel-Ziv-Welch; RPi, Raspberry Pi 532 -ZEINALI AND THOMPSON

F I G U R E 1
U R E 9 latency value for Transport Control Protocol in all last-mile technologies.4G, fourth generation; ADSL, asymmetric digital subscriber line; LZW, Lempel-Ziv-Welch; UN, University Network Mean latency value for User Datagram Protocol in all last-mile technologies.4G, fourth generation; ADSL, asymmetric digital subscriber line; LZW, Lempel-Ziv-Welch; UN, University Network ZEINALI AND THOMPSON -533

Application Packet size (bytes) Latency
F I G U R E 1 Smart grid applications topology in UK and Last mile technologies connecting to the fibre optic backbone.4G, Fourth Generation; ADSL, asymmetric digital subscriber line; GPS, Global Positioning System; PMU, Phasor Measurement Unit; TCP, Transport Control Protocol; UDP, User Datagram Protocol; V2G, Vehicle to Grid; VPN, virtual private network

Table 2
which indicate achievable latencies of 12-13 ms and 19-22 ms for Fibre and ADSL and Fibre connections, respectively.
Last-mile connectivity's characteristic used in test-bed T A B L E 2