f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment),...

64
Master Thesis HALMSD UNIVERSITY Master's Programme in Embedded and Intelligent Systems, 120 credits Learning wireless channel models to design real-time communications from vehicles Embedded systems, 30 credits Halmstad 2018-06-01 Wouter Dankers

Transcript of f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment),...

Page 1: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

Master Thesis

HALMSTAD

UNIVERSITY

Master's Programme in Embedded and IntelligentSystems, 120 credits

Learning wireless channel models to designreal-time communications from vehicles

Embedded systems, 30 credits

Halmstad 2018-06-01

Wouter Dankers

Page 2: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

Wouter Dankers: Learning wireless channel models to design real-time com-munications from vehicles, , c© June 2018

supervisors:Alexey Vinel and Maben Rabi

location:Halmstad, Sweden

time frame:June 2018

Page 3: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates
Page 4: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

A B S T R A C T

The aim of this project is to analyze a data log of wireless packet traf-fic, and to produce: (1) models for dynamic fluctuations in wirelesschannel and link quality, and, (2) a design for real-time communi-cations over the given wireless channel. The models and designs areuseful in setting up real-time communications in a vehicular test track(www.astazero.com). The data log came from experimental measure-ments at the test track. From this data, we fitted simple models forpacket losses and retransmissions in the wireless communication sys-tem. These models took the form of a combination of a statisticalmodel for the packet losses, with a deterministic model for retrans-missions of lost packets. Such fitted models can be used to predict theaverage quality of vehicle position monitoring based on periodicallytransmitted position information. Such predictions help us decide thefeasibility of safe and reliable conduct of testing with two or moremoving test objects.

iii

Page 5: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates
Page 6: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

A C K N O W L E D G E M E N T S

I would first like to thank my supervisors Alexey Vinel and MabenRabi of the school of Information Technology at Halmstad university.The door to their office was always open whenever I ran into a trou-ble spot or had a question about my work. They consistently allowedthis thesis to be my own work, but steered me in the right directionwhenever they thought I needed it.

I would also like to thank the experts who were involved in the As-taMoCa research project. Without their participation and input, thisthesis project could not have been successfully conducted.

Finally, I must express my very profound gratitude to my parents forproviding me with unfailing support and continuous encouragementthroughout my years of study. This accomplishment would not havebeen possible without them. Thank you.

v

Page 7: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates
Page 8: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

C O N T E N T S

List of Figures viiiList of Tables ix1 introduction 1

2 background 3

2.1 V2X communication 3

2.2 LTE architecture 4

2.3 LTE retransmissions 6

2.4 LTE stack 7

2.5 Measurement scenarios 8

3 literature review 11

4 method 13

4.1 Phase 1 13

4.1.1 LTE transmission latency 13

4.1.2 Cumulative distribution function for IID losses 16

4.1.3 Deficiencies of the IDD loss model 18

4.2 Phase 2 19

4.2.1 Gilbert-Elliott model 19

4.2.2 Measurement campaign 25

4.2.3 Data post-processing 27

4.2.4 Data matching 36

4.2.5 Model creation 40

4.3 Phase 3 44

5 conclusion and recommendations 47

bibliography 49

Bibliography 49

vii

Page 9: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

L I S T O F F I G U R E S

Figure 1 V2X communication 4

Figure 2 Simplified LTE architecture 5

Figure 3 HARQ retransmissions 7

Figure 4 LTE stack 7

Figure 5 LTE transmission diagram 14

Figure 6 CDF 18

Figure 7 CDF zoom in 19

Figure 8 CDF model compared with the ground truth 19

Figure 9 Gilbert-Elliott model 20

Figure 10 Test setup of AstaZero’s researchers day 28

Figure 11 Speed and transmission time over time 33

Figure 12 Histogram of transmission times from each testobject 36

Figure 13 Histogram of transmission times from the testobjects combined 37

Figure 14 Speed and transmission time over time 38

Figure 15 Combined CDF compared with the earlier mea-surements 38

Figure 16 CDF offset plots 39

Figure 17 Retransmission spread 42

viii

Page 10: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

L I S T O F TA B L E S

Table 1 ITS applications and use cases for active roadsafety 9

Table 2 Total uplink time latency 15

Table 3 Probability mass values for P = 0.2 17

Table 4 Gilbert-Elliott model parameters 21

Table 5 Gilbert-Elliott model example parameters 23

Table 6 Gilbert-Elliott model result 23

Table 7 Pattern learning example result 25

Table 8 Summary of the AstaZero test log data 35

Table 9 Results of Gilbert’s approximation 43

Table 10 Baum-Welch parameter learning 45

ix

Page 11: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

L I S T I N G S

Listing 1 Python code for parsing the log file 31

Listing 2 Python code for calculating speed from GPScoordinates 34

Listing 3 Python code finding the bin number 41

Listing 4 Matlab script for hmm parameter learning 44

x

Page 12: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

1I N T R O D U C T I O N

This thesis project is centralized around the AstaZero test track (www.astazero.com). AstaZero is the world’s first full-scale test environmentwhich makes it possible for vehicle manufacturers, suppliers, legisla-tors, and universities to test out their systems. Their focus is on testingadvanced safety systems under different traffic situations. The nameAstaZero is a combination of the abbreviation Asta (which stands forActive Safety Test Area) and zero, where zero refers to the vision ofthe Swedish Parliament’s to have zero traffic casualties.

AstaZero is currently experiencing a problem where they would liketo have full network coverage with zero to none package losses at anacceptable throughput regarding safety critical data (E.g. CAM mes-sages). The aim for this thesis is to solve this problem by analyzingthe data corpus which may come from experimental measurementsat the test track, or from simulations. From this data, we shall try tofit simple models for packet losses and retransmissions in the wire-less communication system. These models may take the form of acombination of a statistical model for the packet losses, with a deter-ministic model for retransmissions of lost packets. Such fitted modelswill be used to predict the average quality of vehicle position moni-toring based on periodically transmitted position information. Suchpredictions help us decide the feasibility of safe and reliable conductof testing with two or more moving test objects.

The rest of this document is structured as follows:

• Chapter 2: Provides some relevant information needed to fullyunderstand the later parts of the thesis.

• Chapter 3: Presents previous work done in the context of thethesis.

• Chapter 4: Provides an inside in what has been produced andall the steps required to reach those results.

1

Page 13: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates
Page 14: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

2B A C K G R O U N D

This chapter presents some background for the research presented inthis thesis. One can find a review on V2X communication in section2.1. Section 2.2 provides an introduction into the complicated LTEarchitecture and most of its components. The core concepts aboutretransmissions schemes in LTE is explained in Section 2.3 as wellas the protocol stack (Section 2.4). Section 2.5 presents some possiblemeasurement scenarios and their applications. Background for theGilbert-Eliot model in the thesis is not covered in this chapter, butrather presented in Chapter 4.

2.1 v2x communication

V2X (vehicle-to-everything) communication is based on WLAN tech-nology and works directly between vehicles, which form a vehicularad-hoc network as two V2X senders come within each other’s range.Hence it does not require any infrastructure for vehicles to commu-nicate, which is key to assure safety in remote or little developed ar-eas. WLAN is particularly well-suited for V2X communication, due toits low latency. It transmits messages known as Common AwarenessMessages (CAM) and Decentralised Notification Messages (DENM)or Basic Safety Message (BSM). There are four main different typesof vehicle communication each with its own features and applicationarea’s combined under the V2X group. These four categories are vi-sualized in Figure 1.

• V2V (Vehicle-to-Vehicle) communication: is also known as VANETs(vehicular ad hoc networks) where two vehicles communicatewith each other directly to provide information such as safetywarnings, traffic information, etc.

• V2P (Vehicle-to-Pedestrian) communication: here the vehicle knowsposition information about the surrounding pedestrians. Thistype of communication could be of big interest in city area’swhere the vehicle can take notice of the unpredictable humanbeings who are in close vicinity of the vehicle.

• V2I (Vehicle-to-Infrastructure) communication: is a broad termwhere infrastructure can include tollgates, traffic lights, high-way entrance ramps, etc. As an example take a vehicle which isdriving towards a road junction; the roadside unit (traffic lights)can for instance update the car with the time left for a green/red

3

Page 15: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4 background

light. The vehicle can then update its speed depending on itsplanned trajectory so that it doesn’t need to stop and waste pre-cious full.

• V2N (Vehicle-to-Network) communication: this type of commu-nication is used when a vehicle is in direct communication witha server connected to the internet. V2N is used for file down-loads, internet access, etc.

Figure 1: V2X communication

The last category of vehicle communication (V2N) is the type of com-munication this thesis project is focusing on. All tests at the AstaZerotrack require the vehicle to be in direct communication with a serverlocated in the core network. Direct communication is needed to up-load a given test to the vehicle, update the trajectory of the vehicle,monitor the vehicle in real-time, etc.

2.2 lte architecture

Long-Term-Evolution (LTE) is a high speed wireless data communi-cation standard for mobile devices base on top of the GSM/EDGEand UMTS/HSPA technology. The standard has been developed by3GPP (3rd Generation Partnership Project) and specified in Release 8

document series (with minor adjustments in Release 9). LTE is com-monly known as 4G due to marketing pressure even though that LTEdoes not meet the technical 4G criteria. Later on with the introduc-tion of LTE-A (LTE-Advanced) and the improvements of WiMAX-Advanced can it finally be called 4G. In order to differentiate thetwo standards ITU-R (International Telecommunication Union Radiocommunication sector) has defined LTE-A as "True 4G". LTE specifi-cations provides:

• Downlink peak rates of 300 Mbit/sec

Page 16: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

2.2 lte architecture 5

• Uplink peak rates of 75 Mbit/sec

• QoS (Quality of Services) to unsure transfer latency’s less then5ms in the radio access network

• The ability to mangage fast moving mobile notes

• Support multicast and broadcast streams

• Scalable carrier bandwidths from 1.4 MHz to 20 MHz

• Supports both frequency division duplexing (FDD) and time-division duplexing (TDD)

• Seamless handovers to cell towers with older network technol-ogy

LTE implements a simple architecture which results in lower oper-ating costs (for example, each E-UTRA cell will support up to fourtimes the data and voice capacity supported by HSPA). Figure 2 visu-alizes this simplistic architecture which consists of an UE (User equip-ment), eNodeB (base station), and the EPC (Evolved Packet Core).The mobile node (UE) communicates with the base station via theether. For the sake of the thesis project has this wireless node beenvisualized with a vehicle. Each base station covers a certain area andis in direct contact with the core network as well as with other basestation. E-UTRAN (Evolved Universal Terrestrial Radio Access) is theair interface of LTE which include the mobile nodes and all the basestations.

Figure 2: Simplified LTE architecture

The LTE core network has a flat all IP architecture called the Sys-tem Architecture Evolution (SAE). The main component of the SAE

Page 17: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

6 background

architecture is the Evolved Packet Core (EPC), also known as SAECore. The EPC will serve as the equivalent of GPRS networks (via theMobility Management Entity, Serving Gateway and PDN Gatewaysubcomponents). The subcomponents of the EPC are:

• MME (Mobility Management Entity): is the key control-noderesponsible for idle mode UE paging and tagging procedureincluding retransmissions.

• SGW (Serving Gateway): responsible for forwarding and rout-ing of data packets.

• PGW (PDN gateway): provides connectivity from UE to exter-nal networks.

• HSS (Home Subscriber Server): central database which containsuser and subscription related information.

• ANDSF (Access Network Discovery and Selection Function):provides the UE information about connectivity to 3GPP andnon-3GPP access networks (such as Wi-Fi).

• ePDG (Evolved Packet Data Gateway): main functionality is tosecure data transmissions with a UE connected to the EPC overan entrusted non-3GPP access network.

Because of its many components and complexity will the EPC (EvolvedPacket Core) serve as a level of abstraction for the entire SAE architec-ture. The focus of this thesis project is on the communication betweenthe UE and the eNB. This is because wireless communication is by itsnature not error free so nearly all retransmissions will occur in thispart of the network.

2.3 lte retransmissions

In LTE upon receiving a packet an automatic repeat request (ARQ)bit is send back to the transmitter. In case of a unreadable/corruptmessage a negative acknowledgement (NACK) is send back to thetransmitter where as an positive acknowledgement (ACK) will besend back when the message is decodable. There are no packet num-bering included in the ARQ message since LTE knows which ARQbelongs to which packet. This is done by using a fixed time betweensending of the package and receiving the ARQ which is also calleda stop-and-wait procedure. However since the transmitter stops aftereach transmission, the throughput is also low. LTE therefore appliesmultiple stop-and-wait processes in parallel such that, while waitingfor an ARQ from one process, the transmitter can transmit data to an-other ARQ process. When the transmitter receives a NACK back, the

Page 18: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

2.4 lte stack 7

erroneously received message can be send again in the next availabletime slot which is illustrated in Figure 3.

Figure 3: HARQ retransmissions

When the receiver receives an erroneously packet this will not be dis-carded. Even though it was not possible to decode the packet, the re-ceived signal still contains useful information. LTE uses hybrid ARQ(HARQ) with soft combining to reduce the amount of retransmissionby storing the erroneous received packet in a buffer memory whereit can later be combined with the retransmission to obtain a singlecombined packet that is more reliable than its constituents.

2.4 lte stack

Let’s have a close look at all the layers available in E-UTRAN or LTEProtocol Stack. Figure 4 gives a more elaborated diagram of the LTEstack. Note that communication stack between eNB and EPC will notbe covert since this is not relevant for the thesis project.

Figure 4: LTE stack

• Physical Layer (PHY) carries all information from the MACtransport channels over the air interface. Takes care of the linkadaptation (AMC), power control, cell search (for initial syn-chronization and handover purposes) and other measurements(inside the LTE system and between systems) for the RRC layer.

Page 19: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

8 background

• Medium Access Layer (MAC) MAC layer is responsible formapping between logical channels and transport channels, mul-tiplexing of MAC SDUs from one or different logical channelsonto transport blocks (TB), scheduling information reporting,error correction through HARQ, priority handling between UEsby means of dynamic scheduling, Priority handling betweenlogical channels of one UE, and logical Channel prioritization.

• Radio Link Control (RLC) RLC operates in 3 modes of oper-ation: Transparent Mode (TM), Unacknowledged Mode (UM),and Acknowledged Mode (AM). The RLC Layer is responsiblefor transferring of upper layer PDUs, error correction throughARQ (Only for AM data transfer), concatenation, segmentationand reassembly of RLC SDUs (Only for UM and AM data trans-fer). RLC is also responsible for re-segmentation of RLC dataPDUs (Only for AM data transfer), reordering of RLC dataPDUs (Only for UM and AM data transfer), duplicate detection(Only for UM and AM data transfer), RLC SDU discard (Onlyfor UM and AM data transfer), RLC re-establishment, and pro-tocol error detection (Only for AM data transfer).

• Radio Resource Control (RRC) The main services and func-tions of the RRC sublayer include broadcast of System Infor-mation related to the non-access stratum (NAS), broadcast ofSystem Information related to the access stratum (AS), mainte-nance and release of an RRC connection between the UE andeNB, Security functions including key management, establish-ment, configuration, maintenance and release of point to pointRadio Bearers.

• Packet Data Convergence Control (PDCP) PDCP Layer is re-sponsible for header compression and decompression of IP data,transfer of data (user plane or control plane), maintenance ofPDCP Sequence Numbers (SNs), In-sequence delivery of upperlayer PDUs at re-establishment of lower layers, duplicate elim-ination of lower layer SDUs at re-establishment of lower layersfor radio bearers mapped on RLC AM, ciphering and decipher-ing of user plane data and control plane data, integrity protec-tion and integrity verification of control plane data, timer baseddiscard, duplicate discarding, PDCP is used for SRBs and DRBsmapped on DCCH and DTCH type of logical channels.

2.5 measurement scenarios

The automotive industry together with ETSI ITS standardization orga-nization in Europe and US-DOT in USA, respectively, have specifieda basic set of ITS applications that can effectively reduce the numberof road accidents and traffic jams; Details can be found in [1] and

Page 20: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

2.5 measurement scenarios 9

[2]. The cooperative road safety and traffic efficiency applications arelisted in Table 1.

Applications Use case

Road hazards Forward collision warning (FCW)Emergency electronic brake light warning(EEBW)Blind spot warning (BSW)Wrong way driving warning (WWDW)Do not pass warning (DNPW)Roadwork warning (RWW)Traffic condition warning (TCW)

Cooperative-awareness

Cross traffic violation warning (CTVW)Intersection collision warning (ICW)Left/right turn assistance at intersection (LTA)Emergency vehicle warning (EVW)

Table 1: ITS applications and use cases for active road safety

Having these safety applications in mind, a number of scenarios wereidentified where vehicular channel measurements could be performed.The possible measurement sites include:

• Rural: A rural scenario is characterized as a country road withopen surroundings. The most relevant safety applications forthis scenario are Forward collision warning (FCW), Emergencyelectronics brake light warning (EEBL), and Do not pass warn-ing (DNPW).

• Highway: A highway scenario in general may include 2-6 lanesin each direction with variable traffic. The most relevant safetyapplications for this scenario are Forward collision warning (FCW),Emergency electronics brake light warning (EEBW), Roadworkwarning (RWW), and Blind spot warning (BSW).

• Urban: An urban scenario is characterized by streets/roads indensely populated areas with single- to multi-story buildingslined on both sides of the streets. The Most relevant safety appli-cations for this scenario are Forward collision warning (FCW),Emergency electronics brake light warning (EEBW), Roadworkwarning (RWW), Wrong way driving warning (WWDW) andDo not pass warning (DNPW).

• Intersection: An intersection scenario is described as when morethan one rural, urban, or suburban streets/roads of varyingwidths intersect at a certain point. The communication signalbetween cars approaching the intersection is often blocked by

Page 21: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

10 background

buildings of certain height situated at the corner of the intersec-tion. The Most relevant safety applications for this scenario areForward collision warning (FCW), Emergency electronics brakelight warning (EEBW), Roadwork warning (RWW), Wrong waydriving warning (WWDW) and Do not pass warning (DNPW).

Page 22: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

3L I T E R AT U R E R E V I E W

As a starting point for the literature hunt, paper [3] was used to geta great introduction into propagation channel models where the au-thors discuss the fundamental limits of wireless communication. Thispaper is extremely relevant since the core of the thesis is about increas-ing the channel capacity of the wireless vehicular network.

Paper [18] provides an explanation for better understanding of theconcept of data-age in vehicular networks paper. The authors use aexperimental setup to minimize the age of information by changingthe CW (contention window). Information age is minimized at anoptimal operating point that lies between the extremes of maximumthoughput and minimum delay.

IEEE 802.11p standard [17] [11] used for vehicular ad hoc networks(VANETS) is seen as the standard for intelligent transportation sys-tems (ITS) due to its easy deployment, mature technology (based onthe popular WiFi standard) and low cost. However, the drawbacksare that the system suffers from poor scalability, delays and a lackof quality of service (QoS). As a result of the previously mentionedconcerns there has been a increasing interest in Long Term Evolution(LTE) [9] as a potential access technology to support vehicular com-munication due to its high data rates and low latency for mobile users.E. Dahlman wrote a wonderful book [6] (4G LTE-Advanced Pro andThe Road to 5G) where he provides a real insight and understandinginto the why and how of the standard and its related technologies.Paper [19] in combination with Dahlman’s book provides a great in-troduction to most of the latency parameters in a LTE system

Paper [12] introduces path-loss models by extensive testing in fourdifferent environments (rural, urban, suburban and highway) to findparameters in V2V (Vehicle to Vehicle) communication systems. Thisis particularly important for analysis of interference and scalability insuch networks. The authors mentioned that their study confirm pre-viously executed studies. However more test and measurements arerequired to achieve a general channel parameters model.

Reliable traffic requires accurate models for V2V propagation channel[4][14]. These survey provides an overview of existing V2V channelmeasurement campaigns and their succeeding channel characteristics(such as delay spreads and Doppler spreads [13]). The authors alsodescribe the most commonly used types of channel characterization(statistical and geometry-based approach) for a V2V wireless commu-nication environment in different scenarios. Paper [5] discusses vehic-

11

Page 23: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

12 literature review

ular propagation channels, including application-specific scenarios,the impact of vehicle types, and antennas. As well as it has a sugges-tion for future research and development. However, these papers havetheir focus on modeling the physical layer of the network. Where inthis project we focus on modeling the data-link layer of the network.

Multiple models for LTE systems exists which serve as a layer of ab-straction to understand and mimic the physical layer of the channel.Paper [15] provides a survey of the most important developments inthe area of MIMO channel modeling. However, a great alternative forthese complicated models is a Markov chain. The Markov chain getits power from its simplicity where the system can be described by astochastic sequence of packet arrival/losses. A more specific modelwould be the Gilbert-Eliot model [8] where the network can eitherbe in a good state or a bad state. The transition point of going fromone state to another banks on probabilistic parameters which are spe-cific to the networks health. A bunch of extension to the well knownGilbert-Eliot model exist. One classical approach is to introduce anintermediate state where the network is not in a good state nor a badstate. The open source framework LTE-Sim [10] can be used to testand verify the Gilbert-Eliot model in different environments.

Page 24: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4M E T H O D

This chapter is the core of the thesis where all the required steps areexplained in order to create a probabilistic model from experimentalmeasurement log files and all it preliminary steps. The first Section(4.1 gives a brief overview on retransmission schemes and the processof sending a packet with its complementary delays in a LTE network.Also this chapter touches upon the creation of the first model andwhy the results are unrealistically too perfect. Section 4.2 was the sec-ond part of the thesis which focused on what can be done/generatedwith the data from AstaZero as well as how to setup a measurementcampaign. The section concludes with yet another model that doesnot meet the requirements. The last Section (4.3) presents a workingprobabilistic network model generated from the work done in Section4.2 by using the Baum-Welsh algorithm to train hidden Markov mod-els.

The creation of the models follows the principle of Occam’s razormeaning when presented with competing hypothetical answers to aproblem, one should select the answer that makes the fewest assump-tions. In science, Occam’s razor is used as a heuristic guide in the de-velopment of theoretical model, since one can always burden failingexplanations with ad hoc hypotheses to prevent them from being fal-sified, simpler theories are preferable to more complex ones becausethey are more testable.

4.1 phase 1

This was the first stage of the thesis, where the theoretical averagetransmission latency for the LTE network had to be found and usedas a reference for the X plane of the CDF (4.1.1). The calculation ofthe CDF which takes different packet error rates into considerationcan be found in Section 4.1.2. One can find the results of this modelin Section 4.1.3.

4.1.1 LTE transmission latency

The theoretical average latency is mostly determined by going fromthe idle stage to the connected stage, which will take roughly 10 ms.This includes the UE establishes a connection with the core network(EPC) via the base station (eNodeB) using a threeway-handshake pro-tocol, which is also called the request to send (RTS) and grant to send

13

Page 25: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

14 method

(GTS) stage. In Figure 5 the threeway-handshake is visualized in asequential diagram (Figure 5.

Figure 5: LTE transmission diagram

Besides the RTS and GTS delay there are some other factors who alsoneed to be included in order to find the total round trip delay. Theround trip time is the time it takes for a single package to be sentfrom an edge node (UE) to the server which is connected to the coreLTE network (EPC). All the factors included in the round trip timeand there associating values are listed in Table 2.

Tx processing is used to prepare the message coming from the ap-plication layer for delivery to the server. This includes RLC segmen-tation, MAC logical channel creation, MAC scheduling, message en-

Page 26: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4.1 phase 1 15

Latency values

RTS / GTS 10 ms Trts

Tx processing 1 ms TTxeu

Data transmission (UE to eNodeB) 0.67 ms TPeu

Rx processing (eNodeB) 0.5 ms TRxnb

ARQ ≈0 ms Tarq

Data transmission (eNodeB toEPC)

1 ms TPnb

Rx processing (EPC) 0.5 ms TRxgw

Total 13.67 ms Ttt

Table 2: Total uplink time latency

coding, etc. Whearas Rx processing includes message decoding andRLC concatenation.

The propagation delay to transfer a data frame between UE and theeNodeB is set to the maximal delay which is 0.67 ms. This is due tothe fact that LTE is designed to handle at most 100km, which corre-sponds to maximal timing delay of 0,67ms. The base station (eNodeB)is connected to the LTE core network (EPC) via a wire so it is assumedthat the latency is dominated by the propagation delay. According tothe propagation speed in copper cables (200,000 km/s) the distancebetween two nodes (EPC and the eNodeB) of 200km results in a la-tency of 1 ms. Obviously the network topology choice has therefora significant impact. In the case of Asta-Zero this propagation delaycould possibly be negligible. The propagation delay between the coreLTE network (EPC) and the server are assumed to be negligible sincethose two are most likely not very far from one other. Another factorthat could be neglected is the propagation delay of the ARQ message,but the maximum value it could take on is 0.67 ms. Retransmissionsin the wired network are neglected since the odds are very low forthis to happen.

The total transmission time for one packet starting from idle statecorresponds to the following formula.

Ttt = Trts + TTxeu + (TPeu + TRxnb) ∗ (1+ r) + TPnb + TRxgw

Which equals after inserting all the constants:

Ttt = 12.5+ 1.17 ∗ (1+ r)

In case of a clean transmission (no packet losses) the total transmis-sion time will equal 13.67 ms. In case of retransmissions the delay will

Page 27: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

16 method

increase by a sum of TPnb and TRxgw for each retransmission. How-ever if there is more then one packet in the queue, the retransmissiontime (TPnb) will increase by the amount of subframes there is in oneframe (1 subframe = 1 ms). This is due to the stop-and-wait principleapplied in the HARQ. All sub frames need to have received a ARQbefore the any new/old subframes can be transmitted/retransmitted.Hence the next available scheduled retransmission slot will be afterall the other subframes have received an ARQ.

Ttt = Trts+TTxeu+(TPeu+TRxnb+(SF−1))∗ (1+ r)+TPnb+TRxgw

Ttt = 12.5+ (1.17(SF− 1)) ∗ (1+ r)

Where SF equals to the number of subframes used.

4.1.2 Cumulative distribution function for IID losses

The cumulative distribution function (CDF) is used to determine theprobability of a value being less or equal to a number. In our caseit could be; what is the probability that the transmission delay of apacket is less or equal than 15.6 ms if we know that the packet errorrate (P) equals to 0.1. This can be written as

Pr{X 6 n

}=

n∑i=0

Pr{X = i

}The first step in the process is that we need to construct an probabil-ity mass function. In probability theorem and statistics a probabilitymass function (PMF) is a function that gives the probability that a dis-crete random variable is exactly equal to some value. In this projectwe assume that losses are IDD. The PMF of retransmissions for namount of retransmissions and the probabilistic variable p, whichequals to the packet error rate could be written as:

Pr(n) =

Pr{X = 0

}= 1− p

Pr{X = 1

}= p(1− p)

Pr{X = 2

}= p2(1− p)

...

Pr{X = n

}= pn(1− p)

Let’s consider an example where the packet error rate equals to 0.2and n equals to 4. Then by inserting p and n into the formula thecorresponding probability mass values will equal to the values repre-sented in Table 3.

Page 28: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4.1 phase 1 17

n Pr(n) Value

0 1− p 0.8

1 p(1− p) 0.16

2 p2(1− p) 0.032

3 p3(1− p) 0.0064

Table 3: Probability mass values for P = 0.2

These values will keep decreasing up to the point where it will be-come closer and closer to zero. If we take n = ∞ and sum up all thevalues this will equal to 1. In the case of n = 3 the total summationequals to 0.9984 which is fairly close to 1 but not quite there yet. Nowto come back to the CDF, what will the CDF be for Pr

{X 6 n

}? This

will equal to the summation of all the probability mass values up un-til n. For example the CDF for Pr

{X 6 3

}= 1− p+ p(1− p) + p2(1−

p) + p3(1− p) = 0,9984.

In Figure 6 you can see the CDF plotted out for five different packet er-ror values (p). From this graph it is possible to derive what the proba-bility for successfully transmitting a packet will be at a certain time in-terval. For example; The probability of a packet arriving successfullyafter 14ms with packet error rate of 0.2 equals to ≈80%. By comparingthe different p values it is visible that when p is decreasing the CDFwill increase. At 13.67 ms the curve starts to increase very rapidly.This is due to the fact that the probability of Pr

{Ttt < 13, 67ms

}= 0.

The minimum time a packet needs to be transmitted equals to 13.67

ms so it is not possible to transmit a packet in a smaller time interval.In practice this could be possible since the value 13.67 ms is based onthe assumptions that we are dealing with maximum delays over theentire network.

Figure 6 also tells us that probability of a successful packet transmis-sion is very close to 1 for all the packet error rates after ≈18 ms. Thismeans that for the highest p value it will take at most 4 transmissionsto successfully decode a received packet. The amount of transmis-sions (r) can be easily found by inserting the known parameters intothe formula described in Section 4.1.1 since we know that the Ttt willalways increases with 1.17 ms for each retransmission.

Ttt = 12.5+ 1.17 ∗ (1+ r)

18 = 12.5+ 1.17 ∗ (1+ r)

r =18− 12.5

1.17− 1

r = 3.7 ≈ 4

Page 29: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

18 method

Figure 6: CDF

Figure 7 zooms in on the point where most of the curves meet (be-tween 1 and 0.995 on the Y-axes and between 13.5 and 17.5 on theX-axes) in Figure 6. Now you can see that their is a very small prob-abilistic difference between p = 10−4 and p = 10−3 which was notvisual in figure 6. Also it looks like the CDF for p = 10−4 was 1 al-most straight from the start; In Figure 7 you can see that this is nottrue, but it is very close to 1.

4.1.3 Deficiencies of the IDD loss model

As expected the simplistic calculations of the CDF seem to fail whencompared with the ground truth. This is visually detectable by com-paring Figure 8 with the early experimental measurements at the testtrack(Figure 8 b) where they plot out the RTT (Round Trip Time)needed to setup a TCP (Transmission Control Protocol) connection.The reason why the CDF fails to follow the ground truth curves issince in our calculations we have only taken one parameter (packeterror rate) into considerations. In the future more parameters willbe included into the calculation to follow the experimental measure-ments as closely as possible. One parameter could be how the net-work was behaving a couple of time steps ago. These together withsome other parameters will be extracted from the experimental mea-surements that the project members from Halmstad university aregoing to conclude at the test track.

Page 30: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4.2 phase 2 19

Figure 7: CDF zoom in

(a) CDF model (b) Ground truth

Figure 8: CDF model compared with the ground truth

4.2 phase 2

Was the second stage of the thesis which starts off with some the-ory about the Gilbert-Elliott model as well as all the minimum re-quirements needed to execute a descent measurement campaign (Sec-tion 4.2.1 and 4.2.2). The second part covers all the steps that whereneeded to construct a bit-stream of packet losses from a data log file(Section 4.2.3 and 4.2.4). Finally the results of the Gilbert-Elliott modelare presented (Section 4.2.5.1).

4.2.1 Gilbert-Elliott model

The Gilbert-Eliott model is a classical 2-state Markov which was in-troduced by Gilbert [8] and Elliott [7] in the early sixties in order to

Page 31: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

20 method

model burst-noise in wireless telephone circuits. The Gilbert-Elliottmodel is especially powerful and widely used for describing errorpatterns in transition channels and for analyzing the efficiency of cod-ing for error detection and correction. The model described in Figure9 consists of a good (G) and a bad (B) state each with their transitionprobabilities and each state may generate independent errors. Param-eter description can be found in Table 4.

Figure 9: Gilbert-Elliott model

Gilbert suggested to estimate the model parameters from three mea-surable instances of a binary error process {Et}, where Et = F indi-cates an error:

a = Pr(F); b = Pr(F|F); c =Pr(FFF)

Pr(FSF) + Pr(FFF)(1)

By knowing a, b, and c the three model parameters can be computedin the following manner:

1− r =ac− b2

2ac− b(a+ c); h = 1−

b

1− r; p =

ar

1− h− a(2)

When the observations (the trace) of c are too small Gilbert arguesthat the c measurements can be avoided by choosing h = 0.5 andreplacing 1-r from Equation 2 with 1− r = 2b. The parameters of aeven more simplified Gilbert model (simple Gilbert) include:

p = Pr(F|S); r = Pr(S|F) (3)

Another way of estimating the parameters could be by consideringthe Average Burst Error Length (ABEL) to determine r and the aver-age number of packet drops to determine pE:

r = 1/ABEL; p =pE ∗ rh− pE

(4)

Page 32: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4.2 phase 2 21

Parameter Description

1-k Packet error rate of the Good state

1-h Packet error rate of the Bad state

p Transition probability of going from the Good stateto the Bad state

1-p Transition probability of staying in the Good state

r Transition probability of going from the Bad state tothe Good state

1-r Transition probability of staying in the Bad state

Table 4: Gilbert-Elliott model parameters

In order to calculate the probabilities of being in a good state (Pr{G})or in the bad state (Pr{B}) given the parameters from equation 2 can bedone in two ways. The first approaches is the most straight-forwardone which starts with writing down all the transition probabilitiesof each state by looking at Figure 9. (Note that the first approachassumes that we are in the steady state)

Pr{G} = Pr{B} ∗ r+ Pr{G} ∗ (1− p)

Pr{B} = Pr{G} ∗ p+ Pr{B} ∗ (1− r)

Pr{G}+ Pr{B} = 1

(5)

The next step is to solve the linear equations by substituting the un-knowns. (Note that the process for both states are identical):

Pr{G} = (1− Pr{G}) ∗ r+ Pr{G} ∗ (1− p)

0 = r− r ∗ Pr{G}− p ∗ Pr{G}

Pr{G} = rr+p

(6)

After solving the linear equations we end up with the following for-mulas to calculate the state probabilities:

Pr{G} =r

r+ p; Pr{B} =

p

p+ r(7)

Equation 7 is derived from Equation 5 by solving the linear equation.Now one can plug in all the values into Equation 7 to find out thestate probabilities.

If the Markov chain is unknown, approach two is the best way togo. Approach two can also be in any arbitrary stage since the stateprobabilities converge overtime and is written in matrix form which

Page 33: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

22 method

makes it easier for a computer to solve. Equation 8 gives the transitionprobability matrix for the Gilbert-Elliott model. In the beginning anyarbitrary number can be chosen for Pr{G} and Pr{B} as long as itfollows the formula: 1 = Pr{G}+ Pr{B}:[

Pr{G}

Pr{B}

]=

[1− p r

p 1− r

[Pr{G}

Pr{B}

](8)

The matrix can easily be solved by doing matrix multiplications forboth Pr{G} and Pr{B}. In Equation 9 P̂ and 1− P̂ equal to Pr{G} andPr{B} respectively.[

1− P̂

]=

[1− p ∗ P̂+ r ∗ 1− P̂

p ∗ P̂+ 1− r ∗ 1− P̂

](9)

From Equation 9 we can derive the probabilities of each state by in-serting the known variables into Equation 10.

P̂ = 1− p ∗ P̂+ r ∗ 1− P̂; 1− P̂ = p ∗ P̂+ 1− r ∗ 1− P̂ (10)

Let’s consider an example where we have a input data stream con-sisting of 500 binary samples. Note that a S to the power of a Xmeans X adjoining success full packet delivery. for example S4 = SSSS.Whereas F means a retransmission.

S62FFS77FS46FFSFSFFFS11FFS15FS42FS28FFS9SFS37FFS5

FFSFS35FSFFSFS23FFS4FFS18FS15FFSFFFSFFSFFFS5

With the help of Equation 2 we can extract the Gilbert-Elliott modelparameters from any given bit stream. From equation 1 we know thatwe need to calculate the occurrence of a certain pattern in order tofeed this into Equation 2. The pattern occurrence is counted in thefollowing matter and the results are given in Table 5.

• a: Is the amount of 1 bits from the entire data stream dividedby the amount of sample.

• b: Is the amount of pairs of 1 bits (two consecutive 1 bits behindeach other) and is calculated by dividing the pairs of 1’s by theamount of 1’s.

• c: Is the amount of triple consecutive 1’s given that the middlebit is either a 1 or a 0. This is calculated by dividing the amountof triple 1 bits by a sum of the amount of triple 1 bits and theamount of times the pattern 101 occurs.

Page 34: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4.2 phase 2 23

variable pattern occurrence

a Pr(F)38500

b Pr(F|F)1538

c Pr(FFF)Pr(FSF)+Pr(FFF)

310

Table 5: Gilbert-Elliott model example parameters

Now that the parameters (a, b, and c) are calculated, the next step isto insert these parameters into Equation 2:

1− r = ac−b2

2ac−b(a+c)

= −0.13−0.10

= 1.29

r = 1− 1.29

r = −0.29

(11)

As mentioned before, when the c trail is to small (to little values) itwill demolish your calculation. In Equation 11 it turns out we endedup with a negative probability for r which is impossible. In order tosolve this the parameter c is trashed and 1-r = 2b is used instead of

ac−b2

2ac−b(a+c) and h is set to 0.5. The state probabilities are calculatedby using Equation 7. Results are shown in table 6.

variable result

r 0.22

1-r 0.78

p 0.03

1-p 0.97

Pr{G} 0.88

Pr{B} 0.12

Table 6: Gilbert-Elliott model result

4.2.1.1 Gilbert-Elliott model extension

The Gilbert-Elliott model takes only these three patterns (Equation 1)into consideration which in most cases will give a good estimationof the network but it could happen (in short observations) that morepatterns need to be included or some need to be removed. This couldbe done by considering the Gilbert-Elliott model as a Hidden MarkovModel trained by the Baum-Welch algorithm.

Page 35: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

24 method

In order to easily find the interesting (recurring) parameters for theGilbert-Eliot model a pattern learning algorithm could be used. Thelearning algorithm is based on the well known association rule learn-ing algorithm which is especially suitable to find hidden relationshipsin big databases. Association rule learning was introduced to discoverregularities between products in large-scale transaction data recordedby point-of-sale systems in supermarkets (also called the market bas-ket analysis). A famous example of this was that in a supermarket inthe USA association rule learning found out that on Thursdays menbought diapers and beers together, the store could with this knowl-edge increase sales for these products by placing them together.

Association rule learning provides the user with frequent items foundin the database as well as it also generates rules from frequent item-sets. Another type of association rule learning is called sequentialpattern mining which is a topic of data mining concerned with find-ing statistically relevant patterns between data examples where thevalues are delivered in a sequence. This type suits our requirementsbest since the Gilbert-Eloit model doesn’t require any rules, also thedatabase required for association rule learning must consist of a tablewith multiple columns and rows instead of a stream of data.

The mathematics behind the sequential pattern mining are very straightforward and simplistic which makes it fairly easy to implement. Al-gorithm 1 explains the basic idea behind sequential pattern mining.The algorithm requires a sequential data stream (dataStream) in listform and a pattern to look for (also in list form) as input. First of alla counter will be initialized to keep track of how many occurrences(or pattern hits) have happened. Secondly the entire data stream willbe looped. For each data item will a check be executed to see if thepattern will fit into the remaining data-stream. If this check is posi-tive then will the pattern be looped and checked if the pattern itemmatches the data-stream item if this is correct then counter (c) willbe incremented. If after looping the pattern, the length of the pat-tern equals to the value stored inside of C then one can say that thepattern occurred in the data stream on place i. After looping all theitems out of the data stream will the algorithm return a percentage ofhow many times this particular pattern occurred in the data stream.In order to find the X most occurring patterns one needs to run thealgorithm with different patterns and select the patterns which resultin a high percentage.

Page 36: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4.2 phase 2 25

Algorithm 1 Sequential pattern mining

1: PatternMining(dataStream[], pattern[])2: counter = 0

3: loop dataStream with i do4: c = 0

5: if pattern fits in dataStream then6: loop pattern with j do7: if dataStream[i+ j] = pattern[j] then8: c = c+ 1

9: if c = lenght(pattern) then10: counter = counter+ 1

11: return counter/lenght(dataStream)

Let’s consider the example again with where we have a input datastream consisting of 500 binary samples:

S62FFS77FS46FFSFSFFFS11FFS15FS42FS28FFS9SFS37FFS5

FFSFS35FSFFSFS23FFS4FFS18FS15FFSFFFSFFSFFFS5

After running the algorithm with this data stream and a max patternlength of 4 (used as a boundary for generating patterns) one can seethat the probability of a the pattern 1 equals to 0.07 and pattern 111

equals to 0.01 all the recommended patterns are ordered in descend-ing order in Table 7.

Pattern Occurrence

F 0.07

FF 0.03

FSF 0.01

FFF 0.01

FSFF 0.01

FFSF 0.01

FSSF 0.00

FFFF 0.00

Table 7: Pattern learning example result

4.2.2 Measurement campaign

The purpose of the measurement campaign is to collect data for (pos-sibly) several traffic situation in order to evaluate the network qualityin a probabilistic matter. At the AstaZero test track it is possible to

Page 37: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

26 method

find all traffic scenarios explained in Section 2.5 even though that afull test of all the different traffic scenarios would be possible thiswouldn’t give accurate result. It is better to conduct a single test spe-cific to a certain traffic scenario in order to estimate the network qual-ity better. Also having traffic specific test data could help future re-search into the V2I communication topic at Halmstad university.

In order to estimate the network quality, the system has to log rel-evant parameters which will help later on to construct a model forpacket-losses and retransmissions. Initially what the system can issend a packet periodically from the vehicle to server. Such a packethas to include a time stamp, the GPS coordinates and the sequencenumber. Some extra variables that could be included in the packetare; some measurements from the vehicle its sensors, signal strength,encoding schemes, velocity, heading, trajectory history, etc. If morethan one vehicle is executing the test it could be of great interest toalso log what kind of messages (and its content) the vehicles receivefrom each other at different traffic scenarios. In case of estimating thenetwork quality, a test with only one vehicle is more than enough.

What the vehicle can log are all the periodical transmitted packets aswell as the ARQ’s received from the base station. As mentioned in Sec-tion 2.2 almost all packet losses will accrue between the vehicle andthe base station. The logging of the ARQ’s could be a good estimateof network quality since the network quality is mostly determinedby the amount of retransmissions. Another neat feature that could beextracted from the tests is the actual round trip time of a packet. InSection 4.1.1 we found that the theoretical average latency equals to13.67ms (without any retransmission). This could be easily tested bymaking the receiving side (server) time stamp each received packet.During the data processing one could easily find the actual transmis-sion latency by subtracting the time the packet was send with thetime it has arrived.

Route documentation is important to keep track of the positions ofthe vehicle, GPS coordinates are used to log the position during eachmeasurement run. In addition to GPS data, videos of each measure-ment could also be recorded through the windscreen of the vehicle.GPS coordinates together with video information are used in the postprocessing of the data to find the reasons whenever an unexpectedbut significant difference between the links is observed due to varia-tions in traffic density, number of pedestrians, houses, road side envi-ronment, etc.

There are some limitations and challenges involved with executing ameasurement campaign. Some of them are listed below.

• The amount of data: A very important question that should beaddressed is ’How much data is enough?’ There is no correct an-swer to this question, the more data available to more accurate

Page 38: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4.2 phase 2 27

the prediction model will be. Will a 30 minute test (10 periodi-cally send packets per second = ≈18000 packets per half hour)generate enough data to correctly predict the network quality?

• Amount of traffic: Does the amount of traffic on the networkimpact the test? Shall one test while the network is completelyfree of traffic or should the network be tested at its limits? Incase of AstaZero we would like to know the worst case networkquality so a good approach is to have a dummy system down-loading a big file from the network in order to simulate a lot oftraffic.

• Test site: Shall one execute one big test including all the differenttraffic scenarios of shall each test be specific to a certain trafficscenario (rural, city, highway, etc.)? The customers of AstaZerousually come to the track to test out a specific scenario also themeasurements will be more accurate if they are traffic specific

• Placing of the antenna:

• Accuracy of the GPS: The GPS’s accuracy might be a problemduring the post-processing due to the well known phenomenonof "drifting".

• What clock to use: Another important factor to take into consid-eration is what type of clock to use to do all the logging sincea couple of milliseconds in difference can result in the systemassuming a retransmission has happened.

• Weather during the test: will rainy weather affect the networkquality?

4.2.2.1 Execution of the measurement campaign

Unfortunately due to time restrictions of the thesis it was not possibleto visit the AstaZero test track to execute the measurement campaign.Instead we decided to use Chronos demo log files (see Section 4.2.3)for the network analysis. The AstaMoCo project group will executenew measurement campaigns in the future

4.2.3 Data post-processing

AstaZero conducted a test during there their latest researchers (Octo-ber 2017) . The test consisted of a hand full of vehicles executing a setmaneuver on a T-junction in their city area. In Figure 10 one can seethe maneuver that each vehicle executed. Note that all the vehiclesfollowed the Swedish traffic rules.Each vehicle in Figure 10 is represented by a number (object ID seesection 4.2.3).

Page 39: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

28 method

Figure 10: Test setup of AstaZero’s researchers day

• Robot car (ID 0): Was a fully autonomous (self-driving) vehicle.

• Human driver (ID 1): Was a regular car operated by a humandriver.

• High speed platform (ID 3): Consisted of a wheeled, flat, metalplatform which can be controlled remotely. On top of this plat-form a vast array of different balloons could be placed. Theseballoons could take the form of a car, bus, truck, or animal.

• Pedestrian (ID 4): Was a balloon shaped like a human strappedto a RC (radio controlled) car.

• Virtual object (ID 5) and Virtual truck (ID 6):Where objects thatwhere implemented in software (not physically present duringthe test). The software program updates the server with positioninformation of the planned trajectory.

Note that each object was equipped with the necessary communica-tion and sensor equipment.

During the test each object sends out heartbeat packages periodicallyto the test server. The server will upon receiving of a packet timestamp it with the current arrival time. In this way it is possible todetermine for how long the packet has travelled through the etheras well as an estimation of the amount of retransmissions that tookplace.

The data-set consists of a hand full of variables logged by the objectand the server which follows the following format:⟨

ETSI time at message arrival,Message type,Object ID,

ETSI time at message departure,Latitude,Longitude,

Heading,Other sensor data⟩

Page 40: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4.2 phase 2 29

• ETSI time at message arrival: Is the time at which the packethas arrived at the receiver (server side). Converting ETSI timeto milliseconds is easily done by adding the amount of millisec-onds from 1970 up to 2004 (without including leap seconds )together with the difference in leap seconds between ETSI andUTS time plus the ETSI time itself.

t = ETSItime +MS_1970_TO_2004+DIFF_LEAP_SECONDS

t = ETSItime + 1072915200000+ 5

• Message type: Indicates the type off traffic. In this data-set thisis always set to 3 which equals to monitor data.

• Object ID: Specifies who the sender was of that message.

• Object type: Was not specified in the explanation of the data set.By default it was set to 0 for all messages.

• ETSI time at message departure: Gives the time at which themessage was send by the object.

• Latitude and Longitude: Are the degrees latitude and longitudeof the test object gathered from its GPS sensor.

• Heading: Gives the clockwise degrees from north.

• Other: Some other sensor data collected by the object.

The following row is an example gathered from the data. Keep inmind that semicolons and colons are mixed within one other as wellas there is no consistency regarding spacing.⟨

446390418570 : 3 6; 0; 446390418509;

577724328; 127697649; 20325; 0; 161; 0; 2;⟩

In order to use the 20 103 lines of logging data. A couple of stepshad to be executed before it was ready to do calculations on them.The first step is to remove the inconsistency of the colons, semicolons,and spaces. This was done by replacing all the spaces with a semi-colon symbol and the colon symbols were replaced by a empty sting.This brought consistency to the data log and by splitting on the semi-colon symbol one can create a list of lists which can be easily looped,ordered, etc. The program also drops lines of data when that par-ticular line is not exactly 12 items long and if there are items whichcontain nothing (a empty sting). Another task of the program is to cal-culate the time difference between the sending and receiving time ofthe message. This time difference is appended to the end of each list.

Page 41: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

30 method

Python was used as the language to process all the data for the sim-ple reason that Python is a simple and structured scripting languagewhich is very power full for doing data processing. Also, Python isequipped with a bunch of plugins which makes the life of the de-veloper a bit easier. In Listing 1 one can find the developed pythoncode.

Page 42: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4.2 phase 2 31

1 def openAndParseLogFile ( ) :d a t a L i s t = [ ]f =open ( ’ event . log ’ )l i n e s = f . r e a d l i n e s ( )f o r l i n e in l i n e s :

6 # parse i n t o l i s t formatr = l i n e . r e p l a c e ( ’ ’ , ’ ; ’ ) . r e p l a c e ( ’ : ’ , ’ ’ ) . s p l i t ( ’ ; ’ )#remove the ’\n ’r = r [ : −1 ]

11 # only append the good l i n e si f ( len ( r ) ==12 and ’ ’ not in r ) :

b = [ ]f o r i in range ( len ( r ) ) :

i f i == 0 or i == 4 :16 #change ETSI time to m i l l i s e c

time = i n t ( r [ i ] ) +MS_FROM_1970_TO_2004_NO_LEAP_SECS +DIFF_LEAP_SECONDS_UTC_ETSI

b . append ( time )e l s e :

b . append ( i n t ( r [ i ] ) )21

# c a l c d i f f e r e n c e in timetimeDif = b [ 0 ] − b [ 4 ]b . append ( t imeDif )

26 d a t a L i s t . append ( b )re turn d a t a L i s t

Listing 1: Python code for parsing the log file

The second step was to discard the messages which where send byID2 (unknown object). There are 61 samples present in the data-setwhich has this ID. The final step was to convert the latitude and lon-gitude item from nine numerical digits to a float with the commaseparator inserted after the the 7Th digit (counting from right to left).

From the data a bunch of parameters can be extracted using simplelogic and calculus. The results can be found in table 8

• Amount of samples: Give the amount of samples each object hassent to the server. Values varies between 300 and 6000 samples.The amount of samples are calculated by simply asking pythonfor the length of each list.

• Minimum and maximum transmission time: Is the minimumand maximum transmission time of each object in milliseconds.Python has the build in functions min() and max() which makesit very easy to find the minimum or maximum transmissiontime.

Page 43: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

32 method

• Average transmission time: The average transmission time iscalculated by iterating all the transmission times of each ob-ject, counting them together and finally dividing them by theamount of samples of that object.

• Standard deviation: The Numpy library is used for calculatingthe standard deviation. The function requires you to give a listas the argument in the function and it will return the standarddeviation of that list.

• Test duration: Gives the time duration of the test in minutes. Itis calculated by dividing the element "time at transmission" ofthe last line with the element "time at transmission" of the firstline (since the messages are by default sorted on arrival time).This is repeated for each object separately.

• Sampling interval: Which is the average time between the send-ing of two consecutive packets. This is calculated by iteratingeach object and calculating the time between packet number Nand packet number N+1. All these time differences are addedtogether and divided by the amount of samples. The unit of thesampling rate is in milliseconds but it can be easily convertedinto frequency (Hz) with the following equation:

frequency (Hz) =1

period (s)

.

Another interesting parameter that could be extracted from the datais the speed of each vehicle at a certain point in time. In Figure 11

one can see the speed at any given point in time as well as the trans-mission time (same X-axes). The entire duration of the test is shownin the graph (roughly 1 minute) and as we can see all objects arestanding still for the vast majority of time then execute their maneu-ver (crossing a T-junction with some traffic) and the test is over. Byexamining the speed and the transmission time in Figure 11 it visiblethat there is slight correlation between the speed of the object andits transmission time. For example; the high-speed platform (red line)starts accelerating at around 47500 (x-axes) and roughly around thesame time the transmission time went from ≈(44-52)ms. When thecar started to decelerate at around 58000 the transmission time alsowent down given a small delay of a couple of seconds. The reason forthis small delay could because there where still quite a few packetswaiting in the transmission queue. To prove that there is a correlationbetween transmission time and speed more data is needed. If there isno correlation between transmission time and speed a reason for thethe transmission time going up at the same time as the speed goescould be due to the fact that while the object starts moving it starts to

Page 44: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4.2 phase 2 33

loose the line of sight connection or due to clock drifts (which is veryunlikely).

Figure 11: Speed and transmission time over time

The speeds are calculated by taking the difference between the lati-tude and longitude coordinates of packet N with the latitude and lon-gitude coordinates of packet N+1. This gives the distance travelledbetween packet N and packet N+1. Speed can then be calculated bydividing the distance with difference in time when packet N and N+1

were generated. Listing 2 presents the algorithm which takes a list ofGPS coordinates as an input and outputs a list of speeds. The for-mula presented in this algorithm also takes the curvature of the earthinto account instead of using a 2D space. The stepVal variable is usedso that programs takes jumps of 5 between N and N+1. This is be-cause otherwise the speed plot became extremely spiky. An averageof those 5 values is used for the transmission time (not presented inthe code snippet).

Page 45: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

34 method

def calculateSpeedFromCoordinates ( data ) :# approximate radius of ear th in km

3 R = 6373 .0stepVal = 5

f o r i in range ( 0 , len ( data )−stepVal , s tepVal ) :# Convert degrees i n t o r a d i a l s f o r python

8 latN = radians ( f l o a t ( data [ i ] [ 5 ] ) )lonN = radians ( f l o a t ( data [ i ] [ 6 ] ) )latNp1 = radians ( f l o a t ( data [ i +stepVal ] [ 5 ] ) )lonNp1 = radians ( f l o a t ( data [ i +stepVal ] [ 6 ] ) )

13 # Ca l c u l a te d i f f e r e n c e between the two pointsdlon = lonNp1 − lonNd l a t = latNp1 − latN

a = s in ( d l a t / 2 ) ∗∗ 2 + cos ( latN ) ∗ cos ( latNp1 ) ∗ s i n( dlon / 2 ) ∗∗ 2

18 c = 2 ∗ atan2 ( s q r t ( a ) , s q r t (1 − a ) )

d i s t a n c e = R∗c # in km

timeDif = data [ k ] [ i +stepVal ] [ 4 ] − data [ k ] [ i ] [ 4 ] # in ms23 timeDifH = timeDif ∗0 .27777777777778 ∗ 10∗∗−6 # in hours

i f ( timeDifH != 0 ) :speed = d i s t a n c e / timeDifH # in km/h

Listing 2: Python code for calculating speed from GPS coordinates

Another interesting graph that could be generated from the data isa histogram of the transmission times. With this histogram is it pos-sible to see how all the transmission times are grouped. Figure 12

gives the transmission time for all objects (besides object with ID2).As we can see the virtual object and the virtual truck with ID 5 and6 respectively send all their packets with a transmission delay of 1

ms (virtual object) and 61 ms (virtual truck). This is because they areprogrammed in that matter, they do not actually use the LTE channel.With this information it is safe to say that these two objects can beremoved from the test since they will not contribute to the networkquality. Moreover, they might cause wrong/bad results if kept in thedata-set.

Page 46: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4.2 phase 2 35

Vehi

cle

Rob

otca

r(I

D0

)H

uman

driv

er(I

D1

)U

nkno

wn

(ID

2)

Hig

hsp

eed

plat

form

(ID

3)

Am

ount

ofsa

mpl

es4754

304

61

3977

Min

tran

smis

sion

tim

e(m

s)24

10

446390419080

30

Max

tran

smis

sion

tim

e(m

s)169

101

446390479303

77

Avg

tran

smis

sion

tim

e(m

s)40

14

446390449194

47

Stan

dard

devi

atio

n10.6

71

7.2

69

17670.6

18

7.4

91

Ave

rage

spee

d(k

m/h

)4

.454

3.8

58

2.9

62

Test

dura

tion

(min

utes

)1

.013

1.0

09

0.0

00

1.0

13

Sam

plin

gin

terv

al(m

s)12.7

91

199.3

35

0.0

15.2

87

Vehi

cle

Pede

stri

an(I

D4)

Vir

tual

obje

ct(I

D5)

Vir

tual

truc

k(I

D6

)

Am

ount

ofsa

mpl

es1354

3561

6085

Min

tran

smis

sion

tim

e(m

s)5

060

Max

tran

smis

sion

tim

e(m

s)66

262

Avg

tran

smis

sion

tim

e(m

s)9

061

Stan

dard

devi

atio

n3

.688

0.5

20

0.4

65

Ave

rage

spee

d(k

m/h

)0

.593

Test

dura

tion

(min

utes

)1

.013

1.0

13

1.0

14

Sam

plin

gin

terv

al(m

s)44.8

91

17.0

81

9.9

98

Tabl

e8

:Sum

mar

yof

the

Ast

aZer

ote

stlo

gda

ta

Page 47: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

36 method

Figure 12: Histogram of transmission times from each test object

Figure 13 visualizes the transmission time spread when the virtualobjects are removed (and all the objects transmission times are com-bined into one single object). From this histogram one can tell thatthere are two major groups one group with transmission time be-tween ≈(50-20) ms and ≈(25-60)ms. In fact these two gaps are alsovisual if we go back to the transmission time over time plot (Figure11). Here you could also see that there are two distinct groups witha clear gap between them. The red and blue line are clearly bundledtogether whereas the purple and green line are also bundled together.Section 4.2.4 will try to give an explanation for why these group ap-pear.

In Figure 14 the CDF of each object is plotted out. Here the twogroups are also visible. One can also see that the virtual objects canbe removed since there CDF’s are unrealistic in comparison with theother objects.

4.2.4 Data matching

This section compares the data and its generated graphs with theearlier measurements which was the result from a measurement cam-paign executed at the AstaZero track and it also presents a solutionfor how these difference could be solved.

Figure 15 shows both CDF next to each other. It is fairly easy to spotthe differences between both. First of all the CDF from the earlier

Page 48: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4.2 phase 2 37

Figure 13: Histogram of transmission times from the test objects combined

measurements has multiple vertical lines whereas on first sight thecombined CDF doesn’t have any of those. In fact the combined CDFhas several of those spots which are hidden from first sight. For in-stance there is a vertical jump at ≈ 40 ms (X-axes) and another oneat ≈ 45 ms. The reason why these vertical jumps are not as visiblecould be because of during the earlier measurement campaign theywhere using a different traffic model (they where measuring a filedownload). Let’s now address the elephant in the room, the horizon-tal plateau from ≈ (18− 5)ms. This happened due to the groupingof transmission times of the individual CDF’s. When these individ-ual CDF’s are combined into one single CDF a plateau appears sincethere is not much data between the range of where the first groupconverges and the second group starts. In fact these gaps are visiblein all the graphs generated so far (transmission time over time, thehistograms, CDF’S, etc.). A reason why these gaps appear is due tohow the logging was setup. Each object time stamps its packet rightbefore it is ready to be send with its local time (GPS clock). When thepacket arrives at the server it will time stamp the arrival time withits local time (network time). Since the object’s time and the server itstime are not synchronized this can lead to time offsets. These differ-ences in time could be the main reason for the two groups. In case ofthe earlier measurement campaign this was not a problem since theycalculated the round trip time where the packet arrival and departuretime are logged on the same device (no time offsets due to differentclocks). Another reason could be because of bad antenna placement.During a discussion with the AstaZero employees regarding the re-

Page 49: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

38 method

Figure 14: Speed and transmission time over time

(a) Combined CDF (b) Earlier measurements

Figure 15: Combined CDF compared with the earlier measurements

sults that where gathered from the data-set, a employee mentionedthat the antenna of the robot car was just placed on the back seat ofthe car and the antenna of the robot car was hidden in a box.

It is almost impossible to find out from the data what offset each clockhas compared with the server. A way to work around these offsets isby moving the start point around the X-axes and trying to minimizethe plateau as much as possible without losing any important infor-mation. Figure 16 shows two approaches to remove the offsets. Thetop row of the plot gives the CDF’s of each object separately whereasthe bottom row shows the combined CDF of the plots above. Notethat the second and third column (counting from the left side) areapproaches to remove the offsets whereas the first column is the rawdata. Also note that the virtual object from the raw data are not in-cluded in any other CDF’s besides the raw data (also not included in

Page 50: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4.2 phase 2 39

the combined CDF of the raw data).

Figure 16: CDF offset plots

Approach 1 (middle column): Assumes that the offset from eachclock are randomly distributed which means that a weighted aver-age function can be used to move all the CDF’s closer together. Asa weight the minimum transmission time of unscheduled LTE net-works is used because the transmission time will be approximatelyaround this point. In Section 2.3 we found out that the minimumtransmission time is equal to 13.67 ms. Equation 12 was used to cal-culate the offset value. Note: Xn equals to the transmission time ofobject number n at a certain point in time.

offset =∑samples

n=1 (13.67−min(Xn))samples

offset =(13.67−24)+(13.67−10)+(13.67−30)+(13.67−5)

4

Xnnew = Xnold± offset

(12)

Each data point is then iterated and the offset value is added or sub-tracted from that data point in order to shift it towards commongrounds (which is around the 13.67 ms mark).

Approach 2 (right column): Is a more experimental approach whereit is assumed that there is no time offset at all meaning that the mini-mum transmission time is equal in all cases. This approach was triedout to see what would have happened when all the object’s had thesame minimum transmission time and if it would have become al-most identical to the earlier measurements. Equation 13 presents theoffset calculations. Note that n equals to a certain object and the theo-

Page 51: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

40 method

retical transmission time of LTE systems (Section 4.1.1) is used as thestarting point for each curve.

offsetn = 13.67 − min(Xn)

Xnnew = Xnold+ offsetn

(13)

The results of the two approaches are visible in Figure 16. As onecan see the plateau is about the disappear with approach 1 and iscompletely gone with approach 2. Almost none of the vertical jumpshave been lost in the process but they are a lot more visible withapproach 1 as well as the steps which connect the vertical spots.

4.2.5 Model creation

The Gilbert-Elliott model requires an input stream in the form of ze-ros (success) and ones (retransmissions) for calculating the probabilis-tic parameters presented in Section 4.2.1. Extracting the input streamor bit-stream is not as trivial as it seems since the only variable avail-able to estimate the amount of retransmissions is the transmissiontime which is as we know from Section 4.2.4 not very reliable.

The amount of retransmissions where estimated by creating a list ofedges where each edge represent a certain amount of retransmissions.The construction of the edge list is given in Algorithm 2. Here all thetransmission times of each object need to be provided as an input (inlist form). With this data the edges are constructed by using a verysimple loop that starts of with the object its minimum transmissiontime and counts up to its maximum transmission time with steps of5ms. The value of the first number ’i’ will be the first edge, the secondvalue will be the second edge and so on until the maximum transmis-sion time is reached. In the actual program only the first 8 edges willbe returned. The reasons for this is because LTE uses hybrid acknowl-edgement (HARQ) which usually do not excite 8 retransmission. Forexample if all the edges where returned and we try to find in whichgroup the packet with transmission time 160ms belongs to then theprogram will say it took 32 retransmissions which is impossible.

Algorithm 2 Creating of the edges

1: CreateEdges(data[])2: edges = []

3: loop i from min(data) until max(data) with steps of 5

4: edges.append(i)5: return edges

The reason for the steps of 5ms is because in both the earlier measure-

Page 52: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4.2 phase 2 41

ment data and the data-logs from AstaZero the time between two ver-tical gaps equals to exactly 5ms. We assume these vertical gaps equalto a successful transmission so the time between two transmissionsequals to 5ms. The reason why these gaps are exactly 5ms could bebecause LTE uses a stop and wait principle which waits for a certainamount of time and will resent the packet if no acknowledgementhas been received. This wait time could be set with a value which isa bit less than 5ms so that the wait time plus the transmission timeequal to 5ms.

Now that an edge list is generated for each object we can start esti-mating the amount of retransmissions by iterating all the data pointsand checking in between what edges this data point lies. Listing 3

does exactly that. By iterating each edge and checking if the transmis-sion time fits between its borders, it is possible to find out to what bin(edges) it belong. Each bin represents a transmission so for examplethe first bin equals to 1 successful transmission and 0 retransmissionswhereas for instance bin 5 equals to 1 successful transmission and 4

retransmissions. Note that the dummy border is used since the algo-rithm only has the first 8 edges and the one with higher transmis-sion times are removed. In order to cope with these big values a bigdummy value is inserted in the end to not have any overflows.

def findBinNumber ( edges , data ) :2 looper = True

i = 0

# include a big value as dummy borderedges = edges + [ 2 0 0 0 ]

7 while looper :i f ( data >= edges [ i ] and data <= edges [ i +1] ) :

looper = Fa l see l s e :

i = i +1

12 re turn i

Listing 3: Python code finding the bin number

Figure 17 visualizes how all the transmissions for each object are di-vided. For the object’s with ID 1 and 4 the delay spread is concen-trated around bin 0 and 1 whereas ID 0 and 3 are concentrated nearbin 2 and 3.The construction of the bit-stream if fairly straightforward. Each sam-ple is iterated and a function is called which returns the bin numberit belong to. Then a amount of ones (retransmissions) is added tothe bit-stream depending on the bin number followed by a zero (suc-cess). After iterating all the samples from each object the bit-stream isready. Equation 1 in combination with the bit-stream is then used to

Page 53: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

42 method

Figure 17: Retransmission spread

calculate the three model parameters to construct the Gilbert-Elliottmodel.

4.2.5.1 Results of Gilbert’s approximation [8]

On the basis of the three model parameters can the Gilbert-Elliottmodel be constructed by calculating the transition probabilities andthe state probabilities (Equation 2 and 7 respectively). The probabilis-tic results are given in Table 9. Note that the top table is constructedfrom the raw data of each object separately whereas the bottom tableis constructed from combining the raw data into one single bit-streamwith different offsets (see Section 4.2.4 for a more detailed explana-tion).

As noticed by the red writing the model is not reliable at all due tothe negative probabilities and probabilities above 100 percent. Theonly model that seems to be correct is the one for the human driver(which had the lowest overall delay). The reason why there are prob-abilities higher then 100 percent and lower than zero is because ofthe selection of the measurable model parameters. It seems like thesebit-streams require another way of estimating the model parameters.Section 4.3 will do exactly that, here the Baum-Welch algorithm fortraining hidden Markov models is used to generate the model proba-bilities.

Page 54: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4.2 phase 2 43

Bit-

stre

amR

obot

car

(ID

0)

Hum

andr

iver

(ID

1)

Hig

hsp

eed

plat

form

(ID

3)

Pede

stri

an(I

D4

)

r0.2

28

0.4

87

0.1

62

0.0

48

1-r

0.7

72

0.5

13

0.8

38

0.9

52

p2.0

96

0.3

36

2.0

27

25.8

0

1-p

-1.0

90.6

64

-1.0

2-2

4.8

Pr G

0.0

98

0.5

91

0.0

74

0.0

01

Pr G

0.9

02

0.4

09

0.9

26

0.9

99

Bit-

stre

amC

ombi

ned

raw

data

Com

bine

din

clud

ing

offs

etC

ombi

ned

sam

est

arti

ngpo

int

r0.0

17

0.0

49

0.1

52

1-r

0.9

83

0.9

51

0.8

48

p2.8

56

1.9

20

2.2

12

1-p

-1.8

5-0

.92

-1.2

1

Pr G

0.0

06

0.0

25

0.0

64

Pr G

0.9

94

0.9

75

0.9

35

Tabl

e9

:Res

ults

ofG

ilber

t’sap

prox

imat

ion

Page 55: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

44 method

4.3 phase 3

Since the standard parameter learning of the Gilbert-Elliott modelfailed to construct a probabilistic network model a different approachhad to be taken. This approach was to use the Baum-Welch algorithmfor learning the parameters of a hidden Markov models (hmm) [16].Note that the exact same bit stream was used as the Gilbert-Elliottmodel with a minor adjustment. It was recommended by my super-visors to use an already existing Matlab library for learning the pa-rameters of a hidden Markov model instead implementing the Baum-Welch algorithm my self in Python due to its mathematical complex-ity. The minor adjustments that was done on the bit-stream was thatthe input bit-stream needed to be a list where the values between[1− 2

]instead of

[0− 1

]. Code Listing 4 presents the script used to

train the hidden Markov model. Note that the values for the initialtransition matrix (trans) and the initial emission matrix (emis) don’treally mater since the bit-stream has a long enough trace so the valueswill eventually settle on the same value no matter the initial input.

% t r a n s i t i o n matrixt r a n s = [ 0 . 9 5 , 0 . 0 5 ;

3 0 . 2 0 , 0 . 8 0 ] ;% emission matrixemis = [ 0 . 8 , 0 . 2 ;

0 . 4 , 0 . 6 ] ;

8 % example b i t−streamseq = [ 1 , 2 , 1 , 2 , 2 , 2 , 1 , 1 , 1 , 2 , 1 , 1 , 2 ]

% l ea rn the hmm parameters[ estTR , estE ] = hmmtrain ( seq , trans , emis ) ;

Listing 4: Matlab script for hmm parameter learning

The results of the parameter learning as well as the state probabilitiescan be found in Table 10. One can see that the model gives reason-able results compared to the Gilbert-Elliot model for the all the ob-jects separately. Unfortunately the model seems to fail to produce aprobabilistic model for the combined data. This could be due to thefact that the state some transition probabilities equal to 0 or 1. Thetransition en emission probability matrix follow the format of:[

1− p p

r 1− r

]Whereas the state probabilities are calculated in the same way as pre-sented in section 4.2.1.

Pr{G} =r

r+ p; Pr{B} =

p

p+ r

Page 56: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

4.3 phase 3 45

Vehi

cle

Rob

otca

r(I

D0)

Hum

andr

iver

(ID

1)

Hig

hsp

eed

plat

form

(ID

3)

Pede

stri

an(I

D4)

Emis

sion

mat

rix

[ 0.2895

0.7105

0.2898

0.7102

][ 0

.8430

0.1570

0.0000

1.0000

][ 0

.2488

0.7512

0.2491

0.7509

][ 0

.8048

0.1952

0.2009

0.7991

]

Tran

siti

onm

atri

x

[ 0.6653

0.3347

0.0317

0.9683

][ 0

.9862

0.0138

0.2333

0.7667

][ 0

.5929

0.4071

0.0261

0.9739

][ 0

.9957

0.0043

0.1351

0.8649

]Pr{G

}0.0

865

0.9

441

0.0

602

0.9

691

Pr{B}

0.9

135

0.0

559

0.9

398

0.0

309

Vehi

cle

Com

bine

dra

wda

taC

ombi

ned

incl

udin

gof

fset

Com

bine

dsa

me

star

ting

poin

t

Emis

sion

mat

rix

[ 0.6916

0.3084

0.1350

0.8650

][ 0

.6129

0.3871

0.1541

0.8459

][ 0

.6882

0.3118

0.2565

0.7435

]

Tran

siti

onm

atri

x

[ 0.9992

0.0008

0.0000

1.0000

][ 0

.9993

0.0007

0.0000

1.0000

][ 0

.9992

0.0008

0.0001

0.9999

]Pr{G

}0

.0123

0.0

140

0.0

123

Pr{B}

0.9

877

0.9

860

0.9

877

Tabl

e1

0:B

aum

-Wel

chpa

ram

eter

lear

ning

Page 57: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates
Page 58: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

5C O N C L U S I O N A N D R E C O M M E N D AT I O N S

Initially the project consisted out of three major parts, (1) Analyze adata corpus and retrieve interesting information from it. (2) Constructa statistical model for the packet losses, with a deterministic modelfor retransmissions of lost packets from the data corpus. (3) With theuse of the probabilistic model predict on the feasibility of safe andreliable conduct of testing with two or more moving test objects in areal-time.

From the three major parts two have been fully completed. Unfortu-nately the real-time usage of the model has not been implementeddue to time restrictions. The data corpus was made available verylate in the project because of project management issues.

The data-corpus raised some interesting questions and assumptionswhere made after processing it. Unfortunately one data file is notenough to fully understand the situation and proof the assumptionthat where made with enough statistical evidence.

This thesis project found a couple of interesting facts which can be ofgreat interest for AstaZero and/or for the general public who wantsto execute a similar test.

• Time synchronization: One of the biggest problems found in thedata-set was due to timing issues. Neither the team at HalmstadUniversity nor the team at AstaZero who conducted the testsknew about this problem. The AstaZero team has already con-firmed that they will make clock synchronization as one of theirnumber one priorities for the future. Clock synchronization caneither be done by using a NTP server (Network Time Protocol)or by making sure each object uses the same GPS clock.

• Preliminary test: Before each test starts it is recommended foreach object to run a simple RTT (round trip time) script thatsimply pings the server for a certain amount of time (similar tothe earlier measurements). This preliminary test could be veryvaluable for a couple of reasons. First of all, it can instantlytell the operators if there is something wrong with the networkwhen most of the packets its transmission time is not betweencertain boundaries. Secondly, the results from the preliminarytest could be used during post processing stage where the logfiles can be used to find out what the clock offset is and if clockdrift accrue as well as how big the clock drift is.

47

Page 59: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates
Page 60: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

B I B L I O G R A P H Y

[1] "ETSI TR 102 638 -intelligent transport systems (ITS); vehicu-lar communications; basic set of applications; definitions", Tech.Rep. V1.1.1. June 2009.

[2] "Intelligent transportation systems: Vehicle-to-vehicle technolo-gies expected to offer safety benefits, but a variety of deploymentchallenges exist,â GAO-14-13, Tech. Rep. November 2013.

[3] Fredrik Tufvesson Andreas F. Molisch. "Propagation Chan-nel Models for Next-Generation Wireless Communications Sys-tems". IEICE TRANSACTIONS on Communications, E97-B(10):2022–2034, 2014. doi: https://search.ieice.org/bin/summary.php?id=e97-b_10_2022.

[4] Johan Karedal Fredrik Tufvesson Christoph F. Mecklenbrauker,Andreas F. Molisch. "A survey on vehicle-to-vehicle propa-gation channels". IEEE Wireless Communications, 2009. doi:10.1109/MWC.2009.5361174.

[5] Johan Karedal Fredrik Tufvesson Alexander Paier-LauraBernado Thomas Zemen Oliver Klemp Nicolai Czink ChristophF. Mecklenbrauker, Andreas F. Molisch. "Vehicular ChannelCharacterization and Its Implications for Wireless System De-sign and Performance". IEEE, 2011. doi: 10.1109/JPROC.2010.2101990.

[6] S. Parkvall E. Dahlman and J. Skold. LTE/LTE-Advanced for mobilebroadband. Academic-press, 2011.

[7] E. O. Elliott. Estimates of error rates for codes on burst-noisechannels. The Bell System Technical Journal, 42(5):1977–1997, Sept1963. ISSN 0005-8580. doi: 10.1002/j.1538-7305.1963.tb00955.x.

[8] E. O. Elliott. Estimates of error rates for codes on burst-noisechannels. The Bell System Technical Journal, 42(5):1977–1997, Sept1963. ISSN 0005-8580. doi: 10.1002/j.1538-7305.1963.tb00955.x.

[9] Massimo Condoluci Antonio Iera Antonella MolinaroGiuseppe Araniti, Claudia Campolo. "LTE for vehicularnetworking: a survey". IEEE Communications Society, 2013. doi:10.1109/MCOM.2013.6515060.

[10] Gennaro Boggia Francesco Capozzi Pietro CamardaGiuseppe Piro, Luigi Alfredo Grieco. "Simulating LTE Cel-lular Systems: An Open-Source Framework". IEEE Transactionson Vehicular Technology, 2011. doi: 10.1109/TVT.2010.2091660.

49

Page 61: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

50 bibliography

[11] L.P. Laberteaux H. Hartenstein. "A tutorial survey on vehicularad hoc networks". IEEE Communications Society, 2008. doi: http://ieeexplore.ieee.org.ezproxy.bib.hh.se/document/453948/.

[12] Alexander Paier Fredrik Tufvesson Andreas F. Molisch Jo-han Karedal, Nicolai Czink. "Path Loss Modeling for Vehicle-to-Vehicle Communications". IEEE Vehicular Technology So-ciety, 2010. doi: http://ieeexplore.ieee.org.ezproxy.bib.hh.se/document/5645701/.

[13] Fredrik Tufvesson Andreas F. Molisch Christoph F. Meck-lenbrauker Laura Bernado, Thomas Zemen. "Delay andDoppler Spreads of Nonstationary Vehicular Channels forSafety-Relevant Scenarios". IEEE Vehicular Technology Society,2013. doi: 10.1109/TVT.2013.2271956.

[14] Pertti Vainikainen Claude Oestges Olivier Renaudin, Veli-Matti Kolmonen. "Non-Stationary Narrowband MIMO Inter-Vehicle Channel Characterization in the 5-GHz Band". IEEE Ve-hicular Technology Society, 2010. doi: 10.1109/TVT.2010.2040851.

[15] A. Burr N. Czink M. Debbah V. Degli-Esposti H. Hofstetter P.Kyosti D. Laurenson G. Matz A. F. Molisch C. Oestges P. Almers,E. Bonek and H. Ozcelik. "Survey of Channel and RadioPropagation Models for Wireless MIMO Systems". EURASIPJournal on Wireless Communications and Networking, 2007. doi:10.1155/2007/19070.

[16] L. R. Rabiner. A tutorial on hidden markov models and selectedapplications in speech recognition. Proceedings of the IEEE, 77(2):257–286, Feb 1989. ISSN 0018-9219. doi: 10.1109/5.18626.

[17] Vinuth Rai John Kenney Sanjit Kaul, Marco Gruteser. "IEEE802.11p: Towards an International Standard for Wireless Accessin Vehicular Environments". IEEE, 2008. doi: http://ieeexplore.ieee.org.ezproxy.bib.hh.se/document/4526014/.

[18] Vinuth Rai John Kenney Sanjit Kaul, Marco Gruteser. "Minimiz-ing age of information in vehicular networks". IEEE Communi-cations, 2011. doi: http://ieeexplore.ieee.org.ezproxy.bib.hh.se/document/5984917/authors.

[19] M. Druzijanic T. Blajic, D. Nogulic. "Latency Improvements in 3GLong Term Evolution". IEEE Transactions on Vehicular Technology,2006.

Page 62: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

D E C L A R AT I O N

Halmstad, Sweden, June 2018

Wouter Dankers, September26, 2018

Page 63: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

52 bibliography

.

Page 64: f - DiVA portalhh.diva-portal.org/smash/get/diva2:1230512/FULLTEXT02.pdf · 2018-09-26 · ment), eNodeB (base station), and the EPC (Evolved Packet Core). The mobile node (UE) communicates

PO Box 823, SE-301 18 HalmstadPhone: +35 46 16 71 00E-mail: [email protected]

Wouter Dankers received his B.S.degree in Information andCommunication Technologies fromThomas More hogeschool Geel,Belgium and his M.Sc.Eng degree inEmbedded and Intelligent Systemsfrom Halmstad University, Sweden in2016 and 2018, respectively.